head 1.4; access; symbols pkgsrc-2026Q2:1.4.0.10 pkgsrc-2026Q2-base:1.4 pkgsrc-2026Q1:1.4.0.8 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.4.0.6 pkgsrc-2025Q4-base:1.4 pkgsrc-2025Q3:1.4.0.4 pkgsrc-2025Q3-base:1.4 pkgsrc-2025Q2:1.4.0.2 pkgsrc-2025Q2-base:1.4 pkgsrc-2025Q1:1.3.0.2 pkgsrc-2025Q1-base:1.3; locks; strict; comment @# @; 1.4 date 2025.06.08.07.37.45; author wiz; state Exp; branches; next 1.3; commitid I3jr5qsuFSfII3YF; 1.3 date 2025.02.05.16.30.34; author adam; state Exp; branches; next 1.2; commitid hLANQ79vzS0ICiIF; 1.2 date 2024.09.29.16.51.55; author adam; state dead; branches; next 1.1; commitid en6cavKcqPZ6TIrF; 1.1 date 2024.06.28.18.35.16; author wiz; state Exp; branches; next ; commitid rG3yT8RHrM0QrMfF; desc @@ 1.4 log @*gcc14*: update to 14.3 bugfix release. @ text @$NetBSD: patch-fixincludes_inclhack.def,v 1.3 2025/02/05 16:30:34 adam Exp $ Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches. --- fixincludes/inclhack.def.orig 2025-05-23 11:02:03.804189823 +0000 +++ fixincludes/inclhack.def @@@@ -195,33 +195,6 @@@@ fix = { }; /* - * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where - * __attribute__((availability)) is not supported. - */ -fix = { - hackname = darwin_api_availability; - mach = "*-*-darwin*"; - files = os/availability.h; - bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; - select = - " *#define __API_AVAILABLE.*\n" - " *#define __API_DEPRECATED.*\n" - " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" - " *#define __API_UNAVAILABLE.*\n"; - c_fix = format; - c_fix_arg = - " #define API_AVAILABLE(...)\n" - " #define API_DEPRECATED(...)\n" - " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" - " #define API_UNAVAILABLE(...)\n"; - test_text = - "#define __API_AVAILABLE(...)\n" - "#define __API_DEPRECATED(...)\n" - "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" - "#define __API_UNAVAILABLE(...)\n"; -}; - -/* * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) */ fix = { @@@@ -1352,32 +1326,6 @@@@ fix = { }; /* - * macOS 10.12 uses __attribute__((availability)) - * unconditionally. - */ -fix = { - hackname = darwin_availabilityinternal; - mach = "*-*-darwin*"; - files = AvailabilityInternal.h; - select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*"; - c_fix = format; - c_fix_arg = <<- _EOFix_ - #if defined(__has_attribute) - #if __has_attribute(availability) - %0 - #else - #define %1 - #endif - #else - #define %1 - #endif - _EOFix_; - - test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n" - "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))"; -}; - -/* * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) * to be useful, the main math.h must use <> and not "" includes. */ @ 1.3 log @gcc14: incorporate Homebrew patches to let GCC 14 build on macOS and other platforms @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- fixincludes/inclhack.def d7 1 a7 2 @@@@ -194,33 +194,6 @@@@ fix = { _EndOfHeader_; d9 2 a10 2 -/* d37 1 a37 1 /* d40 2 a41 10 @@@@ -1273,6 +1246,7 @@@@ fix = { hackname = apple_local_stdio_fn_deprecation; mach = "*-*-*darwin2*"; files = stdio.h; + files = _stdio.h; select = "__deprecated_msg([^\n]*)$"; c_fix = format; c_fix_arg = "#if defined(__APPLE_LOCAL_DEPRECATIONS)\n" @@@@ -1350,32 +1324,6 @@@@ fix = { test_text = "extern void* malloc( size_t );"; d43 2 a44 2 -/* d70 1 a70 1 /* d73 1 @ 1.2 log @gcc14: restore building on macOS @ text @d1 1 a1 1 $NetBSD: patch-fixincludes_inclhack.def,v 1.1 2024/06/28 18:35:16 wiz Exp $ d3 1 a3 2 A workaround for Catalina SDK bug from https://github.com/Homebrew/homebrew-core/pull/44762 d5 1 a5 1 --- fixincludes/inclhack.def.orig 2020-03-04 08:29:59.000000000 +0000 d7 2 a8 1 @@@@ -1269,6 +1269,28 @@@@ fix = { d10 28 a37 1 d39 1 a39 24 + * macOS 10.15 does not define __OSX_AVAILABLE_STARTING on + * non-clang compilers. + */ +fix = { + hackname = darwin_availability; + mach = "*-*-darwin*"; + files = Availability.h; + select = "#endif /\\* __OSX_AVAILABLE_STARTING \\*/"; + c_fix = format; + c_fix_arg = <<- _EOFix_ + #endif /* __OSX_AVAILABLE_STARTING */ + #ifndef __OSX_AVAILABLE_STARTING + #define __OSX_AVAILABLE_STARTING(_osx, _ios) + #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) + #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) + #endif + _EOFix_; + + test_text = "#endif /* __OSX_AVAILABLE_STARTING */"; +}; + +/* * macOS 10.12 uses __attribute__((availability)) * unconditionally. d41 41 @ 1.1 log @gcc14*: add new packages for GCC 14 @ text @d1 1 a1 1 $NetBSD: patch-fixincludes_inclhack.def,v 1.1 2023/05/03 20:03:09 wiz Exp $ @