Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/dist/zlib Handle standalone code.



details:   https://anonhg.NetBSD.org/src/rev/bcf934fbd6a6
branches:  trunk
changeset: 371896:bcf934fbd6a6
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 15 23:21:34 2022 +0000

description:
Handle standalone code.

diffstat:

 common/dist/zlib/zlib.h  |   4 +++-
 common/dist/zlib/zutil.h |  10 +++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 46250450fe0e -r bcf934fbd6a6 common/dist/zlib/zlib.h
--- a/common/dist/zlib/zlib.h   Sat Oct 15 21:53:21 2022 +0000
+++ b/common/dist/zlib/zlib.h   Sat Oct 15 23:21:34 2022 +0000
@@ -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 @@
    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.
diff -r 46250450fe0e -r bcf934fbd6a6 common/dist/zlib/zutil.h
--- a/common/dist/zlib/zutil.h  Sat Oct 15 21:53:21 2022 +0000
+++ b/common/dist/zlib/zutil.h  Sat Oct 15 23:21:34 2022 +0000
@@ -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 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 @@
 #  elif (UINT_MAX == 0xffffffffffffffff)
 #    define Z_U8 unsigned
 #  endif
+# endif
 #endif
 
 extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */



Home | Main Index | Thread Index | Old Index