diff --git a/ANNOUNCE b/ANNOUNCE index 76274c776..f18a679a1 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta35 - March 17, 2014 +Libpng 1.7.0beta35 - March 22, 2014 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. @@ -572,7 +572,14 @@ Version 1.7.0beta34 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.7.0beta35 [March 17, 2014] +Version 1.7.0beta35 [March 22, 2014] + Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because + they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 + when using its "__builtin_pow()" function. + Silence 'unused parameter' build warnings (Cosmin). + $(CP) is now used alongside $(RM_F). Also, use 'copy' instead + of 'cp' where applicable, and applied other minor makefile changes. + Don't warn about invalid dimensions exceeding user limits. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index be78c3c72..b5b84ed2b 100644 --- a/CHANGES +++ b/CHANGES @@ -4861,7 +4861,14 @@ Version 1.7.0beta34 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.7.0beta35 [March 17, 2014] +Version 1.7.0beta35 [March 22, 2014] + Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because + they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 + when using its "__builtin_pow()" function. + Silence 'unused parameter' build warnings (Cosmin). + $(CP) is now used alongside $(RM_F). Also, use 'copy' instead + of 'cp' where applicable, and applied other minor makefile changes. + Don't warn about invalid dimensions exceeding user limits. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index 580267030..5ce74f841 100644 --- a/png.c +++ b/png.c @@ -696,13 +696,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.7.0beta35 - March 17, 2014" PNG_STRING_NEWLINE \ + "libpng version 1.7.0beta35 - March 22, 2014" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 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.7.0beta35 - March 17, 2014\ + return "libpng version 1.7.0beta35 - March 22, 2014\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -2341,45 +2341,46 @@ png_check_IHDR(png_const_structrp png_ptr, png_warning(png_ptr, "Image width is zero in IHDR"); error = 1; } + else if (width > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image width in IHDR"); + error = 1; + } + else + { +# ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (width > png_ptr->user_width_max) +# else + if (width > PNG_USER_WIDTH_MAX) +# endif + { + png_warning(png_ptr, "Image width exceeds user limit in IHDR"); + error = 1; + } + } if (height == 0) { png_warning(png_ptr, "Image height is zero in IHDR"); error = 1; } - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (width > png_ptr->user_width_max) - -# else - if (width > PNG_USER_WIDTH_MAX) -# endif - { - png_warning(png_ptr, "Image width exceeds user limit in IHDR"); - error = 1; - } - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (height > png_ptr->user_height_max) -# else - if (height > PNG_USER_HEIGHT_MAX) -# endif - { - png_warning(png_ptr, "Image height exceeds user limit in IHDR"); - error = 1; - } - - if (width > PNG_UINT_31_MAX) - { - png_warning(png_ptr, "Invalid image width in IHDR"); - error = 1; - } - - if (height > PNG_UINT_31_MAX) + else if (height > PNG_UINT_31_MAX) { png_warning(png_ptr, "Invalid image height in IHDR"); error = 1; } + else + { +# ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (height > png_ptr->user_height_max) +# else + if (height > PNG_USER_HEIGHT_MAX) +# endif + { + png_warning(png_ptr, "Image height exceeds user limit in IHDR"); + error = 1; + } + } /* Check other values */ if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && diff --git a/pngerror.c b/pngerror.c index 9d058b33a..828cac4b3 100644 --- a/pngerror.c +++ b/pngerror.c @@ -765,6 +765,9 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN) #ifdef PNG_SETJMP_SUPPORTED if (png_ptr && png_ptr->longjmp_fn && png_ptr->jmp_buf_ptr) png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val); +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(val) #endif /* If control reaches this point, png_longjmp() must not return. The only diff --git a/pngget.c b/pngget.c index 4a2704721..1db804199 100644 --- a/pngget.c +++ b/pngget.c @@ -124,6 +124,9 @@ png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) return (info_ptr->x_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -142,6 +145,9 @@ png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) return (info_ptr->y_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -159,6 +165,9 @@ png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr) info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit) return (info_ptr->x_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -229,6 +238,9 @@ png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) return (info_ptr->x_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -245,6 +257,9 @@ png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) return (info_ptr->y_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -261,6 +276,9 @@ png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) return (info_ptr->x_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -277,6 +295,9 @@ png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) return (info_ptr->y_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); diff --git a/scripts/README.txt b/scripts/README.txt index a855e095f..0662e95fc 100644 --- a/scripts/README.txt +++ b/scripts/README.txt @@ -1,5 +1,5 @@ -Makefiles for libpng version 1.7.0beta35 - March 17, 2014 +Makefiles for libpng version 1.7.0beta35 - March 22, 2014 pnglibconf.h.prebuilt => Stores configuration settings makefile.linux => Linux/ELF makefile diff --git a/scripts/makefile.atari b/scripts/makefile.atari index 051d3036e..3c54b8402 100644 --- a/scripts/makefile.atari +++ b/scripts/makefile.atari @@ -45,7 +45,7 @@ $(LBR): $(OBJS) $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt pnglibconf.h + cp $< $@ pngtest.ttp: pngtest.o $(LBR) $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o diff --git a/scripts/makefile.bc32 b/scripts/makefile.bc32 index c2a912211..26b8b1f9f 100644 --- a/scripts/makefile.bc32 +++ b/scripts/makefile.bc32 @@ -11,10 +11,11 @@ ## Where zlib.h, zconf.h and zlib.lib are ZLIB_DIR=..\zlib -## Compiler, linker and lib stuff +## Compiler, linker, librarian and other tools CC=bcc32 LD=bcc32 LIB=tlib +CP=copy # -3 = 386, -4 = 486, -5 = Pentium etc. !ifndef TARGET_CPU @@ -114,7 +115,7 @@ test: pngtest.exe # see scripts\pnglibconf.mak for how to make this file # with different options pnglibconf.h: scripts\pnglibconf.h.prebuilt - copy scripts\pnglibconf.h.prebuilt $@ + $(CP) $< $@ png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h diff --git a/scripts/makefile.beos b/scripts/makefile.beos index fb5123be1..3dbcdeb3e 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -24,6 +24,7 @@ AR_RC=ar rc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f # Where the zlib library and include files are located @@ -83,7 +84,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # try include scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.bor b/scripts/makefile.bor index a032510d4..70236d698 100644 --- a/scripts/makefile.bor +++ b/scripts/makefile.bor @@ -12,10 +12,11 @@ ## Where zlib.h, zconf.h and zlib_MODEL.lib are ZLIB_DIR=..\zlib -## Compiler, linker and lib stuff +## Compiler, linker, librarian and other tools CC=bcc LD=bcc LIB=tlib +CP=copy !ifndef MODEL MODEL=l @@ -112,7 +113,7 @@ all: libpng pngtest # try !inlude scripts\pnglibconf.mak for more options pnglibconf.h: scripts\pnglibconf.h.prebuilt - copy scripts\pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng: $(LIBNAME) diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin index 2315482ff..0ea63f021 100644 --- a/scripts/makefile.darwin +++ b/scripts/makefile.darwin @@ -34,6 +34,7 @@ AR_RC=ar rc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f ARCH=-arch ppc -arch i386 -arch x86_64 @@ -80,7 +81,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.dec b/scripts/makefile.dec index 663c3c3f0..9ba91423f 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -22,6 +22,7 @@ CC=cc MKDIR_P=mkdir LN_SF=ln -f -s RANLIB=ranlib +CP=cp RM_F=/bin/rm -f # where make install puts libpng.a and png.h @@ -68,7 +69,7 @@ all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) @@ -181,7 +182,7 @@ test-installed: ./pngtesti pngtest.png clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ libpng.pc pnglibconf.h diff --git a/scripts/makefile.dj2 b/scripts/makefile.dj2 index a43f34a14..0ff391380 100644 --- a/scripts/makefile.dj2 +++ b/scripts/makefile.dj2 @@ -19,6 +19,9 @@ LDFLAGS=-L. -L../zlib/ -lpng -lz -lm RANLIB=ranlib +CP=cp +RM_F=rm -f + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ pngmem.o pngerror.o pngpread.o @@ -30,7 +33,7 @@ all: libpng.a pngtest # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) ar rc $@ $(OBJS) @@ -43,7 +46,7 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest clean: - rm -f *.o libpng.a pngtest pngout.png pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.elf b/scripts/makefile.elf index 51ed2e0c3..de3178e8e 100644 --- a/scripts/makefile.elf +++ b/scripts/makefile.elf @@ -30,6 +30,7 @@ CC=gcc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f # where "make install" puts libpng17.a, libpng17.so*, @@ -100,7 +101,7 @@ all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd index 173a049a0..dbcb2e33e 100644 --- a/scripts/makefile.freebsd +++ b/scripts/makefile.freebsd @@ -13,7 +13,7 @@ LIB= png SHLIB_MAJOR= ${SHLIB_VER} SHLIB_MINOR= 0 NO_PROFILE= YES -NO_OBJ= YES +NO_OBJ= YES # where make install puts libpng.a and png.h DESTDIR= ${PREFIX} @@ -57,7 +57,7 @@ test: pngtest # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + cp $< $@ DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff --git a/scripts/makefile.gcc b/scripts/makefile.gcc index a592294fc..3e1b84f9a 100644 --- a/scripts/makefile.gcc +++ b/scripts/makefile.gcc @@ -16,6 +16,7 @@ CC = gcc LD = $(CC) AR_RC = ar rcs RANLIB = ranlib +CP = cp RM_F = rm -f WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \ @@ -39,7 +40,7 @@ all: static # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64 index e2a056d19..d1759e6f9 100644 --- a/scripts/makefile.hp64 +++ b/scripts/makefile.hp64 @@ -34,6 +34,7 @@ CC=cc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f CPPFLAGS=-I$(ZLIBINC) \ @@ -85,7 +86,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc index fa7a4f6e6..5fb425ee2 100644 --- a/scripts/makefile.hpgcc +++ b/scripts/makefile.hpgcc @@ -25,6 +25,7 @@ AR_RC=ar rc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f # where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux index ae8f36829..5de20937e 100644 --- a/scripts/makefile.hpux +++ b/scripts/makefile.hpux @@ -84,7 +84,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.ibmc b/scripts/makefile.ibmc index 861a55157..1571d0ed9 100644 --- a/scripts/makefile.ibmc +++ b/scripts/makefile.ibmc @@ -21,6 +21,7 @@ ZLIBLIB = ../zlib CC = icc LD = ilink AR = ilib +CP = copy RM = del CPPFLAGS = -I$(ZLIBINC) @@ -47,7 +48,7 @@ all: libpng$(A) pngtest$(E) # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng$(A): $(OBJS) $(AR) -out:$@ $(OBJS) diff --git a/scripts/makefile.intel b/scripts/makefile.intel index 1abfc6ed6..cdc752636 100644 --- a/scripts/makefile.intel +++ b/scripts/makefile.intel @@ -36,6 +36,7 @@ CPPFLAGS=-I$(ZLIBINC) CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo LD=link LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO +CP=cp O=.obj @@ -47,7 +48,7 @@ all: test # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) diff --git a/scripts/makefile.knr b/scripts/makefile.knr index 720921517..7395f6596 100644 --- a/scripts/makefile.knr +++ b/scripts/makefile.knr @@ -36,6 +36,9 @@ ANSI2KNRFLAGS= RANLIB = ranlib #RANLIB = echo +CP = cp +RM_F = rm -f + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -44,7 +47,7 @@ all: ansi2knr libpng.a pngtest # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ # general rule to allow ansi2knr to work .c.o: @@ -83,7 +86,7 @@ install: libpng.a png.h pngconf.h pnglibconf.h chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a clean: - rm -f *.o libpng.a pngtest pngout.png ansi2knr pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png ansi2knr pnglibconf.h DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff --git a/scripts/makefile.linux b/scripts/makefile.linux index 685d006ff..7a60121e9 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -24,6 +24,7 @@ CC=gcc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=ranlib +CP=cp RM_F=/bin/rm -f # where "make install" puts libpng17.a, libpng17.so*, @@ -93,7 +94,7 @@ all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.mips b/scripts/makefile.mips index a0df0018a..2297126f6 100644 --- a/scripts/makefile.mips +++ b/scripts/makefile.mips @@ -30,6 +30,8 @@ LDFLAGS=-L. -L../zlib/ -lpng -lz -lm #RANLIB=ranlib RANLIB=echo +CP=cp + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -41,7 +43,7 @@ all: libpng.a pngtest # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) ar rc $@ $(OBJS) diff --git a/scripts/makefile.msc b/scripts/makefile.msc index 905ed72c5..f2f1d280f 100644 --- a/scripts/makefile.msc +++ b/scripts/makefile.msc @@ -16,6 +16,7 @@ CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) CC=cl LD=link LDFLAGS=/e/st:0x1500/noe +CP=copy O=.obj #uncomment next to put error messages in a file @@ -30,10 +31,10 @@ all: libpng.lib # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) + $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) diff --git a/scripts/makefile.msys b/scripts/makefile.msys index 1bd550365..383ec6151 100644 --- a/scripts/makefile.msys +++ b/scripts/makefile.msys @@ -37,6 +37,7 @@ CC = gcc LD = $(CC) AR_RC = ar rcs RANLIB = ranlib +CP = cp RM_F = rm -rf MKDIR_P=mkdir -p LN_SF=ln -sf @@ -83,7 +84,7 @@ all: static shared # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $< diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd index 43d3c1e71..052b0e3e7 100644 --- a/scripts/makefile.ne12bsd +++ b/scripts/makefile.ne12bsd @@ -39,7 +39,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + cp $< $@ pngtest.o: pngtest.c ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd index e7e87f701..a0ab0ed6f 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -39,7 +39,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + cp $< $@ pngtest.o: pngtest.c ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index 684dbaf6d..7b13468e9 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -36,7 +36,7 @@ DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + cp $< $@ pngtest.o: pngtest.c ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} diff --git a/scripts/makefile.sco b/scripts/makefile.sco index 5f3074dfd..2d4330245 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -25,6 +25,7 @@ AR_RC=ar rc MKDIR_P=mkdir LN_SF=ln -f -s RANLIB=echo +CP=cp RM_F=/bin/rm -f # where make install puts libpng.a, $(OLDSO)*, and png.h @@ -79,7 +80,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index a7e2d9aab..05e2e1f1a 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -22,6 +22,7 @@ CC=gcc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=echo +CP=cp RM_F=/bin/rm -f # Where make install puts libpng.a, libpng17.so, and libpng17/png.h @@ -82,7 +83,7 @@ all: libpng.a pngtest shared libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index 7d04c9aae..b84e334c5 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -22,6 +22,7 @@ CC=cc MKDIR_P=mkdir -p LN_SF=ln -sf RANLIB=echo +CP=cp RM_F=/bin/rm -f # Where make install puts libpng.a, libpng17.so, and libpng17/png.h @@ -85,7 +86,7 @@ all: libpng.a pngtest shared libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index 108140735..b906f8156 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -26,6 +26,7 @@ AR_RC=ar rc MKDIR_P=mkdir -p LN_SF=ln -f -s RANLIB=echo +CP=cp RM_F=/bin/rm -f # Where make install puts libpng.a, $(OLDSO)*, and png.h @@ -89,7 +90,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index fd0005f10..ac77cb148 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -24,6 +24,7 @@ CC=gcc MKDIR_P=mkdir -p LN_SF=ln -f -s RANLIB=echo +CP=cp RM_F=/bin/rm -f # Where make install puts libpng.a, libpng17.so*, and png.h @@ -85,7 +86,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.solaris-x86 b/scripts/makefile.solaris-x86 index 5ce39fdb1..ff05fae03 100644 --- a/scripts/makefile.solaris-x86 +++ b/scripts/makefile.solaris-x86 @@ -24,6 +24,7 @@ CC=gcc MKDIR_P=mkdir -p LN_SF=ln -f -s RANLIB=echo +CP=cp RM_F=/bin/rm -f # Where make install puts libpng.a, libpng17.so*, and png.h @@ -84,7 +85,7 @@ all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.std b/scripts/makefile.std index 30a21e23f..db731c9be 100644 --- a/scripts/makefile.std +++ b/scripts/makefile.std @@ -32,6 +32,7 @@ AR_RC = ar rc MKDIR_P = mkdir LN_SF = ln -sf RANLIB = ranlib +CP = cp RM_F = rm -f AWK = awk SED = sed diff --git a/scripts/makefile.sunos b/scripts/makefile.sunos index bc5f9267b..ce2a7f2e2 100644 --- a/scripts/makefile.sunos +++ b/scripts/makefile.sunos @@ -37,6 +37,7 @@ AR_RC=ar rc MKDIR_P=mkdir -p LN_SF=ln -f -s RANLIB=ranlib +CP=cp RM_F=/bin/rm -f CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 @@ -54,7 +55,7 @@ all: libpng.a pngtest # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) diff --git a/scripts/makefile.tc3 b/scripts/makefile.tc3 index 62279b76b..43f8a84f3 100644 --- a/scripts/makefile.tc3 +++ b/scripts/makefile.tc3 @@ -12,6 +12,8 @@ CC=tcc LD=tcc LIB=tlib LDFLAGS=-m$(MODEL) -L..\zlib +CP=copy + O=.obj E=.exe @@ -27,7 +29,7 @@ all: libpng$(MODEL).lib pngtest$(E) # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts/pnglibconf.h.prebuilt - cp scripts/pnglibconf.h.prebuilt $@ + $(CP) $< $@ pngtest: pngtest$(E) diff --git a/scripts/makefile.vcwin32 b/scripts/makefile.vcwin32 index b26c4acc7..d9f8c126d 100644 --- a/scripts/makefile.vcwin32 +++ b/scripts/makefile.vcwin32 @@ -19,6 +19,7 @@ CPPFLAGS = -I..\zlib CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 LDFLAGS = -nologo ARFLAGS = -nologo +CP = copy RM = del # File extensions @@ -38,7 +39,7 @@ all: libpng.lib # see scripts/pnglibconf.mak for more options pnglibconf.h: scripts\pnglibconf.h.prebuilt - copy scripts\pnglibconf.h.prebuilt $@ + $(CP) $< $@ png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt index 0b0b36ff3..b93120c79 100644 --- a/scripts/pnglibconf.h.prebuilt +++ b/scripts/pnglibconf.h.prebuilt @@ -2,7 +2,7 @@ /* pnglibconf.h - library build configuration */ -/* Libpng version 1.7.0beta35 - March 17, 2014 */ +/* Libpng version 1.7.0beta35 - March 22, 2014 */ /* Copyright (c) 1998-2013 Glenn Randers-Pehrson */ diff --git a/scripts/symbols.dfn b/scripts/symbols.dfn index 6f52918d4..1d697969b 100644 --- a/scripts/symbols.dfn +++ b/scripts/symbols.dfn @@ -11,11 +11,17 @@ /* NOTE: making 'symbols.chk' checks both that the exported * symbols in the library don't change and (implicitly) that - * scripts/pnglibconf.h.prebuilt is as expected. If scripts/pnglibconf.h.prebuilt - * is remade using scripts/pnglibconf.dfa then this checks the - * .dfa file too. + * scripts/pnglibconf.h.prebuilt is as expected. + * If scripts/pnglibconf.h.prebuilt is remade using + * scripts/pnglibconf.dfa then this checks the .dfa file too. */ +#define PNG_EXPORTA(ordinal, type, name, args, attributes)\ + PNG_DFN "@" name "@ @@" ordinal "@" +#define PNG_REMOVED(ordinal, type, name, args, attributes)\ + PNG_DFN "; @" name "@ @@" ordinal "@" +#define PNG_EXPORT_LAST_ORDINAL(ordinal)\ + #define PNG_EXPORTA(ordinal, type, name, args, attributes)\ PNG_DFN "@" name "@ @@" ordinal "@" #define PNG_REMOVED(ordinal, type, name, args, attributes)\