GNOME Bugzilla – Bug 160956
libgnomeui build fails with the AIX compiler
Last modified: 2006-01-16 12:40:17 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 ------------------------
Commited. It fixes a warning under Linux as well, thanks.
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