summaryrefslogtreecommitdiffstats
path: root/compat/zlib/minigzip.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-04-20 14:50:10 (GMT)
committernijtmans <nijtmans>2010-04-20 14:50:10 (GMT)
commit833ea84043d927c416802983797aa3884a894012 (patch)
tree92c8f9663c828bd3eb7d42c72b7b54841ed193ab /compat/zlib/minigzip.c
parent04890d3f2b3093debd335e9bea71a39c99a9fa5e (diff)
downloadtcl-833ea84043d927c416802983797aa3884a894012.zip
tcl-833ea84043d927c416802983797aa3884a894012.tar.gz
tcl-833ea84043d927c416802983797aa3884a894012.tar.bz2
Upgrade to zlib 1.2.5
Diffstat (limited to 'compat/zlib/minigzip.c')
-rw-r--r--compat/zlib/minigzip.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/compat/zlib/minigzip.c b/compat/zlib/minigzip.c
index e67cde3..4f64c9a 100644
--- a/compat/zlib/minigzip.c
+++ b/compat/zlib/minigzip.c
@@ -13,7 +13,7 @@
* or in pipe mode.
*/
-/* @(#) $Id: minigzip.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */
+/* @(#) $Id: minigzip.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */
#include "zlib.h"
#include <stdio.h>
@@ -32,6 +32,9 @@
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
# include <fcntl.h>
# include <io.h>
+# ifdef UNDER_CE
+# include <stdlib.h>
+# endif
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
#else
# define SET_BINARY_MODE(file)
@@ -50,11 +53,13 @@
# include <unix.h> /* for fileno */
#endif
+#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
extern int unlink OF((const char *));
#endif
+#endif
-#if defined(UNDER_CE) && defined(NO_ERRNO_H)
+#if defined(UNDER_CE)
# include <windows.h>
# define perror(s) pwinerror(s)
@@ -116,7 +121,7 @@ static void pwinerror (s)
fprintf(stderr, "%s\n", strwinerror(GetLastError ()));
}
-#endif /* UNDER_CE && NO_ERRNO_H */
+#endif /* UNDER_CE */
#ifndef GZ_SUFFIX
# define GZ_SUFFIX ".gz"