From: Mark Adler Date: Sat, 18 Feb 2012 23:19:44 +0000 (-0800) Subject: Require gcc 4.0 or later on Mac OS X to use the hidden attribute. X-Git-Tag: v1.2.7~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75d6ea070cedd3afa9865e63127c7ee8946d605;p=thirdparty%2Fzlib-ng.git Require gcc 4.0 or later on Mac OS X to use the hidden attribute. --- diff --git a/gzguts.h b/gzguts.h index f16295064..6800fa765 100644 --- a/gzguts.h +++ b/gzguts.h @@ -12,7 +12,8 @@ # endif #endif -#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +#define GCC_VER ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) +#if (GCC_VER >= 303 && !defined(__APPLE__)) || GCC_VER >= 400 # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) #else # define ZLIB_INTERNAL diff --git a/zutil.h b/zutil.h index de42dfb68..f42214791 100644 --- a/zutil.h +++ b/zutil.h @@ -13,7 +13,8 @@ #ifndef ZUTIL_H #define ZUTIL_H -#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +#define GCC_VER ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) +#if (GCC_VER >= 303 && !defined(__APPLE__)) || GCC_VER >= 400 # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) #else # define ZLIB_INTERNAL