GNOME Bugzilla – Bug 564575
GNOME Goal: Clean up GLib and GTK+ includes
Last modified: 2008-12-18 19:53:04 UTC
http://live.gnome.org/GnomeGoals/CleanupGTKIncludes Gnumeric does compile with the following symbols defined: G_DISABLE_SINGLE_INCLUDES GDK_PIXBUF_DISABLE_SINGLE_INCLUDES GTK_DISABLE_SINGLE_INCLUDES
Created attachment 124709 [details] [review] modify deprecated glib,gtk+ includes.
I did gtk+ includes yesterday. Hence patch will not apply.
Note: I actually did better than just fixing the includes: I installed a test program so if anyone introduces such includes again, it will be caught before release.
Created attachment 124751 [details] [review] 2nd try: modify deprecated glib,gdk includes.
#include <gdk/gdkkeysyms.h> #include <glib/gstdio.h> You left at least the above alone. Are these going to be allowed going forward? How do you generate this patch?
Not to mention glib/gi18n-lib.h: ~/gnome-src/gnumeric> find . -type f -name '*.[chy]' -print | xargs -n100 grep -h glib/ | sort | uniq -c 1 #include <glib/gfileutils.h> 8 #include <glib/gi18n.h> 188 #include <glib/gi18n-lib.h> 1 #include <glib/gprintf.h> 9 #include <glib/gstdio.h>
(In reply to comment #5) > #include <gdk/gdkkeysyms.h> > #include <glib/gstdio.h> > > You left at least the above alone. Are these going to be allowed going > forward? How do you generate this patch? > How I generated the patch: 1. make CFLAGS+="-DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES" 2. fix the code untill it compiles. 3. svn diff Some files are still allowed, most are not. Those that are not, contains at the start: #if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) #error "Only <glib.h> can be included directly." #endif Those h-files that are allowed, do not contains these lines. glib/gfileutils.h - contains these lines. (but i couldn't find a c/h that includes it, just old .Plo) gdk/gdkkeysyms.h, glib/gstdio.h, glib/gprintf.h, glib/gstdio.h, glib/gi18n.h, glib/gi18n-lib.h - do not.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.