mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 07:27:59 -08:00
libz: sync with upstream
fixes a possible redefinition of z_const and adds a range check for MAX_WBITS. ok bluhm
This commit is contained in:
parent
0fae8ff559
commit
151539ad7d
@ -233,10 +233,12 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
#ifndef z_const
|
||||||
# define z_const const
|
# ifdef ZLIB_CONST
|
||||||
#else
|
# define z_const const
|
||||||
# define z_const
|
# else
|
||||||
|
# define z_const
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Z_SOLO
|
#ifdef Z_SOLO
|
||||||
|
@ -67,7 +67,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||||||
/* To be used only when the state is known to be valid */
|
/* To be used only when the state is known to be valid */
|
||||||
|
|
||||||
/* common constants */
|
/* common constants */
|
||||||
|
#if MAX_WBITS < 9 || MAX_WBITS > 15
|
||||||
|
# error MAX_WBITS must be in 9..15
|
||||||
|
#endif
|
||||||
#ifndef DEF_WBITS
|
#ifndef DEF_WBITS
|
||||||
# define DEF_WBITS MAX_WBITS
|
# define DEF_WBITS MAX_WBITS
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user