diff options
| -rw-r--r-- | zutil.h | 44 |
1 files changed, 30 insertions, 14 deletions
| @@ -98,28 +98,38 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | #ifdef AMIGA | 100 | #ifdef AMIGA |
| 101 | # define OS_CODE 0x01 | 101 | # define OS_CODE 1 |
| 102 | #endif | 102 | #endif |
| 103 | 103 | ||
| 104 | #if defined(VAXC) || defined(VMS) | 104 | #if defined(VAXC) || defined(VMS) |
| 105 | # define OS_CODE 0x02 | 105 | # define OS_CODE 2 |
| 106 | # define F_OPEN(name, mode) \ | 106 | # define F_OPEN(name, mode) \ |
| 107 | fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") | 107 | fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") |
| 108 | #endif | 108 | #endif |
| 109 | 109 | ||
| 110 | #ifdef __370__ | ||
| 111 | # if __TARGET_LIB__ < 0x20000000 | ||
| 112 | # define OS_CODE 4 | ||
| 113 | # elif __TARGET_LIB__ < 0x40000000 | ||
| 114 | # define OS_CODE 11 | ||
| 115 | # else | ||
| 116 | # define OS_CODE 8 | ||
| 117 | # endif | ||
| 118 | #endif | ||
| 119 | |||
| 110 | #if defined(ATARI) || defined(atarist) | 120 | #if defined(ATARI) || defined(atarist) |
| 111 | # define OS_CODE 0x05 | 121 | # define OS_CODE 5 |
| 112 | #endif | 122 | #endif |
| 113 | 123 | ||
| 114 | #ifdef OS2 | 124 | #ifdef OS2 |
| 115 | # define OS_CODE 0x06 | 125 | # define OS_CODE 6 |
| 116 | # if defined(M_I86) && !defined(Z_SOLO) | 126 | # if defined(M_I86) && !defined(Z_SOLO) |
| 117 | # include <malloc.h> | 127 | # include <malloc.h> |
| 118 | # endif | 128 | # endif |
| 119 | #endif | 129 | #endif |
| 120 | 130 | ||
| 121 | #if defined(MACOS) || defined(TARGET_OS_MAC) | 131 | #if defined(MACOS) || defined(TARGET_OS_MAC) |
| 122 | # define OS_CODE 0x07 | 132 | # define OS_CODE 7 |
| 123 | # ifndef Z_SOLO | 133 | # ifndef Z_SOLO |
| 124 | # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os | 134 | # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os |
| 125 | # include <unix.h> /* for fdopen */ | 135 | # include <unix.h> /* for fdopen */ |
| @@ -131,18 +141,24 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
| 131 | # endif | 141 | # endif |
| 132 | #endif | 142 | #endif |
| 133 | 143 | ||
| 134 | #ifdef TOPS20 | 144 | #ifdef __acorn |
| 135 | # define OS_CODE 0x0a | 145 | # define OS_CODE 13 |
| 136 | #endif | 146 | #endif |
| 137 | 147 | ||
| 138 | #ifdef WIN32 | 148 | #if defined(WIN32) && !defined(__CYGWIN__) |
| 139 | # ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ | 149 | # define OS_CODE 10 |
| 140 | # define OS_CODE 0x0b | 150 | #endif |
| 141 | # endif | 151 | |
| 152 | #ifdef _BEOS_ | ||
| 153 | # define OS_CODE 16 | ||
| 154 | #endif | ||
| 155 | |||
| 156 | #ifdef __TOS_OS400__ | ||
| 157 | # define OS_CODE 18 | ||
| 142 | #endif | 158 | #endif |
| 143 | 159 | ||
| 144 | #ifdef __50SERIES /* Prime/PRIMOS */ | 160 | #ifdef __APPLE__ |
| 145 | # define OS_CODE 0x0f | 161 | # define OS_CODE 19 |
| 146 | #endif | 162 | #endif |
| 147 | 163 | ||
| 148 | #if defined(_BEOS_) || defined(RISCOS) | 164 | #if defined(_BEOS_) || defined(RISCOS) |
| @@ -177,7 +193,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
| 177 | /* common defaults */ | 193 | /* common defaults */ |
| 178 | 194 | ||
| 179 | #ifndef OS_CODE | 195 | #ifndef OS_CODE |
| 180 | # define OS_CODE 0x03 /* assume Unix */ | 196 | # define OS_CODE 3 /* assume Unix */ |
| 181 | #endif | 197 | #endif |
| 182 | 198 | ||
| 183 | #ifndef F_OPEN | 199 | #ifndef F_OPEN |
