From: Matthias Clasen Date: Thu, 17 May 2007 16:36:53 +0000 (+0000) Subject: Move the compiler-dependency in the G_GNUC_INTERNAL definition from X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=793da74d005f30c1db0d060d35a16c91da57f76c;p=dana%2Fcg-glib.git Move the compiler-dependency in the G_GNUC_INTERNAL definition from 2007-05-17 Matthias Clasen * configure.in: Move the compiler-dependency in the G_GNUC_INTERNAL definition from configure-time to runtime (of the compiler). (#438869, Damien Carbery) * glib/gdebug.h: * glib/gmessages.h: * glib/gunicodeprivate.h: * glib/gthreadprivate.h: Move G_GNUC_INTERNAL before function declarations to fix compilation with sun studio. (#438873, Damien Carbery) svn path=/trunk/; revision=5497 --- diff --git a/ChangeLog b/ChangeLog index 55660f6d..c2251436 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-05-17 Matthias Clasen + + * configure.in: Move the compiler-dependency in the G_GNUC_INTERNAL + definition from configure-time to runtime (of the compiler). + (#438869, Damien Carbery) + + * glib/gdebug.h: + * glib/gmessages.h: + * glib/gunicodeprivate.h: + * glib/gthreadprivate.h: Move G_GNUC_INTERNAL before function + declarations to fix compilation with sun studio. (#438873, + Damien Carbery) + 2007-05-14 Matthias Clasen * glib/gslice.h: diff --git a/configure.in b/configure.in index 336f52dd..8b1d9fbc 100644 --- a/configure.in +++ b/configure.in @@ -2508,26 +2508,18 @@ _______EOF fi - if test x$g_have_gnuc_visibility = xyes ; then cat >>$outfile <<_______EOF #if __GNUC__ == 2 && __GNUC_MINOR__ == 95 #define G_GNUC_INTERNAL -#else +#elif defined (__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) #define G_HAVE_GNUC_VISIBILITY 1 #define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) -#endif -_______EOF - else - if test x$g_have_sunstudio_visibility = xyes ; then - cat >>$outfile <<_______EOF +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) #define G_GNUC_INTERNAL __hidden -_______EOF - else - cat >>$outfile <<_______EOF +#else #define G_GNUC_INTERNAL +#endif _______EOF - fi - fi echo >>$outfile diff --git a/glib/gdebug.h b/glib/gdebug.h index 8e172b72..dea3dde7 100644 --- a/glib/gdebug.h +++ b/glib/gdebug.h @@ -52,7 +52,7 @@ typedef enum { GLIB_VAR gboolean _g_debug_initialized; GLIB_VAR guint _g_debug_flags; -void _g_debug_init (void) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_debug_init (void); G_END_DECLS diff --git a/glib/gmessages.h b/glib/gmessages.h index 0037af6c..f279e873 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -103,10 +103,10 @@ GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); /* internal */ -void _g_log_fallback_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer unused_data) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_log_fallback_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); /* Internal functions, used to implement the following macros */ void g_return_if_fail_warning (const char *log_domain, diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h index 9b41b770..c9b5fa50 100644 --- a/glib/gthreadprivate.h +++ b/glib/gthreadprivate.h @@ -47,20 +47,20 @@ G_BEGIN_DECLS void g_thread_init_glib (void); /* base initializers, may only use g_mutex_new(), g_cond_new() */ -void _g_mem_thread_init_noprivate_nomessage (void) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_mem_thread_init_noprivate_nomessage (void); /* initializers that may also use g_private_new() */ -void _g_slice_thread_init_nomessage (void) G_GNUC_INTERNAL; -void _g_messages_thread_init_nomessage (void) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_slice_thread_init_nomessage (void); +G_GNUC_INTERNAL void _g_messages_thread_init_nomessage (void); /* full fledged initializers */ -void _g_convert_thread_init (void) G_GNUC_INTERNAL; -void _g_rand_thread_init (void) G_GNUC_INTERNAL; -void _g_main_thread_init (void) G_GNUC_INTERNAL; -void _g_atomic_thread_init (void) G_GNUC_INTERNAL; -void _g_utils_thread_init (void) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_convert_thread_init (void); +G_GNUC_INTERNAL void _g_rand_thread_init (void); +G_GNUC_INTERNAL void _g_main_thread_init (void); +G_GNUC_INTERNAL void _g_atomic_thread_init (void); +G_GNUC_INTERNAL void _g_utils_thread_init (void); #ifdef G_OS_WIN32 -void _g_win32_thread_init (void) G_GNUC_INTERNAL; +G_GNUC_INTERNAL void _g_win32_thread_init (void); #endif /* G_OS_WIN32 */ G_END_DECLS diff --git a/glib/gunicodeprivate.h b/glib/gunicodeprivate.h index 3cf2bb6b..01aa5cba 100644 --- a/glib/gunicodeprivate.h +++ b/glib/gunicodeprivate.h @@ -25,10 +25,11 @@ G_BEGIN_DECLS -gunichar *_g_utf8_normalize_wc (const gchar *str, - gssize max_len, - GNormalizeMode mode) G_GNUC_INTERNAL; -gint _g_unichar_combining_class (gunichar uc) G_GNUC_INTERNAL; +G_GNUC_INTERNAL gunichar *_g_utf8_normalize_wc + (const gchar *str, + gssize max_len, + GNormalizeMode mode); +G_GNUC_INTERNAL gint _g_unichar_combining_class (gunichar uc); G_END_DECLS diff --git a/gobject/ChangeLog b/gobject/ChangeLog index e8b1e905..66adff1e 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,9 @@ +2007-05-17 Matthias Clasen + + * gtype.h: Move G_GNUC_INTERNAL before function + declarations to fix compilation with sun studio. (#438873, + Damien Carbery) + 2007-05-03 Matthias Clasen * === Released 2.13.1 === diff --git a/gobject/gtype.h b/gobject/gtype.h index cbcc11d1..1586888c 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -435,15 +435,15 @@ G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class); /* --- internal functions --- */ -void g_value_c_init (void) G_GNUC_INTERNAL; /* sync with gvalue.c */ -void g_value_types_init (void) G_GNUC_INTERNAL; /* sync with gvaluetypes.c */ -void g_enum_types_init (void) G_GNUC_INTERNAL; /* sync with genums.c */ -void g_param_type_init (void) G_GNUC_INTERNAL; /* sync with gparam.c */ -void g_boxed_type_init (void) G_GNUC_INTERNAL; /* sync with gboxed.c */ -void g_object_type_init (void) G_GNUC_INTERNAL; /* sync with gobject.c */ -void g_param_spec_types_init (void) G_GNUC_INTERNAL; /* sync with gparamspecs.c */ -void g_value_transforms_init (void) G_GNUC_INTERNAL; /* sync with gvaluetransform.c */ -void g_signal_init (void) G_GNUC_INTERNAL; /* sync with gsignal.c */ +G_GNUC_INTERNAL void g_value_c_init (void); /* sync with gvalue.c */ +G_GNUC_INTERNAL void g_value_types_init (void); /* sync with gvaluetypes.c */ +G_GNUC_INTERNAL void g_enum_types_init (void); /* sync with genums.c */ +G_GNUC_INTERNAL void g_param_type_init (void); /* sync with gparam.c */ +G_GNUC_INTERNAL void g_boxed_type_init (void); /* sync with gboxed.c */ +G_GNUC_INTERNAL void g_object_type_init (void); /* sync with gobject.c */ +G_GNUC_INTERNAL void g_param_spec_types_init (void); /* sync with gparamspecs.c */ +G_GNUC_INTERNAL void g_value_transforms_init (void); /* sync with gvaluetransform.c */ +G_GNUC_INTERNAL void g_signal_init (void); /* sync with gsignal.c */ /* --- implementation bits --- */