summaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2015-08-01 17:38:56 -0700
committerMark Adler <madler@alumni.caltech.edu>2015-08-01 17:38:56 -0700
commitb4ce6caf0992296230e4e25b22a63e418bdf4dcf (patch)
treea3162fbb31eb49e83bfb5493df1d9e3cb4d7be83 /gzlib.c
parent2fc6d66797b87ad40e4739520cd4e0e40d42efd3 (diff)
downloadzlib-b4ce6caf0992296230e4e25b22a63e418bdf4dcf.tar.gz
Compile the gzopen_w() function when __CYGWIN__ defined.
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gzlib.c b/gzlib.c
index 3e344f9..d735829 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -188,7 +188,7 @@ local gzFile gz_open(path, fd, mode)
}
/* save the path name for error messages */
-#ifdef _WIN32
+#ifdef WIDECHAR
if (fd == -2) {
len = wcstombs(NULL, path, 0);
if (len == (size_t)-1)
@@ -202,7 +202,7 @@ local gzFile gz_open(path, fd, mode)
free(state);
return NULL;
}
-#ifdef _WIN32
+#ifdef WIDECHAR
if (fd == -2)
if (len)
wcstombs(state->path, path, len + 1);
@@ -239,7 +239,7 @@ local gzFile gz_open(path, fd, mode)
/* open the file with the appropriate flags (or just use fd) */
state->fd = fd > -1 ? fd : (
-#ifdef _WIN32
+#ifdef WIDECHAR
fd == -2 ? _wopen(path, oflag, 0666) :
#endif
open((const char *)path, oflag, 0666));
@@ -303,7 +303,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
}
/* -- see zlib.h -- */
-#ifdef _WIN32
+#ifdef WIDECHAR
gzFile ZEXPORT gzopen_w(path, mode)
const wchar_t *path;
const char *mode;