From f05407d2926035071787b9197123b0abc8dba983 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 16 May 2016 18:59:47 -0500 Subject: [PATCH 1/2] [libpng17] Check for CLOCK_PROCESS_CPUTIME_ID in /contrib/libtests/timepng. Otherwise it does not build on platforms that don't supply clock_gettime(). --- ANNOUNCE | 6 ++++-- CHANGES | 4 +++- contrib/libtests/timepng.c | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 9835e1a71..a1dd7365d 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta81 - May 7, 2016 +Libpng 1.7.0beta81 - May 16, 2016 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. @@ -1290,7 +1290,9 @@ Version 1.7.0beta80 [May 6, 2016] unreachable code in pz_default_settings and eliminated a spurious warning in pngcp for small files. -Version 1.7.0beta81 [May 7, 2016] +Version 1.7.0beta81 [May 16, 2016] + Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng. + Otherwise it does not build on platforms that don't supply clock_gettime(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 0243921d2..c9b83da0c 100644 --- a/CHANGES +++ b/CHANGES @@ -5590,7 +5590,9 @@ Version 1.7.0beta80 [May 6, 2016] unreachable code in pz_default_settings and eliminated a spurious warning in pngcp for small files. -Version 1.7.0beta81 [May 7, 2016] +Version 1.7.0beta81 [May 16, 2016] + Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng. + Otherwise it does not build on platforms that don't supply clock_gettime(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/libtests/timepng.c b/contrib/libtests/timepng.c index 4073ab6ef..2c685e15d 100644 --- a/contrib/libtests/timepng.c +++ b/contrib/libtests/timepng.c @@ -44,8 +44,10 @@ # define voidcast(type, value) (value) #endif /* __cplusplus */ -#if ((defined(PNG_SEQUENTIAL_READ_SUPPORTED)) && defined(PNG_STDIO_SUPPORTED)\ - && defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED)) +#if (defined (CLOCK_PROCESS_CPUTIME_ID) && + defined (PNG_SEQUENTIAL_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)\ + && defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED) + typedef struct { FILE *input; From bd6fb5534f262b477e4908b71cc4f2b2678f8661 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 16 May 2016 19:39:55 -0500 Subject: [PATCH 2/2] [libpng17] Update Makefile.am, fix typo in timepng.c --- ANNOUNCE | 2 +- Makefile.am | 7 ++++++- contrib/libtests/timepng.c | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index a1dd7365d..0fe628e43 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta81 - May 16, 2016 +Libpng 1.7.0beta81 - May 17, 2016 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. diff --git a/Makefile.am b/Makefile.am index 6202ca1e6..0af391e8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +< contrib/libtests/timepng.o: pnglibconf.h + # Makefile.am: # Source file for Makefile.in (and hence Makefile) # @@ -7,7 +9,7 @@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ ACLOCAL_AMFLAGS = -I scripts # test programs - run on make check, make distcheck -check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage +check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage timepng # Utilities - installed bin_PROGRAMS= pngfix png-fix-itxt @@ -42,6 +44,9 @@ pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c +timepng_SOURCES = contrib/libtests/timepng.c +timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + # Generally these are single line shell scripts to run a test with a particular # set of parameters: TESTS =\ diff --git a/contrib/libtests/timepng.c b/contrib/libtests/timepng.c index 2c685e15d..1aa11e2f5 100644 --- a/contrib/libtests/timepng.c +++ b/contrib/libtests/timepng.c @@ -44,9 +44,9 @@ # define voidcast(type, value) (value) #endif /* __cplusplus */ -#if (defined (CLOCK_PROCESS_CPUTIME_ID) && - defined (PNG_SEQUENTIAL_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)\ - && defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED) +#if defined (CLOCK_PROCESS_CPUTIME_ID) && \ + defined (PNG_SEQUENTIAL_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) \ + && defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED) typedef struct {