aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2012-04-14 15:06:57 +0200
committerYang Tse <yangsita@gmail.com>2012-04-14 15:06:57 +0200
commit8b63b48627961c0bf880eb4d57cf24d6a828dcd2 (patch)
treeddc6989b9d2a6081bc115c2095bd3c2aba729e16 /m4
parentb9ac64c2cb7965eae3dfa9fd1bf9a2bf04b1e2a5 (diff)
headers: surround GCC attribute names with double underscores
This protects from attribute names being defined by third party's code. Improvement: http://curl.haxx.se/mail/lib-2012-04/0127.html
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-compilers.m48
1 files changed, 4 insertions, 4 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 9b212e462..fffe85f20 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 59
+# serial 60
dnl CURL_CHECK_COMPILER
@@ -1393,7 +1393,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
case "$compiler_id" in
CLANG)
dnl All versions of clang support -fvisibility=
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
;;
@@ -1401,7 +1401,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
dnl Only gcc 3.4 or later
if test "$compiler_num" -ge "304"; then
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
fi
@@ -1420,7 +1420,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
printf("icc fvisibility bug test");
]])
],[
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
])