]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove more workarounds for really old compilers
authorhansr <hk-git@circlestorm.org>
Wed, 15 Oct 2014 13:10:51 +0000 (15:10 +0200)
committerhansr <hk-git@circlestorm.org>
Wed, 15 Oct 2014 13:10:51 +0000 (15:10 +0200)
deflate.c
zconf.h
zconf.h.cmakein
zconf.h.in
zlib.h
zutil.c
zutil.h

index 5bfc7d25377857468f48b636ff032cf3bdc2a162..d09fcb5af2f85dcd84c7d3b0a1b2faab707a5cd7 100644 (file)
--- 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 538573b50c150f1dc61507f1ef0bd28d3a517192..8bd4879286d10fabcd87a77bded27d5cfd699839 100644 (file)
--- a/zconf.h
+++ b/zconf.h
 #  endif
 #endif
 
-#ifndef STDC
-#  define STDC
-#endif
-
 #ifdef __STDC_VERSION__
 #  if __STDC_VERSION__ >= 199901L
 #    ifndef STDC99
 #  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
index c1e93546582a8fe428a50db38aec0add0f3ac208..19386ad263c7bad46aaa9541575f281e4b461014 100644 (file)
 #  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
 
                         /* Type declarations */
 
+/* OF() definition is kept for compatibility purposes */
 #ifndef OF /* function prototypes */
 #  define OF(args)  args
 #endif
index 44546681153243bc83f873d2b70a4cd7bf89132b..8bd4879286d10fabcd87a77bded27d5cfd699839 100644 (file)
 #  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
 
                         /* 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 bc25b95c5df9b2bb1021dccf6a93faa351e4b8fc..fde157367af43ed9cb21a2e1f468505e61a2346c 100644 (file)
--- 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 e1094073aa187ac3fc2ce87c8363b99f204b6a0e..8639ca60c508fe96dd0799b307bd39a5a0a63027 100644 (file)
--- a/zutil.c
+++ b/zutil.c
 #  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 83cebbddf6fe9bd37857f538403b1b8e79a015de..774532664228267f63d9c7cd07e57faef64b3837 100644 (file)
--- 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 <unix.h> /* 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)