summaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
authorhansr <hk-git@circlestorm.org>2014-10-12 12:38:06 +0200
committerhansr <hk-git@circlestorm.org>2014-10-12 12:38:06 +0200
commitf7e1e0130fb198fa2d4d62b8990d2ab205985b3f (patch)
tree56b60d978ce22cea80c52be7962d6be5e8c0fef9 /zconf.h
parentf5c5de68590f559ceee1f26bca0eb2f4b26a21cd (diff)
Remove workarounds for non-ANSI-C compatible compilers (Part 1)
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h64
1 files changed, 13 insertions, 51 deletions
diff --git a/zconf.h b/zconf.h
index 3d6fc37..e1b7360 100644
--- a/zconf.h
+++ b/zconf.h
@@ -161,34 +161,17 @@
# endif
#endif
+#ifndef STDC
+# define STDC
+#endif
+
#ifdef __STDC_VERSION__
-# ifndef STDC
-# define STDC
-# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(WINDOWS) || defined(WIN32))
-# define STDC
-#endif
-#if !defined(STDC) && defined(__HOS_AIX__)
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const /* note: need a more gentle solution here */
-# endif
-#endif
#if defined(ZLIB_CONST) && !defined(z_const)
# define z_const const
@@ -231,19 +214,11 @@
/* Type declarations */
#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
+# define OF(args) args
#endif
#ifndef Z_ARG /* function prototypes for stdarg */
-# if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# define Z_ARG(args) args
-# else
-# define Z_ARG(args) ()
-# endif
+# define Z_ARG(args) args
#endif
#if defined(WINDOWS) || defined(WIN32)
@@ -306,17 +281,11 @@ typedef int intf;
typedef uInt uIntf;
typedef uLong uLongf;
-#ifdef STDC
- typedef void const *voidpc;
- typedef void *voidpf;
- typedef void *voidp;
-#else
- typedef Byte const *voidpc;
- typedef Byte *voidpf;
- typedef Byte *voidp;
-#endif
+typedef void const *voidpc;
+typedef void *voidpf;
+typedef void *voidp;
-#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+#if !defined(Z_U4) && !defined(Z_SOLO)
# include <limits.h>
# if (UINT_MAX == 0xffffffffUL)
# define Z_U4 unsigned
@@ -341,16 +310,9 @@ typedef uLong uLongf;
# define Z_HAVE_STDARG_H
#endif
-#ifdef STDC
-# ifndef Z_SOLO
-# include <sys/types.h> /* for off_t */
-# endif
-#endif
-
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# ifndef Z_SOLO
-# include <stdarg.h> /* for va_list */
-# endif
+#ifndef Z_SOLO
+# include <sys/types.h> /* for off_t */
+# include <stdarg.h> /* for va_list */
#endif
#ifdef _WIN32