From 3456045399e5a6eadd71f5b0cdb53cf9f68e3b3b Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 26 Dec 2002 20:51:04 +0000 Subject: [PATCH] * src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c, src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h, src/gzip/zutil.h: updates to allow compilation without compiler warnings with LCC-Win32 * include/freetype/freetype.h, docs/VERSION.DLL, builds/unix/configure.ac: updates for the upcoming 2.1.4 release --- ChangeLog | 3 +++ builds/unix/configure.ac | 2 +- docs/VERSION.DLL | 9 +++++---- include/freetype/freetype.h | 2 +- src/gzip/adler32.c | 2 +- src/gzip/infblock.c | 3 +++ src/gzip/inflate.c | 8 ++++---- src/gzip/inftrees.c | 3 +++ src/gzip/zconf.h | 27 +++++++++++++++------------ src/gzip/zlib.h | 18 +++++++++--------- src/gzip/zutil.h | 2 +- 11 files changed, 46 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index b678ae3eb..c3b1e5aaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ src/gzip/zutil.h: updates to allow compilation without compiler warnings with LCC-Win32 + * include/freetype/freetype.h, docs/VERSION.DLL, + builds/unix/configure.ac: updates for the upcoming 2.1.4 release + 2002-12-23 Anthony Fok * builds/unix/configure.ac, builds/unix/unix-cc.in, diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac index b9c8fbd3e..a90200a7f 100644 --- a/builds/unix/configure.ac +++ b/builds/unix/configure.ac @@ -10,7 +10,7 @@ dnl configuration file -- stay in 8.3 limit AC_CONFIG_HEADER(ftconfig.h:ftconfig.in) dnl Don't forget to update VERSION.DLL! -version_info='9:2:3' +version_info='9:3:3' AC_SUBST(version_info) ft_version=`echo $version_info | tr : .` AC_SUBST(ft_version) diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL index e3086e312..980197311 100644 --- a/docs/VERSION.DLL +++ b/docs/VERSION.DLL @@ -13,10 +13,10 @@ For each new public release of FreeType 2, there are generally *three* distinct "version" numbers to consider: * the official FT2 release number, like 2.0.9, or 2.1.3 - + * the libtool (and Unix) specific version number, like "9.2.3". This is what "freetype-config --version" will return - + * the platform-specific shared object number, used for example when the library is installed as "/usr/lib/libfreetype.so.6.3.2" @@ -35,10 +35,10 @@ macros defined in FT_FREETYPE_H: - FREETYPE_MINOR : minor release number - FREETYPE_PATCH : patch release number -see below for some Autoconf fragment to +see below for some Autoconf fragment to -the release number is also available at *runtime* through the +the release number is also available at *runtime* through the "FT_Library_Version" API. Unfortunately, this one wasn't available or working correctly before the 2.1.3 official release !! @@ -51,6 +51,7 @@ found on _most_ systems, but not all of them: release libtool so ------------------------------------- + 2.1.4 9.3.3 6.3.3 2.1.3 9.2.3 6.3.2 2.1.2 9.1.3 6.3.1 2.1.1 ? ? diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 93077c977..8e1335626 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -35,7 +35,7 @@ /* */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 1 -#define FREETYPE_PATCH 3 +#define FREETYPE_PATCH 4 #include diff --git a/src/gzip/adler32.c b/src/gzip/adler32.c index f6bf3244e..9549d0737 100644 --- a/src/gzip/adler32.c +++ b/src/gzip/adler32.c @@ -18,7 +18,7 @@ #define DO16(buf) DO8(buf,0); DO8(buf,8); /* ========================================================================= */ -ZEXTERNDEF uLong ZEXPORT adler32(adler, buf, len) +ZEXPORT(uLong) adler32(adler, buf, len) uLong adler; const Bytef *buf; uInt len; diff --git a/src/gzip/infblock.c b/src/gzip/infblock.c index 423af8178..63db030e9 100644 --- a/src/gzip/infblock.c +++ b/src/gzip/infblock.c @@ -365,6 +365,9 @@ int r; r = Z_STREAM_ERROR; LEAVE } +#ifdef NEED_DUMMY_RETURN + return 0; +#endif } diff --git a/src/gzip/inflate.c b/src/gzip/inflate.c index 72b01a925..2def8e290 100644 --- a/src/gzip/inflate.c +++ b/src/gzip/inflate.c @@ -51,7 +51,7 @@ struct internal_state { }; -int ZEXPORT inflateReset(z) +ZEXPORT(int) inflateReset(z) z_streamp z; { if (z == Z_NULL || z->state == Z_NULL) @@ -65,7 +65,7 @@ z_streamp z; } -int ZEXPORT inflateEnd(z) +ZEXPORT(int) inflateEnd(z) z_streamp z; { if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) @@ -79,7 +79,7 @@ z_streamp z; } -int ZEXPORT inflateInit2_(z, w, version, stream_size) +ZEXPORT(int) inflateInit2_(z, w, version, stream_size) z_streamp z; int w; const char *version; @@ -144,7 +144,7 @@ int stream_size; #define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) -int ZEXPORT inflate(z, f) +ZEXPORT(int) inflate(z, f) z_streamp z; int f; { diff --git a/src/gzip/inftrees.c b/src/gzip/inftrees.c index ec57d39ed..1ec13d961 100644 --- a/src/gzip/inftrees.c +++ b/src/gzip/inftrees.c @@ -10,8 +10,11 @@ # define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ #endif + +#if 0 local const char inflate_copyright[] = " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; +#endif /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot diff --git a/src/gzip/zconf.h b/src/gzip/zconf.h index 2e66fb3e2..d6989c9f8 100644 --- a/src/gzip/zconf.h +++ b/src/gzip/zconf.h @@ -91,11 +91,14 @@ # define NO_DUMMY_DECL #endif -/* Old Borland C incorrectly complains about missing returns: */ +/* Old Borland C and LCC incorrectly complains about missing returns: */ #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) # define NEED_DUMMY_RETURN #endif +#if defined(__LCC__) +# define NEED_DUMMY_RETURN +#endif /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL @@ -167,22 +170,22 @@ # undef FAR # endif # include -# define ZEXPORT WINAPI +# define ZEXPORT(x) x WINAPI # ifdef WIN32 -# define ZEXPORTVA WINAPIV +# define ZEXPORTVA(x) x WINAPIV # else -# define ZEXPORTVA FAR _cdecl _export +# define ZEXPORTVA(x) x FAR _cdecl _export # endif # endif # if defined (__BORLANDC__) # if (__BORLANDC__ >= 0x0500) && defined (WIN32) # include -# define ZEXPORT __declspec(dllexport) WINAPI -# define ZEXPORTRVA __declspec(dllexport) WINAPIV +# define ZEXPORT(x) x __declspec(dllexport) WINAPI +# define ZEXPORTRVA(x) x __declspec(dllexport) WINAPIV # else # if defined (_Windows) && defined (__DLL__) -# define ZEXPORT _export -# define ZEXPORTVA _export +# define ZEXPORT(x) x _export +# define ZEXPORTVA(x) x _export # endif # endif # endif @@ -190,16 +193,16 @@ #ifndef ZEXPORT -# define ZEXPORT +# define ZEXPORT(x) static x #endif #ifndef ZEXPORTVA -# define ZEXPORTVA +# define ZEXPORTVA(x) static x #endif #ifndef ZEXTERN -# define ZEXTERN static +# define ZEXTERN(x) static x #endif #ifndef ZEXTERNDEF -# define ZEXTERNDEF static +# define ZEXTERNDEF(x) static x #endif #ifndef FAR diff --git a/src/gzip/zlib.h b/src/gzip/zlib.h index e0c899b89..50d0d3f14 100644 --- a/src/gzip/zlib.h +++ b/src/gzip/zlib.h @@ -173,7 +173,7 @@ typedef z_stream FAR *z_streamp; */ /* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); +ZEXTERN(int) deflateInit OF((z_streamp strm, int level)); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. @@ -286,7 +286,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); /* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); +ZEXTERN(int) inflateInit OF((z_streamp strm)); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by @@ -306,7 +306,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); */ -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +ZEXTERN(int) inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may some @@ -375,7 +375,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +ZEXTERN(int) inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any @@ -393,7 +393,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); */ /* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, +ZEXTERN(int) deflateInit2 OF((z_streamp strm, int level, int method, int windowBits, @@ -514,7 +514,7 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, */ /* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, +ZEXTERN(int) inflateInit2 OF((z_streamp strm, int windowBits)); This is another version of inflateInit with an extra parameter. The @@ -566,7 +566,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, until success or end of the input data. */ -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +ZEXTERN(int) inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate all the internal decompression state. @@ -772,7 +772,7 @@ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); compression library. */ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +ZEXTERN(uLong) adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and @@ -810,7 +810,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, +ZEXTERN(int) inflateInit2_ OF((z_streamp strm, int windowBits, const char *version, int stream_size)); #define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) diff --git a/src/gzip/zutil.h b/src/gzip/zutil.h index 2210515d9..2b26c5ce2 100644 --- a/src/gzip/zutil.h +++ b/src/gzip/zutil.h @@ -203,7 +203,7 @@ typedef unsigned long ulg; #endif -typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, +typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len)); local voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); local void zcfree OF((voidpf opaque, voidpf ptr));