summaryrefslogtreecommitdiffstats
path: root/lib/libz/zutil.h
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2010-03-31 20:55:13 +0000
committerdelphij <delphij@FreeBSD.org>2010-03-31 20:55:13 +0000
commitba79e1ef62e2e7614577a089817e8de44324f09d (patch)
treefde3ba7d2e741c0e79f850ebad661ff81d9ac59f /lib/libz/zutil.h
parent41905cc36439fe2bd87d0b1a1b68762651ac373a (diff)
downloadFreeBSD-src-ba79e1ef62e2e7614577a089817e8de44324f09d.zip
FreeBSD-src-ba79e1ef62e2e7614577a089817e8de44324f09d.tar.gz
Update to 1.2.4.1 (beta).
Diffstat (limited to 'lib/libz/zutil.h')
-rw-r--r--lib/libz/zutil.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h
index 025035d..b21a19c 100644
--- a/lib/libz/zutil.h
+++ b/lib/libz/zutil.h
@@ -24,19 +24,6 @@
# include <stdlib.h>
#endif
-#if defined(UNDER_CE) && defined(NO_ERRNO_H)
-# define zseterrno(ERR) SetLastError((DWORD)(ERR))
-# define zerrno() ((int)GetLastError())
-#else
-# ifdef NO_ERRNO_H
- extern int errno;
-# else
-# include <errno.h>
-# endif
-# define zseterrno(ERR) do { errno = (ERR); } while (0)
-# define zerrno() errno
-#endif
-
#ifndef local
# define local static
#endif
@@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#pragma warn -8066
#endif
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
# define z_off64_t off64_t
#else
# define z_off64_t z_off_t
#endif
+/* provide prototypes for these when building zlib without LFS */
+#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
+ ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
+#endif
+
/* common defaults */
#ifndef OS_CODE
@@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define F_OPEN(name, mode) fopen((name), (mode))
#endif
-#ifdef _LARGEFILE64_SOURCE
-# define F_OPEN64(name, mode) fopen64((name), (mode))
-#else
-# define F_OPEN64(name, mode) fopen((name), (mode))
-#endif
-
/* functions */
#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
OpenPOWER on IntegriCloud