• Bug#266946: gpsk31: FTBFS with gcc-3.4: using typedef-name `GtkAttachOp

    From Andreas Jochens@1:229/2 to All on Thu Aug 19 23:20:12 2004
    From: [email protected]

    Package: gpsk31
    Severity: normal
    Tags: patch

    When building 'gpsk31' with gcc-3.4 I get the following error:

    c++ -DHAVE_CONFIG_H -I. -I. -I.. -DDATADIR=\"/usr/share/gpsk31\" -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g -O2 -c main_screen.C
    main_screen.C: In function `int setup_screen()':
    main_screen.C:210: error: using typedef-name `GtkAttachOptions' after `enum' main_screen.C:211: error: using typedef-name `GtkAttachOptions' after `enum' main_screen.C:227: error: using typedef-name `GtkAttachOptions' after `enum' main_screen.C:228: error: using typedef-name `GtkAttachOptions' after `enum' make[3]: *** [main_screen.o] Error 1
    make[3]: Leaving directory `/gpsk31-0.2.4a/src'

    With the attached patch 'gpsk31' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/gpsk31-0.2.4a/src/main_screen.C ./src/main_screen.C
    --- ../tmp-orig/gpsk31-0.2.4a/src/main_screen.C 2004-08-19 22:43:54.661599817 +0200
    +++ ./src/main_screen.C 2004-08-19 22:43:47.745651201 +0200
    @@ -207,8 +207,8 @@

    gtk_table_attach(
    GTK_TABLE(table), main_screen.spectrum_drawing,
    - 1, 2, 0, 1, (enum GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
    - (enum GtkAttachOptions) GTK_FILL, 0, 0);
    + 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
    + (GtkAttachOptions) GTK_FILL, 0, 0);

    gtk_widget_set_events( main_screen.spectrum_drawing,
    GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK ); @@ -224,8 +224,8 @@
    GTK_OBJECT(hrule) );
    /* GTK_WIDGET_CLASS(GTK_OBJECT(hrule)->klass)->motion_notify_event, */
    gtk_table_attach( GTK_TABLE(table), hrule, 1, 2, 1, 2,
    - (enum GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
    - (enum GtkAttachOptions) GTK_FILL, 0, 0 );
    + (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
    + (Gtk