2009-03-20 18:57:29 +01:00
|
|
|
Only export symbols that should be exported.
|
|
|
|
|
|
|
|
Patch by Mike Frysinger
|
|
|
|
|
|
|
|
http://bugs.gentoo.org/32764
|
|
|
|
http://bugs.gentoo.org/149929
|
|
|
|
|
2009-11-27 00:54:06 +01:00
|
|
|
Index: configure
|
|
|
|
===================================================================
|
|
|
|
--- configure.orig 2009-11-24 17:22:26.143484000 +0100
|
|
|
|
+++ configure 2009-11-24 17:22:26.578476000 +0100
|
|
|
|
@@ -204,6 +204,20 @@ else
|
2009-03-20 18:57:29 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
cat > $test.c <<EOF
|
|
|
|
+int foo __attribute__ ((visibility ("hidden")));
|
|
|
|
+int main()
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+EOF
|
|
|
|
+if ($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>/dev/null; then
|
|
|
|
+ CFLAGS="$CFLAGS -DHAS_attribute_visibility -fvisibility=hidden"
|
|
|
|
+ echo "Checking for attribute(visibility) support... Yes."
|
|
|
|
+else
|
|
|
|
+ echo "Checking for attribute(visibility) support... No."
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+cat > $test.c <<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include "zconf.h"
|
2009-11-27 00:54:06 +01:00
|
|
|
Index: zconf.in.h
|
|
|
|
===================================================================
|
|
|
|
--- zconf.in.h.orig 2005-05-28 08:40:35.000000000 +0200
|
|
|
|
+++ zconf.in.h 2009-11-24 17:22:26.582476000 +0100
|
2009-03-20 18:57:29 +01:00
|
|
|
@@ -244,7 +244,11 @@
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ZEXTERN
|
|
|
|
-# define ZEXTERN extern
|
|
|
|
+# if defined(ZLIB_INTERNAL) && defined(HAS_attribute_visibility)
|
|
|
|
+# define ZEXTERN extern __attribute__ ((visibility("default")))
|
|
|
|
+# else
|
|
|
|
+# define ZEXTERN extern
|
|
|
|
+# endif
|
|
|
|
#endif
|
|
|
|
#ifndef ZEXPORT
|
|
|
|
# define ZEXPORT
|