So I think Xcode upgraded my macOS compiler with an automatic update and
my -current build was failing for a couple of days.

I finally dug in and I think I found the bug.

The compiler now defines TARGET_OS_* to either "0" or "1", with
TARGET_OS_MAC=1 (and TARGET_OS_OSX=1), the rest "0".  At least I think
this is what's new.

Anyway the following changes fix at least these first set of problems
for me.  I'm not sure the first to files need changing, but certainly
the binutils and gdb ones need the patch:

diff --git a/common/dist/zlib/zutil.h b/common/dist/zlib/zutil.h
index 6a93e2a1e55b..c869c966e6dd 100644
--- a/common/dist/zlib/zutil.h
+++ b/common/dist/zlib/zutil.h
@@ -151,7 +151,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 
2-zlib_error */
 #  endif
 #endif

-#if defined(MACOS)
+#if ((MACOS - 0) > 0) && !defined(__APPLE__)
 #  define OS_CODE  7
 #endif

diff --git a/external/cddl/osnet/dist/uts/common/zmod/zutil.h 
b/external/cddl/osnet/dist/uts/common/zmod/zutil.h
index 8e4a70abc55e..dfdeb29b9e55 100644
--- a/external/cddl/osnet/dist/uts/common/zmod/zutil.h
+++ b/external/cddl/osnet/dist/uts/common/zmod/zutil.h
@@ -129,7 +129,7 @@ extern const char * const z_errmsg[10]; /* indexed by 
2-zlib_error */
 #  endif
 #endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if ((MACOS - 0) > 0) && !defined(__APPLE__)
 #  define OS_CODE  0x07
 #  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
 #    include <unix.h> /* for fdopen */
diff --git a/external/gpl3/binutils/dist/zlib/zutil.h 
b/external/gpl3/binutils/dist/zlib/zutil.h
index 6f644b1a903d..5e391390b7a0 100644
--- a/external/gpl3/binutils/dist/zlib/zutil.h
+++ b/external/gpl3/binutils/dist/zlib/zutil.h
@@ -137,7 +137,7 @@ 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
diff --git a/external/gpl3/gdb/dist/zlib/zutil.h 
b/external/gpl3/gdb/dist/zlib/zutil.h
index 6f644b1a903d..0c60e387a6de 100644
--- a/external/gpl3/gdb/dist/zlib/zutil.h
+++ b/external/gpl3/gdb/dist/zlib/zutil.h
@@ -137,7 +137,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 
2-zlib_error */
 #  endif
 #endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if ((MACOS - 0) > 0) && !defined(__APPLE__)
 #  define OS_CODE  7
 #  ifndef Z_SOLO
 #    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os


--
                                        Greg A. Woods <gwo...@acm.org>

Kelowna, BC     +1 250 762-7675           RoboHack <wo...@robohack.ca>
Planix, Inc. <wo...@planix.com>     Avoncote Farms <wo...@avoncote.ca>

Attachment: pgpM73FFEUlqa.pgp
Description: OpenPGP Digital Signature

Reply via email to