summaryrefslogtreecommitdiff
path: root/zutil.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:37 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:37 -0700
commit4b5a43a219d51066c01ff2ab86af18b967f2d0dd (patch)
tree4dcaf0cd18751d04cf638a9a6ec521990d4f2e90 /zutil.h
parent086e982175da84b3db958191031380794315f95f (diff)
downloadzlib-4b5a43a219d51066c01ff2ab86af18b967f2d0dd.tar.gz
zlib 1.2.0.5v1.2.0.5
Diffstat (limited to 'zutil.h')
-rw-r--r--zutil.h60
1 files changed, 32 insertions, 28 deletions
diff --git a/zutil.h b/zutil.h
index 0eda40c..db678b0 100644
--- a/zutil.h
+++ b/zutil.h
@@ -74,7 +74,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* target dependencies */
-#ifdef MSDOS
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
# define OS_CODE 0x00
# if defined(__TURBOC__) || defined(__BORLANDC__)
# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
@@ -82,19 +82,15 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
void _Cdecl farfree( void *block );
void *_Cdecl farmalloc( unsigned long nbytes );
# else
-# include <alloc.h>
+# include <alloc.h>
# endif
# else /* MSC or DJGPP */
# include <malloc.h>
# endif
#endif
-#ifdef OS2
-# define OS_CODE 0x06
-#endif
-
-#ifdef WIN32 /* Window 95 & Windows NT */
-# define OS_CODE 0x0b
+#ifdef AMIGA
+# define OS_CODE 0x01
#endif
#if defined(VAXC) || defined(VMS)
@@ -103,14 +99,14 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
#endif
-#ifdef AMIGA
-# define OS_CODE 0x01
-#endif
-
#if defined(ATARI) || defined(atarist)
# define OS_CODE 0x05
#endif
+#ifdef OS2
+# define OS_CODE 0x06
+#endif
+
#if defined(MACOS) || defined(TARGET_OS_MAC)
# define OS_CODE 0x07
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
@@ -122,14 +118,20 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0F
-#endif
-
#ifdef TOPS20
# define OS_CODE 0x0a
#endif
+#ifdef WIN32
+# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
+# define OS_CODE 0x0b
+# endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+# define OS_CODE 0x0f
+#endif
+
#if defined(_BEOS_) || defined(RISCOS)
# define fdopen(fd,mode) NULL /* No fdopen() */
#endif
@@ -142,8 +144,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-
- /* Common defaults */
+ /* common defaults */
#ifndef OS_CODE
# define OS_CODE 0x03 /* assume Unix */
@@ -155,28 +156,31 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* functions */
-#ifdef __STDC_VERSION__
-# if __STDC_VERSION__ >= 199901L
-# ifndef STDC99
-# define STDC99
-# endif
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
# endif
#endif
-#if !defined(STDC99) && !(defined(__TURBOC__) && __TURBOC__ >= 0x550) && !defined(HAVE_VSNPRINTF)
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#ifndef HAVE_VSNPRINTF
# ifdef MSDOS
/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
but for now we just assume it doesn't. */
# define NO_vsnprintf
# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
# ifdef WIN32
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(__TURBOC__)
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
# define vsnprintf _vsnprintf
# endif
# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
#endif
#ifdef HAVE_STRERROR