[libpng16] Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To

preserve API compatibility, the new defines all default to "extern"
(requested by Jan Nijtmans).
This commit is contained in:
Glenn Randers-Pehrson 2015-07-03 16:07:54 -05:00
parent a390897ba4
commit b9e5e5f5a8
6 changed files with 34 additions and 12 deletions

View File

@ -1,4 +1,4 @@
Libpng 1.6.18beta09 - July 1, 2015
Libpng 1.6.18beta09 - July 3, 2015
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -95,9 +95,12 @@ Version 1.6.18beta08 [June 30, 2015]
be used.
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
Version 1.6.18beta09 [July 1, 2015]
Version 1.6.18beta09 [July 3, 2015]
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To
preserve API compatibility, the new defines all default to "extern"
(requested by Jan Nijtmans).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5280,9 +5280,12 @@ Version 1.6.18beta08 [June 30, 2015]
be used.
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
Version 1.6.18beta09 [July 1, 2015]
Version 1.6.18beta09 [July 3, 2015]
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To
preserve API compatibility, the new defines all default to "extern"
(requested by Jan Nijtmans).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -295,11 +295,11 @@
* table entries, so we discard it here. See the .dfn files in the
* scripts directory.
*/
#ifndef PNG_EXPORTA
# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \
extern attributes)
#ifndef PNG_EXPORTA
# define PNG_EXPORTA(ordinal, type, name, args, attributes) \
PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
PNG_LINKAGE_API attributes)
#endif
/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
@ -307,7 +307,7 @@
*/
#define PNG_EMPTY /*empty list*/
#define PNG_EXPORT(ordinal, type, name, args)\
#define PNG_EXPORT(ordinal, type, name, args) \
PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
/* Use PNG_REMOVED to comment out a removed interface. */

View File

@ -252,17 +252,18 @@
* always be used to declare an extern data or function object in this file.
*/
#ifndef PNG_INTERNAL_DATA
# define PNG_INTERNAL_DATA(type, name, array) extern type name array
# define PNG_INTERNAL_DATA(type, name, array) PNG_LINKAGE_DATA type name array
#endif
#ifndef PNG_INTERNAL_FUNCTION
# define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\
extern PNG_FUNCTION(type, name, args, PNG_EMPTY attributes)
PNG_LINKAGE_FUNCTION PNG_FUNCTION(type, name, args, PNG_EMPTY attributes)
#endif
#ifndef PNG_INTERNAL_CALLBACK
# define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\
extern PNG_FUNCTION(type, (PNGCBAPI name), args, PNG_EMPTY attributes)
PNG_LINKAGE_CALLBACK PNG_FUNCTION(type, (PNGCBAPI name), args,\
PNG_EMPTY attributes)
#endif
/* If floating or fixed point APIs are disabled they may still be compiled

View File

@ -249,6 +249,17 @@ setting Z_DEFAULT_STRATEGY default @Z_FILTERED
setting Z_DEFAULT_NOFILTER_STRATEGY default @Z_DEFAULT_STRATEGY
setting ZLIB_VERNUM default @ZLIB_VERNUM
# Linkage of:
#
# API: libpng API functions
# CALLBACK: internal non-file-local callbacks
# FUNCTION: internal non-file-local functions
# DATA: internal non-file-local (const) data
setting LINKAGE_API default extern
setting LINKAGE_CALLBACK default extern
setting LINKAGE_FUNCTION default extern
setting LINKAGE_DATA default extern
setting TEXT_Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
setting TEXT_Z_DEFAULT_STRATEGY default @Z_DEFAULT_STRATEGY

View File

@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng version 1.6.18beta09 - June 30, 2015 */
/* Libpng version 1.6.18beta09 - July 3, 2015 */
/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
@ -190,6 +190,10 @@
#define PNG_GAMMA_THRESHOLD_FIXED 5000
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
#define PNG_INFLATE_BUF_SIZE 1024
#define PNG_LINKAGE_API extern
#define PNG_LINKAGE_CALLBACK extern
#define PNG_LINKAGE_DATA extern
#define PNG_LINKAGE_FUNCTION extern
#define PNG_MAX_GAMMA_8 11
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5