# HG changeset patch # User gthomas # Date 1085491807 0 # Node ID 9875d08a7ee7ad33bfc351af52720ba9c1286941 # Parent 2a37dbf01ca2327fab1b65cad7be71d1c85f2815 Turn on Z_PREFIX diff --git a/packages/services/compress/zlib/current/ChangeLog b/packages/services/compress/zlib/current/ChangeLog --- a/packages/services/compress/zlib/current/ChangeLog +++ b/packages/services/compress/zlib/current/ChangeLog @@ -1,3 +1,12 @@ +2004-05-25 Gary Thomas + + * src/zutil.h: Fix redefine of 'crc32' + + * include/zconf.h: Force define of __ECOS__ to make it easier for + applications to use this library. Also define Z_PREFIX to minimize + namespace pollution. !CYGSEM_COMPRESS_ZLIB_DEFLATE_MAKES_GZIP now + implies NO_GZCOMPRESS and NO_GZIP. + 2004-05-24 Gary Thomas * tests/zlib2.c: diff --git a/packages/services/compress/zlib/current/include/zconf.h b/packages/services/compress/zlib/current/include/zconf.h --- a/packages/services/compress/zlib/current/include/zconf.h +++ b/packages/services/compress/zlib/current/include/zconf.h @@ -8,6 +8,23 @@ #ifndef ZCONF_H #define ZCONF_H +// #ifdef __ECOS__ +#undef __ECOS__ +#define __ECOS__ +#define Z_PREFIX +#include +#if CYGINT_COMPRESS_ZLIB_LOCAL_ALLOC != 0 +#define MY_ZCALLOC +#endif +#ifdef CYGSEM_COMPRESS_ZLIB_DEFLATE_MAKES_GZIP +#undef MAX_WBITS +#define MAX_WBITS 15+16 /* 32K LZ77 window */ +#else +#define NO_GZIP +#define NO_GZCOMPRESS +#endif +// #endif + /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. @@ -320,15 +337,4 @@ typedef uLong FAR uLongf; # pragma map(inflate_copyright,"INCOPY") #endif -#ifdef __ECOS__ -#include -#if CYGINT_COMPRESS_ZLIB_LOCAL_ALLOC != 0 -#define MY_ZCALLOC -#endif -#ifdef CYGSEM_COMPRESS_ZLIB_DEFLATE_MAKES_GZIP -#undef MAX_WBITS -#define MAX_WBITS 15+16 /* 32K LZ77 window */ -#endif -#endif - #endif /* ZCONF_H */ diff --git a/packages/services/compress/zlib/current/src/README.eCos b/packages/services/compress/zlib/current/src/README.eCos --- a/packages/services/compress/zlib/current/src/README.eCos +++ b/packages/services/compress/zlib/current/src/README.eCos @@ -17,3 +17,8 @@ Additionally, local changes has been mad changes are marked by __ECOS__ (comments or definitions). Finally, the headers zlib.h and zconf.h have been moved out of the directory into ../include. + +Note: zconf.h always defines __ECOS__. This is necessary to support +programs built outside of the eCos tree which may wish to use this +library (so those programs needn't worry about defining __ECOS__) + diff --git a/packages/services/compress/zlib/current/src/zutil.h b/packages/services/compress/zlib/current/src/zutil.h --- a/packages/services/compress/zlib/current/src/zutil.h +++ b/packages/services/compress/zlib/current/src/zutil.h @@ -17,6 +17,7 @@ #ifdef __ECOS__ #include #include +#undef crc32 #define crc32 cyg_ether_crc32_accumulate #else #include "zlib.h"