#ifndef CPU_H
#define CPU_H
-#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#ifdef HAVE_HIDDEN
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
extern int x86_cpu_has_sse2;
extern int x86_cpu_has_sse42;
}
/* save the path name for error messages */
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
if (fd == -2) {
len = wcstombs(NULL, path, 0);
if (len == (size_t)-1)
free(state);
return NULL;
}
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
if (fd == -2)
if (len)
wcstombs(state->path, path, len + 1);
state->fd = fd > -1 ? fd : (
#ifdef _WIN32
fd == -2 ? _wopen(path, oflag, 0666) :
+#elif __CYGWIN__
+ fd == -2 ? open(state->path, oflag, 0666) :
#endif
open((const char *)path, oflag, 0666));
if (state->fd == -1) {
ZEXTERN int ZEXPORT inflateUndermine (z_stream *, int);
ZEXTERN int ZEXPORT inflateResetKeep (z_stream *);
ZEXTERN int ZEXPORT deflateResetKeep (z_stream *);
-#if defined(_WIN32) && defined(WITH_GZFILEOP)
+#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(WITH_GZFILEOP)
ZEXTERN gzFile ZEXPORT gzopen_w (const wchar_t *path, const char *mode);
#endif
#ifdef WITH_GZFILEOP