diff options
author | wtc%netscape.com <devnull@localhost> | 2003-02-08 15:00:13 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-02-08 15:00:13 +0000 |
commit | a431e571ac29c25e255b8b23bc819a14560ca941 (patch) | |
tree | 338b2612cc5b7dc32387b0e1c0755f0f2b0798d8 /security/nss/cmd/zlib/zutil.h | |
parent | e656b014c07ad5ef43fd6b8e6df4715bda594ec4 (diff) | |
download | nss-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.h')
-rw-r--r-- | security/nss/cmd/zlib/zutil.h | 83 |
1 files changed, 37 insertions, 46 deletions
diff --git a/security/nss/cmd/zlib/zutil.h b/security/nss/cmd/zlib/zutil.h index 718ebc15b..6918260cf 100644 --- a/security/nss/cmd/zlib/zutil.h +++ b/security/nss/cmd/zlib/zutil.h @@ -1,30 +1,31 @@ /* zutil.h -- internal interface and configuration of 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 */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ -/* @(#) $Id$ */ +/* $Id$ */ #ifndef _Z_UTIL_H #define _Z_UTIL_H #include "zlib.h" +#if defined(_WIN32_WCE) +#elif defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS) +# include <stddef.h> +# include <errno.h> +#else + extern int errno; +#endif #ifdef STDC -# include <stddef.h> # include <string.h> # include <stdlib.h> #endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include <errno.h> -#endif #ifndef local # define local static @@ -75,14 +76,8 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #ifdef MSDOS # define OS_CODE 0x00 -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include <alloc.h> -# endif +# ifdef __TURBOC__ +# include <alloc.h> # else /* MSC or DJGPP */ # include <malloc.h> # endif @@ -98,7 +93,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #if defined(VAXC) || defined(VMS) # define OS_CODE 0x02 -# define F_OPEN(name, mode) \ +# define FOPEN(name, mode) \ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") #endif @@ -110,15 +105,8 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ # define OS_CODE 0x05 #endif -#if defined(MACOS) || defined(TARGET_OS_MAC) +#ifdef MACOS # define OS_CODE 0x07 -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include <unix.h> /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif #endif #ifdef __50SERIES /* Prime/PRIMOS */ @@ -133,25 +121,22 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ # define fdopen(fd,mode) NULL /* No fdopen() */ #endif -#if (defined(_MSC_VER) && (_MSC_VER > 600)) -# define fdopen(fd,type) _fdopen(fd,type) -#endif - - /* Common defaults */ #ifndef OS_CODE # define OS_CODE 0x03 /* assume Unix */ #endif -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) +#ifndef FOPEN +# define FOPEN(name, mode) fopen((name), (mode)) #endif /* functions */ #ifdef HAVE_STRERROR +#ifndef MOZILLA_CLIENT extern char *strerror OF((int)); +#endif # define zstrerror(errnum) strerror(errnum) #else # define zstrerror(errnum) "" @@ -160,10 +145,9 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #if defined(pyr) # define NO_MEMCPY #endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) +#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(_MSC_VER) /* Use our own functions for small and medium model with MSC <= 5.0. * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. */ # define NO_MEMCPY #endif @@ -181,23 +165,30 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len)); + extern int zmemcmp OF((Bytef* s1, Bytef* s2, uInt len)); extern void zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ -#ifdef DEBUG +#ifdef DEBUG_ZLIB # include <stdio.h> - extern int z_verbose; +# ifndef verbose +# define verbose 0 +# endif extern void z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +# define Trace(x) fprintf x +# define Tracev(x) {if (verbose) fprintf x ;} +# define Tracevv(x) {if (verbose>1) fprintf x ;} +# define Tracec(c,x) {if (verbose && (c)) fprintf x ;} +# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} #else +# include <stdio.h> +# ifndef verbose +# define verbose 0 +# endif + extern void z_error OF((char *m)); # define Assert(cond,msg) # define Trace(x) # define Tracev(x) @@ -207,8 +198,8 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, - uInt len)); +typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len)); + voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); void zcfree OF((voidpf opaque, voidpf ptr)); |