[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

@@ -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