Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch

Issue 6776028: Upgrade libxml2 and its portage dependencies (Closed) Base URL: ssh://gitrw.chromium.org:9222/portage-stable.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW
« no previous file with comments | « sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch ('k') | sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698