diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-10-13 21:28:24 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-10-13 21:28:24 +0000 |
commit | 5609786006ef6fde060aeceeb5e703e68292c526 (patch) | |
tree | bae302a50cb46f756e69356301667d42978c4996 | |
parent | 352e7ecd9981e8156b23602a69054063fca6cfb3 (diff) | |
download | nspr-hg-5609786006ef6fde060aeceeb5e703e68292c526.tar.gz |
Bugzilla bug 307168: 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. r=bryner. (See also
Bugzilla bug 307168 comment 29.)
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r-- | pr/include/prtypes.h | 4 |
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 |