Module Name: src
Committed By: christos
Date: Sat Oct 15 23:21:34 UTC 2022
Modified Files:
src/common/dist/zlib: zlib.h zutil.h
Log Message:
Handle standalone code.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/dist/zlib/zlib.h \
src/common/dist/zlib/zutil.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/dist/zlib/zlib.h
diff -u src/common/dist/zlib/zlib.h:1.6 src/common/dist/zlib/zlib.h:1.7
--- src/common/dist/zlib/zlib.h:1.6 Sat Oct 15 15:49:32 2022
+++ src/common/dist/zlib/zlib.h Sat Oct 15 19:21:34 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: zlib.h,v 1.6 2022/10/15 19:49:32 christos Exp $ */
+/* $NetBSD: zlib.h,v 1.7 2022/10/15 23:21:34 christos Exp $ */
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.13, October 13th, 2022
@@ -1726,7 +1726,9 @@ ZEXTERN uLong ZEXPORT adler32_combine OF
negative, the result has no meaning or utility.
*/
+#if !defined(_KERNEL) && !defined(_STANDALONE)
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+#endif
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
Index: src/common/dist/zlib/zutil.h
diff -u src/common/dist/zlib/zutil.h:1.6 src/common/dist/zlib/zutil.h:1.7
--- src/common/dist/zlib/zutil.h:1.6 Sat Oct 15 15:49:32 2022
+++ src/common/dist/zlib/zutil.h Sat Oct 15 19:21:34 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: zutil.h,v 1.6 2022/10/15 19:49:32 christos Exp $ */
+/* $NetBSD: zutil.h,v 1.7 2022/10/15 23:21:34 christos Exp $ */
/* zutil.h -- internal interface and configuration of the compression library
* Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler
@@ -49,6 +49,13 @@ typedef ush FAR ushf;
typedef unsigned long ulg;
#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC)
+# if defined(_KERNEL) || defined(_STANDALONE)
+# ifdef _LP64
+# define Z_U8 unsigned long
+# else
+# define Z_U8 unsigned long long
+# endif
+# else
# include <limits.h>
# if (ULONG_MAX == 0xffffffffffffffff)
# define Z_U8 unsigned long
@@ -57,6 +64,7 @@ typedef unsigned long ulg;
# elif (UINT_MAX == 0xffffffffffffffff)
# define Z_U8 unsigned
# endif
+# endif
#endif
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */