[devel] Restored the ability to include optional pngusr.h

This commit is contained in:
Glenn Randers-Pehrson
2010-04-17 18:03:02 -05:00
parent 8c065ddbe6
commit aecef098f9
3 changed files with 17 additions and 1 deletions

View File

@@ -25,6 +25,9 @@
#define PNGPRIV_H
#define PNGLIB_BUILD
#ifdef PNG_USER_CONFIG
# include "pngusr.h"
#endif
#include "png.h"
#include "pnginfo.h"
#include "pngstruct.h"
@@ -77,6 +80,18 @@
# define PNG_WARNINGS_SUPPORTED
#endif
/* If warnings or errors are turned off the code is disabled
* or redirected here.
*/
#ifndef PNG_WARNINGS_SUPPORTED
# define png_warning(s1,s2) ((void)0)
# define png_chunk_warning(s1,s2) ((void)0)
#endif
#ifndef PNG_ERROR_TEXT_SUPPORTED
# define png_error(s1,s2) png_err(s1)
# define png_chunk_error(s1,s2) png_err(s1)
#endif
/* Added at libpng version 1.4.0 */
#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
# define PNG_CHECK_cHRM_SUPPORTED