OLD | NEW |
1 /* gzguts.h -- zlib internal header definitions for gz* operations | 1 /* gzguts.h -- zlib internal header definitions for gz* operations |
2 * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler | 2 * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler |
3 * For conditions of distribution and use, see copyright notice in zlib.h | 3 * For conditions of distribution and use, see copyright notice in zlib.h |
4 */ | 4 */ |
5 | 5 |
6 #ifdef _LARGEFILE64_SOURCE | 6 #ifdef _LARGEFILE64_SOURCE |
7 # ifndef _LARGEFILE_SOURCE | 7 # ifndef _LARGEFILE_SOURCE |
8 # define _LARGEFILE_SOURCE 1 | 8 # define _LARGEFILE_SOURCE 1 |
9 # endif | 9 # endif |
10 # ifdef _FILE_OFFSET_BITS | 10 # ifdef _FILE_OFFSET_BITS |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 # define local static | 109 # define local static |
110 #endif | 110 #endif |
111 /* compile with -Dlocal if your debugger can't find static symbols */ | 111 /* compile with -Dlocal if your debugger can't find static symbols */ |
112 | 112 |
113 /* gz* functions always use library allocation functions */ | 113 /* gz* functions always use library allocation functions */ |
114 #ifndef STDC | 114 #ifndef STDC |
115 extern voidp malloc OF((uInt size)); | 115 extern voidp malloc OF((uInt size)); |
116 extern void free OF((voidpf ptr)); | 116 extern void free OF((voidpf ptr)); |
117 #endif | 117 #endif |
118 | 118 |
119 #if defined(_FX_MANAGED_CODE_) && defined(__cplusplus) | |
120 extern "C" { | |
121 #endif | |
122 | |
123 extern void* FXMEM_DefaultAlloc(size_t, int); | 119 extern void* FXMEM_DefaultAlloc(size_t, int); |
124 extern void FXMEM_DefaultFree(void*, int); | 120 extern void FXMEM_DefaultFree(void*, int); |
125 | 121 |
126 #if defined(_FX_MANAGED_CODE_) && defined(__cplusplus) | |
127 } | |
128 #endif | |
129 | |
130 #define malloc(size) FXMEM_DefaultAlloc(size, 0) | 122 #define malloc(size) FXMEM_DefaultAlloc(size, 0) |
131 #define free(ptr) FXMEM_DefaultFree(ptr, 0) | 123 #define free(ptr) FXMEM_DefaultFree(ptr, 0) |
132 | 124 |
133 /* get errno and strerror definition */ | 125 /* get errno and strerror definition */ |
134 #if defined UNDER_CE | 126 #if defined UNDER_CE |
135 # include <windows.h> | 127 # include <windows.h> |
136 # define zstrerror() gz_strwinerror((DWORD)GetLastError()) | 128 # define zstrerror() gz_strwinerror((DWORD)GetLastError()) |
137 #else | 129 #else |
138 # ifndef NO_STRERROR | 130 # ifndef NO_STRERROR |
139 # include <errno.h> | 131 # include <errno.h> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 208 |
217 /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t | 209 /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t |
218 value -- needed when comparing unsigned to z_off64_t, which is signed | 210 value -- needed when comparing unsigned to z_off64_t, which is signed |
219 (possible z_off64_t types off_t, off64_t, and long are all signed) */ | 211 (possible z_off64_t types off_t, off64_t, and long are all signed) */ |
220 #ifdef INT_MAX | 212 #ifdef INT_MAX |
221 # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) | 213 # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) |
222 #else | 214 #else |
223 unsigned ZLIB_INTERNAL gz_intmax OF((void)); | 215 unsigned ZLIB_INTERNAL gz_intmax OF((void)); |
224 # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) | 216 # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) |
225 #endif | 217 #endif |
OLD | NEW |