X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=common%2Fzlib.c;h=63902209d7f16f6467da52a79a1e7c21f2634053;hb=01070777efb6acb4a0b5071bcf5ece2f5e12bf78;hp=ab68d4438bfd54b1489312236c0868d311f6d4d5;hpb=13d5a105497fb2a8f1dd017448742ec545e6b670;p=ppp.git diff --git a/common/zlib.c b/common/zlib.c index ab68d44..6390220 100644 --- a/common/zlib.c +++ b/common/zlib.c @@ -11,9 +11,15 @@ * - added Z_PACKET_FLUSH (see zlib.h for details) * - added inflateIncomp * - * $Id: zlib.c,v 1.2 1996/04/04 02:43:28 paulus Exp $ + * $Id: zlib.c,v 1.5 1997/03/04 03:26:35 paulus Exp $ */ +/* + * ==FILEVERSION 960926== + * + * This marker is used by the Linux installation script to determine + * whether an up-to-date version of this file is already installed. + */ /*+++++*/ /* zutil.h -- internal interface and configuration of the compression library @@ -32,10 +38,6 @@ #include "zlib.h" -#ifdef STDC -# include -#endif - #ifndef local # define local static #endif @@ -86,9 +88,20 @@ extern char *z_errmsg[]; /* indexed by 1-zlib_error */ /* functions */ #if defined(KERNEL) || defined(_KERNEL) +#include +#include +#include # define zmemcpy(d, s, n) bcopy((s), (d), (n)) # define zmemzero bzero + #else +#if defined(__KERNEL__) +/* Assume this is Linux */ +#include +#define zmemcpy memcpy +#define zmemzero(dest, len) memset(dest, 0, len) + +#else /* not kernel */ #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) # define HAVE_MEMCPY #endif @@ -99,7 +112,8 @@ extern char *z_errmsg[]; /* indexed by 1-zlib_error */ extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len)); extern void zmemzero OF((Bytef* dest, uInt len)); #endif -#endif +#endif /* __KERNEL__ */ +#endif /* KERNEL */ /* Diagnostic functions */ #ifdef DEBUG_ZLIB