From 4c8f7269ff1b90bead3619458cf493af76092933 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 16 Mar 2010 19:30:01 -0500 Subject: [PATCH] [devel] Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN --- ANNOUNCE | 5 +++-- CHANGES | 4 +++- Makefile.am | 9 +++++---- Makefile.in | 9 +++++---- png.c | 10 ++++------ png.h | 16 ++++++---------- pngpriv.h | 7 +------ 7 files changed, 27 insertions(+), 33 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index f377dc3b1..51065b426 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.0beta15 - March 16, 2010 +Libpng 1.5.0beta15 - March 17, 2010 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. @@ -124,11 +124,12 @@ version 1.5.0beta14 [March 14, 2010] platforms on which it happened (all but Mac OS and RISC OS). Moved the Mac OS test into pngpriv.h (the only place it is used.) -version 1.5.0beta14 [March 16, 2010] +version 1.5.0beta14 [March 17, 2010] Added symbols.chk target to Makefile.am to validate the symbols in png.h against the new DEF file scripts/symbols.def. Changed the default DEF file back to pngwin.def. Removed makefile.mingw. + Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index a73e1ef2a..a6d2d5d93 100644 --- a/CHANGES +++ b/CHANGES @@ -2601,11 +2601,13 @@ version 1.5.0beta14 [March 14, 2010] platforms on which it happened (all but Mac OS and RISC OS). Moved the Mac OS test into pngpriv.h (the only place it is used.) -version 1.5.0beta14 [March 16, 2010] +version 1.5.0beta14 [March 17, 2010] Added symbols.chk target to Makefile.am to validate the symbols in png.h against the new DEF file scripts/symbols.def. Changed the default DEF file back to pngwin.def. Removed makefile.mingw. + Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/Makefile.am b/Makefile.am index dfc85b2e0..dcfde36ec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,17 +94,18 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\ -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' libpng.sym libpng.vers libpng.def checksym.lst: - $(RM) $@ dfn.c dfn?.out + rm -f $@ dfn.c dfn?.out echo '#include "$<"' >dfn.c $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c >dfn1.out $(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p' dfn1.out >dfn2.out $(SED) -e 's| *@@@ *||' -e 's| *$$||' dfn2.out >dfn3.out - $(RM) dfn.c dfn[12].out + rm -f dfn.c dfn[12].out mv dfn3.out $@ symbols.chk: scripts/checksym.awk scripts/symbols.def checksym.lst - $(RM) $@ symbols.new - $(AWK) -f $^ >&2 + rm -f $@ symbols.new + $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/symbols.def\ + checksym.lst >&2 mv symbols.new $@ dist: symbols.chk diff --git a/Makefile.in b/Makefile.in index 632b6f215..98d444c8f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1219,17 +1219,18 @@ libpng.def: scripts/def.dfn png.h pngconf.h checksym.lst: scripts/checksym.dfn png.h pngconf.h libpng.sym libpng.vers libpng.def checksym.lst: - $(RM) $@ dfn.c dfn?.out + rm -f $@ dfn.c dfn?.out echo '#include "$<"' >dfn.c $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c >dfn1.out $(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p' dfn1.out >dfn2.out $(SED) -e 's| *@@@ *||' -e 's| *$$||' dfn2.out >dfn3.out - $(RM) dfn.c dfn[12].out + rm -f dfn.c dfn[12].out mv dfn3.out $@ symbols.chk: scripts/checksym.awk scripts/symbols.def checksym.lst - $(RM) $@ symbols.new - $(AWK) -f $^ >&2 + rm -f $@ symbols.new + $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/symbols.def\ + checksym.lst >&2 mv symbols.new $@ dist: symbols.chk diff --git a/png.c b/png.c index c8fba7747..189a69ac4 100644 --- a/png.c +++ b/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.5.0 [March 14, 2010] + * Last changed in libpng 1.5.0 [March 17, 2010] * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -11,7 +11,6 @@ * and license in png.h */ -#define PNG_NO_EXTERN #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ @@ -549,13 +548,13 @@ png_get_copyright(png_structp png_ptr) #else # ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.5.0beta15 - March 14, 2010" PNG_STRING_NEWLINE \ + "libpng version 1.5.0beta15 - March 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 ((png_charp) "libpng version 1.5.0beta15 - March 14, 2010\ + return ((png_charp) "libpng version 1.5.0beta15 - March 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."); @@ -575,8 +574,7 @@ png_charp PNGAPI png_get_libpng_ver(png_structp png_ptr) { /* Version of *.c files used when building libpng */ - png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ - return ((png_charp) PNG_LIBPNG_VER_STRING); + return png_get_header_ver(png_ptr); } png_charp PNGAPI diff --git a/png.h b/png.h index e1084c9f6..e8fb2cfc7 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.5.0beta15 - March 16, 2010 + * libpng version 1.5.0beta15 - March 17, 2010 * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -11,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.5.0beta15 - March 16, 2010: Glenn + * libpng versions 0.97, January 1998, through 1.5.0beta15 - March 17, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -170,7 +170,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.5.0beta15, March 16, 2010, are + * libpng versions 1.2.6, August 15, 2004, through 1.5.0beta15, March 17, 2010, are * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: @@ -282,7 +282,7 @@ * Y2K compliance in libpng: * ========================= * - * March 16, 2010 + * March 17, 2010 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -346,7 +346,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.5.0beta15" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.5.0beta15 - March 16, 2010\n" + " libpng version 1.5.0beta15 - March 17, 2010\n" #define PNG_LIBPNG_VER_SONUM 15 #define PNG_LIBPNG_VER_DLLNUM 15 @@ -433,14 +433,10 @@ extern "C" { * which applications aren't expected to use directly. */ -/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) /* Version information for C files, stored in png.c. This had better match * the version above. */ -# define png_libpng_ver png_get_header_ver(NULL) - -#endif /* PNG_NO_EXTERN */ +#define png_libpng_ver png_get_header_ver(NULL) /* Three color definitions. The order of the red, green, and blue, (and the * exact size) is not important, although the size of the fields need to diff --git a/pngpriv.h b/pngpriv.h index a1a1d121f..d7cc1a534 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1,7 +1,7 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.5.0beta15 - March 14, 2010 + * libpng version 1.5.0beta15 - March 17, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -77,11 +77,6 @@ # endif #endif -/* Codewarrior on NT has linking problems without this. */ -#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) -# define PNG_ALWAYS_EXTERN -#endif - /* This provides the non-ANSI (far) memory allocation routines. */ #if defined(__TURBOC__) && defined(__MSDOS__) # include