Move the compiler-dependency in the G_GNUC_INTERNAL definition from
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 May 2007 16:36:53 +0000 (16:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 17 May 2007 16:36:53 +0000 (16:36 +0000)
2007-05-17  Matthias Clasen  <mclasen@redhat.com>

        * 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

ChangeLog
configure.in
glib/gdebug.h
glib/gmessages.h
glib/gthreadprivate.h
glib/gunicodeprivate.h
gobject/ChangeLog
gobject/gtype.h

index 55660f6..c225143 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-05-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/gslice.h:
index 336f52d..8b1d9fb 100644 (file)
@@ -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
index 8e172b7..dea3dde 100644 (file)
@@ -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
 
index 0037af6..f279e87 100644 (file)
@@ -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,
index 9b41b77..c9b5fa5 100644 (file)
@@ -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
index 3cf2bb6..01aa5cb 100644 (file)
 
 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
 
index e8b1e90..66adff1 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-17  Matthias Clasen <mclasen@redhat.com>
+
+       * gtype.h: Move G_GNUC_INTERNAL before function
+       declarations to fix compilation with sun studio.  (#438873,
+       Damien Carbery)
+
 2007-05-03  Matthias Clasen <mclasen@redhat.com>
 
        * === Released 2.13.1 ===
index cbcc11d..1586888 100644 (file)
@@ -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 --- */