From e66d9d4c06d3a06033a8303b789fae8d05078801 Mon Sep 17 00:00:00 2001 From: "Glenn Randers-Pehrson glennrp@comcast.net" Date: Wed, 29 Apr 2009 20:08:55 -0500 Subject: [PATCH] Revisions to make pngcrush.c and gzio.c compile on MingW --- ChangeLog.txt | 6 ++++++ pngcrush.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 96bc8940b..f34158d11 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,6 +4,12 @@ Version 1.6.17 (built with libpng-1.2.35 and zlib-1.2.3.2) Defined TOO_FAR == 32767 in deflate.c (again). The definition has continually been inadvertently omitted during zlib updates since pngcrush version 1.6.4. + Revised handling of xcode files so at least we can get printout + of IHDR values with "pngcrush -fix -n -v xcode.png" + Changes from Thomas M. Edwards: + Revised gzio.c so it will not attempt to use fseeko/ftello on MinGW. + See http://www.gnu.org/software/hello/manual/gnulib/ftello.html + Revised pngcrush.c handling of CLOCKS_PER_SEC to work with the MinGW macro. Version 1.6.16 (built with libpng-1.2.35 and zlib-1.2.3.2) Added -newtimestamp and -oldtimestamp options and changed diff --git a/pngcrush.c b/pngcrush.c index 69328050e..f88beaa4a 100644 --- a/pngcrush.c +++ b/pngcrush.c @@ -436,13 +436,17 @@ #endif #ifndef CLOCKS_PER_SEC -#define CLOCKS_PER_SEC 1000 +# define CLOCKS_PER_SEC 1000 #endif -#if CLOCKS_PER_SEC <= 100 -# define TIME_T long +#ifdef __STDC__ +# define TIME_T clock_t #else -# define TIME_T float +# if CLOCKS_PER_SEC <= 100 +# define TIME_T long +# else +# define TIME_T float +# endif #endif struct options_help {