G_GNUC_INTERNAL macro must be added at the be beginning of lines to compile with Sun Studio compiler under solaris
That sounds a little odd. Error messages? Patches to which declarations?
Created attachment 1959 This patch solve the problem with sunstudio cc
Humm sorry patch was not added the first time
Again, please post the error messages.
Here are the error logs cc -DHAVE_CONFIG_H -I. -I.. -I.. "-DDEFAULT_XDG_CACHE_HOME=\"~/.cache\"" "-DDEFAULT_XDG_DATA_HOME=\"~/.local/share\"" "-DDEFAULT_XDG_CONFIG_HOME=\"~/.config\"" -DDEFAULT_XDG_DATA_DIRS=\"/opt/csw/share:/usr/local/share:/usr/share\" -DDEFAULT_XDG_CONFIG_DIRS=\"/opt/csw/etc/xdg:/opt/csw/etc/xfce4:/etc/xdg\" -DDATADIR=\"/opt/csw/share\" -DSYSCONFDIR=\"/opt/csw/etc\" -DPACKAGE_LOCALE_DIR=\"/opt/csw/share/locale\" -DG_LOG_DOMAIN=\"libxfce4util\" -DKIOSKDIR=\"/opt/csw/etc/xdg/xfce4/kiosk\" -DKIOSKDEF=\"ALL\" -DLIBXFCE4UTIL_COMPILATION -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include -I/opt/csw/include -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include/xfce4 -I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -xO3 -xtarget=generic -xarch=generic -I/export/home/william/community/blastwave/build.5.11-i386/opt/csw/include -I/opt/csw/include -xlibmil -errtags=yes -erroff=E_EMPTY_DECLARATION -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -c libxfce4util-private.c -KPIC -DPIC -o .libs/libxfce4util_la-libxfce4util-private.o "../libxfce4util/libxfce4util-private.h", line 33: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN) "../libxfce4util/libxfce4util-private.h", line 33: warning: useless declaration (E_USELESS_DECLARATION) "../libxfce4util/libxfce4util-private.h", line 35: syntax error before or at: ; "libxfce4util-private.c", line 38: identifier redefined: _xfce_i18n_init current : function(void) returning void previous: function(void) returning void : "../libxfce4util/libxfce4util-private.h", line 33 cc: acomp failed for libxfce4util-private.c gmake[4]: *** [libxfce4util_la-libxfce4util-private.lo] Erreur 1
Line 33 where stands the error is the following : void _xfce_i18n_init (void) G_GNUC_INTERNAL; Macro G_GNUC_INTERNAL is expended to __hidden and has to be at the beginning of the line when compiling with SunStudio. Kind regards, W.
Does it work at the beginning of the line (not just compile, but function as intended) for gcc as well? Otherwise this is kinda a no-go...
Or maybe we should just drop G_GNUC_INTERNAL entirely; those symbols won't get exported anyway due to -export-symbols-regex excluding symbols that start with a '_'.
If some one already has a build environnement setup and some minutes, would it be possible to test my patch on linux for instance please ? Otherwise i can set ip up but i won't do it before the end of the long coming week end... Thanks in advance. King regards
Looks like before is OK for gcc as well: http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Macros.html#G-GNUC-INTERNAL:CAPS
So if you could accept my patch if would be cool for SunStudio users, bec
So if you could accept this proposal it would be cool for SunStudio users, because i submitted many fixes of this kind for Thunar and others like Terminal. Thanks in advance regards
Builds fine here.
Brian, the link you provided states that "for portability, the attribute should be placed before the function declaration. While GCC allows the macro after the declaration, Sun Studio does not." So it looks like a no brainer to me and I am ready to commit that patch in both trunk and 4.4 branch if noone disagrees.
Yes, that's what I said ^_^. Go for it.
Applied, both branches. Thanks for the patch :)