OLD | NEW |
(Empty) | |
| 1 Only export symbols that should be exported. |
| 2 |
| 3 Patch by Mike Frysinger |
| 4 |
| 5 http://bugs.gentoo.org/32764 |
| 6 http://bugs.gentoo.org/149929 |
| 7 |
| 8 --- zlib-1.2.3/configure |
| 9 +++ zlib-1.2.3/configure |
| 10 @@ -209,6 +209,20 @@ |
| 11 fi |
| 12 |
| 13 cat > $test.c <<EOF |
| 14 +int foo __attribute__ ((visibility ("hidden"))); |
| 15 +int main() |
| 16 +{ |
| 17 + return 0; |
| 18 +} |
| 19 +EOF |
| 20 +if ($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>/dev/null; then |
| 21 + CFLAGS="$CFLAGS -DHAS_attribute_visibility -fvisibility=hidden" |
| 22 + echo "Checking for attribute(visibility) support... Yes." |
| 23 +else |
| 24 + echo "Checking for attribute(visibility) support... No." |
| 25 +fi |
| 26 + |
| 27 +cat > $test.c <<EOF |
| 28 #include <stdio.h> |
| 29 #include <stdarg.h> |
| 30 #include "zconf.h" |
| 31 --- zlib-1.2.3/zconf.in.h |
| 32 +++ zlib-1.2.3/zconf.in.h |
| 33 @@ -244,7 +244,11 @@ |
| 34 #endif |
| 35 |
| 36 #ifndef ZEXTERN |
| 37 -# define ZEXTERN extern |
| 38 +# if defined(ZLIB_INTERNAL) && defined(HAS_attribute_visibility) |
| 39 +# define ZEXTERN extern __attribute__ ((visibility("default"))) |
| 40 +# else |
| 41 +# define ZEXTERN extern |
| 42 +# endif |
| 43 #endif |
| 44 #ifndef ZEXPORT |
| 45 # define ZEXPORT |
OLD | NEW |