aboutsummaryrefslogtreecommitdiffstats
path: root/pngconf.h
diff options
context:
space:
mode:
authorJim Huang <jserv@0xlab.org>2010-08-08 15:11:37 +0800
committerJim Huang <jserv@0xlab.org>2010-08-08 15:11:37 +0800
commit1cb15eb3049b918c8c1363e874f2efb491cbb534 (patch)
tree27bae8d6e6f777b68b407e21379adbb077a10d84 /pngconf.h
parent5f6bd84e375226bf228fc8ac90318957ec9e1e7f (diff)
downloadexternal_libpng-1cb15eb3049b918c8c1363e874f2efb491cbb534.zip
external_libpng-1cb15eb3049b918c8c1363e874f2efb491cbb534.tar.gz
external_libpng-1cb15eb3049b918c8c1363e874f2efb491cbb534.tar.bz2
libpng: use GCC visibility to reduce shared library size
The change introduced the implementation for macro PNG_IMPEXP by using GCC visibility in defaulting of "hidden" attribute. Experiment on HTC Passion: target file; out/target/product/passion/system/lib/libskia.so (libpng was statically linked to libskia.so) before: 1117888 bytes after: 1113780 bytes Code size reduction = 4108 bytes Change-Id: I9b718a6a5710268dbb945feea3b64ca3fa393b94
Diffstat (limited to 'pngconf.h')
-rw-r--r--pngconf.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pngconf.h b/pngconf.h
index defc16d..5760ba3 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1505,7 +1505,11 @@ typedef z_stream FAR * png_zstreamp;
# define PNGAPI
#endif
#ifndef PNG_IMPEXP
-# define PNG_IMPEXP
+# if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
+# define PNG_IMPEXP __attribute__((visibility ("default")))
+# else
+# define PNG_IMPEXP
+# endif
#endif
#ifdef PNG_BUILDSYMS