summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-01-05 21:31:25 +0000
committerwtchang%redhat.com <devnull@localhost>2006-01-05 21:31:25 +0000
commitb34a8081eb7c1cf31f46bc919a1fee9e201e0251 (patch)
tree4a2a363ef75cbb9e2c4774da9eab03c2e11df276
parent705de78c03677723e46571d73f8f523bcdc3158c (diff)
downloadnspr-hg-b34a8081eb7c1cf31f46bc919a1fee9e201e0251.tar.gz
Determine if the visibility(default) attribute can be used by using only
the GCC version so that this public header does not depend on any macro the user needs to define. See Bugzilla bug 312361 and bug 307168 comment 29. r=bryner. a=dveditz for mozilla1.8.1. Tag: MOZILLA_1_8_BRANCH
-rw-r--r--pr/include/prtypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index 3eb15548..1ed9f995 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -178,7 +178,9 @@
#else /* Unix */
-#ifdef HAVE_VISIBILITY_PRAGMA
+/* GCC 3.3 and later support the visibility attribute. */
+#if (__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default")))
#else
#define PR_VISIBILITY_DEFAULT