After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 564575 - GNOME Goal: Clean up GLib and GTK+ includes
GNOME Goal: Clean up GLib and GTK+ includes
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
git master
Other All
: Normal trivial
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-12-15 08:16 UTC by Tal Benavidor
Modified: 2008-12-18 19:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
modify deprecated glib,gtk+ includes. (39.13 KB, patch)
2008-12-15 08:17 UTC, Tal Benavidor
needs-work Details | Review
2nd try: modify deprecated glib,gdk includes. (2.01 KB, patch)
2008-12-15 19:57 UTC, Tal Benavidor
committed Details | Review

Description Tal Benavidor 2008-12-15 08:16:29 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
Comment 1 Tal Benavidor 2008-12-15 08:17:53 UTC
Created attachment 124709 [details] [review]
modify deprecated glib,gtk+ includes.
Comment 2 Morten Welinder 2008-12-15 14:24:30 UTC
I did gtk+ includes yesterday.  Hence patch will not apply.
Comment 3 Morten Welinder 2008-12-15 14:26:11 UTC
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.
Comment 4 Tal Benavidor 2008-12-15 19:57:54 UTC
Created attachment 124751 [details] [review]
2nd try: modify deprecated glib,gdk includes.
Comment 5 Morten Welinder 2008-12-15 21:25:13 UTC
#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?
Comment 6 Morten Welinder 2008-12-15 21:36:11 UTC
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>
Comment 7 Tal Benavidor 2008-12-16 11:23:46 UTC
(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.



Comment 8 Morten Welinder 2008-12-18 19:53:04 UTC
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.