[devel] Revised and renamed the typedef in png.h and png.c that was designed

to catch library and header mismatch, also found at the end of pngtest.c.
This commit is contained in:
Glenn Randers-Pehrson
2010-10-16 20:38:45 -05:00
parent a60f8a9c1f
commit 88910f5b9d
6 changed files with 20 additions and 15 deletions

6
png.c
View File

@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_5_0beta53 Your_png_h_is_not_version_1_5_0beta53;
typedef png_libpng_version_1_5_0beta53 Your_png_h_is_not_version_1_5_0beta53;
/* Version information for C files. This had better match the version
* string defined in png.h.
@@ -560,13 +560,13 @@ png_get_copyright(png_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.0beta53 - October 16, 2010" PNG_STRING_NEWLINE \
"libpng version 1.5.0beta53 - October 17, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.5.0beta53 - October 16, 2010\
return "libpng version 1.5.0beta53 - October 17, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";