mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 04:05:11 +01:00
Remove G_GNUC_INTERNAL from here. Check whether the visibility attribute
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.
This commit is contained in:
parent
e02c68bef0
commit
3156c8e9cf
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
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.
|
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
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.
|
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
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.
|
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
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.
|
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
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.
|
* glib/gmacros.h (G_GNUC_INTERNAL): Define empty if gcc is too old.
|
||||||
|
31
configure.in
31
configure.in
@ -667,6 +667,23 @@ call_a(2,3);
|
|||||||
],g_have_gnuc_varargs=yes,g_have_gnuc_varargs=no)
|
],g_have_gnuc_varargs=yes,g_have_gnuc_varargs=no)
|
||||||
AC_MSG_RESULT($g_have_gnuc_varargs)
|
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
|
# check for bytesex stuff
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
@ -2206,6 +2223,18 @@ _______EOF
|
|||||||
|
|
||||||
fi
|
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
|
echo >>$outfile
|
||||||
if test x$g_mutex_has_default = xyes; then
|
if test x$g_mutex_has_default = xyes; then
|
||||||
cat >>$outfile <<_______EOF
|
cat >>$outfile <<_______EOF
|
||||||
@ -2522,6 +2551,8 @@ g_have_gnuc_varargs=$g_have_gnuc_varargs
|
|||||||
g_have_iso_c_varargs=$g_have_iso_c_varargs
|
g_have_iso_c_varargs=$g_have_iso_c_varargs
|
||||||
g_have_iso_cxx_varargs=$g_have_iso_cxx_varargs
|
g_have_iso_cxx_varargs=$g_have_iso_cxx_varargs
|
||||||
|
|
||||||
|
g_have_gnuc_visibility=$g_have_gnuc_visibility
|
||||||
|
|
||||||
case xyes in
|
case xyes in
|
||||||
x$ac_cv_c_bigendian)
|
x$ac_cv_c_bigendian)
|
||||||
g_byte_order=G_BIG_ENDIAN
|
g_byte_order=G_BIG_ENDIAN
|
||||||
|
@ -54,17 +54,6 @@
|
|||||||
#define G_GNUC_PURE
|
#define G_GNUC_PURE
|
||||||
#endif
|
#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)
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||||
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
||||||
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user