summaryrefslogtreecommitdiffstats
path: root/cpukit/zlib
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-03-18 10:11:43 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-03-18 10:11:43 +0000
commit47a619ae9498fb4938c2e04337de76b8ea0fff35 (patch)
treec7b0148fd1e8cd414d7b8fa09210aeca541d37c1 /cpukit/zlib
parent43b1d3af770a6b68b969b84bc9f9397102886f97 (diff)
downloadrtems-47a619ae9498fb4938c2e04337de76b8ea0fff35.tar.bz2
Import from zlib-1.2.5
Diffstat (limited to 'cpukit/zlib')
-rw-r--r--cpukit/zlib/minigzip.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/zlib/minigzip.c b/cpukit/zlib/minigzip.c
index 84d823b72f..9825ccc3a7 100644
--- a/cpukit/zlib/minigzip.c
+++ b/cpukit/zlib/minigzip.c
@@ -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"