diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/minigzip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/minigzip.c b/test/minigzip.c index aa787fc..d5173b5 100644 --- a/test/minigzip.c +++ b/test/minigzip.c | |||
@@ -39,7 +39,7 @@ | |||
39 | # ifdef UNDER_CE | 39 | # ifdef UNDER_CE |
40 | # include <stdlib.h> | 40 | # include <stdlib.h> |
41 | # endif | 41 | # endif |
42 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) | 42 | # define SET_BINARY_MODE(file) _setmode(_fileno(file), O_BINARY) |
43 | #else | 43 | #else |
44 | # define SET_BINARY_MODE(file) | 44 | # define SET_BINARY_MODE(file) |
45 | #endif | 45 | #endif |
@@ -58,6 +58,10 @@ | |||
58 | #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os | 58 | #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os |
59 | # include <unix.h> /* for fileno */ | 59 | # include <unix.h> /* for fileno */ |
60 | #endif | 60 | #endif |
61 | #ifdef WIN32 | ||
62 | # define fileno _fileno | ||
63 | # define unlink _unlink | ||
64 | #endif | ||
61 | 65 | ||
62 | #if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) | 66 | #if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) |
63 | #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ | 67 | #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ |