diff options
Diffstat (limited to 'src/3rdparty/libpng/pngconf.h')
-rw-r--r-- | src/3rdparty/libpng/pngconf.h | 93 |
1 files changed, 40 insertions, 53 deletions
diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h index d0b3454..2a41a29 100644 --- a/src/3rdparty/libpng/pngconf.h +++ b/src/3rdparty/libpng/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.5.1 - February 3, 2011 + * libpng version 1.5.4 - July 7, 2011 * * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -22,29 +22,31 @@ #ifndef PNGCONF_H #define PNGCONF_H +#ifndef PNG_BUILDING_SYMBOL_TABLE /* PNG_NO_LIMITS_H may be used to turn off the use of the standard C * definition file for machine specific limits, this may impact the * correctness of the definitons below (see uses of INT_MAX). */ -#ifndef PNG_NO_LIMITS_H -# include <limits.h> -#endif +# ifndef PNG_NO_LIMITS_H +# include <limits.h> +# endif /* For the memory copy APIs (i.e. the standard definitions of these), * because this file defines png_memcpy and so on the base APIs must * be defined here. */ -#if defined(BSD) && !defined(VXWORKS) -# include <strings.h> -#else -# include <string.h> -#endif +# if defined(BSD) && !defined(VXWORKS) +# include <strings.h> +# else +# include <string.h> +# endif /* For png_FILE_p - this provides the standard definition of a * FILE */ -#ifdef PNG_STDIO_SUPPORTED -# include <stdio.h> +# ifdef PNG_STDIO_SUPPORTED +# include <stdio.h> +# endif #endif /* This controls optimization of the reading of 16 and 32 bit values @@ -289,23 +291,15 @@ # endif #endif -/* THe following complexity is concerned with getting the 'attributes' of the - * declared function in the correct place. This potentially requires a separate - * PNG_EXPORT function for every compiler. +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) */ #ifndef PNG_FUNCTION -# ifdef __GNUC__ -# define PNG_FUNCTION(type, name, args, attributes)\ - attributes type name args -# else /* !GNUC */ -# ifdef _MSC_VER -# define PNG_FUNCTION(type, name, args, attributes)\ - attributes type name args -# else /* !MSC */ -# define PNG_FUNCTION(type, name, args, attributes)\ - type name args -# endif -# endif +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args #endif #ifndef PNG_EXPORT_TYPE @@ -317,13 +311,19 @@ * scripts directory. */ #ifndef PNG_EXPORTA + # define PNG_EXPORTA(ordinal, type, name, args, attributes)\ - extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\ - attributes) + PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \ + extern attributes) #endif +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + #define PNG_EXPORT(ordinal, type, name, args)\ - PNG_EXPORTA(ordinal, type, name, args, ) + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) /* Use PNG_REMOVED to comment out a removed interface. */ #ifndef PNG_REMOVED @@ -331,8 +331,7 @@ #endif #ifndef PNG_CALLBACK -# define PNG_CALLBACK(type, name, args, attributes)\ - type (PNGCBAPI name) PNGARG(args) attributes +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) #endif /* Support for compiler specific function attributes. These are used @@ -354,16 +353,13 @@ * functions in png.h will generate compiler warnings. Added at libpng * version 1.2.41. */ -# ifdef __GNUC__ +# if defined(__GNUC__) # ifndef PNG_USE_RESULT # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif # ifndef PNG_NORETURN # define PNG_NORETURN __attribute__((__noreturn__)) # endif -# ifndef PNG_PTR_NORETURN -# define PNG_PTR_NORETURN __attribute__((__noreturn__)) -# endif # ifndef PNG_ALLOCATED # define PNG_ALLOCATED __attribute__((__malloc__)) # endif @@ -376,9 +372,6 @@ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __attribute__((__deprecated__)) -# endif # ifndef PNG_PRIVATE # if 0 /* Doesn't work so we use deprecated instead*/ # define PNG_PRIVATE \ @@ -387,21 +380,21 @@ # define PNG_PRIVATE \ __attribute__((__deprecated__)) # endif -# endif /* PNG_PRIVATE */ +# endif # endif /* PNGLIB_BUILD */ # endif /* __GNUC__ */ -# ifdef _MSC_VER /* may need to check value */ + +# if defined(_MSC_VER) && (_MSC_VER >= 1300) # ifndef PNG_USE_RESULT -# define PNG_USE_RESULT /*not supported*/ +# define PNG_USE_RESULT /* not supported */ # endif # ifndef PNG_NORETURN # define PNG_NORETURN __declspec(noreturn) # endif -# ifndef PNG_PTR_NORETURN -# define PNG_PTR_NORETURN /*not supported*/ -# endif # ifndef PNG_ALLOCATED -# define PNG_ALLOCATED __declspec(restrict) +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif # endif /* This specifically protects structure members that should only be @@ -412,14 +405,11 @@ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __declspec(deprecated) # endif -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __declspec(deprecated) -# endif # ifndef PNG_PRIVATE # define PNG_PRIVATE __declspec(deprecated) -# endif /* PNG_PRIVATE */ +# endif # endif /* PNGLIB_BUILD */ -# endif /* __GNUC__ */ +# endif /* _MSC_VER */ #endif /* PNG_PEDANTIC_WARNINGS */ #ifndef PNG_DEPRECATED @@ -434,9 +424,6 @@ #ifndef PNG_ALLOCATED # define PNG_ALLOCATED /* The result of the function is new memory */ #endif -#ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ -#endif #ifndef PNG_PRIVATE # define PNG_PRIVATE /* This is a private libpng function */ #endif |