diff options
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -188,7 +188,7 @@ local gzFile gz_open(path, fd, mode) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | /* save the path name for error messages */ | 190 | /* save the path name for error messages */ |
191 | #ifdef _WIN32 | 191 | #ifdef WIDECHAR |
192 | if (fd == -2) { | 192 | if (fd == -2) { |
193 | len = wcstombs(NULL, path, 0); | 193 | len = wcstombs(NULL, path, 0); |
194 | if (len == (size_t)-1) | 194 | if (len == (size_t)-1) |
@@ -202,7 +202,7 @@ local gzFile gz_open(path, fd, mode) | |||
202 | free(state); | 202 | free(state); |
203 | return NULL; | 203 | return NULL; |
204 | } | 204 | } |
205 | #ifdef _WIN32 | 205 | #ifdef WIDECHAR |
206 | if (fd == -2) | 206 | if (fd == -2) |
207 | if (len) | 207 | if (len) |
208 | wcstombs(state->path, path, len + 1); | 208 | wcstombs(state->path, path, len + 1); |
@@ -239,7 +239,7 @@ local gzFile gz_open(path, fd, mode) | |||
239 | 239 | ||
240 | /* open the file with the appropriate flags (or just use fd) */ | 240 | /* open the file with the appropriate flags (or just use fd) */ |
241 | state->fd = fd > -1 ? fd : ( | 241 | state->fd = fd > -1 ? fd : ( |
242 | #ifdef _WIN32 | 242 | #ifdef WIDECHAR |
243 | fd == -2 ? _wopen(path, oflag, 0666) : | 243 | fd == -2 ? _wopen(path, oflag, 0666) : |
244 | #endif | 244 | #endif |
245 | open((const char *)path, oflag, 0666)); | 245 | open((const char *)path, oflag, 0666)); |
@@ -303,7 +303,7 @@ gzFile ZEXPORT gzdopen(fd, mode) | |||
303 | } | 303 | } |
304 | 304 | ||
305 | /* -- see zlib.h -- */ | 305 | /* -- see zlib.h -- */ |
306 | #ifdef _WIN32 | 306 | #ifdef WIDECHAR |
307 | gzFile ZEXPORT gzopen_w(path, mode) | 307 | gzFile ZEXPORT gzopen_w(path, mode) |
308 | const wchar_t *path; | 308 | const wchar_t *path; |
309 | const char *mode; | 309 | const char *mode; |