summaryrefslogtreecommitdiff
path: root/security/nss/cmd/zlib/zutil.c
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-02-08 15:00:13 +0000
committerwtc%netscape.com <devnull@localhost>2003-02-08 15:00:13 +0000
commita431e571ac29c25e255b8b23bc819a14560ca941 (patch)
tree338b2612cc5b7dc32387b0e1c0755f0f2b0798d8 /security/nss/cmd/zlib/zutil.c
parente656b014c07ad5ef43fd6b8e6df4715bda594ec4 (diff)
downloadnss-hg-a431e571ac29c25e255b8b23bc819a14560ca941.tar.gz
Bug 131826: backed out the zlib 1.1.4 upgrade because the signtool tests
failed. Modified Files: README adler32.c compress.c crc32.c deflate.c deflate.h example.c gzio.c infblock.c infblock.h infcodes.c infcodes.h inffast.c inffast.h inflate.c inftrees.c inftrees.h infutil.c infutil.h minigzip.c trees.c uncompr.c zconf.h zlib.h zutil.c zutil.h
Diffstat (limited to 'security/nss/cmd/zlib/zutil.c')
-rw-r--r--security/nss/cmd/zlib/zutil.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/security/nss/cmd/zlib/zutil.c b/security/nss/cmd/zlib/zutil.c
index dfc38ec14..afca3ed0c 100644
--- a/security/nss/cmd/zlib/zutil.c
+++ b/security/nss/cmd/zlib/zutil.c
@@ -1,12 +1,19 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2002 Jean-loup Gailly.
+ * Copyright (C) 1995-1996 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+/* This file was modified since it was taken from the zlib distribution */
+/* $Id$ */
-/* @(#) $Id$ */
+#include <stdio.h>
#include "zutil.h"
+#ifdef MOZILLA_CLIENT
+#include "prtypes.h"
+#include "prlog.h"
+#endif
+
struct internal_state {int dummy;}; /* for buggy compilers */
#ifndef STDC
@@ -26,41 +33,24 @@ const char *z_errmsg[10] = {
""};
-const char * ZEXPORT zlibVersion()
+PR_PUBLIC_API(const char *) zlibVersion()
{
return ZLIB_VERSION;
}
-#ifdef DEBUG
-
-# ifndef verbose
-# define verbose 0
-# endif
-int z_verbose = verbose;
-
+#if defined(DEBUG) && defined(MOZILLA_CLIENT)
void z_error (m)
char *m;
{
- fprintf(stderr, "%s\n", m);
- exit(1);
+ PR_ASSERT(0);
}
#endif
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
- int err;
-{
- return ERR_MSG(err);
-}
-
-
#ifndef HAVE_MEMCPY
void zmemcpy(dest, source, len)
Bytef* dest;
- const Bytef* source;
+ Bytef* source;
uInt len;
{
if (len == 0) return;
@@ -70,8 +60,8 @@ void zmemcpy(dest, source, len)
}
int zmemcmp(s1, s2, len)
- const Bytef* s1;
- const Bytef* s2;
+ Bytef* s1;
+ Bytef* s2;
uInt len;
{
uInt j;
@@ -178,7 +168,7 @@ void zcfree (voidpf opaque, voidpf ptr)
# define MY_ZCALLOC
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
+#if (!defined(_MSC_VER) || (_MSC_VER < 600))
# define _halloc halloc
# define _hfree hfree
#endif