[libpng16] Added symbol prefixing that allows all the libpng external symbols

to be prefixed (suggested by Reuben Hawkins).  This is work in progress that
breaks some non-configure builds.
This commit is contained in:
John Bowler
2012-01-31 07:28:13 -06:00
committed by Glenn Randers-Pehrson
parent 572b078d8c
commit 42369ccd85
10 changed files with 126 additions and 15 deletions

18
scripts/intprefix.dfn Normal file
View File

@@ -0,0 +1,18 @@
/* intprefix.dfn - generate an unprefixed internal symbol list
*
* Last changed in libpng version 1.6.0 [January 30, 2012]
* Copyright (c) 2012 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
#define PNG_INTERNAL_DATA(type, name, array)\
PNG_DEFN_MAGIC-name-PNG_DEFN_END
#define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\
PNG_DEFN_MAGIC-name-PNG_DEFN_END
#include "../pngpriv.h"

3
scripts/macro.lst Normal file
View File

@@ -0,0 +1,3 @@
get_uint_32(buf)
get_uint_16(buf)
get_int_32(buf)

View File

@@ -161,6 +161,12 @@ setting USER_VERSIONINFO_LEGALTRADEMARKS
setting API_RULE default 0
# This allows a prefix to be added to the front of every API functon name (and
# therefore every symbol) by redefining all the function names with the prefix
# in a new file "pngprefix.h"; this file must be installed in png.h if this
# facility is used.
setting PREFIX
# Default to using the read macros
setting DEFAULT_READ_MACROS default 1

20
scripts/prefix.dfn Normal file
View File

@@ -0,0 +1,20 @@
/* prefix.dfn - generate an unprefixed symbol list
*
* Last changed in libpng version 1.6.0 [January 30, 2012]
* Copyright (c) 2012 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC-name-PNG_DEFN_END
/* The configuration information *before* the additional of symbol renames,
* the list is the C name list; no symbol prefix.
*/
#include "pnglibconf.out"
#include "../png.h"