Skip to content

Commit 75ff8c3

Browse files
committed
fixincludes, Darwin: Remove handling for attribute availability.
Since we have an implementation we no longer need to work around cases where support for absence was broken. Signed-off-by: Iain Sandoe <[email protected]>
1 parent 4086966 commit 75ff8c3

File tree

2 files changed

+5
-165
lines changed

2 files changed

+5
-165
lines changed

fixincludes/fixincl.x

Lines changed: 5 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
*
33
* DO NOT EDIT THIS FILE (fixincl.x)
44
*
5-
* It has been AutoGen-ed August 17, 2023 at 10:16:38 AM by AutoGen 5.18.12
5+
* It has been AutoGen-ed May 13, 2024 at 05:50:22 PM by AutoGen 5.18.7
66
* From the definitions inclhack.def
77
* and the template file fixincl
88
*/
9-
/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Aug 17 10:16:38 CEST 2023
9+
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon May 13 17:50:22 BST 2024
1010
*
1111
* You must regenerate it. Use the ./genfixes script.
1212
*
@@ -15,7 +15,7 @@
1515
* certain ANSI-incompatible system header files which are fixed to work
1616
* correctly with ANSI C and placed in a directory that GNU C will search.
1717
*
18-
* This file contains 274 fixup descriptions.
18+
* This file contains 272 fixup descriptions.
1919
*
2020
* See README for more information.
2121
*
@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = {
267267
#endif /* __MATH__ */",
268268
(char*)NULL };
269269

270-
/* * * * * * * * * * * * * * * * * * * * * * * * * *
271-
*
272-
* Description of Darwin_Api_Availability fix
273-
*/
274-
tSCC zDarwin_Api_AvailabilityName[] =
275-
"darwin_api_availability";
276-
277-
/*
278-
* File name selection pattern
279-
*/
280-
tSCC zDarwin_Api_AvailabilityList[] =
281-
"os/availability.h\0";
282-
/*
283-
* Machine/OS name selection pattern
284-
*/
285-
tSCC* apzDarwin_Api_AvailabilityMachs[] = {
286-
"*-*-darwin*",
287-
(const char*)NULL };
288-
289-
/*
290-
* content selection pattern - do fix if pattern found
291-
*/
292-
tSCC zDarwin_Api_AvailabilitySelect0[] =
293-
" *#define __API_AVAILABLE.*\n\
294-
*#define __API_DEPRECATED.*\n\
295-
*#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\
296-
*#define __API_UNAVAILABLE.*\n";
297-
298-
/*
299-
* content bypass pattern - skip fix if pattern found
300-
*/
301-
tSCC zDarwin_Api_AvailabilityBypass0[] =
302-
"__IPHONE_OS_VERSION_MIN_REQUIRED";
303-
304-
#define DARWIN_API_AVAILABILITY_TEST_CT 2
305-
static tTestDesc aDarwin_Api_AvailabilityTests[] = {
306-
{ TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL },
307-
{ TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, };
308-
309-
/*
310-
* Fix Command Arguments for Darwin_Api_Availability
311-
*/
312-
static const char* apzDarwin_Api_AvailabilityPatch[] = {
313-
"format",
314-
" #define API_AVAILABLE(...)\n\
315-
#define API_DEPRECATED(...)\n\
316-
#define API_DEPRECATED_WITH_REPLACEMENT(...)\n\
317-
#define API_UNAVAILABLE(...)\n",
318-
(char*)NULL };
319-
320270
/* * * * * * * * * * * * * * * * * * * * * * * * * *
321271
*
322272
* Description of Aab_Fd_Zero_Asm_Posix_Types_H fix
@@ -2763,51 +2713,6 @@ extern \"C\" {\n\
27632713
#endif\n",
27642714
(char*)NULL };
27652715

2766-
/* * * * * * * * * * * * * * * * * * * * * * * * * *
2767-
*
2768-
* Description of Darwin_Availabilityinternal fix
2769-
*/
2770-
tSCC zDarwin_AvailabilityinternalName[] =
2771-
"darwin_availabilityinternal";
2772-
2773-
/*
2774-
* File name selection pattern
2775-
*/
2776-
tSCC zDarwin_AvailabilityinternalList[] =
2777-
"AvailabilityInternal.h\0";
2778-
/*
2779-
* Machine/OS name selection pattern
2780-
*/
2781-
tSCC* apzDarwin_AvailabilityinternalMachs[] = {
2782-
"*-*-darwin*",
2783-
(const char*)NULL };
2784-
2785-
/*
2786-
* content selection pattern - do fix if pattern found
2787-
*/
2788-
tSCC zDarwin_AvailabilityinternalSelect0[] =
2789-
"#define[ \t]+(__API_[ADU]\\([^)]*\\)).*";
2790-
2791-
#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1
2792-
static tTestDesc aDarwin_AvailabilityinternalTests[] = {
2793-
{ TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, };
2794-
2795-
/*
2796-
* Fix Command Arguments for Darwin_Availabilityinternal
2797-
*/
2798-
static const char* apzDarwin_AvailabilityinternalPatch[] = {
2799-
"format",
2800-
"#if defined(__has_attribute)\n\
2801-
#if __has_attribute(availability)\n\
2802-
%0\n\
2803-
#else\n\
2804-
#define %1\n\
2805-
#endif\n\
2806-
#else\n\
2807-
#define %1\n\
2808-
#endif",
2809-
(char*)NULL };
2810-
28112716
/* * * * * * * * * * * * * * * * * * * * * * * * * *
28122717
*
28132718
* Description of Darwin_9_Long_Double_Funcs_2 fix
@@ -11169,9 +11074,9 @@ static const char* apzX11_SprintfPatch[] = {
1116911074
*
1117011075
* List of all fixes
1117111076
*/
11172-
#define REGEX_COUNT 313
11077+
#define REGEX_COUNT 310
1117311078
#define MACH_LIST_SIZE_LIMIT 187
11174-
#define FIX_COUNT 274
11079+
#define FIX_COUNT 272
1117511080

1117611081
/*
1117711082
* Enumerate the fixes
@@ -11180,7 +11085,6 @@ typedef enum {
1118011085
AAB_AIX_STDIO_FIXIDX,
1118111086
AAB_AIX_FCNTL_FIXIDX,
1118211087
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX,
11183-
DARWIN_API_AVAILABILITY_FIXIDX,
1118411088
AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
1118511089
AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
1118611090
AAB_FD_ZERO_SELECTBITS_H_FIXIDX,
@@ -11242,7 +11146,6 @@ typedef enum {
1124211146
CTRL_QUOTES_DEF_FIXIDX,
1124311147
CTRL_QUOTES_USE_FIXIDX,
1124411148
CXX_UNREADY_FIXIDX,
11245-
DARWIN_AVAILABILITYINTERNAL_FIXIDX,
1124611149
DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
1124711150
DARWIN_EXTERNC_FIXIDX,
1124811151
DARWIN_GCC4_BREAKAGE_FIXIDX,
@@ -11469,11 +11372,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
1146911372
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
1147011373
aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 },
1147111374

11472-
{ zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList,
11473-
apzDarwin_Api_AvailabilityMachs,
11474-
DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
11475-
aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 },
11476-
1147711375
{ zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList,
1147811376
apzAab_Fd_Zero_Asm_Posix_Types_HMachs,
1147911377
AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
@@ -11779,11 +11677,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
1177911677
CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
1178011678
aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 },
1178111679

11782-
{ zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList,
11783-
apzDarwin_AvailabilityinternalMachs,
11784-
DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
11785-
aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 },
11786-
1178711680
{ zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List,
1178811681
apzDarwin_9_Long_Double_Funcs_2Machs,
1178911682
DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

fixincludes/inclhack.def

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -194,33 +194,6 @@ fix = {
194194
_EndOfHeader_;
195195
};
196196

197-
/*
198-
* SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where
199-
* __attribute__((availability)) is not supported.
200-
*/
201-
fix = {
202-
hackname = darwin_api_availability;
203-
mach = "*-*-darwin*";
204-
files = os/availability.h;
205-
bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED";
206-
select =
207-
" *#define __API_AVAILABLE.*\n"
208-
" *#define __API_DEPRECATED.*\n"
209-
" *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n"
210-
" *#define __API_UNAVAILABLE.*\n";
211-
c_fix = format;
212-
c_fix_arg =
213-
" #define API_AVAILABLE(...)\n"
214-
" #define API_DEPRECATED(...)\n"
215-
" #define API_DEPRECATED_WITH_REPLACEMENT(...)\n"
216-
" #define API_UNAVAILABLE(...)\n";
217-
test_text =
218-
"#define __API_AVAILABLE(...)\n"
219-
"#define __API_DEPRECATED(...)\n"
220-
"#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n"
221-
"#define __API_UNAVAILABLE(...)\n";
222-
};
223-
224197
/*
225198
* This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
226199
*/
@@ -1350,32 +1323,6 @@ fix = {
13501323
test_text = "extern void* malloc( size_t );";
13511324
};
13521325

1353-
/*
1354-
* macOS 10.12 <AvailabilityInternal.h> uses __attribute__((availability))
1355-
* unconditionally.
1356-
*/
1357-
fix = {
1358-
hackname = darwin_availabilityinternal;
1359-
mach = "*-*-darwin*";
1360-
files = AvailabilityInternal.h;
1361-
select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*";
1362-
c_fix = format;
1363-
c_fix_arg = <<- _EOFix_
1364-
#if defined(__has_attribute)
1365-
#if __has_attribute(availability)
1366-
%0
1367-
#else
1368-
#define %1
1369-
#endif
1370-
#else
1371-
#define %1
1372-
#endif
1373-
_EOFix_;
1374-
1375-
test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n"
1376-
"#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))";
1377-
};
1378-
13791326
/*
13801327
* For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long)
13811328
* to be useful, the main math.h must use <> and not "" includes.

0 commit comments

Comments
 (0)