summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2024-01-29 13:18:26 +0000
committerCopybara-Service <copybara-worker@google.com>2024-01-29 05:24:38 -0800
commit646b7f569718921d7d4b5b8e22572ff6c76f2596 (patch)
tree15d5d748ce2060ea03b9e9b60d9d0ee512274520
parent63c0cec0344e6ba70f22bd690187088299baaa94 (diff)
downloadzlib-646b7f569718921d7d4b5b8e22572ff6c76f2596.tar.gz
[zlib][build] Remove fdopen #defines in zutil.h.
The latest version of Clang changed what macros it predefines on Apple targets, causing errors about predefined macros in zlib. See: https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9 Bug: 1519899 Change-Id: Ie75ef4078f2c86d89ba6c036ddd13e768a40ccbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5237020 Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Hans Wennborg <hans@chromium.org> Cr-Commit-Position: refs/heads/main@{#1253252} NOKEYCHECK=True GitOrigin-RevId: 2f39ac8d0a414dd65c0e1d5aae38c8f97aa06ae9
-rw-r--r--zutil.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/zutil.h b/zutil.h
index 6980a5f..2e2f576 100644
--- a/zutil.h
+++ b/zutil.h
@@ -152,17 +152,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
@@ -185,18 +176,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