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 160956 - libgnomeui build fails with the AIX compiler
libgnomeui build fails with the AIX compiler
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: general
CVS HEAD
Other AIX
: Normal normal
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-10 16:21 UTC by Vincent Berger
Modified: 2006-01-16 12:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Vincent Berger 2004-12-10 16:21:34 UTC
Hello, I'm compiling libgnomeui under AIX with AIX own C compiler (xlc version 6.0).
It looks like this compiler is a bit picky about the ANSI C norm.
When compiling libgnomeui/libgnomeui/gnome-app-helper.c, it complains with the
fact that the "_" macro is already defined (in "/usr/include/bonobo/bonobo-i18n.h")

In the C norm, you cannot redefine a macro which is already defined. I know it
may seem a bit annoying but I guess it's to help in preventing overriding
previous macro definitions without noticing.

I propose the following patch (which simple undef the previous macro definition
in case it's already defined before redefining it).

Thank you for fixing this in CVS if multi-plateform is an issue for libgnomeui.

Cheers,

Vincent.

-------------------------- Proposed PATCH ---------------------------
--- libgnomeui/libgnomeui/gnome-app-helper.c.old        2004-12-10
17:18:32.000000000 +0100
+++ libgnomeui/libgnomeui/gnome-app-helper.c    2004-11-08 19:21:58.000000000 +0100
@@ -2550,6 +2550,10 @@
 }

 /* Welcome to Hack City, population: gnome-app-helper */
+/* Hack into the hack for AIX pre-compiler : does not like to define twice */
+#ifdef _
+#undef _
+#endif
 #define _(x) dgettext (GETTEXT_PACKAGE, x)

 static void
@@ -2683,6 +2687,10 @@
 }

 /* Now leaving Hack City */
+/* Still needed for AIX */
+#ifdef _
+#undef _
+#endif
 #define _(x) gettext (x)

 static int
------------------------------- End of Patch ------------------------
Comment 1 Kjartan Maraas 2005-08-30 11:48:10 UTC
Commited. It fixes a warning under Linux as well, thanks.
Comment 2 Jean-Pierre Dion 2006-01-16 12:40:17 UTC
Vincent is not in the project anymore.
Please make me "opener" of the defect in case someone reopens it :

jean-pierre.dion@bull.net

Thanks.

jean-pierre