diff options
author | C.G. Dogan <gcc+cgdogan.00@gmail.com> | 2019-08-18 18:54:13 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2019-08-18 18:54:13 +0000 |
commit | 5c439f4d675813d18876b191137dcd5849bd6e7e (patch) | |
tree | 24fde358f394cd6063a23fb9c7a845d4be760259 /fixincludes/inclhack.def | |
parent | da92beb3726e8acafe0301fdf0d3381a33d0ccd4 (diff) | |
download | gcc-5c439f4d675813d18876b191137dcd5849bd6e7e.zip gcc-5c439f4d675813d18876b191137dcd5849bd6e7e.tar.gz gcc-5c439f4d675813d18876b191137dcd5849bd6e7e.tar.bz2 |
[Darwin, fixincludes] Fix PR83531
There is no reasonable chance that the SDKs in question will be re-
issued, so the only viable solution is a fixincludes.
2019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com>
Iain Sandoe <iain@sandoe.co.uk>
PR target/83531
* inclhack.def (darwin_api_availability): New, strip leading
underscores from API_XXXX defines.
* fixincl.x: Regenerate.
* tests/base/os/availability.h: New file.
Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
From-SVN: r274624
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 861532c..3c6b48d 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -195,6 +195,33 @@ 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 = { |