[libpng16] Do not use __restrict when GNUC is <= 3.1

This commit is contained in:
Glenn Randers-Pehrson 2012-07-21 11:16:17 -05:00
parent 05ed18e7d1
commit 0a9f26e219
3 changed files with 28 additions and 21 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.0beta27 - July 14, 2012
Libpng 1.6.0beta27 - July 21, 2012
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.
@ -399,7 +399,8 @@ Version 1.6.0beta26 [July 10, 2012]
Moved scripts/chkfmt to contrib/tools.
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
Version 1.6.0beta27 [July 14, 2012]
Version 1.6.0beta27 [July 21, 2012]
Do not use __restrict when GNUC is <= 3.1
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4150,7 +4150,9 @@ Version 1.6.0beta26 [July 10, 2012]
Moved scripts/chkfmt to contrib/tools.
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
Version 1.6.0beta27 [July 14, 2012]
Version 1.6.0beta27 [July 21, 2012]
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
Do not use __restrict when GNUC is <= 3.1
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.0beta27 - July 14, 2012
* libpng version 1.6.0beta27 - July 21, 2012
*
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -366,24 +366,28 @@
# ifndef PNG_NORETURN
# define PNG_NORETURN __attribute__((__noreturn__))
# endif
# ifndef PNG_ALLOCATED
# define PNG_ALLOCATED __attribute__((__malloc__))
# endif
# ifndef PNG_DEPRECATED
# define PNG_DEPRECATED __attribute__((__deprecated__))
# endif
# ifndef PNG_PRIVATE
# if 0 /* Doesn't work so we use deprecated instead*/
# define PNG_PRIVATE \
__attribute__((warning("This function is not exported by libpng.")))
# else
# define PNG_PRIVATE \
__attribute__((__deprecated__))
# if __GNUC__ >= 3
# ifndef PNG_ALLOCATED
# define PNG_ALLOCATED __attribute__((__malloc__))
# endif
# endif
# ifndef PNG_RESTRICT
# define PNG_RESTRICT __restrict
# endif
# ifndef PNG_DEPRECATED
# define PNG_DEPRECATED __attribute__((__deprecated__))
# endif
# ifndef PNG_PRIVATE
# if 0 /* Doesn't work so we use deprecated instead*/
# define PNG_PRIVATE \
__attribute__((warning("This function is not exported by libpng.")))
# else
# define PNG_PRIVATE \
__attribute__((__deprecated__))
# endif
# endif
# if ((__GNUC__ != 3) || (__GNUC_MINOR__ >= 1))
# ifndef PNG_RESTRICT
# define PNG_RESTRICT __restrict
# endif
# endif /* __GNUC__ == 3.0 */
# endif /* __GNUC__ >= 3 */
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
# ifndef PNG_USE_RESULT