*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Sunday September 4, 2016 at 12:15:33 PM EDT
+ * It has been AutoGen-ed November 20, 2016 at 11:44:36 AM by AutoGen 5.16.2
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sun 4 Sep 2016 12:15:33 EDT
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Nov 20 11:44:37 MET 2016
*
* You must regenerate it. Use the ./genfixes script.
*
* 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 237 fixup descriptions.
+ * This file contains 241 fixup descriptions.
*
* See README for more information.
*
#endif\n",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Darwin_Availabilityinternal fix
+ */
+tSCC zDarwin_AvailabilityinternalName[] =
+ "darwin_availabilityinternal";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_AvailabilityinternalList[] =
+ "AvailabilityInternal.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_AvailabilityinternalMachs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_AvailabilityinternalSelect0[] =
+ "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*";
+
+#define DARWIN_AVAILABILITYINTERNAL_TEST_CT 1
+static tTestDesc aDarwin_AvailabilityinternalTests[] = {
+ { TT_EGREP, zDarwin_AvailabilityinternalSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Availabilityinternal
+ */
+static const char* apzDarwin_AvailabilityinternalPatch[] = {
+ "format",
+ "#if defined(__has_attribute)\n\
+ #if __has_attribute(availability)\n\
+%0\n\
+ #else\n\
+ #define %1\n\
+ #endif\n\
+#else\n\
+ #define %1\n\
+#endif",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Darwin_9_Long_Double_Funcs_2 fix
"%1 __attribute__ ((__noreturn__));",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Darwin_Os_Trace_1 fix
+ */
+tSCC zDarwin_Os_Trace_1Name[] =
+ "darwin_os_trace_1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_Os_Trace_1List[] =
+ "os/trace.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_Os_Trace_1Machs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_Os_Trace_1Select0[] =
+ "^(_os_trace_verify_printf.*) (__attribute__.*)";
+
+#define DARWIN_OS_TRACE_1_TEST_CT 1
+static tTestDesc aDarwin_Os_Trace_1Tests[] = {
+ { TT_EGREP, zDarwin_Os_Trace_1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Os_Trace_1
+ */
+static const char* apzDarwin_Os_Trace_1Patch[] = {
+ "format",
+ "%1",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Darwin_Os_Trace_2 fix
+ */
+tSCC zDarwin_Os_Trace_2Name[] =
+ "darwin_os_trace_2";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_Os_Trace_2List[] =
+ "os/trace.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_Os_Trace_2Machs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_Os_Trace_2Select0[] =
+ "typedef.*\\^os_trace_payload_t.*";
+
+#define DARWIN_OS_TRACE_2_TEST_CT 1
+static tTestDesc aDarwin_Os_Trace_2Tests[] = {
+ { TT_EGREP, zDarwin_Os_Trace_2Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Os_Trace_2
+ */
+static const char* apzDarwin_Os_Trace_2Patch[] = {
+ "format",
+ "#if __BLOCKS__\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Darwin_Os_Trace_3 fix
+ */
+tSCC zDarwin_Os_Trace_3Name[] =
+ "darwin_os_trace_3";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_Os_Trace_3List[] =
+ "os/trace.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_Os_Trace_3Machs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_Os_Trace_3Select0[] =
+ "__(API|OSX)_.*\n\
+OS_EXPORT.*\n\
+.*\n\
+_os_trace.*os_trace_payload_t payload);";
+
+#define DARWIN_OS_TRACE_3_TEST_CT 1
+static tTestDesc aDarwin_Os_Trace_3Tests[] = {
+ { TT_EGREP, zDarwin_Os_Trace_3Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Os_Trace_3
+ */
+static const char* apzDarwin_Os_Trace_3Patch[] = {
+ "format",
+ "#if __BLOCKS__\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Darwin_Private_Extern fix
*
* List of all fixes
*/
-#define REGEX_COUNT 275
+#define REGEX_COUNT 279
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 237
+#define FIX_COUNT 241
/*
* Enumerate the fixes
CTRL_QUOTES_DEF_FIXIDX,
CTRL_QUOTES_USE_FIXIDX,
CXX_UNREADY_FIXIDX,
+ DARWIN_AVAILABILITYINTERNAL_FIXIDX,
DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
DARWIN_EXTERNC_FIXIDX,
DARWIN_GCC4_BREAKAGE_FIXIDX,
DARWIN_LONGJMP_NORETURN_FIXIDX,
+ DARWIN_OS_TRACE_1_FIXIDX,
+ DARWIN_OS_TRACE_2_FIXIDX,
+ DARWIN_OS_TRACE_3_FIXIDX,
DARWIN_PRIVATE_EXTERN_FIXIDX,
DARWIN_STDINT_1_FIXIDX,
DARWIN_STDINT_2_FIXIDX,
CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 },
+ { zDarwin_AvailabilityinternalName, zDarwin_AvailabilityinternalList,
+ apzDarwin_AvailabilityinternalMachs,
+ DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 },
+
{ zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List,
apzDarwin_9_Long_Double_Funcs_2Machs,
DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
DARWIN_LONGJMP_NORETURN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aDarwin_Longjmp_NoreturnTests, apzDarwin_Longjmp_NoreturnPatch, 0 },
+ { zDarwin_Os_Trace_1Name, zDarwin_Os_Trace_1List,
+ apzDarwin_Os_Trace_1Machs,
+ DARWIN_OS_TRACE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_Os_Trace_1Tests, apzDarwin_Os_Trace_1Patch, 0 },
+
+ { zDarwin_Os_Trace_2Name, zDarwin_Os_Trace_2List,
+ apzDarwin_Os_Trace_2Machs,
+ DARWIN_OS_TRACE_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_Os_Trace_2Tests, apzDarwin_Os_Trace_2Patch, 0 },
+
+ { zDarwin_Os_Trace_3Name, zDarwin_Os_Trace_3List,
+ apzDarwin_Os_Trace_3Machs,
+ DARWIN_OS_TRACE_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_Os_Trace_3Tests, apzDarwin_Os_Trace_3Patch, 0 },
+
{ zDarwin_Private_ExternName, zDarwin_Private_ExternList,
apzDarwin_Private_ExternMachs,
DARWIN_PRIVATE_EXTERN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
test_text = "extern void* malloc( size_t );";
};
+/*
+ * macOS 10.12 <AvailabilityInternal.h> 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 to be useful,
* you have to not use "" includes.
test_text = "void siglongjmp(sigjmp_buf, int);";
};
+/*
+ * Mac OS X 10.11 <os/trace.h> uses attribute on function definition.
+ */
+fix = {
+ hackname = darwin_os_trace_1;
+ mach = "*-*-darwin*";
+ files = os/trace.h;
+ select = "^(_os_trace_verify_printf.*) (__attribute__.*)";
+ c_fix = format;
+ c_fix_arg = "%1";
+ test_text = "_os_trace_verify_printf(const char *msg, ...) __attribute__((format(printf, 1, 2)))";
+};
+
+/*
+ * Mac OS X 10.1[012] <os/trace.h> os_trace_payload_t typedef uses Blocks
+ * extension without guard.
+ */
+fix = {
+ hackname = darwin_os_trace_2;
+ mach = "*-*-darwin*";
+ files = os/trace.h;
+ select = "typedef.*\\^os_trace_payload_t.*";
+ c_fix = format;
+ c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
+ test_text = "typedef void (^os_trace_payload_t)(xpc_object_t xdict);";
+};
+
+/*
+ * In Mac OS X 10.1[012] <os/trace.h>, need to guard users of
+ * os_trace_payload_t typedef, too.
+ */
+fix = {
+ hackname = darwin_os_trace_3;
+ mach = "*-*-darwin*";
+ files = os/trace.h;
+ select = <<- _EOSelect_
+ __(API|OSX)_.*
+ OS_EXPORT.*
+ .*
+ _os_trace.*os_trace_payload_t payload);
+ _EOSelect_;
+ c_fix = format;
+ c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
+ test_text = <<- _EOText_
+ __API_AVAILABLE(macosx(10.10), ios(8.0), watchos(2.0), tvos(8.0))
+ OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
+ void
+ _os_trace_with_buffer(void *dso, const char *message, uint8_t type, const void *buffer, size_t buffer_size, os_trace_payload_t payload);
+
+ __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0)
+ OS_EXPORT OS_NOTHROW
+ void
+ _os_trace_internal(void *dso, uint8_t type, const char *format, const uint8_t *buf, size_t buf_size, os_trace_payload_t payload);
+ _EOText_;
+};
+
/*
* __private_extern__ doesn't exist in FSF GCC. Even if it did,
* why would you ever put it in a system header file?
c-fix-arg = "# define UINT_%164_MAX __UINT64_MAX__";
test-text = "# define UINT_FAST64_MAX ULLONG_MAX\n"
"# define UINT_LEAST64_MAX ULLONG_MAX\n";
- _EOFix_;
};
/*