[ac_cv_fvisibility_hidden=no])
CFLAGS="$old_CFLAGS"
AS_IF([test "$ac_cv_fvisibility_hidden" = yes],
- [CFLAGS="-DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden $CFLAGS"])
+ [CFLAGS="-DGC_VISIBILITY_HIDDEN_SET -fvisibility=hidden $CFLAGS"],
+ [CFLAGS="-DGC_NO_VISIBILITY $CFLAGS"])
AC_MSG_RESULT($ac_cv_fvisibility_hidden)
fi
fi
# elif defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
|| defined(__CYGWIN__) || defined(__WATCOMC__)
# define CORD_API extern __declspec(dllexport)
-# elif defined(__GNUC__) && (__GNUC__ >= 4 \
- || defined(GC_VISIBILITY_HIDDEN_SET))
+# elif defined(__GNUC__) && !defined(GC_NO_VISIBILITY) \
+ && (__GNUC__ >= 4 || defined(GC_VISIBILITY_HIDDEN_SET))
/* Only matters if used in conjunction with -fvisibility=hidden option. */
# define CORD_API extern __attribute__((__visibility__("default")))
# endif
# elif defined(__GNUC__)
/* Only matters if used in conjunction with -fvisibility=hidden option. */
-# if defined(GC_BUILD) && (__GNUC__ >= 4 \
- || defined(GC_VISIBILITY_HIDDEN_SET))
+# if defined(GC_BUILD) && !defined(GC_NO_VISIBILITY) \
+ && (__GNUC__ >= 4 || defined(GC_VISIBILITY_HIDDEN_SET))
# define GC_API extern __attribute__((__visibility__("default")))
# endif
# endif
/* located in the "extra" folder). */
# if defined(GC_DLL) && defined(__GNUC__) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(CYGWIN32)
-# if __GNUC__ >= 4
+# if (__GNUC__ >= 4) && !defined(GC_NO_VISIBILITY)
/* See the corresponding GC_API definition. */
# define GC_INNER __attribute__((__visibility__("hidden")))
# else
#ifndef GC_API_OSCALL
/* This is used to identify GC routines called by name from OS. */
# if defined(__GNUC__)
-# if __GNUC__ >= 4
+# if (__GNUC__ >= 4) && !defined(GC_NO_VISIBILITY)
/* Same as GC_API if GC_DLL. */
# define GC_API_OSCALL extern __attribute__((__visibility__("default")))
# else