Tony wrote:
> On Wed, Oct 21, 2020 at 12:38 PM Bram Moolenaar <[email protected]> wrote: > > > > > > Patch 8.2.1875 > > Problem: Warning when building GTK gui. > > Solution: Add missing function parameter. > > Files: src/gui_gtk_f.c > > Fatal error in gui_gtk_f.c after applying patches 8.2.1874 to 1876 > (not yet 1877): > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread > -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 > -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 > -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 > -I/usr/include/gio-unix-2.0 -I/usr/include/libxkbcommon > -I/usr/include/wayland -I/usr/include/cairo -I/usr/include/pango-1.0 > -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 > -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 > -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 > -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid > -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 > -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 > -o objects/gui_gtk_f.o gui_gtk_f.c > In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0, > from /usr/include/glib-2.0/gobject/gbinding.h:29, > from /usr/include/glib-2.0/glib-object.h:23, > from /usr/include/glib-2.0/gio/gioenums.h:28, > from /usr/include/glib-2.0/gio/giotypes.h:28, > from /usr/include/glib-2.0/gio/gio.h:26, > from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28, > from /usr/include/gtk-3.0/gdk/gdk.h:32, > from /usr/include/gtk-3.0/gtk/gtk.h:30, > from beval.h:15, > from vim.h:1810, > from gui_gtk_f.c:28: > gui_gtk_f.c:215:24: error: conflicting types for ‘gtk_form_init’ > G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER) > ^ > /usr/include/glib-2.0/gobject/gtype.h:1979:17: note: in definition of > macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE’ > static void type_name##_init (TypeName *self); \ > ^~~~~~~~~ > /usr/include/glib-2.0/gobject/gtype.h:1761:60: note: in expansion of > macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’ > #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) > _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} > _G_DEFINE_TYPE_EXTENDED_END() > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/gobject/gtype.h:1602:43: note: in expansion of > macro ‘G_DEFINE_TYPE_EXTENDED’ > #define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, > t_n, T_P, 0, {}) > ^~~~~~~~~~~~~~~~~~~~~~ > gui_gtk_f.c:215:1: note: in expansion of macro ‘G_DEFINE_TYPE’ > G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER) > ^~~~~~~~~~~~~ > gui_gtk_f.c:54:13: note: previous declaration of ‘gtk_form_init’ was here > static void gtk_form_init(GtkForm *form, void *g_class); > ^~~~~~~~~~~~~ > gui_gtk_f.c:273:1: error: conflicting types for ‘gtk_form_init’ > gtk_form_init(GtkForm *form, void *g_class UNUSED) > ^~~~~~~~~~~~~ This must always have been a problem, we got away with it because the function signatures happened to be the same. It looks like prepending local functions with "gtk_" is asking for trouble, since most gtk library functions start with that. Seems safe to just remove the "gtk_" prefix for all of them. -- hundred-and-one symptoms of being an internet addict: 93. New mail alarm on your palmtop annoys other churchgoers. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202010211410.09LEAvfJ063928%40masaka.moolenaar.net.
