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/fixincl.x | |
parent | da92beb3726e8acafe0301fdf0d3381a33d0ccd4 (diff) | |
download | gcc-5c439f4d675813d18876b191137dcd5849bd6e7e.tar.gz |
[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/fixincl.x')
-rw-r--r-- | fixincludes/fixincl.x | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index b9e02985843..e5ae601eca0 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed June 21, 2019 at 08:06:27 PM by AutoGen 5.17.4 + * It has been AutoGen-ed June 21, 2019 at 09:13:33 PM by AutoGen 5.17.4 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 21 20:06:27 BST 2019 +/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 21 21:13:33 BST 2019 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 255 fixup descriptions. + * This file contains 256 fixup descriptions. * * See README for more information. * @@ -269,6 +269,56 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Darwin_Api_Availability fix + */ +tSCC zDarwin_Api_AvailabilityName[] = + "darwin_api_availability"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Api_AvailabilityList[] = + "os/availability.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Api_AvailabilityMachs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Api_AvailabilitySelect0[] = + " *#define __API_AVAILABLE.*\n\ + *#define __API_DEPRECATED.*\n\ + *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ + *#define __API_UNAVAILABLE.*\n"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zDarwin_Api_AvailabilityBypass0[] = + "__IPHONE_OS_VERSION_MIN_REQUIRED"; + +#define DARWIN_API_AVAILABILITY_TEST_CT 2 +static tTestDesc aDarwin_Api_AvailabilityTests[] = { + { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, + { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Api_Availability + */ +static const char* apzDarwin_Api_AvailabilityPatch[] = { + "format", + " #define API_AVAILABLE(...)\n\ + #define API_DEPRECATED(...)\n\ + #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ + #define API_UNAVAILABLE(...)\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix */ tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] = @@ -10346,9 +10396,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 293 +#define REGEX_COUNT 295 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 255 +#define FIX_COUNT 256 /* * Enumerate the fixes @@ -10357,6 +10407,7 @@ typedef enum { AAB_AIX_STDIO_FIXIDX, AAB_AIX_FCNTL_FIXIDX, AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, + DARWIN_API_AVAILABILITY_FIXIDX, AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, AAB_FD_ZERO_SELECTBITS_H_FIXIDX, @@ -10627,6 +10678,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, + apzDarwin_Api_AvailabilityMachs, + DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, apzAab_Fd_Zero_Asm_Posix_Types_HMachs, AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, |