diff --git a/ANNOUNCE b/ANNOUNCE index f2a1d398d..562a3c0fd 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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. 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 or to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 19ddf6533..2da5a7a8b 100644 --- a/CHANGES +++ b/CHANGES @@ -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. 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 or to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngconf.h b/pngconf.h index 1d59eb834..546f01ed4 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1389,29 +1389,23 @@ typedef char FAR * FAR * FAR * png_charppp; # 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 - - /* 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__)) +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) # 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 /* PNG_PEDANTIC_WARNINGS */