diff --git a/ANNOUNCE b/ANNOUNCE index 9acf68a18..916925b5c 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -128,6 +128,11 @@ Version 1.7.0alpha10 [February 6, 2013] Ported libpng 1.5 options.awk/dfn file handling to 1.7, fixed one bug. Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13. Minor fixes to assembler changes, verified with a dummy .S file + Removed cc -E workround, corrected png_get_palette_max API. Tested on + SUN OS cc 5.9, which demonstrates the tokenization problem previously + avoided by using /lib/cpp. Since all .dfn output is now protected + in double quotes unless it is to be macro substituted the fix should work + everywhere. =========================================================================== NOTICE November 17, 2012: diff --git a/CHANGES b/CHANGES index 12304c20a..ddfeb68e2 100644 --- a/CHANGES +++ b/CHANGES @@ -4414,6 +4414,11 @@ Version 1.7.0alpha10 [February 6, 2013] Ported libpng 1.5 options.awk/dfn file handling to 1.7, fixed one bug. Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13. Minor fixes to assembler changes, verified with a dummy .S file + Removed cc -E workround, corrected png_get_palette_max API. Tested on + SUN OS cc 5.9, which demonstrates the tokenization problem previously + avoided by using /lib/cpp. Since all .dfn output is now protected + in double quotes unless it is to be macro substituted the fix should work + everywhere. =========================================================================== NOTICE November 17, 2012: diff --git a/configure.ac b/configure.ac index c3f21c093..108d39223 100644 --- a/configure.ac +++ b/configure.ac @@ -53,8 +53,7 @@ AC_PROG_CC AM_PROG_AS LT_PATH_LD AC_PROG_CPP -AC_CHECK_TOOL(SED, sed, :) -AC_CHECK_TOOL(AWK, awk, :) +AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET @@ -64,30 +63,23 @@ dnl compatible later version may be used LT_INIT([win32-dll]) LT_PREREQ([2.4.2]) -# On Solaris 10 and 12 CPP gets set to cc -E, however this still -# does some input parsing. We need strict ANSI-C style tokenization, -# check this: -AC_REQUIRE_CPP -AC_MSG_CHECKING([for a C preprocessor that does not parse its input]) -AC_PREPROC_IFELSE([AC_LANG_SOURCE([[1.1.1 16BIT]])], - [DFNCPP="$CPP"], - [ DFNCPP="" - sav_CPP="$CPP" - for CPP in "${CC-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp" "cpp" - do - AC_PREPROC_IFELSE([AC_LANG_SOURCE([[1.1.1 16BIT]])], - [DFNCPP="$CPP"] - [break],,) - done - CPP="$sav_CPP" - ]) -if test -n "$DFNCPP"; then - AC_MSG_RESULT([$DFNCPP]) - AC_SUBST(DFNCPP) +# Some awks crash when confronted with pnglibconf.dfa, do a test run now +# to make sure this doesn't happen +AC_MSG_CHECKING([that AWK works]) +if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ + ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ + ${srcdir}/pngusr.dfa 1>&2 +then + AC_MSG_RESULT([ok]) else - AC_MSG_FAILURE([not found], 1) + AC_MSG_FAILURE([failed], 1) fi +# This is a remnant of the old cc -E validation, where it may have been +# necessary to use a different preprocessor for .dfn files +DFNCPP="$CPP" +AC_SUBST(DFNCPP) + # -Werror cannot be passed to GCC in CFLAGS because configure will fail (it # checks the compiler with a program that generates a warning), add the # following option to deal with this @@ -116,7 +108,7 @@ AC_ARG_ENABLE(werror, # Checks for header files. AC_HEADER_STDC # Headers used in pngpriv.h: -AC_CHECK_HEADERS([stdlib.h string.h float.h fp.h math.h m68881.h]) +AC_CHECK_HEADERS([assert.h stdlib.h string.h float.h fp.h math.h m68881.h]) # Additional headers used in pngconf.h: AC_CHECK_HEADERS([limits.h stddef.h stdio.h setjmp.h time.h]) # Used by pngread.c (for the simplified API): @@ -126,8 +118,6 @@ AC_CHECK_HEADERS([errno.h]) AC_CHECK_HEADERS([ctype.h]) # Additional requirements of contrib/libtests/pngvalid.c: AC_CHECK_HEADERS([fenv.h]) -# Additional requirements of contrib/libtests/tarith.c: -AC_CHECK_HEADERS([assert.h]) # Checks for typedefs, structures, and compiler characteristics. # Most of these have been removed from 1.7.0 because they checked for non-ANSI-C diff --git a/png.h b/png.h index 53d84812d..b6e949b73 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.7.0alpha10 - February 5, 2013 + * libpng version 1.7.0alpha10 - February 6, 2013 * Copyright (c) 1998-2013 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.7.0alpha10 - February 5, 2013: Glenn + * libpng versions 0.97, January 1998, through 1.7.0alpha10 - February 6, 2013: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -199,7 +199,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, February 5, 2013, are + * libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, February 6, 2013, are * Copyright (c) 2004, 2006-2013 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: @@ -311,7 +311,7 @@ * Y2K compliance in libpng: * ========================= * - * February 5, 2013 + * February 6, 2013 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -379,7 +379,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.7.0alpha10" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.7.0alpha10 - February 5, 2013\n" + " libpng version 1.7.0alpha10 - February 6, 2013\n" #define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_DLLNUM 17 @@ -3208,8 +3208,8 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) PNG_EXPORT(242, void, png_set_check_for_invalid_index, (png_structrp png_ptr, int allowed)); -PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, - png_const_infop info_ptr)); +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); #endif /* Maintainer: Put new public prototypes here ^, in libpng.3, and project diff --git a/pngget.c b/pngget.c index 6d1aaa371..5a6d96652 100644 --- a/pngget.c +++ b/pngget.c @@ -1164,7 +1164,7 @@ png_get_io_chunk_type (png_const_structrp png_ptr) #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED int PNGAPI -png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr) +png_get_palette_max(png_const_structrp png_ptr, png_const_inforp info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return png_ptr->num_palette_max;