From: hansr Date: Wed, 15 Oct 2014 13:10:51 +0000 (+0200) Subject: Remove more workarounds for really old compilers X-Git-Tag: 1.9.9-b1~908 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fafd66cd0d0adb7bc34db3617bfad61a6a9f16a;p=thirdparty%2Fzlib-ng.git Remove more workarounds for really old compilers --- diff --git a/deflate.c b/deflate.c index 5bfc7d253..d09fcb5af 100644 --- a/deflate.c +++ b/deflate.c @@ -159,10 +159,6 @@ local const config configuration_table[10] = { #define EQUAL 0 /* result of memcmp for equal strings */ -#ifndef NO_DUMMY_DECL -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ -#endif - /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ #define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) diff --git a/zconf.h b/zconf.h index 538573b50..8bd487928 100644 --- a/zconf.h +++ b/zconf.h @@ -161,10 +161,6 @@ # endif #endif -#ifndef STDC -# define STDC -#endif - #ifdef __STDC_VERSION__ # if __STDC_VERSION__ >= 199901L # ifndef STDC99 @@ -179,11 +175,6 @@ # define z_const #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # define MAX_MEM_LEVEL 9 diff --git a/zconf.h.cmakein b/zconf.h.cmakein index c1e935465..19386ad26 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -177,11 +177,6 @@ # define z_const #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # define MAX_MEM_LEVEL 9 @@ -211,6 +206,7 @@ /* Type declarations */ +/* OF() definition is kept for compatibility purposes */ #ifndef OF /* function prototypes */ # define OF(args) args #endif diff --git a/zconf.h.in b/zconf.h.in index 445466811..8bd487928 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -175,11 +175,6 @@ # define z_const #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # define MAX_MEM_LEVEL 9 @@ -209,6 +204,7 @@ /* Type declarations */ +/* OF() definition is kept for compatibility purposes */ #ifndef OF /* function prototypes */ # define OF(args) args #endif diff --git a/zlib.h b/zlib.h index bc25b95c5..fde157367 100644 --- a/zlib.h +++ b/zlib.h @@ -1721,11 +1721,6 @@ ZEXTERN int ZEXPORT gzgetc_ (gzFile file); /* backward compatibility */ #endif /* !Z_SOLO */ -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - /* undocumented functions */ ZEXTERN const char * ZEXPORT zError (int); ZEXTERN int ZEXPORT inflateSyncPoint (z_streamp); diff --git a/zutil.c b/zutil.c index e1094073a..8639ca60c 100644 --- a/zutil.c +++ b/zutil.c @@ -10,10 +10,6 @@ # include "gzguts.h" #endif -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - z_const char * const z_errmsg[10] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ diff --git a/zutil.h b/zutil.h index 83cebbddf..774532664 100644 --- a/zutil.h +++ b/zutil.h @@ -80,29 +80,12 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* target dependencies */ -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#endif - #ifdef WIN32 # ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ # define OS_CODE 0x0b # endif #endif -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - #if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ @@ -115,12 +98,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif -#if defined(__BORLANDC__) - #pragma warn -8004 - #pragma warn -8008 - #pragma warn -8066 -#endif - /* provide prototypes for these when building zlib without LFS */ #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)