summaryrefslogtreecommitdiff
path: root/fixincludes/tests
diff options
context:
space:
mode:
authorRainer Orth <ro@gcc.gnu.org>2016-11-20 10:49:47 +0000
committerRainer Orth <ro@gcc.gnu.org>2016-11-20 10:49:47 +0000
commit97448adf21ff74d0efe757d580dcefb5aab75244 (patch)
treee0646a17c02687c46ede7df11ce8ea0fa032343d /fixincludes/tests
parent71b9f645fb4148fe98563ad1ba230c3cee6d6efc (diff)
Fix libsanitizer build on OS X 10.1[01], macOS 10.12 (PR sanitizer/78267)
fixincludes: PR sanitizer/78267 * inclhack.def (darwin_availabilityinternal, darwin_os_trace_1) (darwin_os_trace_2, darwin_os_trace_3): New fixes. (hpux_stdint_least_fast): Remove spurious _EOFix_. * fixincl.x: Regenerate. * tests/bases/AvailabilityInternal.h: New file. * tests/bases/os/trace.h: New file. 2016-11-20 Jack Howarth <howarth.at.gcc@gmail.com> libsanitizer: PR sanitizer/78267 * sanitizer_common/sanitizer_mac.cc: Include <os/trace.h> only if compiler supports blocks extension. From-SVN: r242633
Diffstat (limited to 'fixincludes/tests')
-rw-r--r--fixincludes/tests/base/AvailabilityInternal.h31
-rw-r--r--fixincludes/tests/base/os/trace.h38
2 files changed, 69 insertions, 0 deletions
diff --git a/fixincludes/tests/base/AvailabilityInternal.h b/fixincludes/tests/base/AvailabilityInternal.h
new file mode 100644
index 00000000000..60b3503f153
--- /dev/null
+++ b/fixincludes/tests/base/AvailabilityInternal.h
@@ -0,0 +1,31 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/AvailabilityInternal.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( DARWIN_AVAILABILITYINTERNAL_CHECK )
+#if defined(__has_attribute)
+ #if __has_attribute(availability)
+#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))
+ #else
+ #define __API_A(x)
+ #endif
+#else
+ #define __API_A(x)
+#endif
+#if defined(__has_attribute)
+ #if __has_attribute(availability)
+#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))
+ #else
+ #define __API_D(msg,x)
+ #endif
+#else
+ #define __API_D(msg,x)
+#endif
+#endif /* DARWIN_AVAILABILITYINTERNAL_CHECK */
diff --git a/fixincludes/tests/base/os/trace.h b/fixincludes/tests/base/os/trace.h
new file mode 100644
index 00000000000..fdbf1a809fe
--- /dev/null
+++ b/fixincludes/tests/base/os/trace.h
@@ -0,0 +1,38 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/os/trace.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( DARWIN_OS_TRACE_1_CHECK )
+_os_trace_verify_printf(const char *msg, ...)
+#endif /* DARWIN_OS_TRACE_1_CHECK */
+
+
+#if defined( DARWIN_OS_TRACE_2_CHECK )
+#if __BLOCKS__
+typedef void (^os_trace_payload_t)(xpc_object_t xdict);
+#endif
+#endif /* DARWIN_OS_TRACE_2_CHECK */
+
+
+#if defined( DARWIN_OS_TRACE_3_CHECK )
+#if __BLOCKS__
+__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);
+#endif
+
+#if __BLOCKS__
+__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);
+#endif
+#endif /* DARWIN_OS_TRACE_3_CHECK */