mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -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
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#ifndef z_const
|
||||
# ifdef ZLIB_CONST
|
||||
# define z_const const
|
||||
# else
|
||||
# define z_const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#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 */
|
||||
|
||||
/* common constants */
|
||||
|
||||
#if MAX_WBITS < 9 || MAX_WBITS > 15
|
||||
# error MAX_WBITS must be in 9..15
|
||||
#endif
|
||||
#ifndef DEF_WBITS
|
||||
# define DEF_WBITS MAX_WBITS
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user