[libpng14] Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE

when __GNUC__ < 3.
This commit is contained in:
Glenn Randers-Pehrson 2012-07-14 17:03:26 -05:00
parent bfb0dba124
commit 3508343ecd
3 changed files with 18 additions and 22 deletions

View File

@ -33,6 +33,7 @@ version 1.4.12 [July 10, 2012]
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
version 1.4.13beta01 [July 14, 2012] version 1.4.13beta01 [July 14, 2012]
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
Send comments/corrections/commendations to glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2875,6 +2875,7 @@ version 1.4.12 [July 10, 2012]
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
version 1.4.13beta01 [July 14, 2012] version 1.4.13beta01 [July 14, 2012]
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
Send comments/corrections/commendations to glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -1389,29 +1389,23 @@ typedef char FAR * FAR * FAR * png_charppp;
# ifndef PNG_NORETURN # ifndef PNG_NORETURN
# define PNG_NORETURN __attribute__((__noreturn__)) # define PNG_NORETURN __attribute__((__noreturn__))
# endif # endif
# ifndef PNG_ALLOCATED # if __GNUC__ >= 3
# define PNG_ALLOCATED __attribute__((__malloc__)) # ifndef PNG_ALLOCATED
# endif # define PNG_ALLOCATED __attribute__((__malloc__))
# ifndef PNG_DEPRECATED
# define PNG_DEPRECATED __attribute__((__deprecated__))
# endif
/* This specifically protects structure members that should only be
* accessed from within the library, therefore should be empty during
* a library build.
*/
# 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 \
__attribute__((warning("This function is not exported by libpng.")))
# else
# define PNG_PRIVATE \
__attribute__((__deprecated__))
# endif # endif
# endif /* PNG_PRIVATE */ # 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
# endif /* __GNUC__ >= 3 */
# endif /* __GNUC__ */ # endif /* __GNUC__ */
#endif /* PNG_PEDANTIC_WARNINGS */ #endif /* PNG_PEDANTIC_WARNINGS */