summaryrefslogtreecommitdiff
path: root/lib/libz/zutil.h
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-01-21 07:34:40 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-01-21 07:34:40 +0000
commit2aeae0e9c27925f8d78765bc0de33c57b0ce21a3 (patch)
tree6150d82fcb7a0df542db2b6609e61708b33910ba /lib/libz/zutil.h
parentb40d32598abbeb6a0ed0e2bcb9557a5ad4eb07d6 (diff)
libz: sync with upstream's develop branch as of Jan 18
Diffstat (limited to 'lib/libz/zutil.h')
-rw-r--r--lib/libz/zutil.h25
1 files changed, 2 insertions, 23 deletions
diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h
index b851bc9debb..9b288c653bb 100644
--- a/lib/libz/zutil.h
+++ b/lib/libz/zutil.h
@@ -58,7 +58,7 @@ typedef unsigned long ulg;
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
#define ERR_RETURN(strm,err) \
return (strm->msg = ERR_MSG(err), (err))
@@ -139,17 +139,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS)
# define OS_CODE 7
-# ifndef Z_SOLO
-# 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
#endif
#ifdef __acorn
@@ -172,18 +163,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define OS_CODE 19
#endif
-#if defined(_BEOS_) || defined(RISCOS)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
-# if defined(_WIN32_WCE)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# else
-# define fdopen(fd,type) _fdopen(fd,type)
-# endif
-#endif
-
#if defined(__BORLANDC__) && !defined(MSDOS)
#pragma warn -8004
#pragma warn -8008