summaryrefslogtreecommitdiff
path: root/zutil.h
diff options
context:
space:
mode:
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 */
74 74
75 /* target dependencies */ 75 /* target dependencies */
76 76
77#ifdef MSDOS 77#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
78# define OS_CODE 0x00 78# define OS_CODE 0x00
79# if defined(__TURBOC__) || defined(__BORLANDC__) 79# if defined(__TURBOC__) || defined(__BORLANDC__)
80# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) 80# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
@@ -82,19 +82,15 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
82 void _Cdecl farfree( void *block ); 82 void _Cdecl farfree( void *block );
83 void *_Cdecl farmalloc( unsigned long nbytes ); 83 void *_Cdecl farmalloc( unsigned long nbytes );
84# else 84# else
85# include <alloc.h> 85# include <alloc.h>
86# endif 86# endif
87# else /* MSC or DJGPP */ 87# else /* MSC or DJGPP */
88# include <malloc.h> 88# include <malloc.h>
89# endif 89# endif
90#endif 90#endif
91 91
92#ifdef OS2 92#ifdef AMIGA
93# define OS_CODE 0x06 93# define OS_CODE 0x01
94#endif
95
96#ifdef WIN32 /* Window 95 & Windows NT */
97# define OS_CODE 0x0b
98#endif 94#endif
99 95
100#if defined(VAXC) || defined(VMS) 96#if defined(VAXC) || defined(VMS)
@@ -103,14 +99,14 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
103 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") 99 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
104#endif 100#endif
105 101
106#ifdef AMIGA
107# define OS_CODE 0x01
108#endif
109
110#if defined(ATARI) || defined(atarist) 102#if defined(ATARI) || defined(atarist)
111# define OS_CODE 0x05 103# define OS_CODE 0x05
112#endif 104#endif
113 105
106#ifdef OS2
107# define OS_CODE 0x06
108#endif
109
114#if defined(MACOS) || defined(TARGET_OS_MAC) 110#if defined(MACOS) || defined(TARGET_OS_MAC)
115# define OS_CODE 0x07 111# define OS_CODE 0x07
116# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 112# 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 */
122# endif 118# endif
123#endif 119#endif
124 120
125#ifdef __50SERIES /* Prime/PRIMOS */
126# define OS_CODE 0x0F
127#endif
128
129#ifdef TOPS20 121#ifdef TOPS20
130# define OS_CODE 0x0a 122# define OS_CODE 0x0a
131#endif 123#endif
132 124
125#ifdef WIN32
126# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
127# define OS_CODE 0x0b
128# endif
129#endif
130
131#ifdef __50SERIES /* Prime/PRIMOS */
132# define OS_CODE 0x0f
133#endif
134
133#if defined(_BEOS_) || defined(RISCOS) 135#if defined(_BEOS_) || defined(RISCOS)
134# define fdopen(fd,mode) NULL /* No fdopen() */ 136# define fdopen(fd,mode) NULL /* No fdopen() */
135#endif 137#endif
@@ -142,8 +144,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
142# endif 144# endif
143#endif 145#endif
144 146
145 147 /* common defaults */
146 /* Common defaults */
147 148
148#ifndef OS_CODE 149#ifndef OS_CODE
149# define OS_CODE 0x03 /* assume Unix */ 150# define OS_CODE 0x03 /* assume Unix */
@@ -155,28 +156,31 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
155 156
156 /* functions */ 157 /* functions */
157 158
158#ifdef __STDC_VERSION__ 159#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
159# if __STDC_VERSION__ >= 199901L 160# ifndef HAVE_VSNPRINTF
160# ifndef STDC99 161# define HAVE_VSNPRINTF
161# define STDC99
162# endif
163# endif 162# endif
164#endif 163#endif
165#if !defined(STDC99) && !(defined(__TURBOC__) && __TURBOC__ >= 0x550) && !defined(HAVE_VSNPRINTF) 164#if defined(__CYGWIN__)
165# ifndef HAVE_VSNPRINTF
166# define HAVE_VSNPRINTF
167# endif
168#endif
169#ifndef HAVE_VSNPRINTF
166# ifdef MSDOS 170# ifdef MSDOS
167 /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), 171 /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
168 but for now we just assume it doesn't. */ 172 but for now we just assume it doesn't. */
169# define NO_vsnprintf 173# define NO_vsnprintf
170# endif 174# endif
175# ifdef __TURBOC__
176# define NO_vsnprintf
177# endif
171# ifdef WIN32 178# ifdef WIN32
172 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ 179 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
173# if !defined(vsnprintf) && !defined(__TURBOC__) 180# if !defined(vsnprintf) && !defined(NO_vsnprintf)
174# define vsnprintf _vsnprintf 181# define vsnprintf _vsnprintf
175# endif 182# endif
176# endif 183# endif
177# ifdef __TURBOC__
178# define NO_vsnprintf
179# endif
180#endif 184#endif
181 185
182#ifdef HAVE_STRERROR 186#ifdef HAVE_STRERROR