+2004-08-10 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gmacros.h: Remove G_GNUC_INTERNAL from here.
+ * configure.in: Check whether the visibility attribute
+ works and define G_HAVE_GNUC_VISIBILITY and
+ G_GNUC_INTERNAL in glibconfig.h correspondingly.
+
Mon Aug 9 17:37:56 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
+2004-08-10 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gmacros.h: Remove G_GNUC_INTERNAL from here.
+ * configure.in: Check whether the visibility attribute
+ works and define G_HAVE_GNUC_VISIBILITY and
+ G_GNUC_INTERNAL in glibconfig.h correspondingly.
+
Mon Aug 9 17:37:56 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
+2004-08-10 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gmacros.h: Remove G_GNUC_INTERNAL from here.
+ * configure.in: Check whether the visibility attribute
+ works and define G_HAVE_GNUC_VISIBILITY and
+ G_GNUC_INTERNAL in glibconfig.h correspondingly.
+
Mon Aug 9 17:37:56 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
+2004-08-10 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gmacros.h: Remove G_GNUC_INTERNAL from here.
+ * configure.in: Check whether the visibility attribute
+ works and define G_HAVE_GNUC_VISIBILITY and
+ G_GNUC_INTERNAL in glibconfig.h correspondingly.
+
Mon Aug 9 17:37:56 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
+2004-08-10 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gmacros.h: Remove G_GNUC_INTERNAL from here.
+ * configure.in: Check whether the visibility attribute
+ works and define G_HAVE_GNUC_VISIBILITY and
+ G_GNUC_INTERNAL in glibconfig.h correspondingly.
+
Mon Aug 9 17:37:56 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
],g_have_gnuc_varargs=yes,g_have_gnuc_varargs=no)
AC_MSG_RESULT($g_have_gnuc_varargs)
+# check for GNUC visibility support
+AC_MSG_CHECKING(for GNUC visibility attribute)
+GLIB_CHECK_COMPILE_WARNINGS([
+void
+__attribute__ ((visibility ("hidden")))
+ f (void)
+{
+}
+
+int main (int argc, char **argv)
+{
+ f();
+ return 0;
+}
+],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
+AC_MSG_RESULT($g_have_gnuc_visibility)
+
# check for bytesex stuff
AC_C_BIGENDIAN
fi
+ if test x$g_have_gnuc_visibility = xyes ; then
+ cat >>$outfile <<_______EOF
+#define G_HAVE_GNUC_VISIBILITY 1
+#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+_______EOF
+ else
+ cat >>$outfile <<_______EOF
+#define G_GNUC_INTERNAL
+_______EOF
+ fi
+
+
echo >>$outfile
if test x$g_mutex_has_default = xyes; then
cat >>$outfile <<_______EOF
g_have_iso_c_varargs=$g_have_iso_c_varargs
g_have_iso_cxx_varargs=$g_have_iso_cxx_varargs
+g_have_gnuc_visibility=$g_have_gnuc_visibility
+
case xyes in
x$ac_cv_c_bigendian)
g_byte_order=G_BIG_ENDIAN
#define G_GNUC_PURE
#endif
-/*
- * Provide G_GNUC_INTERNAL that is used for marking library
- * functions as being used internally to the lib only, to not
- * create inefficient PLT entries.
- */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
-#else
-#define G_GNUC_INTERNAL
-#endif
-
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
__attribute__((__format__ (__printf__, format_idx, arg_idx)))