Commit 7d0acacfc3

Jakub Konka <kubkon@jakubkonka.com>
2020-10-20 21:20:09
Add minimal set of macOS libc headers
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
1 parent 44f8e6a
lib/libc/include/x86_64-macos-gnu/_types/_intmax_t.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _INTMAX_T
+#define _INTMAX_T
+#ifdef __INTMAX_TYPE__
+typedef __INTMAX_TYPE__ intmax_t;
+#else
+#ifdef __LP64__
+typedef long int intmax_t;
+#else
+typedef long long int intmax_t;
+#endif /* __LP64__ */
+#endif /* __INTMAX_TYPE__ */
+#endif /* _INTMAX_T */
lib/libc/include/x86_64-macos-gnu/_types/_uint16_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _UINT16_T
+#define _UINT16_T
+typedef unsigned short uint16_t;
+#endif /* _UINT16_T */
lib/libc/include/x86_64-macos-gnu/_types/_uint32_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _UINT32_T
+#define _UINT32_T
+typedef unsigned int uint32_t;
+#endif /* _UINT32_T */
lib/libc/include/x86_64-macos-gnu/_types/_uint64_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _UINT64_T
+#define _UINT64_T
+typedef unsigned long long uint64_t;
+#endif /* _UINT64_T */
lib/libc/include/x86_64-macos-gnu/_types/_uint8_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _UINT8_T
+#define _UINT8_T
+typedef unsigned char uint8_t;
+#endif /* _UINT8_T */
lib/libc/include/x86_64-macos-gnu/_types/_uintmax_t.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _UINTMAX_T
+#define _UINTMAX_T
+#ifdef __UINTMAX_TYPE__
+typedef __UINTMAX_TYPE__ uintmax_t;
+#else
+#ifdef __LP64__
+typedef long unsigned int uintmax_t;
+#else
+typedef long long unsigned int uintmax_t;
+#endif /* __LP64__ */
+#endif /* __UINTMAX_TYPE__ */
+#endif /* _UINTMAX_T */
lib/libc/include/x86_64-macos-gnu/_types/_wctrans_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _WCTRANS_T 
+#define _WCTRANS_T 
+#include <_types.h>
+typedef	__darwin_wctrans_t wctrans_t;
+#endif /* _WCTRANS_T */
\ No newline at end of file
lib/libc/include/x86_64-macos-gnu/_types/_wctype_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _WCTYPE_T
+#define _WCTYPE_T 
+#include <_types.h>
+typedef __darwin_wctype_t wctype_t;
+#endif /* _WCTYPE_T */
\ No newline at end of file
lib/libc/include/x86_64-macos-gnu/i386/_limits.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#ifndef _I386__LIMITS_H_
+#define _I386__LIMITS_H_
+
+#define __DARWIN_CLK_TCK                100     /* ticks per second */
+
+#endif  /* _I386__LIMITS_H_ */
lib/libc/include/x86_64-macos-gnu/i386/_mcontext.h
@@ -0,0 +1,212 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef __I386_MCONTEXT_H_
+#define __I386_MCONTEXT_H_
+
+#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
+#include <sys/appleapiopts.h>
+#include <mach/machine/_structs.h>
+
+#ifndef _STRUCT_MCONTEXT32
+#if __DARWIN_UNIX03
+#define _STRUCT_MCONTEXT32      struct __darwin_mcontext32
+_STRUCT_MCONTEXT32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   __es;
+	_STRUCT_X86_THREAD_STATE32      __ss;
+	_STRUCT_X86_FLOAT_STATE32       __fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX32  struct __darwin_mcontext_avx32
+_STRUCT_MCONTEXT_AVX32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   __es;
+	_STRUCT_X86_THREAD_STATE32      __ss;
+	_STRUCT_X86_AVX_STATE32         __fs;
+};
+
+#if defined(_STRUCT_X86_AVX512_STATE32)
+#define _STRUCT_MCONTEXT_AVX512_32      struct __darwin_mcontext_avx512_32
+_STRUCT_MCONTEXT_AVX512_32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   __es;
+	_STRUCT_X86_THREAD_STATE32      __ss;
+	_STRUCT_X86_AVX512_STATE32      __fs;
+};
+#endif /* _STRUCT_X86_AVX512_STATE32 */
+
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_MCONTEXT32      struct mcontext32
+_STRUCT_MCONTEXT32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   es;
+	_STRUCT_X86_THREAD_STATE32      ss;
+	_STRUCT_X86_FLOAT_STATE32       fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX32  struct mcontext_avx32
+_STRUCT_MCONTEXT_AVX32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   es;
+	_STRUCT_X86_THREAD_STATE32      ss;
+	_STRUCT_X86_AVX_STATE32         fs;
+};
+
+#if defined(_STRUCT_X86_AVX512_STATE32)
+#define _STRUCT_MCONTEXT_AVX512_32      struct mcontext_avx512_32
+_STRUCT_MCONTEXT_AVX512_32
+{
+	_STRUCT_X86_EXCEPTION_STATE32   es;
+	_STRUCT_X86_THREAD_STATE32      ss;
+	_STRUCT_X86_AVX512_STATE32      fs;
+};
+#endif /* _STRUCT_X86_AVX512_STATE32 */
+
+#endif /* __DARWIN_UNIX03 */
+#endif /* _STRUCT_MCONTEXT32 */
+
+#ifndef _STRUCT_MCONTEXT64
+#if __DARWIN_UNIX03
+#define _STRUCT_MCONTEXT64      struct __darwin_mcontext64
+_STRUCT_MCONTEXT64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_STATE64      __ss;
+	_STRUCT_X86_FLOAT_STATE64       __fs;
+};
+
+#define _STRUCT_MCONTEXT64_FULL      struct __darwin_mcontext64_full
+_STRUCT_MCONTEXT64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_FULL_STATE64 __ss;
+	_STRUCT_X86_FLOAT_STATE64       __fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX64  struct __darwin_mcontext_avx64
+_STRUCT_MCONTEXT_AVX64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_STATE64      __ss;
+	_STRUCT_X86_AVX_STATE64         __fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX64_FULL  struct __darwin_mcontext_avx64_full
+_STRUCT_MCONTEXT_AVX64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_FULL_STATE64 __ss;
+	_STRUCT_X86_AVX_STATE64         __fs;
+};
+
+#if defined(_STRUCT_X86_AVX512_STATE64)
+#define _STRUCT_MCONTEXT_AVX512_64      struct __darwin_mcontext_avx512_64
+_STRUCT_MCONTEXT_AVX512_64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_STATE64      __ss;
+	_STRUCT_X86_AVX512_STATE64      __fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX512_64_FULL      struct __darwin_mcontext_avx512_64_full
+_STRUCT_MCONTEXT_AVX512_64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   __es;
+	_STRUCT_X86_THREAD_FULL_STATE64 __ss;
+	_STRUCT_X86_AVX512_STATE64      __fs;
+};
+#endif /* _STRUCT_X86_AVX512_STATE64 */
+
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_MCONTEXT64      struct mcontext64
+_STRUCT_MCONTEXT64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_STATE64      ss;
+	_STRUCT_X86_FLOAT_STATE64       fs;
+};
+
+#define _STRUCT_MCONTEXT64_FULL      struct mcontext64_full
+_STRUCT_MCONTEXT64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_FULL_STATE64 ss;
+	_STRUCT_X86_FLOAT_STATE64       fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX64  struct mcontext_avx64
+_STRUCT_MCONTEXT_AVX64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_STATE64      ss;
+	_STRUCT_X86_AVX_STATE64         fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX64_FULL  struct mcontext_avx64_full
+_STRUCT_MCONTEXT_AVX64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_FULL_STATE64 ss;
+	_STRUCT_X86_AVX_STATE64         fs;
+};
+
+#if defined(_STRUCT_X86_AVX512_STATE64)
+#define _STRUCT_MCONTEXT_AVX512_64      struct mcontext_avx512_64
+_STRUCT_MCONTEXT_AVX512_64
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_STATE64      ss;
+	_STRUCT_X86_AVX512_STATE64      fs;
+};
+
+#define _STRUCT_MCONTEXT_AVX512_64_FULL      struct mcontext_avx512_64_full
+_STRUCT_MCONTEXT_AVX512_64_FULL
+{
+	_STRUCT_X86_EXCEPTION_STATE64   es;
+	_STRUCT_X86_THREAD_FULL_STATE64 ss;
+	_STRUCT_X86_AVX512_STATE64      fs;
+};
+#endif /* _STRUCT_X86_AVX512_STATE64 */
+
+#endif /* __DARWIN_UNIX03 */
+#endif /* _STRUCT_MCONTEXT64 */
+
+
+#ifndef _MCONTEXT_T
+#define _MCONTEXT_T
+#if defined(__LP64__)
+typedef _STRUCT_MCONTEXT64      *mcontext_t;
+#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT64
+#else
+typedef _STRUCT_MCONTEXT32      *mcontext_t;
+#define _STRUCT_MCONTEXT        _STRUCT_MCONTEXT32
+#endif
+#endif /* _MCONTEXT_T */
+
+#endif /* __I386_MCONTEXT_H_ */
lib/libc/include/x86_64-macos-gnu/i386/_types.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _BSD_I386__TYPES_H_
+#define _BSD_I386__TYPES_H_
+
+/*
+ * This header file contains integer types.  It's intended to also contain
+ * flotaing point and other arithmetic types, as needed, later.
+ */
+
+#ifdef __GNUC__
+typedef __signed char           __int8_t;
+#else   /* !__GNUC__ */
+typedef char                    __int8_t;
+#endif  /* !__GNUC__ */
+typedef unsigned char           __uint8_t;
+typedef short                   __int16_t;
+typedef unsigned short          __uint16_t;
+typedef int                     __int32_t;
+typedef unsigned int            __uint32_t;
+typedef long long               __int64_t;
+typedef unsigned long long      __uint64_t;
+
+typedef long                    __darwin_intptr_t;
+typedef unsigned int            __darwin_natural_t;
+
+/*
+ * The rune type below is declared to be an ``int'' instead of the more natural
+ * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
+ * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
+ * it looks like 10646 will be a 31 bit standard.  This means that if your
+ * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
+ * chosen over a long is that the is*() and to*() routines take ints (says
+ * ANSI C), but they use __darwin_ct_rune_t instead of int.  By changing it
+ * here, you lose a bit of ANSI conformance, but your programs will still
+ * work.
+ *
+ * NOTE: rune_t is not covered by ANSI nor other standards, and should not
+ * be instantiated outside of lib/libc/locale.  Use wchar_t.  wchar_t and
+ * rune_t must be the same type.  Also wint_t must be no narrower than
+ * wchar_t, and should also be able to hold all members of the largest
+ * character set plus one extra value (WEOF). wint_t must be at least 16 bits.
+ */
+
+typedef int                     __darwin_ct_rune_t;     /* ct_rune_t */
+
+/*
+ * mbstate_t is an opaque object to keep conversion state, during multibyte
+ * stream conversions.  The content must not be referenced by user programs.
+ */
+typedef union {
+	char            __mbstate8[128];
+	long long       _mbstateL;                      /* for alignment */
+} __mbstate_t;
+
+typedef __mbstate_t             __darwin_mbstate_t;     /* mbstate_t */
+
+#if defined(__PTRDIFF_TYPE__)
+typedef __PTRDIFF_TYPE__        __darwin_ptrdiff_t;     /* ptr1 - ptr2 */
+#elif defined(__LP64__)
+typedef long                    __darwin_ptrdiff_t;     /* ptr1 - ptr2 */
+#else
+typedef int                     __darwin_ptrdiff_t;     /* ptr1 - ptr2 */
+#endif /* __GNUC__ */
+
+#if defined(__SIZE_TYPE__)
+typedef __SIZE_TYPE__           __darwin_size_t;        /* sizeof() */
+#else
+typedef unsigned long           __darwin_size_t;        /* sizeof() */
+#endif
+
+#if (__GNUC__ > 2)
+typedef __builtin_va_list       __darwin_va_list;       /* va_list */
+#else
+typedef void *                  __darwin_va_list;       /* va_list */
+#endif
+
+#if defined(__WCHAR_TYPE__)
+typedef __WCHAR_TYPE__          __darwin_wchar_t;       /* wchar_t */
+#else
+typedef __darwin_ct_rune_t      __darwin_wchar_t;       /* wchar_t */
+#endif
+
+typedef __darwin_wchar_t        __darwin_rune_t;        /* rune_t */
+
+#if defined(__WINT_TYPE__)
+typedef __WINT_TYPE__           __darwin_wint_t;        /* wint_t */
+#else
+typedef __darwin_ct_rune_t      __darwin_wint_t;        /* wint_t */
+#endif
+
+typedef unsigned long           __darwin_clock_t;       /* clock() */
+typedef __uint32_t              __darwin_socklen_t;     /* socklen_t (duh) */
+typedef long                    __darwin_ssize_t;       /* byte count or error */
+typedef long                    __darwin_time_t;        /* time() */
+
+#endif  /* _BSD_I386__TYPES_H_ */
lib/libc/include/x86_64-macos-gnu/i386/endian.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1995 NeXT Computer, Inc. All rights reserved.
+ */
+/*
+ * Copyright (c) 1987, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)endian.h	8.1 (Berkeley) 6/11/93
+ */
+
+#ifndef _I386__ENDIAN_H_
+#define _I386__ENDIAN_H_
+
+#include <sys/cdefs.h>
+/*
+ * Define _NOQUAD if the compiler does NOT support 64-bit integers.
+ */
+/* #define _NOQUAD */
+
+/*
+ * Define the order of 32-bit words in 64-bit words.
+ */
+#define _QUAD_HIGHWORD 1
+#define _QUAD_LOWWORD 0
+
+/*
+ * Definitions for byte order, according to byte significance from low
+ * address to high.
+ */
+#define __DARWIN_LITTLE_ENDIAN  1234    /* LSB first: i386, vax */
+#define __DARWIN_BIG_ENDIAN     4321    /* MSB first: 68000, ibm, net */
+#define __DARWIN_PDP_ENDIAN     3412    /* LSB first in word, MSW first in long */
+
+#define __DARWIN_BYTE_ORDER     __DARWIN_LITTLE_ENDIAN
+
+#if     defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+
+#define LITTLE_ENDIAN   __DARWIN_LITTLE_ENDIAN
+#define BIG_ENDIAN      __DARWIN_BIG_ENDIAN
+#define PDP_ENDIAN      __DARWIN_PDP_ENDIAN
+
+#define BYTE_ORDER      __DARWIN_BYTE_ORDER
+
+#include <sys/_endian.h>
+
+#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+#endif /* !_I386__ENDIAN_H_ */
lib/libc/include/x86_64-macos-gnu/i386/limits.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)limits.h	8.3 (Berkeley) 1/4/94
+ */
+
+#ifndef _I386_LIMITS_H_
+#define _I386_LIMITS_H_
+
+#include <sys/cdefs.h>
+#include <i386/_limits.h>
+
+#define CHAR_BIT        8               /* number of bits in a char */
+#define MB_LEN_MAX      6               /* Allow 31 bit UTF2 */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#define CLK_TCK         __DARWIN_CLK_TCK        /* ticks per second */
+#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * According to ANSI (section 2.2.4.2), the values below must be usable by
+ * #if preprocessing directives.  Additionally, the expression must have the
+ * same type as would an expression that is an object of the corresponding
+ * type converted according to the integral promotions.  The subtraction for
+ * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
+ * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
+ * These numbers work for pcc as well.  The UINT_MAX and ULONG_MAX values
+ * are written as hex so that GCC will be quiet about large integer constants.
+ */
+#define SCHAR_MAX       127             /* min value for a signed char */
+#define SCHAR_MIN       (-128)          /* max value for a signed char */
+
+#define UCHAR_MAX       255             /* max value for an unsigned char */
+#define CHAR_MAX        127             /* max value for a char */
+#define CHAR_MIN        (-128)          /* min value for a char */
+
+#define USHRT_MAX       65535           /* max value for an unsigned short */
+#define SHRT_MAX        32767           /* max value for a short */
+#define SHRT_MIN        (-32768)        /* min value for a short */
+
+#define UINT_MAX        0xffffffff      /* max value for an unsigned int */
+#define INT_MAX         2147483647      /* max value for an int */
+#define INT_MIN         (-2147483647-1) /* min value for an int */
+
+#ifdef __LP64__
+#define ULONG_MAX       0xffffffffffffffffUL    /* max unsigned long */
+#define LONG_MAX        0x7fffffffffffffffL     /* max signed long */
+#define LONG_MIN        (-0x7fffffffffffffffL-1) /* min signed long */
+#else /* !__LP64__ */
+#define ULONG_MAX       0xffffffffUL    /* max unsigned long */
+#define LONG_MAX        2147483647L     /* max signed long */
+#define LONG_MIN        (-2147483647L-1) /* min signed long */
+#endif /* __LP64__ */
+
+#define ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
+#define LLONG_MAX       0x7fffffffffffffffLL    /* max signed long long */
+#define LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
+
+#if !defined(_ANSI_SOURCE)
+#ifdef __LP64__
+#define LONG_BIT        64
+#else /* !__LP64__ */
+#define LONG_BIT        32
+#endif /* __LP64__ */
+#define SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
+#define WORD_BIT        32
+
+#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
+#define SIZE_T_MAX      ULONG_MAX       /* max value for a size_t */
+
+#define UQUAD_MAX       ULLONG_MAX
+#define QUAD_MAX        LLONG_MAX
+#define QUAD_MIN        LLONG_MIN
+
+#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
+#endif /* !_ANSI_SOURCE */
+
+#endif /* _I386_LIMITS_H_ */
lib/libc/include/x86_64-macos-gnu/i386/signal.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1992 NeXT Computer, Inc.
+ *
+ */
+
+#ifndef _I386_SIGNAL_H_
+#define _I386_SIGNAL_H_ 1
+
+#include <sys/cdefs.h>
+
+#ifndef _ANSI_SOURCE
+typedef int sig_atomic_t;
+
+#endif /* ! _ANSI_SOURCE */
+
+#endif  /* _I386_SIGNAL_H_ */
lib/libc/include/x86_64-macos-gnu/i386/types.h
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1995 NeXT Computer, Inc. All rights reserved.
+ */
+/*
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)types.h	8.3 (Berkeley) 1/5/94
+ */
+
+#ifndef _MACHTYPES_H_
+#define _MACHTYPES_H_
+
+#ifndef __ASSEMBLER__
+#include <i386/_types.h>
+#include <sys/cdefs.h>
+/*
+ * Basic integral types.  Omit the typedef if
+ * not possible for a machine/compiler combination.
+ */
+#include <sys/_types/_int8_t.h>
+#include <sys/_types/_int16_t.h>
+#include <sys/_types/_int32_t.h>
+#include <sys/_types/_int64_t.h>
+
+#include <sys/_types/_u_int8_t.h>
+#include <sys/_types/_u_int16_t.h>
+#include <sys/_types/_u_int32_t.h>
+#include <sys/_types/_u_int64_t.h>
+
+#if __LP64__
+typedef int64_t                 register_t;
+#else
+typedef int32_t                 register_t;
+#endif
+
+#include <sys/_types/_intptr_t.h>
+#include <sys/_types/_uintptr_t.h>
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+/* These types are used for reserving the largest possible size. */
+typedef u_int64_t               user_addr_t;
+typedef u_int64_t               user_size_t;
+typedef int64_t                 user_ssize_t;
+typedef int64_t                 user_long_t;
+typedef u_int64_t               user_ulong_t;
+typedef int64_t                 user_time_t;
+typedef int64_t                 user_off_t;
+#define USER_ADDR_NULL  ((user_addr_t) 0)
+#define CAST_USER_ADDR_T(a_ptr)   ((user_addr_t)((uintptr_t)(a_ptr)))
+
+
+#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/* This defines the size of syscall arguments after copying into the kernel: */
+typedef u_int64_t               syscall_arg_t;
+
+#endif /* __ASSEMBLER__ */
+#endif  /* _MACHTYPES_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/i386/_OSByteOrder.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2006-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _OS__OSBYTEORDERI386_H
+#define _OS__OSBYTEORDERI386_H
+
+#if !defined(__DARWIN_OS_INLINE)
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#        define __DARWIN_OS_INLINE static inline
+# elif defined(__MWERKS__) || defined(__cplusplus)
+#        define __DARWIN_OS_INLINE static inline
+# else
+#        define __DARWIN_OS_INLINE static __inline__
+# endif
+#endif
+
+/* Generic byte swapping functions. */
+
+__DARWIN_OS_INLINE
+__uint16_t
+_OSSwapInt16(
+	__uint16_t        _data
+	)
+{
+	return (__uint16_t)((_data << 8) | (_data >> 8));
+}
+
+__DARWIN_OS_INLINE
+__uint32_t
+_OSSwapInt32(
+	__uint32_t        _data
+	)
+{
+#if defined(__llvm__)
+	return __builtin_bswap32(_data);
+#else
+	__asm__ ("bswap   %0" : "+r" (_data));
+	return _data;
+#endif
+}
+
+#if defined(__llvm__)
+__DARWIN_OS_INLINE
+__uint64_t
+_OSSwapInt64(
+	__uint64_t        _data
+	)
+{
+	return __builtin_bswap64(_data);
+}
+
+#elif defined(__i386__)
+__DARWIN_OS_INLINE
+__uint64_t
+_OSSwapInt64(
+	__uint64_t        _data
+	)
+{
+	__asm__ ("bswap   %%eax\n\t"
+                 "bswap   %%edx\n\t"
+                 "xchgl   %%eax, %%edx"
+                 : "+A" (_data));
+	return _data;
+}
+#elif defined(__x86_64__)
+__DARWIN_OS_INLINE
+__uint64_t
+_OSSwapInt64(
+	__uint64_t        _data
+	)
+{
+	__asm__ ("bswap   %0" : "+r" (_data));
+	return _data;
+}
+#else
+#error Unknown architecture
+#endif
+
+#endif /* ! _OS__OSBYTEORDERI386_H */
lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _OS__OSBYTEORDER_H
+#define _OS__OSBYTEORDER_H
+
+/*
+ * This header is normally included from <libkern/OSByteOrder.h>.  However,
+ * <sys/_endian.h> also includes this in the case of little-endian
+ * architectures, so that we can map OSByteOrder routines to the hton* and ntoh*
+ * macros.  This results in the asymmetry below; we only include
+ * <libkern/arch/_OSByteOrder.h> for little-endian architectures.
+ */
+
+#include <sys/_types.h>
+
+/* Macros for swapping constant values in the preprocessing stage. */
+#define __DARWIN_OSSwapConstInt16(x) \
+    ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \
+	        (((__uint16_t)(x) & 0x00ff) << 8)))
+
+#define __DARWIN_OSSwapConstInt32(x) \
+    ((__uint32_t)((((__uint32_t)(x) & 0xff000000) >> 24) | \
+	        (((__uint32_t)(x) & 0x00ff0000) >>  8) | \
+	        (((__uint32_t)(x) & 0x0000ff00) <<  8) | \
+	        (((__uint32_t)(x) & 0x000000ff) << 24)))
+
+#define __DARWIN_OSSwapConstInt64(x) \
+    ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
+	        (((__uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
+	        (((__uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
+	        (((__uint64_t)(x) & 0x000000ff00000000ULL) >>  8) | \
+	        (((__uint64_t)(x) & 0x00000000ff000000ULL) <<  8) | \
+	        (((__uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
+	        (((__uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
+	        (((__uint64_t)(x) & 0x00000000000000ffULL) << 56)))
+
+#if defined(__GNUC__)
+
+#if defined(__i386__) || defined(__x86_64__)
+#include <libkern/i386/_OSByteOrder.h>
+#endif
+
+
+
+#define __DARWIN_OSSwapInt16(x) \
+    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
+
+#define __DARWIN_OSSwapInt32(x) \
+    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
+
+#define __DARWIN_OSSwapInt64(x) \
+    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
+
+#else /* ! __GNUC__ */
+
+#if defined(__i386__) || defined(__x86_64__)
+
+#if !defined(__DARWIN_OS_INLINE)
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#        define __DARWIN_OS_INLINE static inline
+# elif defined(__MWERKS__) || defined(__cplusplus)
+#        define __DARWIN_OS_INLINE static inline
+# else
+#        define __DARWIN_OS_INLINE static __inline__
+# endif
+#endif
+
+__DARWIN_OS_INLINE
+uint16_t
+_OSSwapInt16(
+	uint16_t                    data
+	)
+{
+	return __DARWIN_OSSwapConstInt16(data);
+}
+
+__DARWIN_OS_INLINE
+uint32_t
+_OSSwapInt32(
+	uint32_t                    data
+	)
+{
+	return __DARWIN_OSSwapConstInt32(data);
+}
+
+__DARWIN_OS_INLINE
+uint64_t
+_OSSwapInt64(
+	uint64_t                    data
+	)
+{
+	return __DARWIN_OSSwapConstInt64(data);
+}
+#endif
+
+#define __DARWIN_OSSwapInt16(x) _OSSwapInt16(x)
+
+#define __DARWIN_OSSwapInt32(x) _OSSwapInt32(x)
+
+#define __DARWIN_OSSwapInt64(x) _OSSwapInt64(x)
+
+#endif /* __GNUC__ */
+
+#endif /* ! _OS__OSBYTEORDER_H */
lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h
@@ -0,0 +1,1232 @@
+/*
+ * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+#ifndef	_MACH_I386__STRUCTS_H_
+#define	_MACH_I386__STRUCTS_H_
+
+#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
+#include <machine/types.h> /* __uint8_t */
+
+/*
+ * i386 is the structure that is exported to user threads for 
+ * use in status/mutate calls.  This structure should never change.
+ *
+ */
+
+#if __DARWIN_UNIX03
+#define	_STRUCT_X86_THREAD_STATE32	struct __darwin_i386_thread_state
+_STRUCT_X86_THREAD_STATE32
+{
+    unsigned int	__eax;
+    unsigned int	__ebx;
+    unsigned int	__ecx;
+    unsigned int	__edx;
+    unsigned int	__edi;
+    unsigned int	__esi;
+    unsigned int	__ebp;
+    unsigned int	__esp;
+    unsigned int	__ss;
+    unsigned int	__eflags;
+    unsigned int	__eip;
+    unsigned int	__cs;
+    unsigned int	__ds;
+    unsigned int	__es;
+    unsigned int	__fs;
+    unsigned int	__gs;
+};
+#else /* !__DARWIN_UNIX03 */
+#define	_STRUCT_X86_THREAD_STATE32	struct i386_thread_state
+_STRUCT_X86_THREAD_STATE32
+{
+    unsigned int	eax;
+    unsigned int	ebx;
+    unsigned int	ecx;
+    unsigned int	edx;
+    unsigned int	edi;
+    unsigned int	esi;
+    unsigned int	ebp;
+    unsigned int	esp;
+    unsigned int	ss;
+    unsigned int	eflags;
+    unsigned int	eip;
+    unsigned int	cs;
+    unsigned int	ds;
+    unsigned int	es;
+    unsigned int	fs;
+    unsigned int	gs;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+/* This structure should be double-word aligned for performance */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_FP_CONTROL	struct __darwin_fp_control
+_STRUCT_FP_CONTROL
+{
+    unsigned short		__invalid	:1,
+    				__denorm	:1,
+				__zdiv		:1,
+				__ovrfl		:1,
+				__undfl		:1,
+				__precis	:1,
+						:2,
+				__pc		:2,
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define FP_PREC_24B		0
+#define	FP_PREC_53B		2
+#define FP_PREC_64B		3
+#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
+				__rc		:2,
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define FP_RND_NEAR		0
+#define FP_RND_DOWN		1
+#define FP_RND_UP		2
+#define FP_CHOP			3
+#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
+					/*inf*/	:1,
+						:3;
+};
+typedef _STRUCT_FP_CONTROL	__darwin_fp_control_t;
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_FP_CONTROL	struct fp_control
+_STRUCT_FP_CONTROL
+{
+    unsigned short		invalid	:1,
+    				denorm	:1,
+				zdiv	:1,
+				ovrfl	:1,
+				undfl	:1,
+				precis	:1,
+					:2,
+				pc	:2,
+#define FP_PREC_24B		0
+#define	FP_PREC_53B		2
+#define FP_PREC_64B		3
+				rc	:2,
+#define FP_RND_NEAR		0
+#define FP_RND_DOWN		1
+#define FP_RND_UP		2
+#define FP_CHOP			3
+				/*inf*/	:1,
+					:3;
+};
+typedef _STRUCT_FP_CONTROL	fp_control_t;
+#endif /* !__DARWIN_UNIX03 */
+
+/*
+ * Status word.
+ */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_FP_STATUS	struct __darwin_fp_status
+_STRUCT_FP_STATUS
+{
+    unsigned short		__invalid	:1,
+    				__denorm	:1,
+				__zdiv		:1,
+				__ovrfl		:1,
+				__undfl		:1,
+				__precis	:1,
+				__stkflt	:1,
+				__errsumm	:1,
+				__c0		:1,
+				__c1		:1,
+				__c2		:1,
+				__tos		:3,
+				__c3		:1,
+				__busy		:1;
+};
+typedef _STRUCT_FP_STATUS	__darwin_fp_status_t;
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_FP_STATUS	struct fp_status
+_STRUCT_FP_STATUS
+{
+    unsigned short		invalid	:1,
+    				denorm	:1,
+				zdiv	:1,
+				ovrfl	:1,
+				undfl	:1,
+				precis	:1,
+				stkflt	:1,
+				errsumm	:1,
+				c0	:1,
+				c1	:1,
+				c2	:1,
+				tos	:3,
+				c3	:1,
+				busy	:1;
+};
+typedef _STRUCT_FP_STATUS	fp_status_t;
+#endif /* !__DARWIN_UNIX03 */
+				
+/* defn of 80bit x87 FPU or MMX register  */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_MMST_REG	struct __darwin_mmst_reg
+_STRUCT_MMST_REG
+{
+	char	__mmst_reg[10];
+	char	__mmst_rsrv[6];
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_MMST_REG	struct mmst_reg
+_STRUCT_MMST_REG
+{
+	char	mmst_reg[10];
+	char	mmst_rsrv[6];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+
+/* defn of 128 bit XMM regs */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_XMM_REG		struct __darwin_xmm_reg
+_STRUCT_XMM_REG
+{
+	char		__xmm_reg[16];
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_XMM_REG		struct xmm_reg
+_STRUCT_XMM_REG
+{
+	char		xmm_reg[16];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+/* defn of 256 bit YMM regs */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_YMM_REG		struct __darwin_ymm_reg
+_STRUCT_YMM_REG
+{
+	char		__ymm_reg[32];
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_YMM_REG		struct ymm_reg
+_STRUCT_YMM_REG
+{
+	char		ymm_reg[32];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+/* defn of 512 bit ZMM regs */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_ZMM_REG		struct __darwin_zmm_reg
+_STRUCT_ZMM_REG
+{
+	char		__zmm_reg[64];
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_ZMM_REG		struct zmm_reg
+_STRUCT_ZMM_REG
+{
+	char		zmm_reg[64];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_OPMASK_REG	struct __darwin_opmask_reg
+_STRUCT_OPMASK_REG
+{
+	char		__opmask_reg[8];
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_OPMASK_REG	struct opmask_reg
+_STRUCT_OPMASK_REG
+{
+	char		opmask_reg[8];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+/* 
+ * Floating point state.
+ */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define FP_STATE_BYTES		512	/* number of chars worth of data from fpu_fcw */
+#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
+
+#if __DARWIN_UNIX03
+#define	_STRUCT_X86_FLOAT_STATE32	struct __darwin_i386_float_state
+_STRUCT_X86_FLOAT_STATE32
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		__fpu_ip;		/* x87 FPU Instruction Pointer offset */
+	__uint16_t		__fpu_cs;		/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+	__uint32_t		__fpu_dp;		/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		__fpu_ds;		/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	char			__fpu_rsrv4[14*16];	/* reserved */
+	int 			__fpu_reserved1;
+};
+
+#define	_STRUCT_X86_AVX_STATE32	struct __darwin_i386_avx_state
+_STRUCT_X86_AVX_STATE32
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		__fpu_ip;		/* x87 FPU Instruction Pointer offset */
+	__uint16_t		__fpu_cs;		/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+	__uint32_t		__fpu_dp;		/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		__fpu_ds;		/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	char			__fpu_rsrv4[14*16];	/* reserved */
+	int 			__fpu_reserved1;
+	char			__avx_reserved1[64];
+	_STRUCT_XMM_REG		__fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		__fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		__fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		__fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		__fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		__fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		__fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		__fpu_ymmh7;		/* YMMH 7  */
+};
+
+#define	_STRUCT_X86_AVX512_STATE32	struct __darwin_i386_avx512_state
+_STRUCT_X86_AVX512_STATE32
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		__fpu_ip;		/* x87 FPU Instruction Pointer offset */
+	__uint16_t		__fpu_cs;		/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+	__uint32_t		__fpu_dp;		/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		__fpu_ds;		/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	char			__fpu_rsrv4[14*16];	/* reserved */
+	int 			__fpu_reserved1;
+	char			__avx_reserved1[64];
+	_STRUCT_XMM_REG		__fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		__fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		__fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		__fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		__fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		__fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		__fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		__fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_OPMASK_REG	__fpu_k0;		/* K0 */
+	_STRUCT_OPMASK_REG	__fpu_k1;		/* K1 */
+	_STRUCT_OPMASK_REG	__fpu_k2;		/* K2 */
+	_STRUCT_OPMASK_REG	__fpu_k3;		/* K3 */
+	_STRUCT_OPMASK_REG	__fpu_k4;		/* K4 */
+	_STRUCT_OPMASK_REG	__fpu_k5;		/* K5 */
+	_STRUCT_OPMASK_REG	__fpu_k6;		/* K6 */
+	_STRUCT_OPMASK_REG	__fpu_k7;		/* K7 */
+	_STRUCT_YMM_REG		__fpu_zmmh0;		/* ZMMH 0  */
+	_STRUCT_YMM_REG		__fpu_zmmh1;		/* ZMMH 1  */
+	_STRUCT_YMM_REG		__fpu_zmmh2;		/* ZMMH 2  */
+	_STRUCT_YMM_REG		__fpu_zmmh3;		/* ZMMH 3  */
+	_STRUCT_YMM_REG		__fpu_zmmh4;		/* ZMMH 4  */
+	_STRUCT_YMM_REG		__fpu_zmmh5;		/* ZMMH 5  */
+	_STRUCT_YMM_REG		__fpu_zmmh6;		/* ZMMH 6  */
+	_STRUCT_YMM_REG		__fpu_zmmh7;		/* ZMMH 7  */
+};
+
+#else /* !__DARWIN_UNIX03 */
+#define	_STRUCT_X86_FLOAT_STATE32	struct i386_float_state
+_STRUCT_X86_FLOAT_STATE32
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		fpu_ip;			/* x87 FPU Instruction Pointer offset */
+	__uint16_t		fpu_cs;			/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		fpu_rsrv2;		/* reserved */
+	__uint32_t		fpu_dp;			/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		fpu_ds;			/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;		/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	char			fpu_rsrv4[14*16];	/* reserved */
+	int 			fpu_reserved1;
+};
+
+#define	_STRUCT_X86_AVX_STATE32	struct i386_avx_state
+_STRUCT_X86_AVX_STATE32
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		fpu_ip;			/* x87 FPU Instruction Pointer offset */
+	__uint16_t		fpu_cs;			/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		fpu_rsrv2;		/* reserved */
+	__uint32_t		fpu_dp;			/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		fpu_ds;			/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;		/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	char			fpu_rsrv4[14*16];	/* reserved */
+	int 			fpu_reserved1;
+	char			avx_reserved1[64];
+	_STRUCT_XMM_REG		fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		fpu_ymmh7;		/* YMMH 7  */
+};
+
+#define	_STRUCT_X86_AVX512_STATE32	struct i386_avx512_state
+_STRUCT_X86_AVX512_STATE32
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+	__uint32_t		fpu_ip;			/* x87 FPU Instruction Pointer offset */
+	__uint16_t		fpu_cs;			/* x87 FPU Instruction Pointer Selector */
+	__uint16_t		fpu_rsrv2;		/* reserved */
+	__uint32_t		fpu_dp;			/* x87 FPU Instruction Operand(Data) Pointer offset */
+	__uint16_t		fpu_ds;			/* x87 FPU Instruction Operand(Data) Pointer Selector */
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;		/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	char			fpu_rsrv4[14*16];	/* reserved */
+	int 			fpu_reserved1;
+	char			avx_reserved1[64];
+	_STRUCT_XMM_REG		fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_OPMASK_REG	fpu_k0;			/* K0 */
+	_STRUCT_OPMASK_REG	fpu_k1;			/* K1 */
+	_STRUCT_OPMASK_REG	fpu_k2;			/* K2 */
+	_STRUCT_OPMASK_REG	fpu_k3;			/* K3 */
+	_STRUCT_OPMASK_REG	fpu_k4;			/* K4 */
+	_STRUCT_OPMASK_REG	fpu_k5;			/* K5 */
+	_STRUCT_OPMASK_REG	fpu_k6;			/* K6 */
+	_STRUCT_OPMASK_REG	fpu_k7;			/* K7 */
+	_STRUCT_YMM_REG		fpu_zmmh0;		/* ZMMH 0  */
+	_STRUCT_YMM_REG		fpu_zmmh1;		/* ZMMH 1  */
+	_STRUCT_YMM_REG		fpu_zmmh2;		/* ZMMH 2  */
+	_STRUCT_YMM_REG		fpu_zmmh3;		/* ZMMH 3  */
+	_STRUCT_YMM_REG		fpu_zmmh4;		/* ZMMH 4  */
+	_STRUCT_YMM_REG		fpu_zmmh5;		/* ZMMH 5  */
+	_STRUCT_YMM_REG		fpu_zmmh6;		/* ZMMH 6  */
+	_STRUCT_YMM_REG		fpu_zmmh7;		/* ZMMH 7  */
+};
+
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_X86_EXCEPTION_STATE32	struct __darwin_i386_exception_state
+_STRUCT_X86_EXCEPTION_STATE32
+{
+	__uint16_t	__trapno;
+	__uint16_t	__cpu;
+	__uint32_t	__err;
+	__uint32_t	__faultvaddr;
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_X86_EXCEPTION_STATE32	struct i386_exception_state
+_STRUCT_X86_EXCEPTION_STATE32
+{
+	__uint16_t	trapno;
+	__uint16_t	cpu;
+	__uint32_t	err;
+	__uint32_t	faultvaddr;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_X86_DEBUG_STATE32	struct __darwin_x86_debug_state32
+_STRUCT_X86_DEBUG_STATE32
+{
+	unsigned int	__dr0;
+	unsigned int	__dr1;
+	unsigned int	__dr2;
+	unsigned int	__dr3;
+	unsigned int	__dr4;
+	unsigned int	__dr5;
+	unsigned int	__dr6;
+	unsigned int	__dr7;
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_X86_DEBUG_STATE32	struct x86_debug_state32
+_STRUCT_X86_DEBUG_STATE32
+{
+	unsigned int	dr0;
+	unsigned int	dr1;
+	unsigned int	dr2;
+	unsigned int	dr3;
+	unsigned int	dr4;
+	unsigned int	dr5;
+	unsigned int	dr6;
+	unsigned int	dr7;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#define	_STRUCT_X86_PAGEIN_STATE	struct __x86_pagein_state
+_STRUCT_X86_PAGEIN_STATE
+{
+	int __pagein_error;
+};
+
+/*
+ * 64 bit versions of the above
+ */
+
+#if __DARWIN_UNIX03
+#define	_STRUCT_X86_THREAD_STATE64	struct __darwin_x86_thread_state64
+_STRUCT_X86_THREAD_STATE64
+{
+	__uint64_t	__rax;
+	__uint64_t	__rbx;
+	__uint64_t	__rcx;
+	__uint64_t	__rdx;
+	__uint64_t	__rdi;
+	__uint64_t	__rsi;
+	__uint64_t	__rbp;
+	__uint64_t	__rsp;
+	__uint64_t	__r8;
+	__uint64_t	__r9;
+	__uint64_t	__r10;
+	__uint64_t	__r11;
+	__uint64_t	__r12;
+	__uint64_t	__r13;
+	__uint64_t	__r14;
+	__uint64_t	__r15;
+	__uint64_t	__rip;
+	__uint64_t	__rflags;
+	__uint64_t	__cs;
+	__uint64_t	__fs;
+	__uint64_t	__gs;
+};
+#else /* !__DARWIN_UNIX03 */
+#define	_STRUCT_X86_THREAD_STATE64	struct x86_thread_state64
+_STRUCT_X86_THREAD_STATE64
+{
+	__uint64_t	rax;
+	__uint64_t	rbx;
+	__uint64_t	rcx;
+	__uint64_t	rdx;
+	__uint64_t	rdi;
+	__uint64_t	rsi;
+	__uint64_t	rbp;
+	__uint64_t	rsp;
+	__uint64_t	r8;
+	__uint64_t	r9;
+	__uint64_t	r10;
+	__uint64_t	r11;
+	__uint64_t	r12;
+	__uint64_t	r13;
+	__uint64_t	r14;
+	__uint64_t	r15;
+	__uint64_t	rip;
+	__uint64_t	rflags;
+	__uint64_t	cs;
+	__uint64_t	fs;
+	__uint64_t	gs;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+/*
+ * 64 bit versions of the above (complete)
+ */
+
+#if __DARWIN_UNIX03
+#define	_STRUCT_X86_THREAD_FULL_STATE64	struct __darwin_x86_thread_full_state64
+_STRUCT_X86_THREAD_FULL_STATE64
+{
+	_STRUCT_X86_THREAD_STATE64	__ss64;
+	__uint64_t			__ds;
+	__uint64_t			__es;
+	__uint64_t			__ss;
+	__uint64_t			__gsbase;
+};
+#else /* !__DARWIN_UNIX03 */
+#define	_STRUCT_X86_THREAD_FULL_STATE64	struct x86_thread_full_state64
+_STRUCT_X86_THREAD_FULL_STATE64
+{
+	_STRUCT_X86_THREAD_STATE64	ss64;
+	__uint64_t			ds;
+	__uint64_t			es;
+	__uint64_t			ss;
+	__uint64_t			gsbase;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+
+#if __DARWIN_UNIX03
+#define	_STRUCT_X86_FLOAT_STATE64	struct __darwin_x86_float_state64
+_STRUCT_X86_FLOAT_STATE64
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		__fpu_ip;		/* offset */
+	__uint16_t		__fpu_cs;		/* Selector */
+
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		__fpu_dp;		/* offset */
+	__uint16_t		__fpu_ds;		/* Selector */
+
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		__fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		__fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		__fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		__fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		__fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		__fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		__fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		__fpu_xmm15;		/* XMM 15  */
+	char			__fpu_rsrv4[6*16];	/* reserved */
+	int 			__fpu_reserved1;
+};
+
+#define	_STRUCT_X86_AVX_STATE64	struct __darwin_x86_avx_state64
+_STRUCT_X86_AVX_STATE64
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		__fpu_ip;		/* offset */
+	__uint16_t		__fpu_cs;		/* Selector */
+
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		__fpu_dp;		/* offset */
+	__uint16_t		__fpu_ds;		/* Selector */
+
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		__fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		__fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		__fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		__fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		__fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		__fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		__fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		__fpu_xmm15;		/* XMM 15  */
+	char			__fpu_rsrv4[6*16];	/* reserved */
+	int 			__fpu_reserved1;
+	char			__avx_reserved1[64];
+	_STRUCT_XMM_REG		__fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		__fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		__fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		__fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		__fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		__fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		__fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		__fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_XMM_REG		__fpu_ymmh8;		/* YMMH 8  */
+	_STRUCT_XMM_REG		__fpu_ymmh9;		/* YMMH 9  */
+	_STRUCT_XMM_REG		__fpu_ymmh10;		/* YMMH 10  */
+	_STRUCT_XMM_REG		__fpu_ymmh11;		/* YMMH 11  */
+	_STRUCT_XMM_REG		__fpu_ymmh12;		/* YMMH 12  */
+	_STRUCT_XMM_REG		__fpu_ymmh13;		/* YMMH 13  */
+	_STRUCT_XMM_REG		__fpu_ymmh14;		/* YMMH 14  */
+	_STRUCT_XMM_REG		__fpu_ymmh15;		/* YMMH 15  */
+};
+
+#define	_STRUCT_X86_AVX512_STATE64	struct __darwin_x86_avx512_state64
+_STRUCT_X86_AVX512_STATE64
+{
+	int 			__fpu_reserved[2];
+	_STRUCT_FP_CONTROL	__fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	__fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		__fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		__fpu_rsrv1;		/* reserved */ 
+	__uint16_t		__fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		__fpu_ip;		/* offset */
+	__uint16_t		__fpu_cs;		/* Selector */
+
+	__uint16_t		__fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		__fpu_dp;		/* offset */
+	__uint16_t		__fpu_ds;		/* Selector */
+
+	__uint16_t		__fpu_rsrv3;		/* reserved */
+	__uint32_t		__fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		__fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	__fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	__fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	__fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	__fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	__fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	__fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	__fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	__fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		__fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		__fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		__fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		__fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		__fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		__fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		__fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		__fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		__fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		__fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		__fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		__fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		__fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		__fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		__fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		__fpu_xmm15;		/* XMM 15  */
+	char			__fpu_rsrv4[6*16];	/* reserved */
+	int 			__fpu_reserved1;
+	char			__avx_reserved1[64];
+	_STRUCT_XMM_REG		__fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		__fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		__fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		__fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		__fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		__fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		__fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		__fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_XMM_REG		__fpu_ymmh8;		/* YMMH 8  */
+	_STRUCT_XMM_REG		__fpu_ymmh9;		/* YMMH 9  */
+	_STRUCT_XMM_REG		__fpu_ymmh10;		/* YMMH 10  */
+	_STRUCT_XMM_REG		__fpu_ymmh11;		/* YMMH 11  */
+	_STRUCT_XMM_REG		__fpu_ymmh12;		/* YMMH 12  */
+	_STRUCT_XMM_REG		__fpu_ymmh13;		/* YMMH 13  */
+	_STRUCT_XMM_REG		__fpu_ymmh14;		/* YMMH 14  */
+	_STRUCT_XMM_REG		__fpu_ymmh15;		/* YMMH 15  */
+	_STRUCT_OPMASK_REG	__fpu_k0;		/* K0 */
+	_STRUCT_OPMASK_REG	__fpu_k1;		/* K1 */
+	_STRUCT_OPMASK_REG	__fpu_k2;		/* K2 */
+	_STRUCT_OPMASK_REG	__fpu_k3;		/* K3 */
+	_STRUCT_OPMASK_REG	__fpu_k4;		/* K4 */
+	_STRUCT_OPMASK_REG	__fpu_k5;		/* K5 */
+	_STRUCT_OPMASK_REG	__fpu_k6;		/* K6 */
+	_STRUCT_OPMASK_REG	__fpu_k7;		/* K7 */
+	_STRUCT_YMM_REG		__fpu_zmmh0;		/* ZMMH 0  */
+	_STRUCT_YMM_REG		__fpu_zmmh1;		/* ZMMH 1  */
+	_STRUCT_YMM_REG		__fpu_zmmh2;		/* ZMMH 2  */
+	_STRUCT_YMM_REG		__fpu_zmmh3;		/* ZMMH 3  */
+	_STRUCT_YMM_REG		__fpu_zmmh4;		/* ZMMH 4  */
+	_STRUCT_YMM_REG		__fpu_zmmh5;		/* ZMMH 5  */
+	_STRUCT_YMM_REG		__fpu_zmmh6;		/* ZMMH 6  */
+	_STRUCT_YMM_REG		__fpu_zmmh7;		/* ZMMH 7  */
+	_STRUCT_YMM_REG		__fpu_zmmh8;		/* ZMMH 8  */
+	_STRUCT_YMM_REG		__fpu_zmmh9;		/* ZMMH 9  */
+	_STRUCT_YMM_REG		__fpu_zmmh10;		/* ZMMH 10  */
+	_STRUCT_YMM_REG		__fpu_zmmh11;		/* ZMMH 11  */
+	_STRUCT_YMM_REG		__fpu_zmmh12;		/* ZMMH 12  */
+	_STRUCT_YMM_REG		__fpu_zmmh13;		/* ZMMH 13  */
+	_STRUCT_YMM_REG		__fpu_zmmh14;		/* ZMMH 14  */
+	_STRUCT_YMM_REG		__fpu_zmmh15;		/* ZMMH 15  */
+	_STRUCT_ZMM_REG		__fpu_zmm16;		/* ZMM 16  */
+	_STRUCT_ZMM_REG		__fpu_zmm17;		/* ZMM 17  */
+	_STRUCT_ZMM_REG		__fpu_zmm18;		/* ZMM 18  */
+	_STRUCT_ZMM_REG		__fpu_zmm19;		/* ZMM 19  */
+	_STRUCT_ZMM_REG		__fpu_zmm20;		/* ZMM 20  */
+	_STRUCT_ZMM_REG		__fpu_zmm21;		/* ZMM 21  */
+	_STRUCT_ZMM_REG		__fpu_zmm22;		/* ZMM 22  */
+	_STRUCT_ZMM_REG		__fpu_zmm23;		/* ZMM 23  */
+	_STRUCT_ZMM_REG		__fpu_zmm24;		/* ZMM 24  */
+	_STRUCT_ZMM_REG		__fpu_zmm25;		/* ZMM 25  */
+	_STRUCT_ZMM_REG		__fpu_zmm26;		/* ZMM 26  */
+	_STRUCT_ZMM_REG		__fpu_zmm27;		/* ZMM 27  */
+	_STRUCT_ZMM_REG		__fpu_zmm28;		/* ZMM 28  */
+	_STRUCT_ZMM_REG		__fpu_zmm29;		/* ZMM 29  */
+	_STRUCT_ZMM_REG		__fpu_zmm30;		/* ZMM 30  */
+	_STRUCT_ZMM_REG		__fpu_zmm31;		/* ZMM 31  */
+};
+
+#else /* !__DARWIN_UNIX03 */
+#define	_STRUCT_X86_FLOAT_STATE64	struct x86_float_state64
+_STRUCT_X86_FLOAT_STATE64
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		fpu_ip;			/* offset */
+	__uint16_t		fpu_cs;			/* Selector */
+
+	__uint16_t		fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		fpu_dp;			/* offset */
+	__uint16_t		fpu_ds;			/* Selector */
+
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;		/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		fpu_xmm15;		/* XMM 15  */
+	char			fpu_rsrv4[6*16];	/* reserved */
+	int 			fpu_reserved1;
+};
+
+#define	_STRUCT_X86_AVX_STATE64	struct x86_avx_state64
+_STRUCT_X86_AVX_STATE64
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		fpu_ip;			/* offset */
+	__uint16_t		fpu_cs;			/* Selector */
+
+	__uint16_t		fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		fpu_dp;			/* offset */
+	__uint16_t		fpu_ds;			/* Selector */
+
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;		/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		fpu_xmm15;		/* XMM 15  */
+	char			fpu_rsrv4[6*16];	/* reserved */
+	int 			fpu_reserved1;
+	char			avx_reserved1[64];
+	_STRUCT_XMM_REG		fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_XMM_REG		fpu_ymmh8;		/* YMMH 8  */
+	_STRUCT_XMM_REG		fpu_ymmh9;		/* YMMH 9  */
+	_STRUCT_XMM_REG		fpu_ymmh10;		/* YMMH 10  */
+	_STRUCT_XMM_REG		fpu_ymmh11;		/* YMMH 11  */
+	_STRUCT_XMM_REG		fpu_ymmh12;		/* YMMH 12  */
+	_STRUCT_XMM_REG		fpu_ymmh13;		/* YMMH 13  */
+	_STRUCT_XMM_REG		fpu_ymmh14;		/* YMMH 14  */
+	_STRUCT_XMM_REG		fpu_ymmh15;		/* YMMH 15  */
+};
+
+#define	_STRUCT_X86_AVX512_STATE64	struct x86_avx512_state64
+_STRUCT_X86_AVX512_STATE64
+{
+	int 			fpu_reserved[2];
+	_STRUCT_FP_CONTROL	fpu_fcw;		/* x87 FPU control word */
+	_STRUCT_FP_STATUS	fpu_fsw;		/* x87 FPU status word */
+	__uint8_t		fpu_ftw;		/* x87 FPU tag word */
+	__uint8_t		fpu_rsrv1;		/* reserved */ 
+	__uint16_t		fpu_fop;		/* x87 FPU Opcode */
+
+	/* x87 FPU Instruction Pointer */
+	__uint32_t		fpu_ip;		/* offset */
+	__uint16_t		fpu_cs;		/* Selector */
+
+	__uint16_t		fpu_rsrv2;		/* reserved */
+
+	/* x87 FPU Instruction Operand(Data) Pointer */
+	__uint32_t		fpu_dp;		/* offset */
+	__uint16_t		fpu_ds;		/* Selector */
+
+	__uint16_t		fpu_rsrv3;		/* reserved */
+	__uint32_t		fpu_mxcsr;		/* MXCSR Register state */
+	__uint32_t		fpu_mxcsrmask;	/* MXCSR mask */
+	_STRUCT_MMST_REG	fpu_stmm0;		/* ST0/MM0   */
+	_STRUCT_MMST_REG	fpu_stmm1;		/* ST1/MM1  */
+	_STRUCT_MMST_REG	fpu_stmm2;		/* ST2/MM2  */
+	_STRUCT_MMST_REG	fpu_stmm3;		/* ST3/MM3  */
+	_STRUCT_MMST_REG	fpu_stmm4;		/* ST4/MM4  */
+	_STRUCT_MMST_REG	fpu_stmm5;		/* ST5/MM5  */
+	_STRUCT_MMST_REG	fpu_stmm6;		/* ST6/MM6  */
+	_STRUCT_MMST_REG	fpu_stmm7;		/* ST7/MM7  */
+	_STRUCT_XMM_REG		fpu_xmm0;		/* XMM 0  */
+	_STRUCT_XMM_REG		fpu_xmm1;		/* XMM 1  */
+	_STRUCT_XMM_REG		fpu_xmm2;		/* XMM 2  */
+	_STRUCT_XMM_REG		fpu_xmm3;		/* XMM 3  */
+	_STRUCT_XMM_REG		fpu_xmm4;		/* XMM 4  */
+	_STRUCT_XMM_REG		fpu_xmm5;		/* XMM 5  */
+	_STRUCT_XMM_REG		fpu_xmm6;		/* XMM 6  */
+	_STRUCT_XMM_REG		fpu_xmm7;		/* XMM 7  */
+	_STRUCT_XMM_REG		fpu_xmm8;		/* XMM 8  */
+	_STRUCT_XMM_REG		fpu_xmm9;		/* XMM 9  */
+	_STRUCT_XMM_REG		fpu_xmm10;		/* XMM 10  */
+	_STRUCT_XMM_REG		fpu_xmm11;		/* XMM 11 */
+	_STRUCT_XMM_REG		fpu_xmm12;		/* XMM 12  */
+	_STRUCT_XMM_REG		fpu_xmm13;		/* XMM 13  */
+	_STRUCT_XMM_REG		fpu_xmm14;		/* XMM 14  */
+	_STRUCT_XMM_REG		fpu_xmm15;		/* XMM 15  */
+	char			fpu_rsrv4[6*16];	/* reserved */
+	int 			fpu_reserved1;
+	char			avx_reserved1[64];
+	_STRUCT_XMM_REG		fpu_ymmh0;		/* YMMH 0  */
+	_STRUCT_XMM_REG		fpu_ymmh1;		/* YMMH 1  */
+	_STRUCT_XMM_REG		fpu_ymmh2;		/* YMMH 2  */
+	_STRUCT_XMM_REG		fpu_ymmh3;		/* YMMH 3  */
+	_STRUCT_XMM_REG		fpu_ymmh4;		/* YMMH 4  */
+	_STRUCT_XMM_REG		fpu_ymmh5;		/* YMMH 5  */
+	_STRUCT_XMM_REG		fpu_ymmh6;		/* YMMH 6  */
+	_STRUCT_XMM_REG		fpu_ymmh7;		/* YMMH 7  */
+	_STRUCT_XMM_REG		fpu_ymmh8;		/* YMMH 8  */
+	_STRUCT_XMM_REG		fpu_ymmh9;		/* YMMH 9  */
+	_STRUCT_XMM_REG		fpu_ymmh10;		/* YMMH 10  */
+	_STRUCT_XMM_REG		fpu_ymmh11;		/* YMMH 11  */
+	_STRUCT_XMM_REG		fpu_ymmh12;		/* YMMH 12  */
+	_STRUCT_XMM_REG		fpu_ymmh13;		/* YMMH 13  */
+	_STRUCT_XMM_REG		fpu_ymmh14;		/* YMMH 14  */
+	_STRUCT_XMM_REG		fpu_ymmh15;		/* YMMH 15  */
+	_STRUCT_OPMASK_REG	fpu_k0;			/* K0 */
+	_STRUCT_OPMASK_REG	fpu_k1;			/* K1 */
+	_STRUCT_OPMASK_REG	fpu_k2;			/* K2 */
+	_STRUCT_OPMASK_REG	fpu_k3;			/* K3 */
+	_STRUCT_OPMASK_REG	fpu_k4;			/* K4 */
+	_STRUCT_OPMASK_REG	fpu_k5;			/* K5 */
+	_STRUCT_OPMASK_REG	fpu_k6;			/* K6 */
+	_STRUCT_OPMASK_REG	fpu_k7;			/* K7 */
+	_STRUCT_YMM_REG		fpu_zmmh0;		/* ZMMH 0  */
+	_STRUCT_YMM_REG		fpu_zmmh1;		/* ZMMH 1  */
+	_STRUCT_YMM_REG		fpu_zmmh2;		/* ZMMH 2  */
+	_STRUCT_YMM_REG		fpu_zmmh3;		/* ZMMH 3  */
+	_STRUCT_YMM_REG		fpu_zmmh4;		/* ZMMH 4  */
+	_STRUCT_YMM_REG		fpu_zmmh5;		/* ZMMH 5  */
+	_STRUCT_YMM_REG		fpu_zmmh6;		/* ZMMH 6  */
+	_STRUCT_YMM_REG		fpu_zmmh7;		/* ZMMH 7  */
+	_STRUCT_YMM_REG		fpu_zmmh8;		/* ZMMH 8  */
+	_STRUCT_YMM_REG		fpu_zmmh9;		/* ZMMH 9  */
+	_STRUCT_YMM_REG		fpu_zmmh10;		/* ZMMH 10  */
+	_STRUCT_YMM_REG		fpu_zmmh11;		/* ZMMH 11  */
+	_STRUCT_YMM_REG		fpu_zmmh12;		/* ZMMH 12  */
+	_STRUCT_YMM_REG		fpu_zmmh13;		/* ZMMH 13  */
+	_STRUCT_YMM_REG		fpu_zmmh14;		/* ZMMH 14  */
+	_STRUCT_YMM_REG		fpu_zmmh15;		/* ZMMH 15  */
+	_STRUCT_ZMM_REG		fpu_zmm16;		/* ZMM 16  */
+	_STRUCT_ZMM_REG		fpu_zmm17;		/* ZMM 17  */
+	_STRUCT_ZMM_REG		fpu_zmm18;		/* ZMM 18  */
+	_STRUCT_ZMM_REG		fpu_zmm19;		/* ZMM 19  */
+	_STRUCT_ZMM_REG		fpu_zmm20;		/* ZMM 20  */
+	_STRUCT_ZMM_REG		fpu_zmm21;		/* ZMM 21  */
+	_STRUCT_ZMM_REG		fpu_zmm22;		/* ZMM 22  */
+	_STRUCT_ZMM_REG		fpu_zmm23;		/* ZMM 23  */
+	_STRUCT_ZMM_REG		fpu_zmm24;		/* ZMM 24  */
+	_STRUCT_ZMM_REG		fpu_zmm25;		/* ZMM 25  */
+	_STRUCT_ZMM_REG		fpu_zmm26;		/* ZMM 26  */
+	_STRUCT_ZMM_REG		fpu_zmm27;		/* ZMM 27  */
+	_STRUCT_ZMM_REG		fpu_zmm28;		/* ZMM 28  */
+	_STRUCT_ZMM_REG		fpu_zmm29;		/* ZMM 29  */
+	_STRUCT_ZMM_REG		fpu_zmm30;		/* ZMM 30  */
+	_STRUCT_ZMM_REG		fpu_zmm31;		/* ZMM 31  */
+};
+
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_X86_EXCEPTION_STATE64	struct __darwin_x86_exception_state64
+_STRUCT_X86_EXCEPTION_STATE64
+{
+    __uint16_t	__trapno;
+    __uint16_t	__cpu;
+    __uint32_t	__err;
+    __uint64_t	__faultvaddr;
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_X86_EXCEPTION_STATE64	struct x86_exception_state64
+_STRUCT_X86_EXCEPTION_STATE64
+{
+    __uint16_t	trapno;
+    __uint16_t	cpu;
+    __uint32_t	err;
+    __uint64_t	faultvaddr;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_X86_DEBUG_STATE64	struct __darwin_x86_debug_state64
+_STRUCT_X86_DEBUG_STATE64
+{
+	__uint64_t	__dr0;
+	__uint64_t	__dr1;
+	__uint64_t	__dr2;
+	__uint64_t	__dr3;
+	__uint64_t	__dr4;
+	__uint64_t	__dr5;
+	__uint64_t	__dr6;
+	__uint64_t	__dr7;
+};
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_X86_DEBUG_STATE64	struct x86_debug_state64
+_STRUCT_X86_DEBUG_STATE64
+{
+	__uint64_t	dr0;
+	__uint64_t	dr1;
+	__uint64_t	dr2;
+	__uint64_t	dr3;
+	__uint64_t	dr4;
+	__uint64_t	dr5;
+	__uint64_t	dr6;
+	__uint64_t	dr7;
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_X86_CPMU_STATE64	struct __darwin_x86_cpmu_state64
+_STRUCT_X86_CPMU_STATE64
+{
+	__uint64_t __ctrs[16];
+};
+#else /* __DARWIN_UNIX03 */
+#define _STRUCT_X86_CPMU_STATE64	struct x86_cpmu_state64
+_STRUCT_X86_CPMU_STATE64
+{
+	__uint64_t ctrs[16];
+};
+#endif /* !__DARWIN_UNIX03 */
+
+#endif /* _MACH_I386__STRUCTS_H_ */
lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MACH_MACHINE__STRUCTS_H_
+#define _MACH_MACHINE__STRUCTS_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "mach/i386/_structs.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _MACH_MACHINE__STRUCTS_H_ */
lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#if defined (__i386__) || defined (__x86_64__)
+#include "i386/_mcontext.h"
+#else
+#error architecture not supported
+#endif
lib/libc/include/x86_64-macos-gnu/machine/_types.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2003-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _BSD_MACHINE__TYPES_H_
+#define _BSD_MACHINE__TYPES_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "i386/_types.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _BSD_MACHINE__TYPES_H_ */
lib/libc/include/x86_64-macos-gnu/machine/endian.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1995 NeXT Computer, Inc. All rights reserved.
+ */
+#ifndef _BSD_MACHINE_ENDIAN_H_
+#define _BSD_MACHINE_ENDIAN_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "i386/endian.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _BSD_MACHINE_ENDIAN_H_ */
lib/libc/include/x86_64-macos-gnu/machine/limits.h
@@ -0,0 +1,9 @@
+/* This is the `system' limits.h, independent of any particular
+ *  compiler.  GCC provides its own limits.h which can be found in
+ *  /usr/lib/gcc, although it is not very informative.
+ *  This file is public domain.  */
+#if defined (__i386__) || defined(__x86_64__)
+#include <i386/limits.h>
+#else
+#error architecture not supported
+#endif
lib/libc/include/x86_64-macos-gnu/machine/signal.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _BSD_MACHINE_SIGNAL_H_
+#define _BSD_MACHINE_SIGNAL_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "i386/signal.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _BSD_MACHINE_SIGNAL_H_ */
lib/libc/include/x86_64-macos-gnu/machine/types.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1995 NeXT Computer, Inc. All rights reserved.
+ */
+#ifndef _BSD_MACHINE_TYPES_H_
+#define _BSD_MACHINE_TYPES_H_
+
+#if defined (__i386__) || defined(__x86_64__)
+#include "i386/types.h"
+#else
+#error architecture not supported
+#endif
+
+#endif /* _BSD_MACHINE_TYPES_H_ */
lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2018 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MALLOC_UNDERSCORE_MALLOC_H_
+#define _MALLOC_UNDERSCORE_MALLOC_H_
+
+/*
+ * This header is included from <stdlib.h>, so the contents of this file have
+ * broad source compatibility and POSIX conformance implications.
+ * Be cautious about what is included and declared here.
+ */
+
+#include <Availability.h>
+#include <sys/cdefs.h>
+#include <_types.h>
+#include <sys/_types/_size_t.h>
+
+__BEGIN_DECLS
+
+void	*malloc(size_t __size) __result_use_check __alloc_size(1);
+void	*calloc(size_t __count, size_t __size) __result_use_check __alloc_size(1,2);
+void	 free(void *);
+void	*realloc(void *__ptr, size_t __size) __result_use_check __alloc_size(2);
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+void	*valloc(size_t) __alloc_size(1);
+#endif // !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \
+        ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+         (defined(__cplusplus) && __cplusplus >= 201703L))
+void    *aligned_alloc(size_t __alignment, size_t __size) __result_use_check __alloc_size(2) __OSX_AVAILABLE(10.15) __IOS_AVAILABLE(13.0) __TVOS_AVAILABLE(13.0) __WATCHOS_AVAILABLE(6.0);
+#endif
+int 	 posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
+
+__END_DECLS
+
+#endif /* _MALLOC_UNDERSCORE_MALLOC_H_ */
lib/libc/include/x86_64-macos-gnu/secure/_common.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _SECURE__COMMON_H_
+#define _SECURE__COMMON_H_
+
+#undef _USE_FORTIFY_LEVEL
+#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0
+#  if _FORTIFY_SOURCE > 1
+#    define _USE_FORTIFY_LEVEL 2
+#  else
+#    define _USE_FORTIFY_LEVEL 1
+#  endif
+#else
+#  define _USE_FORTIFY_LEVEL 0
+#endif
+
+#define __darwin_obsz0(object) __builtin_object_size (object, 0)
+#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
+
+#endif
lib/libc/include/x86_64-macos-gnu/secure/_stdio.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2007, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _STDIO_H_
+ #error error "Never use <secure/_stdio.h> directly; include <stdio.h> instead."
+#endif
+
+#ifndef _SECURE__STDIO_H_
+#define _SECURE__STDIO_H_
+
+#include <secure/_common.h>
+
+#if _USE_FORTIFY_LEVEL > 0
+
+#ifndef __has_builtin
+#define _undef__has_builtin
+#define __has_builtin(x) 0
+#endif
+
+/* sprintf, vsprintf, snprintf, vsnprintf */
+#if __has_builtin(__builtin___sprintf_chk) || defined(__GNUC__)
+extern int __sprintf_chk (char * __restrict, int, size_t,
+			  const char * __restrict, ...);
+
+#undef sprintf
+#define sprintf(str, ...) \
+  __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
+#endif
+
+#if __DARWIN_C_LEVEL >= 200112L
+#if __has_builtin(__builtin___snprintf_chk) || defined(__GNUC__)
+extern int __snprintf_chk (char * __restrict, size_t, int, size_t,
+			   const char * __restrict, ...);
+
+#undef snprintf
+#define snprintf(str, len, ...) \
+  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
+#endif
+
+#if __has_builtin(__builtin___vsprintf_chk) || defined(__GNUC__)
+extern int __vsprintf_chk (char * __restrict, int, size_t,
+			   const char * __restrict, va_list);
+
+#undef vsprintf
+#define vsprintf(str, format, ap) \
+  __builtin___vsprintf_chk (str, 0, __darwin_obsz(str), format, ap)
+#endif
+
+#if __has_builtin(__builtin___vsnprintf_chk) || defined(__GNUC__)
+extern int __vsnprintf_chk (char * __restrict, size_t, int, size_t,
+			    const char * __restrict, va_list);
+
+#undef vsnprintf
+#define vsnprintf(str, len, format, ap) \
+  __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
+#endif
+
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+#ifdef _undef__has_builtin
+#undef _undef__has_builtin
+#undef __has_builtin
+#endif
+
+#endif /* _USE_FORTIFY_LEVEL > 0 */
+#endif /* _SECURE__STDIO_H_ */
lib/libc/include/x86_64-macos-gnu/secure/_string.h
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2007,2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _STRING_H_
+# error "Never use <secure/_string.h> directly; include <string.h> instead."
+#endif
+
+#ifndef _SECURE__STRING_H_
+#define _SECURE__STRING_H_
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <secure/_common.h>
+
+#if _USE_FORTIFY_LEVEL > 0
+
+/* <rdar://problem/12622659> */
+#if defined(__clang__) && \
+		((defined(__apple_build_version__) && __apple_build_version__ >= 4260006) || \
+		(!defined(__apple_build_version__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 3))))
+#define __HAS_FIXED_CHK_PROTOTYPES 1
+#else
+#define __HAS_FIXED_CHK_PROTOTYPES 0
+#endif
+
+/* memccpy, memcpy, mempcpy, memmove, memset, strcpy, strlcpy, stpcpy,
+   strncpy, stpncpy, strcat, strlcat, and strncat */
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || \
+		defined(__DRIVERKIT_VERSION_MIN_REQUIRED)
+#if __has_builtin(__builtin___memccpy_chk) && __HAS_FIXED_CHK_PROTOTYPES
+#undef memccpy
+/* void *memccpy(void *dst, const void *src, int c, size_t n) */
+#define memccpy(dest, ...) \
+		__builtin___memccpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+#endif
+
+#if __has_builtin(__builtin___memcpy_chk) || defined(__GNUC__)
+#undef memcpy
+/* void *memcpy(void *dst, const void *src, size_t n) */
+#define memcpy(dest, ...) \
+		__builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+
+#if __has_builtin(__builtin___memmove_chk) || defined(__GNUC__)
+#undef memmove
+/* void *memmove(void *dst, const void *src, size_t len) */
+#define memmove(dest, ...) \
+		__builtin___memmove_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+
+#if __has_builtin(__builtin___memset_chk) || defined(__GNUC__)
+#undef memset
+/* void *memset(void *b, int c, size_t len) */
+#define memset(dest, ...) \
+		__builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+
+#if __has_builtin(__builtin___strcpy_chk) || defined(__GNUC__)
+#undef strcpy
+/* char *strcpy(char *dst, const char *src) */
+#define strcpy(dest, ...) \
+		__builtin___strcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+
+#if __DARWIN_C_LEVEL >= 200809L
+#if __has_builtin(__builtin___stpcpy_chk) || defined(__GNUC__)
+#undef stpcpy
+/* char *stpcpy(char *dst, const char *src) */
+#define stpcpy(dest, ...) \
+		__builtin___stpcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#if __has_builtin(__builtin___stpncpy_chk) || __APPLE_CC__ >= 5666 || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
+#undef stpncpy
+/* char *stpncpy(char *dst, const char *src, size_t n) */
+#define stpncpy(dest, ...) \
+		__builtin___stpncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+#endif /* _DARWIN_C_LEVEL >= 200809L */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || \
+		defined(__DRIVERKIT_VERSION_MIN_REQUIRED)
+#if __has_builtin(__builtin___strlcpy_chk) && __HAS_FIXED_CHK_PROTOTYPES
+#undef strlcpy
+/* size_t strlcpy(char *dst, const char *source, size_t size) */
+#define strlcpy(dest, ...) \
+		__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+
+#if __has_builtin(__builtin___strlcat_chk) && __HAS_FIXED_CHK_PROTOTYPES
+#undef strlcat
+/* size_t strlcat(char *dst, const char *source, size_t size) */
+#define strlcat(dest, ...) \
+		__builtin___strlcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 */
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#if __has_builtin(__builtin___strncpy_chk) || defined(__GNUC__)
+#undef strncpy
+/* char *strncpy(char *dst, const char *src, size_t n) */
+#define strncpy(dest, ...) \
+		__builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+
+#if __has_builtin(__builtin___strcat_chk) || defined(__GNUC__)
+#undef strcat
+/* char *strcat(char *s1, const char *s2) */
+#define strcat(dest, ...) \
+		__builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+
+#if ! (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 32000)
+#if __has_builtin(__builtin___strncat_chk) || defined(__GNUC__)
+#undef strncat
+/* char *strncat(char *s1, const char *s2, size_t n) */
+#define strncat(dest, ...) \
+		__builtin___strncat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
+#endif
+#endif
+
+#undef __HAS_FIXED_CHK_PROTOTYPES
+
+#endif /* _USE_FORTIFY_LEVEL > 0 */
+#endif /* _SECURE__STRING_H_ */
lib/libc/include/x86_64-macos-gnu/secure/_strings.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _STRINGS_H_
+# error "Never use <secure/_strings.h> directly; include <strings.h> instead."
+#endif
+
+#ifndef _SECURE__STRINGS_H_
+#define _SECURE__STRINGS_H_
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <secure/_common.h>
+
+#if _USE_FORTIFY_LEVEL > 0
+
+/* bcopy and bzero */
+
+/* Removed in Issue 7 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L
+
+#if __has_builtin(__builtin___memmove_chk) || defined(__GNUC__)
+#undef bcopy
+/* void	bcopy(const void *src, void *dst, size_t len) */
+#define bcopy(src, dest, ...) \
+		__builtin___memmove_chk (dest, src, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+
+#if __has_builtin(__builtin___memset_chk) || defined(__GNUC__)
+#undef bzero
+/* void	bzero(void *s, size_t n) */
+#define bzero(dest, ...) \
+		__builtin___memset_chk (dest, 0, __VA_ARGS__, __darwin_obsz0 (dest))
+#endif
+
+#endif
+
+#endif /* _USE_FORTIFY_LEVEL > 0 */
+#endif /* _SECURE__STRINGS_H_ */
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _PTHREAD_ATTR_T 
+#define _PTHREAD_ATTR_T 
+#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */
+typedef __darwin_pthread_attr_t pthread_attr_t;
+#endif  /* _PTHREAD_ATTR_T */
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _PTHREAD_T
+#define _PTHREAD_T
+#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_t */
+typedef __darwin_pthread_t pthread_t;
+#endif /* _PTHREAD_T */
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2003-2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _SYS__PTHREAD_TYPES_H_
+#define _SYS__PTHREAD_TYPES_H_
+
+#include <sys/cdefs.h>
+
+// pthread opaque structures
+#if defined(__LP64__)
+#define __PTHREAD_SIZE__		8176
+#define __PTHREAD_ATTR_SIZE__		56
+#define __PTHREAD_MUTEXATTR_SIZE__	8
+#define __PTHREAD_MUTEX_SIZE__		56
+#define __PTHREAD_CONDATTR_SIZE__	8
+#define __PTHREAD_COND_SIZE__		40
+#define __PTHREAD_ONCE_SIZE__		8
+#define __PTHREAD_RWLOCK_SIZE__		192
+#define __PTHREAD_RWLOCKATTR_SIZE__	16
+#else // !__LP64__
+#define __PTHREAD_SIZE__		4088
+#define __PTHREAD_ATTR_SIZE__		36
+#define __PTHREAD_MUTEXATTR_SIZE__	8
+#define __PTHREAD_MUTEX_SIZE__		40
+#define __PTHREAD_CONDATTR_SIZE__	4
+#define __PTHREAD_COND_SIZE__		24
+#define __PTHREAD_ONCE_SIZE__		4
+#define __PTHREAD_RWLOCK_SIZE__		124
+#define __PTHREAD_RWLOCKATTR_SIZE__	12
+#endif // !__LP64__
+
+struct __darwin_pthread_handler_rec {
+	void (*__routine)(void *);	// Routine to call
+	void *__arg;			// Argument to pass
+	struct __darwin_pthread_handler_rec *__next;
+};
+
+struct _opaque_pthread_attr_t {
+	long __sig;
+	char __opaque[__PTHREAD_ATTR_SIZE__];
+};
+
+struct _opaque_pthread_cond_t {
+	long __sig;
+	char __opaque[__PTHREAD_COND_SIZE__];
+};
+
+struct _opaque_pthread_condattr_t {
+	long __sig;
+	char __opaque[__PTHREAD_CONDATTR_SIZE__];
+};
+
+struct _opaque_pthread_mutex_t {
+	long __sig;
+	char __opaque[__PTHREAD_MUTEX_SIZE__];
+};
+
+struct _opaque_pthread_mutexattr_t {
+	long __sig;
+	char __opaque[__PTHREAD_MUTEXATTR_SIZE__];
+};
+
+struct _opaque_pthread_once_t {
+	long __sig;
+	char __opaque[__PTHREAD_ONCE_SIZE__];
+};
+
+struct _opaque_pthread_rwlock_t {
+	long __sig;
+	char __opaque[__PTHREAD_RWLOCK_SIZE__];
+};
+
+struct _opaque_pthread_rwlockattr_t {
+	long __sig;
+	char __opaque[__PTHREAD_RWLOCKATTR_SIZE__];
+};
+
+struct _opaque_pthread_t {
+	long __sig;
+	struct __darwin_pthread_handler_rec  *__cleanup_stack;
+	char __opaque[__PTHREAD_SIZE__];
+};
+
+typedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t;
+typedef struct _opaque_pthread_cond_t __darwin_pthread_cond_t;
+typedef struct _opaque_pthread_condattr_t __darwin_pthread_condattr_t;
+typedef unsigned long __darwin_pthread_key_t;
+typedef struct _opaque_pthread_mutex_t __darwin_pthread_mutex_t;
+typedef struct _opaque_pthread_mutexattr_t __darwin_pthread_mutexattr_t;
+typedef struct _opaque_pthread_once_t __darwin_pthread_once_t;
+typedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t;
+typedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t;
+typedef struct _opaque_pthread_t *__darwin_pthread_t;
+
+#endif // _SYS__PTHREAD_TYPES_H_
lib/libc/include/x86_64-macos-gnu/sys/_types/_clock_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _CLOCK_T
+#define _CLOCK_T
+#include <machine/types.h> /* __darwin_clock_t */
+typedef __darwin_clock_t        clock_t;
+#endif /* _CLOCK_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_ct_rune_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _CT_RUNE_T
+#define _CT_RUNE_T
+#include <machine/_types.h> /* __darwin_ct_rune_t */
+typedef __darwin_ct_rune_t ct_rune_t;
+#endif /* _CT_RUNE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_dev_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _DEV_T
+#define _DEV_T
+#include <sys/_types.h> /* __darwin_dev_t */
+typedef __darwin_dev_t        dev_t;    /* device number */
+#endif  /* _DEV_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_errno_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _ERRNO_T
+#define _ERRNO_T
+typedef int                    errno_t;
+#endif  /* _ERRNO_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_id_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _ID_T
+#define _ID_T
+#include <sys/_types.h> /* __darwin_id_t */
+typedef __darwin_id_t   id_t;           /* can hold pid_t, gid_t, or uid_t */
+#endif /* _ID_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int16_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _INT16_T
+#define _INT16_T
+typedef short                   int16_t;
+#endif /* _INT16_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int32_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _INT32_T
+#define _INT32_T
+typedef int                     int32_t;
+#endif /* _INT32_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int64_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _INT64_T
+#define _INT64_T
+typedef long long               int64_t;
+#endif /* _INT64_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _INT8_T
+#define _INT8_T
+typedef __signed char           int8_t;
+#endif /* _INT8_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_intptr_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _INTPTR_T
+#define _INTPTR_T
+#include <machine/types.h> /* __darwin_intptr_t */
+
+typedef __darwin_intptr_t       intptr_t;
+#endif /* _INTPTR_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_mbstate_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _MBSTATE_T
+#define _MBSTATE_T
+#include <machine/types.h> /* __darwin_mbstate_t */
+typedef __darwin_mbstate_t mbstate_t;
+#endif /* _MBSTATE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_mode_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _MODE_T
+#define _MODE_T
+#include <sys/_types.h> /* __darwin_mode_t */
+typedef __darwin_mode_t         mode_t;
+#endif  /* _MODE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_null.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef NULL
+#include <sys/_types.h> /* __DARWIN_NULL */
+#define NULL  __DARWIN_NULL
+#endif  /* NULL */
lib/libc/include/x86_64-macos-gnu/sys/_types/_off_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _OFF_T
+#define _OFF_T
+#include <sys/_types.h> /* __darwin_off_t */
+typedef __darwin_off_t          off_t;
+#endif  /* _OFF_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_pid_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _PID_T
+#define _PID_T
+#include <sys/_types.h> /* __darwin_pid_t */
+typedef __darwin_pid_t        pid_t;
+#endif  /* _PID_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_rsize_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _RSIZE_T
+#define _RSIZE_T
+#include <machine/types.h> /* __darwin_size_t */
+typedef __darwin_size_t        rsize_t;
+#endif  /* _RSIZE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_rune_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _RUNE_T
+#define _RUNE_T
+#include <machine/_types.h> /* __darwin_rune_t */
+typedef __darwin_rune_t rune_t;
+#endif /* _RUNE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_sigaltstack.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+/* Structure used in sigaltstack call. */
+#ifndef _STRUCT_SIGALTSTACK
+
+#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_SIGALTSTACK     struct __darwin_sigaltstack
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_SIGALTSTACK     struct sigaltstack
+#endif /* __DARWIN_UNIX03 */
+
+#include <machine/types.h> /* __darwin_size_t */
+
+_STRUCT_SIGALTSTACK
+{
+	void            *ss_sp;         /* signal stack base */
+	__darwin_size_t ss_size;        /* signal stack length */
+	int             ss_flags;       /* SA_DISABLE and/or SA_ONSTACK */
+};
+typedef _STRUCT_SIGALTSTACK     stack_t; /* [???] signal stack */
+
+#endif /* _STRUCT_SIGALTSTACK */
lib/libc/include/x86_64-macos-gnu/sys/_types/_sigset_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _SIGSET_T
+#define _SIGSET_T
+#include <sys/_types.h> /* __darwin_sigset_t */
+typedef __darwin_sigset_t               sigset_t;
+#endif  /* _SIGSET_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_size_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _SIZE_T
+#define _SIZE_T
+#include <machine/_types.h> /* __darwin_size_t */
+typedef __darwin_size_t        size_t;
+#endif  /* _SIZE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_ssize_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _SSIZE_T
+#define _SSIZE_T
+#include <machine/types.h> /* __darwin_ssize_t */
+typedef __darwin_ssize_t        ssize_t;
+#endif  /* _SSIZE_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_time_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _TIME_T
+#define _TIME_T
+#include <machine/types.h> /* __darwin_time_t */
+typedef __darwin_time_t         time_t;
+#endif  /* _TIME_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_timespec.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _STRUCT_TIMESPEC
+#define _STRUCT_TIMESPEC        struct timespec
+
+#include <machine/types.h> /* __darwin_time_t */
+
+_STRUCT_TIMESPEC
+{
+	__darwin_time_t tv_sec;
+	long            tv_nsec;
+};
+#endif /* _STRUCT_TIMESPEC */
lib/libc/include/x86_64-macos-gnu/sys/_types/_timeval.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _STRUCT_TIMEVAL
+#define _STRUCT_TIMEVAL         struct timeval
+
+#include <machine/types.h> /* __darwin_time_t */
+#include <sys/_types.h> /* __darwin_suseconds_t */
+
+_STRUCT_TIMEVAL
+{
+	__darwin_time_t         tv_sec;         /* seconds */
+	__darwin_suseconds_t    tv_usec;        /* and microseconds */
+};
+#endif /* _STRUCT_TIMEVAL */
lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int16_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _U_INT16_T
+#define _U_INT16_T
+typedef unsigned short                  u_int16_t;
+#endif /* _U_INT16_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int32_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _U_INT32_T
+#define _U_INT32_T
+typedef unsigned int            u_int32_t;
+#endif /* _U_INT32_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int64_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _U_INT64_T
+#define _U_INT64_T
+typedef unsigned long long      u_int64_t;
+#endif /* _U_INT64_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_u_int8_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _U_INT8_T
+#define _U_INT8_T
+typedef unsigned char           u_int8_t;
+#endif /* _U_INT8_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _STRUCT_UCONTEXT
+
+#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
+
+#if __DARWIN_UNIX03
+#define _STRUCT_UCONTEXT        struct __darwin_ucontext
+#else /* !__DARWIN_UNIX03 */
+#define _STRUCT_UCONTEXT        struct ucontext
+#endif /* __DARWIN_UNIX03 */
+
+#include <machine/types.h> /* __darwin_size_t */
+#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */
+#include <sys/_types.h> /* __darwin_sigset_t */
+
+_STRUCT_UCONTEXT
+{
+	int                     uc_onstack;
+	__darwin_sigset_t       uc_sigmask;     /* signal mask used by this context */
+	_STRUCT_SIGALTSTACK     uc_stack;       /* stack used by this context */
+	_STRUCT_UCONTEXT        *uc_link;       /* pointer to resuming context */
+	__darwin_size_t         uc_mcsize;      /* size of the machine context passed in */
+	_STRUCT_MCONTEXT        *uc_mcontext;   /* pointer to machine specific context */
+#ifdef _XOPEN_SOURCE
+	_STRUCT_MCONTEXT        __mcontext_data;
+#endif /* _XOPEN_SOURCE */
+};
+
+/* user context */
+typedef _STRUCT_UCONTEXT        ucontext_t;     /* [???] user context */
+
+#endif /* _STRUCT_UCONTEXT */
lib/libc/include/x86_64-macos-gnu/sys/_types/_uid_t.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _UID_T
+#define _UID_T
+#include <sys/_types.h> /* __darwin_uid_t */
+typedef __darwin_uid_t        uid_t;
+#endif  /* _UID_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_uintptr_t.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+#ifndef _UINTPTR_T
+#define _UINTPTR_T
+typedef unsigned long           uintptr_t;
+#endif /* _UINTPTR_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_va_list.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _VA_LIST_T
+#define _VA_LIST_T
+#include <machine/types.h> /* __darwin_va_list */
+typedef __darwin_va_list va_list;
+#endif /* _VA_LIST_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_wchar_t.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+/* wchar_t is a built-in type in C++ */
+#ifndef __cplusplus
+#ifndef _WCHAR_T
+#define _WCHAR_T
+#include <machine/_types.h> /* __darwin_wchar_t */
+typedef __darwin_wchar_t wchar_t;
+#endif /* _WCHAR_T */
+#endif /* __cplusplus */
lib/libc/include/x86_64-macos-gnu/sys/_types/_wint_t.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _WINT_T
+#define _WINT_T
+#include <machine/_types.h> /* __darwin_wint_t */
+typedef __darwin_wint_t wint_t;
+#endif /* _WINT_T */
lib/libc/include/x86_64-macos-gnu/sys/_endian.h
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+/*
+ * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1987, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SYS__ENDIAN_H_
+#define _SYS__ENDIAN_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * Macros for network/external number representation conversion.
+ */
+
+#if defined(lint)
+
+__BEGIN_DECLS
+__uint16_t      ntohs(__uint16_t);
+__uint16_t      htons(__uint16_t);
+__uint32_t      ntohl(__uint32_t);
+__uint32_t      htonl(__uint32_t);
+__END_DECLS
+
+#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+
+#define ntohl(x)        ((__uint32_t)(x))
+#define ntohs(x)        ((__uint16_t)(x))
+#define htonl(x)        ((__uint32_t)(x))
+#define htons(x)        ((__uint16_t)(x))
+
+#if     defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+
+#define ntohll(x)       ((__uint64_t)(x))
+#define htonll(x)       ((__uint64_t)(x))
+
+#define NTOHL(x)        (x)
+#define NTOHS(x)        (x)
+#define NTOHLL(x)       (x)
+#define HTONL(x)        (x)
+#define HTONS(x)        (x)
+#define HTONLL(x)       (x)
+#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+
+#else   /* __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN */
+
+#include <libkern/_OSByteOrder.h>
+
+#define ntohs(x)        __DARWIN_OSSwapInt16(x)
+#define htons(x)        __DARWIN_OSSwapInt16(x)
+
+#define ntohl(x)        __DARWIN_OSSwapInt32(x)
+#define htonl(x)        __DARWIN_OSSwapInt32(x)
+
+#if     defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+
+#define ntohll(x)       __DARWIN_OSSwapInt64(x)
+#define htonll(x)       __DARWIN_OSSwapInt64(x)
+
+#define NTOHL(x)        (x) = ntohl((__uint32_t)x)
+#define NTOHS(x)        (x) = ntohs((__uint16_t)x)
+#define NTOHLL(x)       (x) = ntohll((__uint64_t)x)
+#define HTONL(x)        (x) = htonl((__uint32_t)x)
+#define HTONS(x)        (x) = htons((__uint16_t)x)
+#define HTONLL(x)       (x) = htonll((__uint64_t)x)
+#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+#endif /* __DARWIN_BYTE_ORDER */
+#endif /* !_SYS__ENDIAN_H_ */
lib/libc/include/x86_64-macos-gnu/sys/_posix_availability.h
@@ -0,0 +1,73 @@
+/* Copyright (c) 2010 Apple Inc. All rights reserved.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _CDEFS_H_
+# error "Never use <sys/_posix_availability.h> directly.  Use <sys/cdefs.h> instead."
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 198808L
+#define ___POSIX_C_DEPRECATED_STARTING_198808L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_198808L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199009L
+#define ___POSIX_C_DEPRECATED_STARTING_199009L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_199009L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199209L
+#define ___POSIX_C_DEPRECATED_STARTING_199209L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_199209L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
+#define ___POSIX_C_DEPRECATED_STARTING_199309L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_199309L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L
+#define ___POSIX_C_DEPRECATED_STARTING_199506L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_199506L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
+#define ___POSIX_C_DEPRECATED_STARTING_200112L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_200112L
+#endif
+
+#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L
+#define ___POSIX_C_DEPRECATED_STARTING_200809L __deprecated
+#else
+#define ___POSIX_C_DEPRECATED_STARTING_200809L
+#endif
+
lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h
@@ -0,0 +1,499 @@
+/* Copyright (c) 2010 Apple Inc. All rights reserved.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _CDEFS_H_
+# error "Never use <sys/_symbol_aliasing.h> directly.  Use <sys/cdefs.h> instead."
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 50000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 50100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 60000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 60100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 70000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 70100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80400
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110400
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120400
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130100
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130200
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130300
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130400
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130500
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_5(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_5(x)
+#endif
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130600
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1010
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1020
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1030
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_5(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_5(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_6(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_6(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_7(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_7(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1080
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_8(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_8(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_9(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_9(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101002
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101003
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101100
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101102
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101103
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_3(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_3(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101104
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101201
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101202
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101204
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101300
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101301
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101302
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_2(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_2(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101304
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101401
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_1(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101404
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_4(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_4(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101405
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_5(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_5(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101406
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_6(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_6(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15(x)
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101501
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x) x
+#else
+#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x)
+#endif
+
lib/libc/include/x86_64-macos-gnu/sys/_types.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2003-2007 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _SYS__TYPES_H_
+#define _SYS__TYPES_H_
+
+#include <sys/cdefs.h>
+#include <machine/_types.h>
+
+/*
+ * Type definitions; takes common type definitions that must be used
+ * in multiple header files due to [XSI], removes them from the system
+ * space, and puts them in the implementation space.
+ */
+
+#ifdef __cplusplus
+#ifdef __GNUG__
+#define __DARWIN_NULL __null
+#else /* ! __GNUG__ */
+#ifdef __LP64__
+#define __DARWIN_NULL (0L)
+#else /* !__LP64__ */
+#define __DARWIN_NULL 0
+#endif /* __LP64__ */
+#endif /* __GNUG__ */
+#else /* ! __cplusplus */
+#define __DARWIN_NULL ((void *)0)
+#endif /* __cplusplus */
+
+typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
+typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
+typedef __int32_t       __darwin_dev_t;         /* dev_t */
+typedef unsigned int    __darwin_fsblkcnt_t;    /* Used by statvfs and fstatvfs */
+typedef unsigned int    __darwin_fsfilcnt_t;    /* Used by statvfs and fstatvfs */
+typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
+typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
+typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
+#if __DARWIN_64_BIT_INO_T
+typedef __darwin_ino64_t __darwin_ino_t;        /* [???] Used for inodes */
+#else /* !__DARWIN_64_BIT_INO_T */
+typedef __uint32_t      __darwin_ino_t;         /* [???] Used for inodes */
+#endif /* __DARWIN_64_BIT_INO_T */
+typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
+typedef __darwin_mach_port_name_t __darwin_mach_port_t; /* Used by mach */
+typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
+typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
+typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
+typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
+typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
+typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
+typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
+typedef unsigned char   __darwin_uuid_t[16];
+typedef char    __darwin_uuid_string_t[37];
+
+#include <sys/_pthread/_pthread_types.h>
+
+#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 || __GNUC__ > 3)
+#define __offsetof(type, field) __builtin_offsetof(type, field)
+#else /* !(gcc >= 3.5) */
+#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
+#endif /* (gcc >= 3.5) */
+
+
+#endif  /* _SYS__TYPES_H_ */
lib/libc/include/x86_64-macos-gnu/sys/appleapiopts.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef __SYS_APPLEAPIOPTS_H__
+#define __SYS_APPLEAPIOPTS_H__
+
+
+#ifndef __APPLE_API_STANDARD
+#define __APPLE_API_STANDARD
+#endif /* __APPLE_API_STANDARD */
+
+#ifndef __APPLE_API_STABLE
+#define __APPLE_API_STABLE
+#endif /* __APPLE_API_STABLE */
+
+#ifndef __APPLE_API_STRICT_CONFORMANCE
+
+#ifndef __APPLE_API_EVOLVING
+#define __APPLE_API_EVOLVING
+#endif /* __APPLE_API_EVOLVING */
+
+#ifndef __APPLE_API_UNSTABLE
+#define __APPLE_API_UNSTABLE
+#endif /* __APPLE_API_UNSTABLE */
+
+#ifndef __APPLE_API_PRIVATE
+#define __APPLE_API_PRIVATE
+#endif /* __APPLE_API_PRIVATE */
+
+#ifndef __APPLE_API_OBSOLETE
+#define __APPLE_API_OBSOLETE
+#endif /* __APPLE_API_OBSOLETE */
+
+#endif /* __APPLE_API_STRICT_CONFORMANCE */
+
+#endif /* __SYS_APPLEAPIOPTS_H__ */
lib/libc/include/x86_64-macos-gnu/sys/cdefs.h
@@ -0,0 +1,855 @@
+/*
+ * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright 1995 NeXT Computer, Inc. All rights reserved. */
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Berkeley Software Design, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
+ */
+
+#ifndef _CDEFS_H_
+#define _CDEFS_H_
+
+#if defined(__cplusplus)
+#define __BEGIN_DECLS   extern "C" {
+#define __END_DECLS     }
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#endif
+
+/* This SDK is designed to work with clang and specific versions of
+ * gcc >= 4.0 with Apple's patch sets */
+#if !defined(__GNUC__) || __GNUC__ < 4
+#warning "Unsupported compiler detected"
+#endif
+
+/*
+ * Compatibility with compilers and environments that don't support compiler
+ * feature checking function-like macros.
+ */
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+#ifndef __has_include
+#define __has_include(x) 0
+#endif
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+#ifndef __has_extension
+#define __has_extension(x) 0
+#endif
+
+/*
+ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
+ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
+ * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
+ * in between its arguments.  __CONCAT can also concatenate double-quoted
+ * strings produced by the __STRING macro, but this only works with ANSI C.
+ */
+#if defined(__STDC__) || defined(__cplusplus)
+#define __P(protos)     protos          /* full-blown ANSI C */
+#define __CONCAT(x, y)   x ## y
+#define __STRING(x)     #x
+
+#define __const         const           /* define reserved names to standard */
+#define __signed        signed
+#define __volatile      volatile
+#if defined(__cplusplus)
+#define __inline        inline          /* convert to C++ keyword */
+#else
+#ifndef __GNUC__
+#define __inline                        /* delete GCC keyword */
+#endif /* !__GNUC__ */
+#endif /* !__cplusplus */
+
+#else   /* !(__STDC__ || __cplusplus) */
+#define __P(protos)     ()              /* traditional C preprocessor */
+#define __CONCAT(x, y)   x /**/ y
+#define __STRING(x)     "x"
+
+#ifndef __GNUC__
+#define __const                         /* delete pseudo-ANSI C keywords */
+#define __inline
+#define __signed
+#define __volatile
+#endif  /* !__GNUC__ */
+
+/*
+ * In non-ANSI C environments, new programs will want ANSI-only C keywords
+ * deleted from the program and old programs will want them left alone.
+ * When using a compiler other than gcc, programs using the ANSI C keywords
+ * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
+ * When using "gcc -traditional", we assume that this is the intent; if
+ * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
+ */
+#ifndef NO_ANSI_KEYWORDS
+#define const           __const                 /* convert ANSI C keywords */
+#define inline          __inline
+#define signed          __signed
+#define volatile        __volatile
+#endif /* !NO_ANSI_KEYWORDS */
+#endif /* !(__STDC__ || __cplusplus) */
+
+#define __dead2         __attribute__((__noreturn__))
+#define __pure2         __attribute__((__const__))
+
+/* __unused denotes variables and functions that may not be used, preventing
+ * the compiler from warning about it if not used.
+ */
+#define __unused        __attribute__((__unused__))
+
+/* __used forces variables and functions to be included even if it appears
+ * to the compiler that they are not used (and would thust be discarded).
+ */
+#define __used          __attribute__((__used__))
+
+/* __cold marks code used for debugging or that is rarely taken
+ * and tells the compiler to optimize for size and outline code.
+ */
+#if __has_attribute(cold)
+#define __cold          __attribute__((__cold__))
+#else
+#define __cold
+#endif
+
+/* __deprecated causes the compiler to produce a warning when encountering
+ * code using the deprecated functionality.
+ * __deprecated_msg() does the same, and compilers that support it will print
+ * a message along with the deprecation warning.
+ * This may require turning on such warning with the -Wdeprecated flag.
+ * __deprecated_enum_msg() should be used on enums, and compilers that support
+ * it will print the deprecation warning.
+ * __kpi_deprecated() specifically indicates deprecation of kernel programming
+ * interfaces in Kernel.framework used by KEXTs.
+ */
+#define __deprecated    __attribute__((__deprecated__))
+
+#if __has_extension(attribute_deprecated_with_message) || \
+        (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
+	#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
+#else
+	#define __deprecated_msg(_msg) __attribute__((__deprecated__))
+#endif
+
+#if __has_extension(enumerator_attributes)
+	#define __deprecated_enum_msg(_msg) __deprecated_msg(_msg)
+#else
+	#define __deprecated_enum_msg(_msg)
+#endif
+
+#define __kpi_deprecated(_msg)
+
+/* __unavailable causes the compiler to error out when encountering
+ * code using the tagged function of variable.
+ */
+#define __unavailable   __attribute__((__unavailable__))
+
+/* Delete pseudo-keywords wherever they are not available or needed. */
+#ifndef __dead
+#define __dead
+#define __pure
+#endif
+
+/*
+ * We use `__restrict' as a way to define the `restrict' type qualifier
+ * without disturbing older software that is unaware of C99 keywords.
+ */
+#if __STDC_VERSION__ < 199901
+#define __restrict
+#else
+#define __restrict      restrict
+#endif
+
+/* Compatibility with compilers and environments that don't support the
+ * nullability feature.
+ */
+
+#if !__has_feature(nullability)
+#ifndef __nullable
+#define __nullable
+#endif
+#ifndef __nonnull
+#define __nonnull
+#endif
+#ifndef __null_unspecified
+#define __null_unspecified
+#endif
+#ifndef _Nullable
+#define _Nullable
+#endif
+#ifndef _Nonnull
+#define _Nonnull
+#endif
+#ifndef _Null_unspecified
+#define _Null_unspecified
+#endif
+#endif
+
+/*
+ * __disable_tail_calls causes the compiler to not perform tail call
+ * optimization inside the marked function.
+ */
+#if __has_attribute(disable_tail_calls)
+#define __disable_tail_calls    __attribute__((__disable_tail_calls__))
+#else
+#define __disable_tail_calls
+#endif
+
+/*
+ * __not_tail_called causes the compiler to prevent tail call optimization
+ * on statically bound calls to the function.  It has no effect on indirect
+ * calls.  Virtual functions, objective-c methods, and functions marked as
+ * "always_inline" cannot be marked as __not_tail_called.
+ */
+#if __has_attribute(not_tail_called)
+#define __not_tail_called       __attribute__((__not_tail_called__))
+#else
+#define __not_tail_called
+#endif
+
+/*
+ * __result_use_check warns callers of a function that not using the function
+ * return value is a bug, i.e. dismissing malloc() return value results in a
+ * memory leak.
+ */
+#if __has_attribute(warn_unused_result)
+#define __result_use_check __attribute__((__warn_unused_result__))
+#else
+#define __result_use_check
+#endif
+
+/*
+ * __swift_unavailable causes the compiler to mark a symbol as specifically
+ * unavailable in Swift, regardless of any other availability in C.
+ */
+#if __has_feature(attribute_availability_swift)
+#define __swift_unavailable(_msg)       __attribute__((__availability__(swift, unavailable, message=_msg)))
+#else
+#define __swift_unavailable(_msg)
+#endif
+
+/*
+ * __abortlike is the attribute to put on functions like abort() that are
+ * typically used to mark assertions. These optimize the codegen
+ * for outlining while still maintaining debugability.
+ */
+#ifndef __abortlike
+#define __abortlike __dead2 __cold __not_tail_called
+#endif
+
+/* Declaring inline functions within headers is error-prone due to differences
+ * across various versions of the C language and extensions.  __header_inline
+ * can be used to declare inline functions within system headers.  In cases
+ * where you want to force inlining instead of letting the compiler make
+ * the decision, you can use __header_always_inline.
+ *
+ * Be aware that using inline for functions which compilers may also provide
+ * builtins can behave differently under various compilers.  If you intend to
+ * provide an inline version of such a function, you may want to use a macro
+ * instead.
+ *
+ * The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
+ * support c99 inline in some cases:
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
+ */
+
+#if defined(__cplusplus) || \
+        (__STDC_VERSION__ >= 199901L && \
+        !defined(__GNUC_GNU_INLINE__) && \
+        (!defined(__GNUC__) || defined(__clang__)))
+# define __header_inline           inline
+#elif defined(__GNUC__) && defined(__GNUC_STDC_INLINE__)
+# define __header_inline           extern __inline __attribute__((__gnu_inline__))
+#elif defined(__GNUC__)
+# define __header_inline           extern __inline
+#else
+/* If we land here, we've encountered an unsupported compiler,
+ * so hopefully it understands static __inline as a fallback.
+ */
+# define __header_inline           static __inline
+#endif
+
+#ifdef __GNUC__
+# define __header_always_inline    __header_inline __attribute__ ((__always_inline__))
+#else
+/* Unfortunately, we're using a compiler that we don't know how to force to
+ * inline.  Oh well.
+ */
+# define __header_always_inline    __header_inline
+#endif
+
+/*
+ * Compiler-dependent macros that bracket portions of code where the
+ * "-Wunreachable-code" warning should be ignored. Please use sparingly.
+ */
+#if defined(__clang__)
+# define __unreachable_ok_push \
+	 _Pragma("clang diagnostic push") \
+	 _Pragma("clang diagnostic ignored \"-Wunreachable-code\"")
+# define __unreachable_ok_pop \
+	 _Pragma("clang diagnostic pop")
+#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+# define __unreachable_ok_push \
+	 _Pragma("GCC diagnostic push") \
+	 _Pragma("GCC diagnostic ignored \"-Wunreachable-code\"")
+# define __unreachable_ok_pop \
+	 _Pragma("GCC diagnostic pop")
+#else
+# define __unreachable_ok_push
+# define __unreachable_ok_pop
+#endif
+
+/*
+ * Compiler-dependent macros to declare that functions take printf-like
+ * or scanf-like arguments.  They are null except for versions of gcc
+ * that are known to support the features properly.  Functions declared
+ * with these attributes will cause compilation warnings if there is a
+ * mismatch between the format string and subsequent function parameter
+ * types.
+ */
+#define __printflike(fmtarg, firstvararg) \
+	        __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
+#define __printf0like(fmtarg, firstvararg) \
+	        __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
+#define __scanflike(fmtarg, firstvararg) \
+	        __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
+
+#define __IDSTRING(name, string) static const char name[] __used = string
+
+#ifndef __COPYRIGHT
+#define __COPYRIGHT(s) __IDSTRING(copyright,s)
+#endif
+
+#ifndef __RCSID
+#define __RCSID(s) __IDSTRING(rcsid,s)
+#endif
+
+#ifndef __SCCSID
+#define __SCCSID(s) __IDSTRING(sccsid,s)
+#endif
+
+#ifndef __PROJECT_VERSION
+#define __PROJECT_VERSION(s) __IDSTRING(project_version,s)
+#endif
+
+/* Source compatibility only, ID string not emitted in object file */
+#ifndef __FBSDID
+#define __FBSDID(s)
+#endif
+
+#ifndef __DECONST
+#define __DECONST(type, var)    __CAST_AWAY_QUALIFIER(var, const, type)
+#endif
+
+#ifndef __DEVOLATILE
+#define __DEVOLATILE(type, var) __CAST_AWAY_QUALIFIER(var, volatile, type)
+#endif
+
+#ifndef __DEQUALIFY
+#define __DEQUALIFY(type, var)  __CAST_AWAY_QUALIFIER(var, const volatile, type)
+#endif
+
+/*
+ * __alloc_size can be used to label function arguments that represent the
+ * size of memory that the function allocates and returns. The one-argument
+ * form labels a single argument that gives the allocation size (where the
+ * arguments are numbered from 1):
+ *
+ * void	*malloc(size_t __size) __alloc_size(1);
+ *
+ * The two-argument form handles the case where the size is calculated as the
+ * product of two arguments:
+ *
+ * void	*calloc(size_t __count, size_t __size) __alloc_size(1,2);
+ */
+#ifndef __alloc_size
+#if __has_attribute(alloc_size)
+#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))
+#else
+#define __alloc_size(...)
+#endif
+#endif // __alloc_size
+
+/*
+ * COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
+ *
+ * DEFAULT	By default newly complied code will get POSIX APIs plus
+ *		Apple API extensions in scope.
+ *
+ *		Most users will use this compilation environment to avoid
+ *		behavioral differences between 32 and 64 bit code.
+ *
+ * LEGACY	Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
+ *		API extensions in scope.
+ *
+ *		This is generally equivalent to the Tiger release compilation
+ *		environment, except that it cannot be applied to 64 bit code;
+ *		its use is discouraged.
+ *
+ *		We expect this environment to be deprecated in the future.
+ *
+ * STRICT	Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
+ *		available APIs to exactly the set of APIs defined by the
+ *		corresponding standard, based on the value defined.
+ *
+ *		A correct, portable definition for _POSIX_C_SOURCE is 200112L.
+ *		A correct, portable definition for _XOPEN_SOURCE is 600L.
+ *
+ *		Apple API extensions are not visible in this environment,
+ *		which can cause Apple specific code to fail to compile,
+ *		or behave incorrectly if prototypes are not in scope or
+ *		warnings about missing prototypes are not enabled or ignored.
+ *
+ * In any compilation environment, for correct symbol resolution to occur,
+ * function prototypes must be in scope.  It is recommended that all Apple
+ * tools users add either the "-Wall" or "-Wimplicit-function-declaration"
+ * compiler flags to their projects to be warned when a function is being
+ * used without a prototype in scope.
+ */
+
+/* These settings are particular to each product. */
+/* Platform: MacOSX */
+#define __DARWIN_ONLY_64_BIT_INO_T      0
+/* #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit) */
+#define __DARWIN_ONLY_VERS_1050         0
+
+/*
+ * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
+ * legacy code to use the old symbol, thus maintaining binary compatibility
+ * while new code can use a standards compliant version of the same function.
+ *
+ * __DARWIN_ALIAS is used by itself if the function signature has not
+ * changed, it is used along with a #ifdef check for __DARWIN_UNIX03
+ * if the signature has changed.  Because the __LP64__ environment
+ * only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
+ * defined, but causes __DARWIN_ALIAS to do no symbol mangling.
+ *
+ * As a special case, when XCode is used to target a specific version of the
+ * OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+ * will be defined by the compiler, with the digits representing major version
+ * time 100 + minor version times 10 (e.g. 10.5 := 1050).  If we are targeting
+ * pre-10.5, and it is the default compilation environment, revert the
+ * compilation environment to pre-__DARWIN_UNIX03.
+ */
+#if !defined(__DARWIN_ONLY_UNIX_CONFORMANCE)
+#  if defined(__LP64__)
+#    define __DARWIN_ONLY_UNIX_CONFORMANCE 1
+#  else /* !__LP64__ */
+#    define __DARWIN_ONLY_UNIX_CONFORMANCE 0
+#  endif /* __LP64__ */
+#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */
+
+#if !defined(__DARWIN_UNIX03)
+#  if   __DARWIN_ONLY_UNIX_CONFORMANCE
+#    if defined(_NONSTD_SOURCE)
+#      error "Can't define _NONSTD_SOURCE when only UNIX conformance is available."
+#    endif /* _NONSTD_SOURCE */
+#    define __DARWIN_UNIX03     1
+#  elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1040)
+#    define __DARWIN_UNIX03     0
+#  elif defined(_DARWIN_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE)
+#    if defined(_NONSTD_SOURCE)
+#      error "Can't define both _NONSTD_SOURCE and any of _DARWIN_C_SOURCE, _XOPEN_SOURCE or _POSIX_C_SOURCE."
+#    endif /* _NONSTD_SOURCE */
+#    define __DARWIN_UNIX03     1
+#  elif defined(_NONSTD_SOURCE)
+#    define __DARWIN_UNIX03     0
+#  else /* default */
+#    if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1050)
+#      define __DARWIN_UNIX03   0
+#    else /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */
+#      define __DARWIN_UNIX03   1
+#    endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */
+#  endif /* _DARWIN_C_SOURCE || _XOPEN_SOURCE || _POSIX_C_SOURCE || __LP64__ */
+#endif /* !__DARWIN_UNIX03 */
+
+#if !defined(__DARWIN_64_BIT_INO_T)
+#  if   defined(_DARWIN_USE_64_BIT_INODE)
+#    if defined(_DARWIN_NO_64_BIT_INODE)
+#      error "Can't define both _DARWIN_USE_64_BIT_INODE and _DARWIN_NO_64_BIT_INODE."
+#    endif /* _DARWIN_NO_64_BIT_INODE */
+#    define __DARWIN_64_BIT_INO_T 1
+#  elif defined(_DARWIN_NO_64_BIT_INODE)
+#    if __DARWIN_ONLY_64_BIT_INO_T
+#      error "Can't define _DARWIN_NO_64_BIT_INODE when only 64-bit inodes are available."
+#    endif /* __DARWIN_ONLY_64_BIT_INO_T */
+#    define __DARWIN_64_BIT_INO_T 0
+#  else /* default */
+#    if __DARWIN_ONLY_64_BIT_INO_T
+#      define __DARWIN_64_BIT_INO_T 1
+#    elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1060) || __DARWIN_UNIX03 == 0
+#      define __DARWIN_64_BIT_INO_T 0
+#    else /* default */
+#      define __DARWIN_64_BIT_INO_T 1
+#    endif /* __DARWIN_ONLY_64_BIT_INO_T */
+#  endif
+#endif /* !__DARWIN_64_BIT_INO_T */
+
+#if !defined(__DARWIN_VERS_1050)
+#  if   __DARWIN_ONLY_VERS_1050
+#    define __DARWIN_VERS_1050 1
+#  elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1050) || __DARWIN_UNIX03 == 0
+#    define __DARWIN_VERS_1050 0
+#  else /* default */
+#    define __DARWIN_VERS_1050 1
+#  endif
+#endif /* !__DARWIN_VERS_1050 */
+
+#if !defined(__DARWIN_NON_CANCELABLE)
+#    define __DARWIN_NON_CANCELABLE 0
+#endif /* !__DARWIN_NON_CANCELABLE */
+
+/*
+ * symbol suffixes used for symbol versioning
+ */
+#if __DARWIN_UNIX03
+#  if __DARWIN_ONLY_UNIX_CONFORMANCE
+#    define __DARWIN_SUF_UNIX03         /* nothing */
+#  else /* !__DARWIN_ONLY_UNIX_CONFORMANCE */
+#    define __DARWIN_SUF_UNIX03         "$UNIX2003"
+#  endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */
+
+#  if __DARWIN_64_BIT_INO_T
+#    if __DARWIN_ONLY_64_BIT_INO_T
+#      define __DARWIN_SUF_64_BIT_INO_T /* nothing */
+#    else /* !__DARWIN_ONLY_64_BIT_INO_T */
+#      define __DARWIN_SUF_64_BIT_INO_T "$INODE64"
+#    endif /* __DARWIN_ONLY_64_BIT_INO_T */
+#  else /* !__DARWIN_64_BIT_INO_T */
+#    define __DARWIN_SUF_64_BIT_INO_T   /* nothing */
+#  endif /* __DARWIN_64_BIT_INO_T */
+
+#  if __DARWIN_VERS_1050
+#    if __DARWIN_ONLY_VERS_1050
+#      define __DARWIN_SUF_1050         /* nothing */
+#    else /* !__DARWIN_ONLY_VERS_1050 */
+#      define __DARWIN_SUF_1050         "$1050"
+#    endif /* __DARWIN_ONLY_VERS_1050 */
+#  else /* !__DARWIN_VERS_1050 */
+#    define __DARWIN_SUF_1050           /* nothing */
+#  endif /* __DARWIN_VERS_1050 */
+
+#  if __DARWIN_NON_CANCELABLE
+#    define __DARWIN_SUF_NON_CANCELABLE "$NOCANCEL"
+#  else /* !__DARWIN_NON_CANCELABLE */
+#    define __DARWIN_SUF_NON_CANCELABLE /* nothing */
+#  endif /* __DARWIN_NON_CANCELABLE */
+
+#else /* !__DARWIN_UNIX03 */
+#  define __DARWIN_SUF_UNIX03           /* nothing */
+#  define __DARWIN_SUF_64_BIT_INO_T     /* nothing */
+#  define __DARWIN_SUF_NON_CANCELABLE   /* nothing */
+#  define __DARWIN_SUF_1050             /* nothing */
+#endif /* __DARWIN_UNIX03 */
+
+#define __DARWIN_SUF_EXTSN              "$DARWIN_EXTSN"
+
+/*
+ * symbol versioning macros
+ */
+#define __DARWIN_ALIAS(sym)             __asm("_" __STRING(sym) __DARWIN_SUF_UNIX03)
+#define __DARWIN_ALIAS_C(sym)           __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03)
+#define __DARWIN_ALIAS_I(sym)           __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03)
+#define __DARWIN_NOCANCEL(sym)          __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE)
+#define __DARWIN_INODE64(sym)           __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T)
+
+#define __DARWIN_1050(sym)              __asm("_" __STRING(sym) __DARWIN_SUF_1050)
+#define __DARWIN_1050ALIAS(sym)         __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03)
+#define __DARWIN_1050ALIAS_C(sym)       __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03)
+#define __DARWIN_1050ALIAS_I(sym)       __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03)
+#define __DARWIN_1050INODE64(sym)       __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T)
+
+#define __DARWIN_EXTSN(sym)             __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN)
+#define __DARWIN_EXTSN_C(sym)           __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE)
+
+/*
+ * symbol release macros
+ */
+#include <sys/_symbol_aliasing.h>
+
+#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
+#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   __DARWIN_ALIAS_STARTING_IPHONE_##_iphone(x)
+#elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   __DARWIN_ALIAS_STARTING_MAC_##_mac(x)
+#else
+#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   x
+#endif
+
+
+/*
+ * POSIX.1 requires that the macros we test be defined before any standard
+ * header file is included.  This permits us to convert values for feature
+ * testing, as necessary, using only _POSIX_C_SOURCE.
+ *
+ * Here's a quick run-down of the versions:
+ *  defined(_POSIX_SOURCE)		1003.1-1988
+ *  _POSIX_C_SOURCE == 1L		1003.1-1990
+ *  _POSIX_C_SOURCE == 2L		1003.2-1992 C Language Binding Option
+ *  _POSIX_C_SOURCE == 199309L		1003.1b-1993
+ *  _POSIX_C_SOURCE == 199506L		1003.1c-1995, 1003.1i-1995,
+ *					and the omnibus ISO/IEC 9945-1: 1996
+ *  _POSIX_C_SOURCE == 200112L		1003.1-2001
+ *  _POSIX_C_SOURCE == 200809L		1003.1-2008
+ *
+ * In addition, the X/Open Portability Guide, which is now the Single UNIX
+ * Specification, defines a feature-test macro which indicates the version of
+ * that specification, and which subsumes _POSIX_C_SOURCE.
+ */
+
+/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1L
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE         199009L
+#endif
+
+/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2L
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE         199209L
+#endif
+
+/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
+#ifdef _XOPEN_SOURCE
+#if _XOPEN_SOURCE - 0L >= 700L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 200809L)
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE         200809L
+#elif _XOPEN_SOURCE - 0L >= 600L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 200112L)
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE         200112L
+#elif _XOPEN_SOURCE - 0L >= 500L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 199506L)
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE         199506L
+#endif
+#endif
+
+/*
+ * Deal with all versions of POSIX.  The ordering relative to the tests above is
+ * important.
+ */
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE         198808L
+#endif
+
+/* POSIX C deprecation macros */
+#include <sys/_posix_availability.h>
+
+#define __POSIX_C_DEPRECATED(ver) ___POSIX_C_DEPRECATED_STARTING_##ver
+
+/*
+ * Set a single macro which will always be defined and can be used to determine
+ * the appropriate namespace.  For POSIX, these values will correspond to
+ * _POSIX_C_SOURCE value.  Currently there are two additional levels corresponding
+ * to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
+ */
+#define __DARWIN_C_ANSI         010000L
+#define __DARWIN_C_FULL         900000L
+
+#if   defined(_ANSI_SOURCE)
+#define __DARWIN_C_LEVEL        __DARWIN_C_ANSI
+#elif defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE) && !defined(_NONSTD_SOURCE)
+#define __DARWIN_C_LEVEL        _POSIX_C_SOURCE
+#else
+#define __DARWIN_C_LEVEL        __DARWIN_C_FULL
+#endif
+
+/* If the developer has neither requested a strict language mode nor a version
+ * of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
+ * of __DARWIN_C_FULL.
+ */
+#if !defined(__STDC_WANT_LIB_EXT1__) && !defined(__STRICT_ANSI__) && __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+
+/*
+ * long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
+ * c99 still want long longs.  While not perfect, we allow long longs for
+ * g++.
+ */
+#if (defined(__STRICT_ANSI__) && (__STDC_VERSION__ - 0 < 199901L) && !defined(__GNUG__))
+#define __DARWIN_NO_LONG_LONG 1
+#else
+#define __DARWIN_NO_LONG_LONG 0
+#endif
+
+/*****************************************
+*  Public darwin-specific feature macros
+*****************************************/
+
+/*
+ * _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
+ * structures modified for 64-bit inodes (like struct stat) will be used.
+ */
+#if __DARWIN_64_BIT_INO_T
+#define _DARWIN_FEATURE_64_BIT_INODE            1
+#endif
+
+/*
+ * _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
+ * be 64-bit; there is no support for 32-bit ino_t when this macro is defined
+ * (and non-zero).  There is no struct stat64 either, as the regular
+ * struct stat will already be the 64-bit version.
+ */
+#if __DARWIN_ONLY_64_BIT_INO_T
+#define _DARWIN_FEATURE_ONLY_64_BIT_INODE       1
+#endif
+
+/*
+ * _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
+ * in 10.5 exists; no pre-10.5 variants are available.
+ */
+#if __DARWIN_ONLY_VERS_1050
+#define _DARWIN_FEATURE_ONLY_VERS_1050          1
+#endif
+
+/*
+ * _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
+ * are available (the legacy BSD APIs are not available)
+ */
+#if __DARWIN_ONLY_UNIX_CONFORMANCE
+#define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE   1
+#endif
+
+/*
+ * _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
+ * and specifies the conformance level (3 is SUSv3)
+ */
+#if __DARWIN_UNIX03
+#define _DARWIN_FEATURE_UNIX_CONFORMANCE        3
+#endif
+
+
+/*
+ * This macro casts away the qualifier from the variable
+ *
+ * Note: use at your own risk, removing qualifiers can result in
+ * catastrophic run-time failures.
+ */
+#ifndef __CAST_AWAY_QUALIFIER
+#define __CAST_AWAY_QUALIFIER(variable, qualifier, type)  (type) (long)(variable)
+#endif
+
+/*
+ * __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
+ * used from other compilation units, but not other libraries or executables.
+ */
+#ifndef __XNU_PRIVATE_EXTERN
+#define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden")))
+#endif
+
+/*
+ * Architecture validation for current SDK
+ */
+#if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__)
+#elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__)
+#else
+#error Unsupported architecture
+#endif
+
+
+
+#define __compiler_barrier() __asm__ __volatile__("" ::: "memory")
+
+#if __has_attribute(enum_extensibility)
+#define __enum_open __attribute__((__enum_extensibility__(open)))
+#define __enum_closed __attribute__((__enum_extensibility__(closed)))
+#else
+#define __enum_open
+#define __enum_closed
+#endif // __has_attribute(enum_extensibility)
+
+#if __has_attribute(flag_enum)
+#define __enum_options __attribute__((__flag_enum__))
+#else
+#define __enum_options
+#endif
+
+/*
+ * Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
+ *
+ * This provides more advanced type checking on compilers supporting
+ * the proper extensions, even in C.
+ */
+#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \
+        __has_extension(cxx_strong_enums)
+#define __enum_decl(_name, _type, ...) \
+	        typedef enum : _type __VA_ARGS__ __enum_open _name
+#define __enum_closed_decl(_name, _type, ...) \
+	        typedef enum : _type __VA_ARGS__ __enum_closed _name
+#define __options_decl(_name, _type, ...) \
+	        typedef enum : _type __VA_ARGS__ __enum_open __enum_options _name
+#define __options_closed_decl(_name, _type, ...) \
+	        typedef enum : _type __VA_ARGS__ __enum_closed __enum_options _name
+#else
+#define __enum_decl(_name, _type, ...) \
+	        typedef _type _name; enum __VA_ARGS__ __enum_open
+#define __enum_closed_decl(_name, _type, ...) \
+	        typedef _type _name; enum __VA_ARGS__ __enum_closed
+#define __options_decl(_name, _type, ...) \
+	        typedef _type _name; enum __VA_ARGS__ __enum_open __enum_options
+#define __options_closed_decl(_name, _type, ...) \
+	        typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options
+#endif
+
+#endif /* !_CDEFS_H_ */
lib/libc/include/x86_64-macos-gnu/sys/errno.h
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 2000-2012 Apple, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)errno.h	8.5 (Berkeley) 1/21/94
+ */
+
+#ifndef _SYS_ERRNO_H_
+#define _SYS_ERRNO_H_
+
+#include <sys/cdefs.h>
+
+
+#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
+#include <sys/_types/_errno_t.h>
+#endif
+
+__BEGIN_DECLS
+extern int * __error(void);
+#define errno (*__error())
+__END_DECLS
+
+/*
+ * Error codes
+ */
+
+#define EPERM           1               /* Operation not permitted */
+#define ENOENT          2               /* No such file or directory */
+#define ESRCH           3               /* No such process */
+#define EINTR           4               /* Interrupted system call */
+#define EIO             5               /* Input/output error */
+#define ENXIO           6               /* Device not configured */
+#define E2BIG           7               /* Argument list too long */
+#define ENOEXEC         8               /* Exec format error */
+#define EBADF           9               /* Bad file descriptor */
+#define ECHILD          10              /* No child processes */
+#define EDEADLK         11              /* Resource deadlock avoided */
+                                        /* 11 was EAGAIN */
+#define ENOMEM          12              /* Cannot allocate memory */
+#define EACCES          13              /* Permission denied */
+#define EFAULT          14              /* Bad address */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define ENOTBLK         15              /* Block device required */
+#endif
+#define EBUSY           16              /* Device / Resource busy */
+#define EEXIST          17              /* File exists */
+#define EXDEV           18              /* Cross-device link */
+#define ENODEV          19              /* Operation not supported by device */
+#define ENOTDIR         20              /* Not a directory */
+#define EISDIR          21              /* Is a directory */
+#define EINVAL          22              /* Invalid argument */
+#define ENFILE          23              /* Too many open files in system */
+#define EMFILE          24              /* Too many open files */
+#define ENOTTY          25              /* Inappropriate ioctl for device */
+#define ETXTBSY         26              /* Text file busy */
+#define EFBIG           27              /* File too large */
+#define ENOSPC          28              /* No space left on device */
+#define ESPIPE          29              /* Illegal seek */
+#define EROFS           30              /* Read-only file system */
+#define EMLINK          31              /* Too many links */
+#define EPIPE           32              /* Broken pipe */
+
+/* math software */
+#define EDOM            33              /* Numerical argument out of domain */
+#define ERANGE          34              /* Result too large */
+
+/* non-blocking and interrupt i/o */
+#define EAGAIN          35              /* Resource temporarily unavailable */
+#define EWOULDBLOCK     EAGAIN          /* Operation would block */
+#define EINPROGRESS     36              /* Operation now in progress */
+#define EALREADY        37              /* Operation already in progress */
+
+/* ipc/network software -- argument errors */
+#define ENOTSOCK        38              /* Socket operation on non-socket */
+#define EDESTADDRREQ    39              /* Destination address required */
+#define EMSGSIZE        40              /* Message too long */
+#define EPROTOTYPE      41              /* Protocol wrong type for socket */
+#define ENOPROTOOPT     42              /* Protocol not available */
+#define EPROTONOSUPPORT 43              /* Protocol not supported */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define ESOCKTNOSUPPORT 44              /* Socket type not supported */
+#endif
+#define ENOTSUP         45              /* Operation not supported */
+#if !__DARWIN_UNIX03 && !defined(KERNEL)
+/*
+ * This is the same for binary and source copmpatability, unless compiling
+ * the kernel itself, or compiling __DARWIN_UNIX03; if compiling for the
+ * kernel, the correct value will be returned.  If compiling non-POSIX
+ * source, the kernel return value will be converted by a stub in libc, and
+ * if compiling source with __DARWIN_UNIX03, the conversion in libc is not
+ * done, and the caller gets the expected (discrete) value.
+ */
+#define EOPNOTSUPP       ENOTSUP        /* Operation not supported on socket */
+#endif /* !__DARWIN_UNIX03 && !KERNEL */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EPFNOSUPPORT    46              /* Protocol family not supported */
+#endif
+#define EAFNOSUPPORT    47              /* Address family not supported by protocol family */
+#define EADDRINUSE      48              /* Address already in use */
+#define EADDRNOTAVAIL   49              /* Can't assign requested address */
+
+/* ipc/network software -- operational errors */
+#define ENETDOWN        50              /* Network is down */
+#define ENETUNREACH     51              /* Network is unreachable */
+#define ENETRESET       52              /* Network dropped connection on reset */
+#define ECONNABORTED    53              /* Software caused connection abort */
+#define ECONNRESET      54              /* Connection reset by peer */
+#define ENOBUFS         55              /* No buffer space available */
+#define EISCONN         56              /* Socket is already connected */
+#define ENOTCONN        57              /* Socket is not connected */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define ESHUTDOWN       58              /* Can't send after socket shutdown */
+#define ETOOMANYREFS    59              /* Too many references: can't splice */
+#endif
+#define ETIMEDOUT       60              /* Operation timed out */
+#define ECONNREFUSED    61              /* Connection refused */
+
+#define ELOOP           62              /* Too many levels of symbolic links */
+#define ENAMETOOLONG    63              /* File name too long */
+
+/* should be rearranged */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EHOSTDOWN       64              /* Host is down */
+#endif
+#define EHOSTUNREACH    65              /* No route to host */
+#define ENOTEMPTY       66              /* Directory not empty */
+
+/* quotas & mush */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EPROCLIM        67              /* Too many processes */
+#define EUSERS          68              /* Too many users */
+#endif
+#define EDQUOT          69              /* Disc quota exceeded */
+
+/* Network File System */
+#define ESTALE          70              /* Stale NFS file handle */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EREMOTE         71              /* Too many levels of remote in path */
+#define EBADRPC         72              /* RPC struct is bad */
+#define ERPCMISMATCH    73              /* RPC version wrong */
+#define EPROGUNAVAIL    74              /* RPC prog. not avail */
+#define EPROGMISMATCH   75              /* Program version wrong */
+#define EPROCUNAVAIL    76              /* Bad procedure for program */
+#endif
+
+#define ENOLCK          77              /* No locks available */
+#define ENOSYS          78              /* Function not implemented */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EFTYPE          79              /* Inappropriate file type or format */
+#define EAUTH           80              /* Authentication error */
+#define ENEEDAUTH       81              /* Need authenticator */
+
+/* Intelligent device errors */
+#define EPWROFF         82      /* Device power is off */
+#define EDEVERR         83      /* Device error, e.g. paper out */
+#endif
+
+#define EOVERFLOW       84              /* Value too large to be stored in data type */
+
+/* Program loading errors */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EBADEXEC        85      /* Bad executable */
+#define EBADARCH        86      /* Bad CPU type in executable */
+#define ESHLIBVERS      87      /* Shared library version mismatch */
+#define EBADMACHO       88      /* Malformed Macho file */
+#endif
+
+#define ECANCELED       89              /* Operation canceled */
+
+#define EIDRM           90              /* Identifier removed */
+#define ENOMSG          91              /* No message of desired type */
+#define EILSEQ          92              /* Illegal byte sequence */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define ENOATTR         93              /* Attribute not found */
+#endif
+
+#define EBADMSG         94              /* Bad message */
+#define EMULTIHOP       95              /* Reserved */
+#define ENODATA         96              /* No message available on STREAM */
+#define ENOLINK         97              /* Reserved */
+#define ENOSR           98              /* No STREAM resources */
+#define ENOSTR          99              /* Not a STREAM */
+#define EPROTO          100             /* Protocol error */
+#define ETIME           101             /* STREAM ioctl timeout */
+
+#if __DARWIN_UNIX03 || defined(KERNEL)
+/* This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL */
+#define EOPNOTSUPP      102             /* Operation not supported on socket */
+#endif /* __DARWIN_UNIX03 || KERNEL */
+
+#define ENOPOLICY       103             /* No such policy registered */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#define ENOTRECOVERABLE 104             /* State not recoverable */
+#define EOWNERDEAD      105             /* Previous owner died */
+#endif
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define EQFULL          106             /* Interface output queue is full */
+#define ELAST           106             /* Must be equal largest errno */
+#endif
+
+#endif /* _SYS_ERRNO_H_ */
lib/libc/include/x86_64-macos-gnu/sys/resource.h
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)resource.h	8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <sys/appleapiopts.h>
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#include <stdint.h>
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+#include <Availability.h>
+
+/* [XSI] The timeval structure shall be defined as described in
+ * <sys/time.h>
+ */
+#include <sys/_types/_timeval.h>
+
+/* The id_t type shall be defined as described in <sys/types.h> */
+#include <sys/_types/_id_t.h>
+
+
+/*
+ * Resource limit type (low 63 bits, excluding the sign bit)
+ */
+typedef __uint64_t      rlim_t;
+
+
+/*****
+ * PRIORITY
+ */
+
+/*
+ * Possible values of the first parameter to getpriority()/setpriority(),
+ * used to indicate the type of the second parameter.
+ */
+#define PRIO_PROCESS    0               /* Second argument is a PID */
+#define PRIO_PGRP       1               /* Second argument is a GID */
+#define PRIO_USER       2               /* Second argument is a UID */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define PRIO_DARWIN_THREAD      3               /* Second argument is always 0 (current thread) */
+#define PRIO_DARWIN_PROCESS     4               /* Second argument is a PID */
+
+
+/*
+ * Range limitations for the value of the third parameter to setpriority().
+ */
+#define PRIO_MIN        -20
+#define PRIO_MAX        20
+
+/*
+ * use PRIO_DARWIN_BG to set the current thread into "background" state
+ * which lowers CPU, disk IO, and networking priorites until thread terminates
+ * or "background" state is revoked
+ */
+#define PRIO_DARWIN_BG 0x1000
+
+/*
+ * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to
+ * the GPU. (deprecated)
+ */
+#define PRIO_DARWIN_NONUI 0x1001
+
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+
+/*****
+ * RESOURCE USAGE
+ */
+
+/*
+ * Possible values of the first parameter to getrusage(), used to indicate
+ * the scope of the information to be returned.
+ */
+#define RUSAGE_SELF     0               /* Current process information */
+#define RUSAGE_CHILDREN -1              /* Current process' children */
+
+/*
+ * A structure representing an accounting of resource utilization.  The
+ * address of an instance of this structure is the second parameter to
+ * getrusage().
+ *
+ * Note: All values other than ru_utime and ru_stime are implementaiton
+ *       defined and subject to change in a future release.  Their use
+ *       is discouraged for standards compliant programs.
+ */
+struct  rusage {
+	struct timeval ru_utime;        /* user time used (PL) */
+	struct timeval ru_stime;        /* system time used (PL) */
+#if __DARWIN_C_LEVEL < __DARWIN_C_FULL
+	long    ru_opaque[14];          /* implementation defined */
+#else
+	/*
+	 * Informational aliases for source compatibility with programs
+	 * that need more information than that provided by standards,
+	 * and which do not mind being OS-dependent.
+	 */
+	long    ru_maxrss;              /* max resident set size (PL) */
+#define ru_first        ru_ixrss        /* internal: ruadd() range start */
+	long    ru_ixrss;               /* integral shared memory size (NU) */
+	long    ru_idrss;               /* integral unshared data (NU)  */
+	long    ru_isrss;               /* integral unshared stack (NU) */
+	long    ru_minflt;              /* page reclaims (NU) */
+	long    ru_majflt;              /* page faults (NU) */
+	long    ru_nswap;               /* swaps (NU) */
+	long    ru_inblock;             /* block input operations (atomic) */
+	long    ru_oublock;             /* block output operations (atomic) */
+	long    ru_msgsnd;              /* messages sent (atomic) */
+	long    ru_msgrcv;              /* messages received (atomic) */
+	long    ru_nsignals;            /* signals received (atomic) */
+	long    ru_nvcsw;               /* voluntary context switches (atomic) */
+	long    ru_nivcsw;              /* involuntary " */
+#define ru_last         ru_nivcsw       /* internal: ruadd() range end */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+};
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/*
+ * Flavors for proc_pid_rusage().
+ */
+#define RUSAGE_INFO_V0  0
+#define RUSAGE_INFO_V1  1
+#define RUSAGE_INFO_V2  2
+#define RUSAGE_INFO_V3  3
+#define RUSAGE_INFO_V4  4
+#define RUSAGE_INFO_CURRENT     RUSAGE_INFO_V4
+
+typedef void *rusage_info_t;
+
+struct rusage_info_v0 {
+	uint8_t  ri_uuid[16];
+	uint64_t ri_user_time;
+	uint64_t ri_system_time;
+	uint64_t ri_pkg_idle_wkups;
+	uint64_t ri_interrupt_wkups;
+	uint64_t ri_pageins;
+	uint64_t ri_wired_size;
+	uint64_t ri_resident_size;
+	uint64_t ri_phys_footprint;
+	uint64_t ri_proc_start_abstime;
+	uint64_t ri_proc_exit_abstime;
+};
+
+struct rusage_info_v1 {
+	uint8_t  ri_uuid[16];
+	uint64_t ri_user_time;
+	uint64_t ri_system_time;
+	uint64_t ri_pkg_idle_wkups;
+	uint64_t ri_interrupt_wkups;
+	uint64_t ri_pageins;
+	uint64_t ri_wired_size;
+	uint64_t ri_resident_size;
+	uint64_t ri_phys_footprint;
+	uint64_t ri_proc_start_abstime;
+	uint64_t ri_proc_exit_abstime;
+	uint64_t ri_child_user_time;
+	uint64_t ri_child_system_time;
+	uint64_t ri_child_pkg_idle_wkups;
+	uint64_t ri_child_interrupt_wkups;
+	uint64_t ri_child_pageins;
+	uint64_t ri_child_elapsed_abstime;
+};
+
+struct rusage_info_v2 {
+	uint8_t  ri_uuid[16];
+	uint64_t ri_user_time;
+	uint64_t ri_system_time;
+	uint64_t ri_pkg_idle_wkups;
+	uint64_t ri_interrupt_wkups;
+	uint64_t ri_pageins;
+	uint64_t ri_wired_size;
+	uint64_t ri_resident_size;
+	uint64_t ri_phys_footprint;
+	uint64_t ri_proc_start_abstime;
+	uint64_t ri_proc_exit_abstime;
+	uint64_t ri_child_user_time;
+	uint64_t ri_child_system_time;
+	uint64_t ri_child_pkg_idle_wkups;
+	uint64_t ri_child_interrupt_wkups;
+	uint64_t ri_child_pageins;
+	uint64_t ri_child_elapsed_abstime;
+	uint64_t ri_diskio_bytesread;
+	uint64_t ri_diskio_byteswritten;
+};
+
+struct rusage_info_v3 {
+	uint8_t  ri_uuid[16];
+	uint64_t ri_user_time;
+	uint64_t ri_system_time;
+	uint64_t ri_pkg_idle_wkups;
+	uint64_t ri_interrupt_wkups;
+	uint64_t ri_pageins;
+	uint64_t ri_wired_size;
+	uint64_t ri_resident_size;
+	uint64_t ri_phys_footprint;
+	uint64_t ri_proc_start_abstime;
+	uint64_t ri_proc_exit_abstime;
+	uint64_t ri_child_user_time;
+	uint64_t ri_child_system_time;
+	uint64_t ri_child_pkg_idle_wkups;
+	uint64_t ri_child_interrupt_wkups;
+	uint64_t ri_child_pageins;
+	uint64_t ri_child_elapsed_abstime;
+	uint64_t ri_diskio_bytesread;
+	uint64_t ri_diskio_byteswritten;
+	uint64_t ri_cpu_time_qos_default;
+	uint64_t ri_cpu_time_qos_maintenance;
+	uint64_t ri_cpu_time_qos_background;
+	uint64_t ri_cpu_time_qos_utility;
+	uint64_t ri_cpu_time_qos_legacy;
+	uint64_t ri_cpu_time_qos_user_initiated;
+	uint64_t ri_cpu_time_qos_user_interactive;
+	uint64_t ri_billed_system_time;
+	uint64_t ri_serviced_system_time;
+};
+
+struct rusage_info_v4 {
+	uint8_t  ri_uuid[16];
+	uint64_t ri_user_time;
+	uint64_t ri_system_time;
+	uint64_t ri_pkg_idle_wkups;
+	uint64_t ri_interrupt_wkups;
+	uint64_t ri_pageins;
+	uint64_t ri_wired_size;
+	uint64_t ri_resident_size;
+	uint64_t ri_phys_footprint;
+	uint64_t ri_proc_start_abstime;
+	uint64_t ri_proc_exit_abstime;
+	uint64_t ri_child_user_time;
+	uint64_t ri_child_system_time;
+	uint64_t ri_child_pkg_idle_wkups;
+	uint64_t ri_child_interrupt_wkups;
+	uint64_t ri_child_pageins;
+	uint64_t ri_child_elapsed_abstime;
+	uint64_t ri_diskio_bytesread;
+	uint64_t ri_diskio_byteswritten;
+	uint64_t ri_cpu_time_qos_default;
+	uint64_t ri_cpu_time_qos_maintenance;
+	uint64_t ri_cpu_time_qos_background;
+	uint64_t ri_cpu_time_qos_utility;
+	uint64_t ri_cpu_time_qos_legacy;
+	uint64_t ri_cpu_time_qos_user_initiated;
+	uint64_t ri_cpu_time_qos_user_interactive;
+	uint64_t ri_billed_system_time;
+	uint64_t ri_serviced_system_time;
+	uint64_t ri_logical_writes;
+	uint64_t ri_lifetime_max_phys_footprint;
+	uint64_t ri_instructions;
+	uint64_t ri_cycles;
+	uint64_t ri_billed_energy;
+	uint64_t ri_serviced_energy;
+	uint64_t ri_interval_max_phys_footprint;
+	uint64_t ri_runnable_time;
+};
+
+typedef struct rusage_info_v4 rusage_info_current;
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+
+/*****
+ * RESOURCE LIMITS
+ */
+
+/*
+ * Symbolic constants for resource limits; since all limits are representable
+ * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of
+ * RLIM_INFINITY.
+ */
+#define RLIM_INFINITY   (((__uint64_t)1 << 63) - 1)     /* no limit */
+#define RLIM_SAVED_MAX  RLIM_INFINITY   /* Unrepresentable hard limit */
+#define RLIM_SAVED_CUR  RLIM_INFINITY   /* Unrepresentable soft limit */
+
+/*
+ * Possible values of the first parameter to getrlimit()/setrlimit(), to
+ * indicate for which resource the operation is being performed.
+ */
+#define RLIMIT_CPU      0               /* cpu time per process */
+#define RLIMIT_FSIZE    1               /* file size */
+#define RLIMIT_DATA     2               /* data segment size */
+#define RLIMIT_STACK    3               /* stack size */
+#define RLIMIT_CORE     4               /* core file size */
+#define RLIMIT_AS       5               /* address space (resident set size) */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define RLIMIT_RSS      RLIMIT_AS       /* source compatibility alias */
+#define RLIMIT_MEMLOCK  6               /* locked-in-memory address space */
+#define RLIMIT_NPROC    7               /* number of processes */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+#define RLIMIT_NOFILE   8               /* number of open files */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define RLIM_NLIMITS    9               /* total number of resource limits */
+#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+#define _RLIMIT_POSIX_FLAG      0x1000  /* Set bit for strict POSIX */
+
+/*
+ * A structure representing a resource limit.  The address of an instance
+ * of this structure is the second parameter to getrlimit()/setrlimit().
+ */
+struct rlimit {
+	rlim_t  rlim_cur;               /* current (soft) limit */
+	rlim_t  rlim_max;               /* maximum value for rlim_cur */
+};
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+/*
+ * proc_rlimit_control()
+ *
+ * Resource limit flavors
+ */
+#define RLIMIT_WAKEUPS_MONITOR          0x1 /* Configure the wakeups monitor. */
+#define RLIMIT_CPU_USAGE_MONITOR        0x2 /* Configure the CPU usage monitor. */
+#define RLIMIT_THREAD_CPULIMITS         0x3 /* Configure a blocking, per-thread, CPU limits. */
+#define RLIMIT_FOOTPRINT_INTERVAL       0x4 /* Configure memory footprint interval tracking */
+
+/*
+ * Flags for wakeups monitor control.
+ */
+#define WAKEMON_ENABLE                  0x01
+#define WAKEMON_DISABLE                 0x02
+#define WAKEMON_GET_PARAMS              0x04
+#define WAKEMON_SET_DEFAULTS            0x08
+#define WAKEMON_MAKE_FATAL              0x10 /* Configure the task so that violations are fatal. */
+
+/*
+ * Flags for CPU usage monitor control.
+ */
+#define CPUMON_MAKE_FATAL               0x1000
+
+/*
+ * Flags for memory footprint interval tracking.
+ */
+#define FOOTPRINT_INTERVAL_RESET        0x1 /* Reset the footprint interval counter to zero */
+
+struct proc_rlimit_control_wakeupmon {
+	uint32_t wm_flags;
+	int32_t wm_rate;
+};
+
+
+
+/* I/O type */
+#define IOPOL_TYPE_DISK 0
+#define IOPOL_TYPE_VFS_ATIME_UPDATES 2
+#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3
+#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4
+
+/* scope */
+#define IOPOL_SCOPE_PROCESS   0
+#define IOPOL_SCOPE_THREAD    1
+#define IOPOL_SCOPE_DARWIN_BG 2
+
+/* I/O Priority */
+#define IOPOL_DEFAULT           0
+#define IOPOL_IMPORTANT         1
+#define IOPOL_PASSIVE           2
+#define IOPOL_THROTTLE          3
+#define IOPOL_UTILITY           4
+#define IOPOL_STANDARD          5
+
+/* compatibility with older names */
+#define IOPOL_APPLICATION       IOPOL_STANDARD
+#define IOPOL_NORMAL            IOPOL_IMPORTANT
+
+
+#define IOPOL_ATIME_UPDATES_DEFAULT     0
+#define IOPOL_ATIME_UPDATES_OFF         1
+
+#define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0
+#define IOPOL_MATERIALIZE_DATALESS_FILES_OFF     1
+#define IOPOL_MATERIALIZE_DATALESS_FILES_ON      2
+
+#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0
+#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME   1
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+__BEGIN_DECLS
+int     getpriority(int, id_t);
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+int     getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+int     getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit);
+int     getrusage(int, struct rusage *);
+int     setpriority(int, id_t, int);
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+int     setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+int     setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit);
+__END_DECLS
+
+#endif  /* !_SYS_RESOURCE_H_ */
lib/libc/include/x86_64-macos-gnu/sys/signal.h
@@ -0,0 +1,392 @@
+/*
+ * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1986, 1989, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)signal.h	8.2 (Berkeley) 1/21/94
+ */
+
+#ifndef _SYS_SIGNAL_H_
+#define _SYS_SIGNAL_H_
+
+#include <sys/cdefs.h>
+#include <sys/appleapiopts.h>
+#include <Availability.h>
+
+#define __DARWIN_NSIG   32      /* counting 0; could be 33 (mask is 1-32) */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#define NSIG    __DARWIN_NSIG
+#endif
+
+#include <machine/signal.h>     /* sigcontext; codes for SIGILL, SIGFPE */
+
+#define SIGHUP  1       /* hangup */
+#define SIGINT  2       /* interrupt */
+#define SIGQUIT 3       /* quit */
+#define SIGILL  4       /* illegal instruction (not reset when caught) */
+#define SIGTRAP 5       /* trace trap (not reset when caught) */
+#define SIGABRT 6       /* abort() */
+#if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))
+#define SIGPOLL 7       /* pollable event ([XSR] generated, not supported) */
+#else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define SIGIOT  SIGABRT /* compatibility */
+#define SIGEMT  7       /* EMT instruction */
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#define SIGFPE  8       /* floating point exception */
+#define SIGKILL 9       /* kill (cannot be caught or ignored) */
+#define SIGBUS  10      /* bus error */
+#define SIGSEGV 11      /* segmentation violation */
+#define SIGSYS  12      /* bad argument to system call */
+#define SIGPIPE 13      /* write on a pipe with no one to read it */
+#define SIGALRM 14      /* alarm clock */
+#define SIGTERM 15      /* software termination signal from kill */
+#define SIGURG  16      /* urgent condition on IO channel */
+#define SIGSTOP 17      /* sendable stop signal not from tty */
+#define SIGTSTP 18      /* stop signal from tty */
+#define SIGCONT 19      /* continue a stopped process */
+#define SIGCHLD 20      /* to parent on child stop or exit */
+#define SIGTTIN 21      /* to readers pgrp upon background tty read */
+#define SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */
+#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#define SIGIO   23      /* input/output possible signal */
+#endif
+#define SIGXCPU 24      /* exceeded CPU time limit */
+#define SIGXFSZ 25      /* exceeded file size limit */
+#define SIGVTALRM 26    /* virtual time alarm */
+#define SIGPROF 27      /* profiling time alarm */
+#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#define SIGWINCH 28     /* window size changes */
+#define SIGINFO 29      /* information request */
+#endif
+#define SIGUSR1 30      /* user defined signal 1 */
+#define SIGUSR2 31      /* user defined signal 2 */
+
+#if defined(_ANSI_SOURCE) || __DARWIN_UNIX03 || defined(__cplusplus)
+/*
+ * Language spec sez we must list exactly one parameter, even though we
+ * actually supply three.  Ugh!
+ * SIG_HOLD is chosen to avoid KERN_SIG_* values in <sys/signalvar.h>
+ */
+#define SIG_DFL         (void (*)(int))0
+#define SIG_IGN         (void (*)(int))1
+#define SIG_HOLD        (void (*)(int))5
+#define SIG_ERR         ((void (*)(int))-1)
+#else
+/* DO NOT REMOVE THE COMMENTED OUT int: fixincludes needs to see them */
+#define SIG_DFL         (void (*)( /*int*/ ))0
+#define SIG_IGN         (void (*)( /*int*/ ))1
+#define SIG_HOLD        (void (*)( /*int*/ ))5
+#define SIG_ERR         ((void (*)( /*int*/ ))-1)
+#endif
+
+#ifndef _ANSI_SOURCE
+#include <sys/_types.h>
+
+#include <machine/_mcontext.h>
+
+#include <sys/_pthread/_pthread_attr_t.h>
+
+#include <sys/_types/_sigaltstack.h>
+#include <sys/_types/_ucontext.h>
+
+#include <sys/_types/_pid_t.h>
+#include <sys/_types/_sigset_t.h>
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_uid_t.h>
+
+union sigval {
+	/* Members as suggested by Annex C of POSIX 1003.1b. */
+	int     sival_int;
+	void    *sival_ptr;
+};
+
+#define SIGEV_NONE      0       /* No async notification */
+#define SIGEV_SIGNAL    1       /* aio - completion notification */
+#define SIGEV_THREAD    3       /* [NOTIMP] [RTS] call notification function */
+
+struct sigevent {
+	int                             sigev_notify;                           /* Notification type */
+	int                             sigev_signo;                            /* Signal number */
+	union sigval    sigev_value;                            /* Signal value */
+	void                    (*sigev_notify_function)(union sigval);   /* Notification function */
+	pthread_attr_t  *sigev_notify_attributes;       /* Notification attributes */
+};
+
+
+typedef struct __siginfo {
+	int     si_signo;               /* signal number */
+	int     si_errno;               /* errno association */
+	int     si_code;                /* signal code */
+	pid_t   si_pid;                 /* sending process */
+	uid_t   si_uid;                 /* sender's ruid */
+	int     si_status;              /* exit value */
+	void    *si_addr;               /* faulting instruction */
+	union sigval si_value;          /* signal value */
+	long    si_band;                /* band event for SIGPOLL */
+	unsigned long   __pad[7];       /* Reserved for Future Use */
+} siginfo_t;
+
+
+/*
+ * When the signal is SIGILL or SIGFPE, si_addr contains the address of
+ * the faulting instruction.
+ * When the signal is SIGSEGV or SIGBUS, si_addr contains the address of
+ * the faulting memory reference. Although for x86 there are cases of SIGSEGV
+ * for which si_addr cannot be determined and is NULL.
+ * If the signal is SIGCHLD, the si_pid field will contain the child process ID,
+ *  si_status contains the exit value or signal and
+ *  si_uid contains the real user ID of the process that sent the signal.
+ */
+
+/* Values for si_code */
+
+/* Codes for SIGILL */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define ILL_NOOP        0       /* if only I knew... */
+#endif
+#define ILL_ILLOPC      1       /* [XSI] illegal opcode */
+#define ILL_ILLTRP      2       /* [XSI] illegal trap */
+#define ILL_PRVOPC      3       /* [XSI] privileged opcode */
+#define ILL_ILLOPN      4       /* [XSI] illegal operand -NOTIMP */
+#define ILL_ILLADR      5       /* [XSI] illegal addressing mode -NOTIMP */
+#define ILL_PRVREG      6       /* [XSI] privileged register -NOTIMP */
+#define ILL_COPROC      7       /* [XSI] coprocessor error -NOTIMP */
+#define ILL_BADSTK      8       /* [XSI] internal stack error -NOTIMP */
+
+/* Codes for SIGFPE */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define FPE_NOOP        0       /* if only I knew... */
+#endif
+#define FPE_FLTDIV      1       /* [XSI] floating point divide by zero */
+#define FPE_FLTOVF      2       /* [XSI] floating point overflow */
+#define FPE_FLTUND      3       /* [XSI] floating point underflow */
+#define FPE_FLTRES      4       /* [XSI] floating point inexact result */
+#define FPE_FLTINV      5       /* [XSI] invalid floating point operation */
+#define FPE_FLTSUB      6       /* [XSI] subscript out of range -NOTIMP */
+#define FPE_INTDIV      7       /* [XSI] integer divide by zero */
+#define FPE_INTOVF      8       /* [XSI] integer overflow */
+
+/* Codes for SIGSEGV */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SEGV_NOOP       0       /* if only I knew... */
+#endif
+#define SEGV_MAPERR     1       /* [XSI] address not mapped to object */
+#define SEGV_ACCERR     2       /* [XSI] invalid permission for mapped object */
+
+/* Codes for SIGBUS */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define BUS_NOOP        0       /* if only I knew... */
+#endif
+#define BUS_ADRALN      1       /* [XSI] Invalid address alignment */
+#define BUS_ADRERR      2       /* [XSI] Nonexistent physical address -NOTIMP */
+#define BUS_OBJERR      3       /* [XSI] Object-specific HW error - NOTIMP */
+
+/* Codes for SIGTRAP */
+#define TRAP_BRKPT      1       /* [XSI] Process breakpoint -NOTIMP */
+#define TRAP_TRACE      2       /* [XSI] Process trace trap -NOTIMP */
+
+/* Codes for SIGCHLD */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define CLD_NOOP        0       /* if only I knew... */
+#endif
+#define CLD_EXITED      1       /* [XSI] child has exited */
+#define CLD_KILLED      2       /* [XSI] terminated abnormally, no core file */
+#define CLD_DUMPED      3       /* [XSI] terminated abnormally, core file */
+#define CLD_TRAPPED     4       /* [XSI] traced child has trapped */
+#define CLD_STOPPED     5       /* [XSI] child has stopped */
+#define CLD_CONTINUED   6       /* [XSI] stopped child has continued */
+
+/* Codes for SIGPOLL */
+#define POLL_IN         1       /* [XSR] Data input available */
+#define POLL_OUT        2       /* [XSR] Output buffers available */
+#define POLL_MSG        3       /* [XSR] Input message available */
+#define POLL_ERR        4       /* [XSR] I/O error */
+#define POLL_PRI        5       /* [XSR] High priority input available */
+#define POLL_HUP        6       /* [XSR] Device disconnected */
+
+/* union for signal handlers */
+union __sigaction_u {
+	void    (*__sa_handler)(int);
+	void    (*__sa_sigaction)(int, struct __siginfo *,
+	    void *);
+};
+
+/* Signal vector template for Kernel user boundary */
+struct  __sigaction {
+	union __sigaction_u __sigaction_u;  /* signal handler */
+	void    (*sa_tramp)(void *, int, int, siginfo_t *, void *);
+	sigset_t sa_mask;               /* signal mask to apply */
+	int     sa_flags;               /* see signal options below */
+};
+
+/*
+ * Signal vector "template" used in sigaction call.
+ */
+struct  sigaction {
+	union __sigaction_u __sigaction_u;  /* signal handler */
+	sigset_t sa_mask;               /* signal mask to apply */
+	int     sa_flags;               /* see signal options below */
+};
+
+
+
+/* if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. */
+#define sa_handler      __sigaction_u.__sa_handler
+#define sa_sigaction    __sigaction_u.__sa_sigaction
+
+#define SA_ONSTACK      0x0001  /* take signal on signal stack */
+#define SA_RESTART      0x0002  /* restart system on signal return */
+#define SA_RESETHAND    0x0004  /* reset to SIG_DFL when taking signal */
+#define SA_NOCLDSTOP    0x0008  /* do not generate SIGCHLD on child stop */
+#define SA_NODEFER      0x0010  /* don't mask the signal we're delivering */
+#define SA_NOCLDWAIT    0x0020  /* don't keep zombies around */
+#define SA_SIGINFO      0x0040  /* signal handler with SA_SIGINFO args */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define SA_USERTRAMP    0x0100  /* do not bounce off kernel's sigtramp */
+/* This will provide 64bit register set in a 32bit user address space */
+#define SA_64REGSET     0x0200  /* signal handler with SA_SIGINFO args with 64bit regs information */
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/* the following are the only bits we support from user space, the
+ * rest are for kernel use only.
+ */
+#define SA_USERSPACE_MASK (SA_ONSTACK | SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | SA_SIGINFO)
+
+/*
+ * Flags for sigprocmask:
+ */
+#define SIG_BLOCK       1       /* block specified signal set */
+#define SIG_UNBLOCK     2       /* unblock specified signal set */
+#define SIG_SETMASK     3       /* set specified signal set */
+
+/* POSIX 1003.1b required values. */
+#define SI_USER         0x10001 /* [CX] signal from kill() */
+#define SI_QUEUE        0x10002 /* [CX] signal from sigqueue() */
+#define SI_TIMER        0x10003 /* [CX] timer expiration */
+#define SI_ASYNCIO      0x10004 /* [CX] aio request completion */
+#define SI_MESGQ        0x10005 /* [CX]	from message arrival on empty queue */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+typedef void (*sig_t)(int);     /* type of signal function */
+#endif
+
+/*
+ * Structure used in sigaltstack call.
+ */
+
+#define SS_ONSTACK      0x0001  /* take signal on signal stack */
+#define SS_DISABLE      0x0004  /* disable taking signals on alternate stack */
+#define MINSIGSTKSZ     32768   /* (32K)minimum allowable stack */
+#define SIGSTKSZ        131072  /* (128K)recommended stack size */
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * 4.3 compatibility:
+ * Signal vector "template" used in sigvec call.
+ */
+struct  sigvec {
+	void    (*sv_handler)(int);     /* signal handler */
+	int     sv_mask;                /* signal mask to apply */
+	int     sv_flags;               /* see signal options below */
+};
+
+#define SV_ONSTACK      SA_ONSTACK
+#define SV_INTERRUPT    SA_RESTART      /* same bit, opposite sense */
+#define SV_RESETHAND    SA_RESETHAND
+#define SV_NODEFER      SA_NODEFER
+#define SV_NOCLDSTOP    SA_NOCLDSTOP
+#define SV_SIGINFO      SA_SIGINFO
+
+#define sv_onstack sv_flags     /* isn't compatibility wonderful! */
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+/*
+ * Structure used in sigstack call.
+ */
+struct  sigstack {
+	char    *ss_sp;                 /* signal stack pointer */
+	int     ss_onstack;             /* current status */
+};
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+/*
+ * Macro for converting signal number to a mask suitable for
+ * sigblock().
+ */
+#define sigmask(m)      (1 << ((m)-1))
+
+
+#define BADSIG          SIG_ERR
+
+#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#endif  /* !_ANSI_SOURCE */
+
+/*
+ * For historical reasons; programs expect signal's return value to be
+ * defined by <sys/signal.h>.
+ */
+__BEGIN_DECLS
+    void(*signal(int, void (*)(int)))(int);
+__END_DECLS
+#endif  /* !_SYS_SIGNAL_H_ */
lib/libc/include/x86_64-macos-gnu/sys/stdio.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+
+#ifndef _SYS_STDIO_H_
+#define _SYS_STDIO_H_
+
+#include <sys/cdefs.h>
+
+#if __DARWIN_C_LEVEL >= 200809L
+#include <Availability.h>
+
+__BEGIN_DECLS
+
+int     renameat(int, const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+
+#define RENAME_SECLUDE          0x00000001
+#define RENAME_SWAP                     0x00000002
+#define RENAME_EXCL                     0x00000004
+int renamex_np(const char *, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+int renameatx_np(int, const char *, int, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+__END_DECLS
+
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+#endif /* _SYS_STDIO_H_ */
lib/libc/include/x86_64-macos-gnu/sys/syslimits.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/*	$NetBSD: syslimits.h,v 1.15 1997/06/25 00:48:09 lukem Exp $	*/
+
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)syslimits.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _SYS_SYSLIMITS_H_
+#define _SYS_SYSLIMITS_H_
+
+#include <sys/cdefs.h>
+
+#if !defined(_ANSI_SOURCE)
+/*
+ * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at
+ * compile time; you *cannot* set it higher than the hard limit!!
+ */
+#define ARG_MAX            (256 * 1024) /* max bytes for an exec function */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define CHILD_MAX                  266  /* max simultaneous processes */
+#define GID_MAX            2147483647U  /* max value for a gid_t (2^31-2) */
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+#define LINK_MAX                32767   /* max file link count */
+#define MAX_CANON                1024   /* max bytes in term canon input line */
+#define MAX_INPUT                1024   /* max bytes in terminal input */
+#define NAME_MAX                  255   /* max bytes in a file name */
+#define NGROUPS_MAX                16   /* max supplemental group id's */
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#define UID_MAX            2147483647U  /* max value for a uid_t (2^31-2) */
+
+#define OPEN_MAX                10240   /* max open files per process - todo, make a config option? */
+
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+#define PATH_MAX                 1024   /* max bytes in pathname */
+#define PIPE_BUF                  512   /* max bytes for atomic pipe writes */
+
+#define BC_BASE_MAX                99   /* max ibase/obase values in bc(1) */
+#define BC_DIM_MAX               2048   /* max array elements in bc(1) */
+#define BC_SCALE_MAX               99   /* max scale value in bc(1) */
+#define BC_STRING_MAX            1000   /* max const string length in bc(1) */
+#define CHARCLASS_NAME_MAX         14   /* max character class name size */
+#define COLL_WEIGHTS_MAX            2   /* max weights for order keyword */
+#define EQUIV_CLASS_MAX             2
+#define EXPR_NEST_MAX              32   /* max expressions nested in expr(1) */
+#define LINE_MAX                 2048   /* max bytes in an input line */
+#define RE_DUP_MAX                255   /* max RE's in interval notation */
+
+#if __DARWIN_UNIX03
+#define NZERO                      20   /* default priority [XSI] */
+                                        /* = ((PRIO_MAX - PRIO_MIN) / 2) + 1 */
+                                        /* range: 0 - 39 [(2 * NZERO) - 1] */
+                                        /* 0 is not actually used */
+#else /* !__DARWIN_UNIX03 */
+#define NZERO                       0   /* default priority */
+                                        /* range: -20 - 20 */
+                                        /* (PRIO_MIN - PRIO_MAX) */
+#endif /* __DARWIN_UNIX03 */
+#endif /* !_ANSI_SOURCE */
+
+#endif /* !_SYS_SYSLIMITS_H_ */
lib/libc/include/x86_64-macos-gnu/sys/wait.h
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
+ */
+/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)wait.h	8.2 (Berkeley) 7/10/94
+ */
+
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/*
+ * This file holds definitions relevent to the wait4 system call
+ * and the alternate interfaces that use it (wait, wait3, waitpid).
+ */
+
+/*
+ * [XSI] The type idtype_t shall be defined as an enumeration type whose
+ * possible values shall include at least P_ALL, P_PID, and P_PGID.
+ */
+typedef enum {
+	P_ALL,
+	P_PID,
+	P_PGID
+} idtype_t;
+
+/*
+ * [XSI] The id_t and pid_t types shall be defined as described
+ * in <sys/types.h>
+ */
+#include <sys/_types/_pid_t.h>
+#include <sys/_types/_id_t.h>
+
+/*
+ * [XSI] The siginfo_t type shall be defined as described in <signal.h>
+ * [XSI] The rusage structure shall be defined as described in <sys/resource.h>
+ * [XSI] Inclusion of the <sys/wait.h> header may also make visible all
+ * symbols from <signal.h> and <sys/resource.h>
+ *
+ * NOTE:	This requirement is currently being satisfied by the direct
+ *		inclusion of <sys/signal.h> and <sys/resource.h>, below.
+ *
+ *		Software should not depend on the exposure of anything other
+ *		than the types siginfo_t and struct rusage as a result of
+ *		this inclusion.  If you depend on any types or manifest
+ *		values othe than siginfo_t and struct rusage from either of
+ *		those files, you should explicitly include them yourself, as
+ *		well, or in future releases your stware may not compile
+ *		without modification.
+ */
+#include <sys/signal.h>         /* [XSI] for siginfo_t */
+#include <sys/resource.h>       /* [XSI] for struct rusage */
+
+/*
+ * Option bits for the third argument of wait4.  WNOHANG causes the
+ * wait to not hang if there are no stopped or terminated processes, rather
+ * returning an error indication in this case (pid==0).  WUNTRACED
+ * indicates that the caller should receive status about untraced children
+ * which stop due to signals.  If children are stopped and a wait without
+ * this option is done, it is as though they were still running... nothing
+ * about them is returned.
+ */
+#define WNOHANG         0x00000001  /* [XSI] no hang in wait/no child to reap */
+#define WUNTRACED       0x00000002  /* [XSI] notify on stop, untraced child */
+
+/*
+ * Macros to test the exit status returned by wait
+ * and extract the relevant values.
+ */
+#if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)
+#define _W_INT(i)       (i)
+#else
+#define _W_INT(w)       (*(int *)&(w))  /* convert union wait to int */
+#define WCOREFLAG       0200
+#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
+
+/* These macros are permited, as they are in the implementation namespace */
+#define _WSTATUS(x)     (_W_INT(x) & 0177)
+#define _WSTOPPED       0177            /* _WSTATUS if process is stopped */
+
+/*
+ * [XSI] The <sys/wait.h> header shall define the following macros for
+ * analysis of process status values
+ */
+#if __DARWIN_UNIX03
+#define WEXITSTATUS(x)  ((_W_INT(x) >> 8) & 0x000000ff)
+#else /* !__DARWIN_UNIX03 */
+#define WEXITSTATUS(x)  (_W_INT(x) >> 8)
+#endif /* !__DARWIN_UNIX03 */
+/* 0x13 == SIGCONT */
+#define WSTOPSIG(x)     (_W_INT(x) >> 8)
+#define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13)
+#define WIFSTOPPED(x)   (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13)
+#define WIFEXITED(x)    (_WSTATUS(x) == 0)
+#define WIFSIGNALED(x)  (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
+#define WTERMSIG(x)     (_WSTATUS(x))
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#define WCOREDUMP(x)    (_W_INT(x) & WCOREFLAG)
+
+#define W_EXITCODE(ret, sig)    ((ret) << 8 | (sig))
+#define W_STOPCODE(sig)         ((sig) << 8 | _WSTOPPED)
+#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+
+/*
+ * [XSI] The following symbolic constants shall be defined as possible
+ * values for the fourth argument to waitid().
+ */
+/* WNOHANG already defined for wait4() */
+/* WUNTRACED defined for wait4() but not for waitid() */
+#define WEXITED         0x00000004  /* [XSI] Processes which have exitted */
+#if __DARWIN_UNIX03
+/* waitid() parameter */
+#define WSTOPPED        0x00000008  /* [XSI] Any child stopped by signal */
+#endif
+#define WCONTINUED      0x00000010  /* [XSI] Any child stopped then continued */
+#define WNOWAIT         0x00000020  /* [XSI] Leave process returned waitable */
+
+
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+/* POSIX extensions and 4.2/4.3 compatability: */
+
+/*
+ * Tokens for special values of the "pid" parameter to wait4.
+ */
+#define WAIT_ANY        (-1)    /* any process */
+#define WAIT_MYPGRP     0       /* any process in my process group */
+
+#include <machine/endian.h>
+
+/*
+ * Deprecated:
+ * Structure of the information in the status word returned by wait4.
+ * If w_stopval==_WSTOPPED, then the second structure describes
+ * the information returned, else the first.
+ */
+union wait {
+	int     w_status;               /* used in syscall */
+	/*
+	 * Terminated process status.
+	 */
+	struct {
+#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+		unsigned int    w_Termsig:7,    /* termination signal */
+		    w_Coredump:1,               /* core dump indicator */
+		    w_Retcode:8,                /* exit code if w_termsig==0 */
+		    w_Filler:16;                /* upper bits filler */
+#endif
+#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+		unsigned int    w_Filler:16,    /* upper bits filler */
+		    w_Retcode:8,                /* exit code if w_termsig==0 */
+		    w_Coredump:1,               /* core dump indicator */
+		    w_Termsig:7;                /* termination signal */
+#endif
+	} w_T;
+	/*
+	 * Stopped process status.  Returned
+	 * only for traced children unless requested
+	 * with the WUNTRACED option bit.
+	 */
+	struct {
+#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+		unsigned int    w_Stopval:8,    /* == W_STOPPED if stopped */
+		    w_Stopsig:8,                /* signal that stopped us */
+		    w_Filler:16;                /* upper bits filler */
+#endif
+#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+		unsigned int    w_Filler:16,    /* upper bits filler */
+		    w_Stopsig:8,                /* signal that stopped us */
+		    w_Stopval:8;                /* == W_STOPPED if stopped */
+#endif
+	} w_S;
+};
+#define w_termsig       w_T.w_Termsig
+#define w_coredump      w_T.w_Coredump
+#define w_retcode       w_T.w_Retcode
+#define w_stopval       w_S.w_Stopval
+#define w_stopsig       w_S.w_Stopsig
+
+#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+
+#if !(__DARWIN_UNIX03 - 0)
+/*
+ * Stopped state value; cannot use waitid() parameter of the same name
+ * in the same scope
+ */
+#define WSTOPPED        _WSTOPPED
+#endif /* !__DARWIN_UNIX03 */
+
+__BEGIN_DECLS
+pid_t   wait(int *) __DARWIN_ALIAS_C(wait);
+pid_t   waitpid(pid_t, int *, int) __DARWIN_ALIAS_C(waitpid);
+#ifndef _ANSI_SOURCE
+int     waitid(idtype_t, id_t, siginfo_t *, int) __DARWIN_ALIAS_C(waitid);
+#endif /* !_ANSI_SOURCE */
+#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+pid_t   wait3(int *, int, struct rusage *);
+pid_t   wait4(pid_t, int *, int, struct rusage *);
+#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
+__END_DECLS
+#endif /* !_SYS_WAIT_H_ */
lib/libc/include/x86_64-macos-gnu/__wctype.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Common header for _wctype.h and xlocale/__wctype.h
+ */
+
+#ifndef ___WCTYPE_H_
+#define ___WCTYPE_H_
+
+#include <sys/cdefs.h>
+#include <_types.h>
+
+#include <sys/_types/_wint_t.h>
+#include <sys/_types/_wint_t.h>
+#include <_types/_wctype_t.h>
+
+#ifndef WEOF
+#define WEOF			__DARWIN_WEOF
+#endif
+
+#ifndef __DARWIN_WCTYPE_TOP_inline
+#define __DARWIN_WCTYPE_TOP_inline __header_inline
+#endif
+
+#include <ctype.h>
+
+#endif /* ___WCTYPE_H_ */
lib/libc/include/x86_64-macos-gnu/_ctermid.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _CTERMID_H_
+#define _CTERMID_H_
+char    *ctermid(char *);
+#endif
lib/libc/include/x86_64-macos-gnu/_ctype.h
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ctype.h	8.4 (Berkeley) 1/21/94
+ */
+
+#ifndef	__CTYPE_H_
+#define __CTYPE_H_
+
+#include <sys/cdefs.h>
+#include <runetype.h>
+
+#define	_CTYPE_A	0x00000100L		/* Alpha */
+#define	_CTYPE_C	0x00000200L		/* Control */
+#define	_CTYPE_D	0x00000400L		/* Digit */
+#define	_CTYPE_G	0x00000800L		/* Graph */
+#define	_CTYPE_L	0x00001000L		/* Lower */
+#define	_CTYPE_P	0x00002000L		/* Punct */
+#define	_CTYPE_S	0x00004000L		/* Space */
+#define	_CTYPE_U	0x00008000L		/* Upper */
+#define	_CTYPE_X	0x00010000L		/* X digit */
+#define	_CTYPE_B	0x00020000L		/* Blank */
+#define	_CTYPE_R	0x00040000L		/* Print */
+#define	_CTYPE_I	0x00080000L		/* Ideogram */
+#define	_CTYPE_T	0x00100000L		/* Special */
+#define	_CTYPE_Q	0x00200000L		/* Phonogram */
+#define	_CTYPE_SW0	0x20000000L		/* 0 width character */
+#define	_CTYPE_SW1	0x40000000L		/* 1 width character */
+#define	_CTYPE_SW2	0x80000000L		/* 2 width character */
+#define	_CTYPE_SW3	0xc0000000L		/* 3 width character */
+#define	_CTYPE_SWM	0xe0000000L		/* Mask for screen width data */
+#define	_CTYPE_SWS	30			/* Bits to shift to get width */
+
+#ifdef _NONSTD_SOURCE
+/*
+ * Backward compatibility
+ */
+#define	_A		_CTYPE_A		/* Alpha */
+#define	_C		_CTYPE_C		/* Control */
+#define	_D		_CTYPE_D		/* Digit */
+#define	_G		_CTYPE_G		/* Graph */
+#define	_L		_CTYPE_L		/* Lower */
+#define	_P		_CTYPE_P		/* Punct */
+#define	_S		_CTYPE_S		/* Space */
+#define	_U		_CTYPE_U		/* Upper */
+#define	_X		_CTYPE_X		/* X digit */
+#define	_B		_CTYPE_B		/* Blank */
+#define	_R		_CTYPE_R		/* Print */
+#define	_I		_CTYPE_I		/* Ideogram */
+#define	_T		_CTYPE_T		/* Special */
+#define	_Q		_CTYPE_Q		/* Phonogram */
+#define	_SW0		_CTYPE_SW0		/* 0 width character */
+#define	_SW1		_CTYPE_SW1		/* 1 width character */
+#define	_SW2		_CTYPE_SW2		/* 2 width character */
+#define	_SW3		_CTYPE_SW3		/* 3 width character */
+#endif /* _NONSTD_SOURCE */
+
+#define __DARWIN_CTYPE_inline		__header_inline
+
+#define __DARWIN_CTYPE_TOP_inline	__header_inline
+
+/*
+ * Use inline functions if we are allowed to and the compiler supports them.
+ */
+#if !defined(_DONT_USE_CTYPE_INLINE_) && \
+    (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
+
+/* See comments in <machine/_type.h> about __darwin_ct_rune_t. */
+__BEGIN_DECLS
+unsigned long		___runetype(__darwin_ct_rune_t);
+__darwin_ct_rune_t	___tolower(__darwin_ct_rune_t);
+__darwin_ct_rune_t	___toupper(__darwin_ct_rune_t);
+__END_DECLS
+
+__DARWIN_CTYPE_TOP_inline int
+isascii(int _c)
+{
+	return ((_c & ~0x7F) == 0);
+}
+
+#ifdef USE_ASCII
+__DARWIN_CTYPE_inline int
+__maskrune(__darwin_ct_rune_t _c, unsigned long _f)
+{
+	return (int)_DefaultRuneLocale.__runetype[_c & 0xff] & (__uint32_t)_f;
+}
+#else /* !USE_ASCII */
+__BEGIN_DECLS
+int             	__maskrune(__darwin_ct_rune_t, unsigned long);
+__END_DECLS
+#endif /* USE_ASCII */
+
+__DARWIN_CTYPE_inline int
+__istype(__darwin_ct_rune_t _c, unsigned long _f)
+{
+#ifdef USE_ASCII
+	return !!(__maskrune(_c, _f));
+#else /* USE_ASCII */
+	return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f)
+		: !!__maskrune(_c, _f));
+#endif /* USE_ASCII */
+}
+
+__DARWIN_CTYPE_inline __darwin_ct_rune_t
+__isctype(__darwin_ct_rune_t _c, unsigned long _f)
+{
+#ifdef USE_ASCII
+	return !!(__maskrune(_c, _f));
+#else /* USE_ASCII */
+	return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
+		!!(_DefaultRuneLocale.__runetype[_c] & _f);
+#endif /* USE_ASCII */
+}
+
+#ifdef USE_ASCII
+__DARWIN_CTYPE_inline __darwin_ct_rune_t
+__toupper(__darwin_ct_rune_t _c)
+{
+	return _DefaultRuneLocale.__mapupper[_c & 0xff];
+}
+
+__DARWIN_CTYPE_inline __darwin_ct_rune_t
+__tolower(__darwin_ct_rune_t _c)
+{
+	return _DefaultRuneLocale.__maplower[_c & 0xff];
+}
+#else /* !USE_ASCII */
+__BEGIN_DECLS
+__darwin_ct_rune_t	__toupper(__darwin_ct_rune_t);
+__darwin_ct_rune_t	__tolower(__darwin_ct_rune_t);
+__END_DECLS
+#endif /* USE_ASCII */
+
+__DARWIN_CTYPE_inline int
+__wcwidth(__darwin_ct_rune_t _c)
+{
+	unsigned int _x;
+
+	if (_c == 0)
+		return (0);
+	_x = (unsigned int)__maskrune(_c, _CTYPE_SWM|_CTYPE_R);
+	if ((_x & _CTYPE_SWM) != 0)
+		return ((_x & _CTYPE_SWM) >> _CTYPE_SWS);
+	return ((_x & _CTYPE_R) != 0 ? 1 : -1);
+}
+
+#ifndef _EXTERNALIZE_CTYPE_INLINES_
+
+#define	_tolower(c)	__tolower(c)
+#define	_toupper(c)	__toupper(c)
+
+__DARWIN_CTYPE_TOP_inline int
+isalnum(int _c)
+{
+	return (__istype(_c, _CTYPE_A|_CTYPE_D));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isalpha(int _c)
+{
+	return (__istype(_c, _CTYPE_A));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isblank(int _c)
+{
+	return (__istype(_c, _CTYPE_B));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+iscntrl(int _c)
+{
+	return (__istype(_c, _CTYPE_C));
+}
+
+/* ANSI -- locale independent */
+__DARWIN_CTYPE_TOP_inline int
+isdigit(int _c)
+{
+	return (__isctype(_c, _CTYPE_D));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isgraph(int _c)
+{
+	return (__istype(_c, _CTYPE_G));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+islower(int _c)
+{
+	return (__istype(_c, _CTYPE_L));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isprint(int _c)
+{
+	return (__istype(_c, _CTYPE_R));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+ispunct(int _c)
+{
+	return (__istype(_c, _CTYPE_P));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isspace(int _c)
+{
+	return (__istype(_c, _CTYPE_S));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isupper(int _c)
+{
+	return (__istype(_c, _CTYPE_U));
+}
+
+/* ANSI -- locale independent */
+__DARWIN_CTYPE_TOP_inline int
+isxdigit(int _c)
+{
+	return (__isctype(_c, _CTYPE_X));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+toascii(int _c)
+{
+	return (_c & 0x7F);
+}
+
+__DARWIN_CTYPE_TOP_inline int
+tolower(int _c)
+{
+        return (__tolower(_c));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+toupper(int _c)
+{
+        return (__toupper(_c));
+}
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+__DARWIN_CTYPE_TOP_inline int
+digittoint(int _c)
+{
+	return (__maskrune(_c, 0x0F));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+ishexnumber(int _c)
+{
+	return (__istype(_c, _CTYPE_X));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isideogram(int _c)
+{
+	return (__istype(_c, _CTYPE_I));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isnumber(int _c)
+{
+	return (__istype(_c, _CTYPE_D));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isphonogram(int _c)
+{
+	return (__istype(_c, _CTYPE_Q));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isrune(int _c)
+{
+	return (__istype(_c, 0xFFFFFFF0L));
+}
+
+__DARWIN_CTYPE_TOP_inline int
+isspecial(int _c)
+{
+	return (__istype(_c, _CTYPE_T));
+}
+#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#endif /* _EXTERNALIZE_CTYPE_INLINES_ */
+
+#else /* not using inlines */
+
+__BEGIN_DECLS
+int     isalnum(int);
+int     isalpha(int);
+int     isblank(int);
+int     iscntrl(int);
+int     isdigit(int);
+int     isgraph(int);
+int     islower(int);
+int     isprint(int);
+int     ispunct(int);
+int     isspace(int);
+int     isupper(int);
+int     isxdigit(int);
+int     tolower(int);
+int     toupper(int);
+int     isascii(int);
+int     toascii(int);
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+int     _tolower(int);
+int     _toupper(int);
+int     digittoint(int);
+int     ishexnumber(int);
+int     isideogram(int);
+int     isnumber(int);
+int     isphonogram(int);
+int     isrune(int);
+int     isspecial(int);
+#endif
+__END_DECLS
+
+#endif /* using inlines */
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_ctype.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* !_CTYPE_H_ */
lib/libc/include/x86_64-macos-gnu/_locale.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)locale.h	8.1 (Berkeley) 6/2/93
+ * $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
+ */
+
+#ifndef __LOCALE_H_
+#define __LOCALE_H_
+
+#include <sys/cdefs.h>
+#include <_types.h>
+
+struct lconv {
+	char	*decimal_point;
+	char	*thousands_sep;
+	char	*grouping;
+	char	*int_curr_symbol;
+	char	*currency_symbol;
+	char	*mon_decimal_point;
+	char	*mon_thousands_sep;
+	char	*mon_grouping;
+	char	*positive_sign;
+	char	*negative_sign;
+	char	int_frac_digits;
+	char	frac_digits;
+	char	p_cs_precedes;
+	char	p_sep_by_space;
+	char	n_cs_precedes;
+	char	n_sep_by_space;
+	char	p_sign_posn;
+	char	n_sign_posn;
+	char	int_p_cs_precedes;
+	char	int_n_cs_precedes;
+	char	int_p_sep_by_space;
+	char	int_n_sep_by_space;
+	char	int_p_sign_posn;
+	char	int_n_sign_posn;
+};
+
+#include <sys/_types/_null.h>
+
+__BEGIN_DECLS
+struct lconv	*localeconv(void);
+__END_DECLS
+
+#endif /* __LOCALE_H_ */
lib/libc/include/x86_64-macos-gnu/_stdio.h
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2000, 2005, 2007, 2009, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
+ */
+
+/*
+ * Common header for stdio.h and xlocale/_stdio.h
+ */
+
+#ifndef	__STDIO_H_
+#define	__STDIO_H_
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#include <_types.h>
+
+/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
+ * __gnuc_va_list and include <stdarg.h> */
+#include <sys/_types/_va_list.h>
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_null.h>
+
+#include <sys/stdio.h>
+
+typedef __darwin_off_t		fpos_t;
+
+#define	_FSTDIO			/* Define for new stdio with functions. */
+
+/*
+ * NB: to fit things in six character monocase externals, the stdio
+ * code uses the prefix `__s' for stdio objects, typically followed
+ * by a three-character attempt at a mnemonic.
+ */
+
+/* stdio buffers */
+struct __sbuf {
+	unsigned char	*_base;
+	int		_size;
+};
+
+/* hold a buncha junk that would grow the ABI */
+struct __sFILEX;
+
+/*
+ * stdio state variables.
+ *
+ * The following always hold:
+ *
+ *	if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
+ *		_lbfsize is -_bf._size, else _lbfsize is 0
+ *	if _flags&__SRD, _w is 0
+ *	if _flags&__SWR, _r is 0
+ *
+ * This ensures that the getc and putc macros (or inline functions) never
+ * try to write or read from a file that is in `read' or `write' mode.
+ * (Moreover, they can, and do, automatically switch from read mode to
+ * write mode, and back, on "r+" and "w+" files.)
+ *
+ * _lbfsize is used only to make the inline line-buffered output stream
+ * code as compact as possible.
+ *
+ * _ub, _up, and _ur are used when ungetc() pushes back more characters
+ * than fit in the current _bf, or when ungetc() pushes back a character
+ * that does not match the previous one in _bf.  When this happens,
+ * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
+ * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * NB: see WARNING above before changing the layout of this structure!
+ */
+typedef	struct __sFILE {
+	unsigned char *_p;	/* current position in (some) buffer */
+	int	_r;		/* read space left for getc() */
+	int	_w;		/* write space left for putc() */
+	short	_flags;		/* flags, below; this FILE is free if 0 */
+	short	_file;		/* fileno, if Unix descriptor, else -1 */
+	struct	__sbuf _bf;	/* the buffer (at least 1 byte, if !NULL) */
+	int	_lbfsize;	/* 0 or -_bf._size, for inline putc */
+
+	/* operations */
+	void	*_cookie;	/* cookie passed to io functions */
+	int	(* _Nullable _close)(void *);
+	int	(* _Nullable _read) (void *, char *, int);
+	fpos_t	(* _Nullable _seek) (void *, fpos_t, int);
+	int	(* _Nullable _write)(void *, const char *, int);
+
+	/* separate buffer for long sequences of ungetc() */
+	struct	__sbuf _ub;	/* ungetc buffer */
+	struct __sFILEX *_extra; /* additions to FILE to not break ABI */
+	int	_ur;		/* saved _r when _r is counting ungetc data */
+
+	/* tricks to meet minimum requirements even when malloc() fails */
+	unsigned char _ubuf[3];	/* guarantee an ungetc() buffer */
+	unsigned char _nbuf[1];	/* guarantee a getc() buffer */
+
+	/* separate buffer for fgetln() when line crosses buffer boundary */
+	struct	__sbuf _lb;	/* buffer for fgetln() */
+
+	/* Unix stdio files get aligned to block boundaries on fseek() */
+	int	_blksize;	/* stat.st_blksize (may be != _bf._size) */
+	fpos_t	_offset;	/* current lseek offset (see WARNING) */
+} FILE;
+
+#endif /* __STDIO_H_ */
lib/libc/include/x86_64-macos-gnu/_types.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef __TYPES_H_
+#define __TYPES_H_
+
+#include <sys/_types.h>
+#include <machine/_types.h> /* __uint32_t */
+
+#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+#define __strfmonlike(fmtarg, firstvararg) \
+		__attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
+#define __strftimelike(fmtarg) \
+		__attribute__((__format__ (__strftime__, fmtarg, 0)))
+#else
+#define __strfmonlike(fmtarg, firstvararg)
+#define __strftimelike(fmtarg)
+#endif
+
+typedef	int		__darwin_nl_item;
+typedef	int		__darwin_wctrans_t;
+#ifdef __LP64__
+typedef	__uint32_t	__darwin_wctype_t;
+#else /* !__LP64__ */
+typedef	unsigned long	__darwin_wctype_t;
+#endif /* __LP64__ */
+
+#ifdef __WCHAR_MAX__
+#define __DARWIN_WCHAR_MAX	__WCHAR_MAX__
+#else /* ! __WCHAR_MAX__ */
+#define __DARWIN_WCHAR_MAX	0x7fffffff
+#endif /* __WCHAR_MAX__ */
+
+#if __DARWIN_WCHAR_MAX > 0xffffU
+#define __DARWIN_WCHAR_MIN	(-0x7fffffff - 1)
+#else
+#define __DARWIN_WCHAR_MIN	0
+#endif
+#define	__DARWIN_WEOF 	((__darwin_wint_t)-1)
+
+#ifndef _FORTIFY_SOURCE
+#  if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050)
+#    define _FORTIFY_SOURCE 0
+#  else
+#    define _FORTIFY_SOURCE 2	/* on by default */
+#  endif
+#endif
+
+#endif /* __TYPES_H_ */
lib/libc/include/x86_64-macos-gnu/_wctype.h
@@ -0,0 +1,164 @@
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Common header for wctype.h and wchar.h
+ *
+ * Contains everything required by wctype.h except:
+ *
+ *	#include <_types/_wctrans_t.h>
+ *	int iswblank(wint_t);
+ *	wint_t towctrans(wint_t, wctrans_t);
+ *	wctrans_t wctrans(const char *);
+ */
+
+#ifndef __WCTYPE_H_
+#define __WCTYPE_H_
+
+#include <__wctype.h>
+
+/*
+ * Use inline functions if we are allowed to and the compiler supports them.
+ */
+#if !defined(_DONT_USE_CTYPE_INLINE_) && \
+    (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
+
+__DARWIN_WCTYPE_TOP_inline int
+iswalnum(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_A|_CTYPE_D));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswalpha(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_A));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswcntrl(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_C));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswctype(wint_t _wc, wctype_t _charclass)
+{
+	return (__istype(_wc, _charclass));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswdigit(wint_t _wc)
+{
+	return (__isctype(_wc, _CTYPE_D));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswgraph(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_G));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswlower(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_L));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswprint(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_R));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswpunct(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_P));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswspace(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_S));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswupper(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_U));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswxdigit(wint_t _wc)
+{
+	return (__isctype(_wc, _CTYPE_X));
+}
+
+__DARWIN_WCTYPE_TOP_inline wint_t
+towlower(wint_t _wc)
+{
+        return (__tolower(_wc));
+}
+
+__DARWIN_WCTYPE_TOP_inline wint_t
+towupper(wint_t _wc)
+{
+        return (__toupper(_wc));
+}
+
+#else /* not using inlines */
+
+__BEGIN_DECLS
+int	iswalnum(wint_t);
+int	iswalpha(wint_t);
+int	iswcntrl(wint_t);
+int	iswctype(wint_t, wctype_t);
+int	iswdigit(wint_t);
+int	iswgraph(wint_t);
+int	iswlower(wint_t);
+int	iswprint(wint_t);
+int	iswpunct(wint_t);
+int	iswspace(wint_t);
+int	iswupper(wint_t);
+int	iswxdigit(wint_t);
+wint_t	towlower(wint_t);
+wint_t	towupper(wint_t);
+__END_DECLS
+
+#endif /* using inlines */
+
+__BEGIN_DECLS
+wctype_t
+	wctype(const char *);
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/__wctype.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* __WCTYPE_H_ */
lib/libc/include/x86_64-macos-gnu/alloca.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _ALLOCA_H_
+#define _ALLOCA_H_
+
+#include <sys/cdefs.h>
+#include <_types.h>
+#include <sys/_types/_size_t.h>
+
+__BEGIN_DECLS
+void	*alloca(size_t);		/* built-in for gcc */
+__END_DECLS
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+/* built-in for gcc 3 */
+#undef	alloca
+#undef	__alloca
+#define	alloca(size)	__alloca(size)
+#define	__alloca(size)	__builtin_alloca(size)
+#endif
+
+#endif /* _ALLOCA_H_ */
lib/libc/include/x86_64-macos-gnu/assert.h
@@ -0,0 +1,111 @@
+/*-
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)assert.h	8.2 (Berkeley) 1/21/94
+ * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $
+ */
+
+#include <sys/cdefs.h>
+#ifdef __cplusplus
+#include <stdlib.h>
+#endif /* __cplusplus */
+
+/*
+ * Unlike other ANSI header files, <assert.h> may usefully be included
+ * multiple times, with and without NDEBUG defined.
+ */
+
+#undef assert
+#undef __assert
+
+#ifdef NDEBUG
+#define	assert(e)	((void)0)
+#else
+
+#ifndef __GNUC__
+
+__BEGIN_DECLS
+#ifndef __cplusplus
+void abort(void) __dead2 __cold;
+#endif /* !__cplusplus */
+int  printf(const char * __restrict, ...);
+__END_DECLS
+
+#define assert(e)  \
+    ((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__)))
+#define __assert(e, file, line) \
+    ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())
+
+#else /* __GNUC__ */
+
+__BEGIN_DECLS
+void __assert_rtn(const char *, const char *, int, const char *) __dead2 __cold __disable_tail_calls;
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
+void __eprintf(const char *, const char *, unsigned, const char *) __dead2 __cold;
+#endif
+__END_DECLS
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070)
+#define __assert(e, file, line) \
+    __eprintf ("%s:%d: failed assertion `%s'\n", file, line, e)
+#else
+/* 8462256: modified __assert_rtn() replaces deprecated __eprintf() */
+#define __assert(e, file, line) \
+    __assert_rtn ((const char *)-1L, file, line, e)
+#endif
+
+#if __DARWIN_UNIX03
+#define	assert(e) \
+    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
+#else /* !__DARWIN_UNIX03 */
+#define assert(e)  \
+    (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0)
+#endif /* __DARWIN_UNIX03 */
+
+#endif /* __GNUC__ */
+#endif /* NDEBUG */
+
+#ifndef _ASSERT_H_
+#define _ASSERT_H_
+
+#ifndef __cplusplus
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define static_assert _Static_assert
+#endif /* __STDC_VERSION__ */
+#endif /* !__cplusplus */
+
+#endif /* _ASSERT_H_ */
lib/libc/include/x86_64-macos-gnu/Availability.h
@@ -0,0 +1,606 @@
+/*
+ * Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+ 
+#ifndef __AVAILABILITY__
+#define __AVAILABILITY__
+ /*     
+    These macros are for use in OS header files. They enable function prototypes
+    and Objective-C methods to be tagged with the OS version in which they
+    were first available; and, if applicable, the OS version in which they 
+    became deprecated.  
+     
+    The desktop Mac OS X and iOS each have different version numbers.
+    The __OSX_AVAILABLE_STARTING() macro allows you to specify both the desktop
+    and iOS version numbers.  For instance:
+        __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0)
+    means the function/method was first available on Mac OS X 10.2 on the desktop
+    and first available in iOS 2.0 on the iPhone.
+    
+    If a function is available on one platform, but not the other a _NA (not
+    applicable) parameter is used.  For instance:
+            __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA)
+    means that the function/method was first available on Mac OS X 10.3, and it
+    currently not implemented on the iPhone.
+
+    At some point, a function/method may be deprecated.  That means Apple
+    recommends applications stop using the function, either because there is a 
+    better replacement or the functionality is being phased out.  Deprecated
+    functions/methods can be tagged with a __OSX_AVAILABLE_BUT_DEPRECATED()
+    macro which specifies the OS version where the function became available
+    as well as the OS version in which it became deprecated.  For instance:
+        __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA)
+    means that the function/method was introduced in Mac OS X 10.0, then
+    became deprecated beginning in Mac OS X 10.5.  On iOS the function 
+    has never been available.  
+    
+    For these macros to function properly, a program must specify the OS version range 
+    it is targeting.  The min OS version is specified as an option to the compiler:
+    -mmacosx-version-min=10.x when building for Mac OS X, and -miphoneos-version-min=y.z
+    when building for the iPhone.  The upper bound for the OS version is rarely needed,
+    but it can be set on the command line via: -D__MAC_OS_X_VERSION_MAX_ALLOWED=10x0 for
+    Mac OS X and __IPHONE_OS_VERSION_MAX_ALLOWED = y0z00 for iOS.  
+    
+    Examples:
+
+        A function available in Mac OS X 10.5 and later, but not on the phone:
+        
+            extern void mymacfunc() __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA);
+
+
+        An Objective-C method in Mac OS X 10.5 and later, but not on the phone:
+        
+            @interface MyClass : NSObject
+            -(void) mymacmethod __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA);
+            @end
+
+        
+        An enum available on the phone, but not available on Mac OS X:
+        
+            #if __IPHONE_OS_VERSION_MIN_REQUIRED
+                enum { myEnum = 1 };
+            #endif
+           Note: this works when targeting the Mac OS X platform because 
+           __IPHONE_OS_VERSION_MIN_REQUIRED is undefined which evaluates to zero. 
+        
+
+        An enum with values added in different iPhoneOS versions:
+		
+			enum {
+			    myX  = 1,	// Usable on iPhoneOS 2.1 and later
+			    myY  = 2,	// Usable on iPhoneOS 3.0 and later
+			    myZ  = 3,	// Usable on iPhoneOS 3.0 and later
+				...
+		      Note: you do not want to use #if with enumeration values
+			  when a client needs to see all values at compile time
+			  and use runtime logic to only use the viable values.
+			  
+
+    It is also possible to use the *_VERSION_MIN_REQUIRED in source code to make one
+    source base that can be compiled to target a range of OS versions.  It is best
+    to not use the _MAC_* and __IPHONE_* macros for comparisons, but rather their values.
+    That is because you might get compiled on an old OS that does not define a later
+    OS version macro, and in the C preprocessor undefined values evaluate to zero
+    in expresssions, which could cause the #if expression to evaluate in an unexpected
+    way.
+    
+        #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+            // code only compiled when targeting Mac OS X and not iPhone
+            // note use of 1050 instead of __MAC_10_5
+            #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+                // code in here might run on pre-Leopard OS
+            #else
+                // code here can assume Leopard or later
+            #endif
+        #endif
+
+
+*/
+
+/* 
+ * __API_TO_BE_DEPRECATED is used as a version number in API that will be deprecated 
+ * in an upcoming release. This soft deprecation is an intermediate step before formal 
+ * deprecation to notify developers about the API before compiler warnings are generated.
+ * You can find all places in your code that use soft deprecated API by redefining the 
+ * value of this macro to your current minimum deployment target, for example:
+ * (macOS)
+ *   clang -D__API_TO_BE_DEPRECATED=10.12 <other compiler flags>
+ * (iOS)
+ *   clang -D__API_TO_BE_DEPRECATED=11.0 <other compiler flags>
+ */
+ 
+#ifndef __API_TO_BE_DEPRECATED
+#define __API_TO_BE_DEPRECATED 100000
+#endif
+
+#ifndef __MAC_10_0
+#define __MAC_10_0            1000
+#define __MAC_10_1            1010
+#define __MAC_10_2            1020
+#define __MAC_10_3            1030
+#define __MAC_10_4            1040
+#define __MAC_10_5            1050
+#define __MAC_10_6            1060
+#define __MAC_10_7            1070
+#define __MAC_10_8            1080
+#define __MAC_10_9            1090
+#define __MAC_10_10         101000
+#define __MAC_10_10_2       101002
+#define __MAC_10_10_3       101003
+#define __MAC_10_11         101100
+#define __MAC_10_11_2       101102
+#define __MAC_10_11_3       101103
+#define __MAC_10_11_4       101104
+#define __MAC_10_12         101200
+#define __MAC_10_12_1       101201
+#define __MAC_10_12_2       101202
+#define __MAC_10_12_4       101204
+#define __MAC_10_13         101300
+#define __MAC_10_13_1       101301
+#define __MAC_10_13_2       101302
+#define __MAC_10_13_4       101304
+#define __MAC_10_14         101400
+#define __MAC_10_14_1       101401
+#define __MAC_10_14_4       101404
+#define __MAC_10_15         101500
+#define __MAC_10_15_1       101501
+#define __MAC_10_15_4       101504
+/* __MAC_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
+
+#define __IPHONE_2_0      20000
+#define __IPHONE_2_1      20100
+#define __IPHONE_2_2      20200
+#define __IPHONE_3_0      30000
+#define __IPHONE_3_1      30100
+#define __IPHONE_3_2      30200
+#define __IPHONE_4_0      40000
+#define __IPHONE_4_1      40100
+#define __IPHONE_4_2      40200
+#define __IPHONE_4_3      40300
+#define __IPHONE_5_0      50000
+#define __IPHONE_5_1      50100
+#define __IPHONE_6_0      60000
+#define __IPHONE_6_1      60100
+#define __IPHONE_7_0      70000
+#define __IPHONE_7_1      70100
+#define __IPHONE_8_0      80000
+#define __IPHONE_8_1      80100
+#define __IPHONE_8_2      80200
+#define __IPHONE_8_3      80300
+#define __IPHONE_8_4      80400
+#define __IPHONE_9_0      90000
+#define __IPHONE_9_1      90100
+#define __IPHONE_9_2      90200
+#define __IPHONE_9_3      90300
+#define __IPHONE_10_0    100000
+#define __IPHONE_10_1    100100
+#define __IPHONE_10_2    100200
+#define __IPHONE_10_3    100300
+#define __IPHONE_11_0    110000
+#define __IPHONE_11_1    110100
+#define __IPHONE_11_2    110200
+#define __IPHONE_11_3    110300
+#define __IPHONE_11_4    110400
+#define __IPHONE_12_0    120000
+#define __IPHONE_12_1    120100
+#define __IPHONE_12_2    120200
+#define __IPHONE_12_3    120300
+#define __IPHONE_13_0    130000
+#define __IPHONE_13_1    130100
+#define __IPHONE_13_2    130200
+#define __IPHONE_13_3    130300
+#define __IPHONE_13_4    130400
+#define __IPHONE_13_5    130500
+#define __IPHONE_13_6    130600
+/* __IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
+
+#define __TVOS_9_0        90000
+#define __TVOS_9_1        90100
+#define __TVOS_9_2        90200
+#define __TVOS_10_0      100000
+#define __TVOS_10_0_1    100001
+#define __TVOS_10_1      100100
+#define __TVOS_10_2      100200
+#define __TVOS_11_0      110000
+#define __TVOS_11_1      110100
+#define __TVOS_11_2      110200
+#define __TVOS_11_3      110300
+#define __TVOS_11_4      110400
+#define __TVOS_12_0      120000
+#define __TVOS_12_1      120100
+#define __TVOS_12_2      120200
+#define __TVOS_12_3      120300
+#define __TVOS_13_0      130000
+#define __TVOS_13_2      130200
+#define __TVOS_13_3      130300
+#define __TVOS_13_4      130400
+
+#define __WATCHOS_1_0     10000
+#define __WATCHOS_2_0     20000
+#define __WATCHOS_2_1     20100
+#define __WATCHOS_2_2     20200
+#define __WATCHOS_3_0     30000
+#define __WATCHOS_3_1     30100
+#define __WATCHOS_3_1_1   30101
+#define __WATCHOS_3_2     30200
+#define __WATCHOS_4_0     40000
+#define __WATCHOS_4_1     40100
+#define __WATCHOS_4_2     40200
+#define __WATCHOS_4_3     40300
+#define __WATCHOS_5_0     50000
+#define __WATCHOS_5_1     50100
+#define __WATCHOS_5_2     50200
+#define __WATCHOS_6_0     60000
+#define __WATCHOS_6_1     60100
+#define __WATCHOS_6_2     60200
+
+#define __DRIVERKIT_19_0 190000
+#endif /* __MAC_10_0 */
+
+#include <AvailabilityInternal.h>
+
+#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
+    #define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_ios
+    #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) \
+                                                    __AVAILABILITY_INTERNAL##_iosIntro##_DEP##_iosDep
+    #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) \
+                                                    __AVAILABILITY_INTERNAL##_iosIntro##_DEP##_iosDep##_MSG(_msg)
+
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+
+   #if defined(__has_builtin)
+    #if __has_builtin(__is_target_arch)
+     #if __has_builtin(__is_target_vendor)
+      #if __has_builtin(__is_target_os)
+       #if __has_builtin(__is_target_environment)
+        #if __has_builtin(__is_target_variant_os)
+         #if __has_builtin(__is_target_variant_environment)
+          #if (__is_target_arch(x86_64) && __is_target_vendor(apple) && ((__is_target_os(ios) && __is_target_environment(macabi)) || (__is_target_variant_os(ios) && __is_target_variant_environment(macabi))))
+            #define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx __AVAILABILITY_INTERNAL##_ios
+            #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) \
+                                                            __AVAILABILITY_INTERNAL##_osxIntro##_DEP##_osxDep __AVAILABILITY_INTERNAL##_iosIntro##_DEP##_iosDep
+            #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) \
+                                                            __AVAILABILITY_INTERNAL##_osxIntro##_DEP##_osxDep##_MSG(_msg) __AVAILABILITY_INTERNAL##_iosIntro##_DEP##_iosDep##_MSG(_msg)
+          #endif /* # if __is_target_arch... */
+         #endif /* #if __has_builtin(__is_target_variant_environment) */
+        #endif /* #if __has_builtin(__is_target_variant_os) */
+       #endif /* #if __has_builtin(__is_target_environment) */
+      #endif /* #if __has_builtin(__is_target_os) */
+     #endif /* #if __has_builtin(__is_target_vendor) */
+    #endif /* #if __has_builtin(__is_target_arch) */
+   #endif /* #if defined(__has_builtin) */
+
+    #ifndef __OSX_AVAILABLE_STARTING
+      #if defined(__has_attribute) && defined(__has_feature)
+          #if __has_attribute(availability)      
+        #define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx
+        #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) \
+                                                        __AVAILABILITY_INTERNAL##_osxIntro##_DEP##_osxDep
+        #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) \
+                                                        __AVAILABILITY_INTERNAL##_osxIntro##_DEP##_osxDep##_MSG(_msg)
+        #else
+        #define __OSX_AVAILABLE_STARTING(_osx, _ios)
+        #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep)
+        #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg)
+        #endif
+      #else
+      #define __OSX_AVAILABLE_STARTING(_osx, _ios)
+      #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep)
+      #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg)
+    #endif
+#endif /* __OSX_AVAILABLE_STARTING */
+
+#else
+    #define __OSX_AVAILABLE_STARTING(_osx, _ios)
+    #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep)
+    #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg)
+#endif
+
+
+#if defined(__has_feature)
+  #if __has_feature(attribute_availability_with_message)
+    #define __OS_AVAILABILITY(_target, _availability)            __attribute__((availability(_target,_availability)))
+    #define __OS_AVAILABILITY_MSG(_target, _availability, _msg)  __attribute__((availability(_target,_availability,message=_msg)))
+  #elif __has_feature(attribute_availability)
+    #define __OS_AVAILABILITY(_target, _availability)            __attribute__((availability(_target,_availability)))
+    #define __OS_AVAILABILITY_MSG(_target, _availability, _msg)  __attribute__((availability(_target,_availability)))
+  #else
+    #define __OS_AVAILABILITY(_target, _availability)
+    #define __OS_AVAILABILITY_MSG(_target, _availability, _msg)
+  #endif
+#else
+    #define __OS_AVAILABILITY(_target, _availability)
+    #define __OS_AVAILABILITY_MSG(_target, _availability, _msg)
+#endif
+
+
+/* for use to document app extension usage */
+#if defined(__has_feature)
+  #if __has_feature(attribute_availability_app_extension)
+    #define __OSX_EXTENSION_UNAVAILABLE(_msg)  __OS_AVAILABILITY_MSG(macosx_app_extension,unavailable,_msg)
+    #define __IOS_EXTENSION_UNAVAILABLE(_msg)  __OS_AVAILABILITY_MSG(ios_app_extension,unavailable,_msg)
+  #else
+    #define __OSX_EXTENSION_UNAVAILABLE(_msg)
+    #define __IOS_EXTENSION_UNAVAILABLE(_msg)
+  #endif
+#else
+    #define __OSX_EXTENSION_UNAVAILABLE(_msg)
+    #define __IOS_EXTENSION_UNAVAILABLE(_msg)
+#endif
+
+#define __OS_EXTENSION_UNAVAILABLE(_msg)  __OSX_EXTENSION_UNAVAILABLE(_msg) __IOS_EXTENSION_UNAVAILABLE(_msg)
+
+
+
+/* for use marking APIs available info for Mac OSX */
+#if defined(__has_attribute)
+  #if __has_attribute(availability)
+    #define __OSX_UNAVAILABLE                    __OS_AVAILABILITY(macosx,unavailable)
+    #define __OSX_AVAILABLE(_vers)               __OS_AVAILABILITY(macosx,introduced=_vers)
+    #define __OSX_DEPRECATED(_start, _dep, _msg) __OSX_AVAILABLE(_start) __OS_AVAILABILITY_MSG(macosx,deprecated=_dep,_msg)
+  #endif
+#endif
+
+#ifndef __OSX_UNAVAILABLE
+  #define __OSX_UNAVAILABLE
+#endif
+
+#ifndef __OSX_AVAILABLE
+  #define __OSX_AVAILABLE(_vers)
+#endif
+
+#ifndef __OSX_DEPRECATED
+  #define __OSX_DEPRECATED(_start, _dep, _msg)
+#endif
+
+
+/* for use marking APIs available info for iOS */
+#if defined(__has_attribute)
+  #if __has_attribute(availability)
+    #define __IOS_UNAVAILABLE                    __OS_AVAILABILITY(ios,unavailable)
+    #define __IOS_PROHIBITED                     __OS_AVAILABILITY(ios,unavailable)
+    #define __IOS_AVAILABLE(_vers)               __OS_AVAILABILITY(ios,introduced=_vers)
+    #define __IOS_DEPRECATED(_start, _dep, _msg) __IOS_AVAILABLE(_start) __OS_AVAILABILITY_MSG(ios,deprecated=_dep,_msg)
+  #endif
+#endif
+
+#ifndef __IOS_UNAVAILABLE
+  #define __IOS_UNAVAILABLE
+#endif
+
+#ifndef __IOS_PROHIBITED
+  #define __IOS_PROHIBITED
+#endif
+
+#ifndef __IOS_AVAILABLE
+  #define __IOS_AVAILABLE(_vers)
+#endif
+
+#ifndef __IOS_DEPRECATED
+  #define __IOS_DEPRECATED(_start, _dep, _msg)
+#endif
+
+
+/* for use marking APIs available info for tvOS */
+#if defined(__has_feature)
+  #if __has_feature(attribute_availability_tvos)
+    #define __TVOS_UNAVAILABLE                    __OS_AVAILABILITY(tvos,unavailable)
+    #define __TVOS_PROHIBITED                     __OS_AVAILABILITY(tvos,unavailable)
+    #define __TVOS_AVAILABLE(_vers)               __OS_AVAILABILITY(tvos,introduced=_vers)
+    #define __TVOS_DEPRECATED(_start, _dep, _msg) __TVOS_AVAILABLE(_start) __OS_AVAILABILITY_MSG(tvos,deprecated=_dep,_msg)
+  #endif
+#endif
+
+#ifndef __TVOS_UNAVAILABLE
+  #define __TVOS_UNAVAILABLE
+#endif
+
+#ifndef __TVOS_PROHIBITED
+  #define __TVOS_PROHIBITED
+#endif
+
+#ifndef __TVOS_AVAILABLE
+  #define __TVOS_AVAILABLE(_vers)
+#endif
+
+#ifndef __TVOS_DEPRECATED
+  #define __TVOS_DEPRECATED(_start, _dep, _msg)
+#endif
+
+
+/* for use marking APIs available info for Watch OS */
+#if defined(__has_feature)
+  #if __has_feature(attribute_availability_watchos)
+    #define __WATCHOS_UNAVAILABLE                    __OS_AVAILABILITY(watchos,unavailable)
+    #define __WATCHOS_PROHIBITED                     __OS_AVAILABILITY(watchos,unavailable)
+    #define __WATCHOS_AVAILABLE(_vers)               __OS_AVAILABILITY(watchos,introduced=_vers)
+    #define __WATCHOS_DEPRECATED(_start, _dep, _msg) __WATCHOS_AVAILABLE(_start) __OS_AVAILABILITY_MSG(watchos,deprecated=_dep,_msg)
+  #endif
+#endif
+
+#ifndef __WATCHOS_UNAVAILABLE
+  #define __WATCHOS_UNAVAILABLE
+#endif
+
+#ifndef __WATCHOS_PROHIBITED
+  #define __WATCHOS_PROHIBITED
+#endif
+
+#ifndef __WATCHOS_AVAILABLE
+  #define __WATCHOS_AVAILABLE(_vers)
+#endif
+
+#ifndef __WATCHOS_DEPRECATED
+  #define __WATCHOS_DEPRECATED(_start, _dep, _msg)
+#endif
+
+
+/* for use marking APIs unavailable for swift */
+#if defined(__has_feature)
+  #if __has_feature(attribute_availability_swift)
+    #define __SWIFT_UNAVAILABLE                   __OS_AVAILABILITY(swift,unavailable)
+    #define __SWIFT_UNAVAILABLE_MSG(_msg)         __OS_AVAILABILITY_MSG(swift,unavailable,_msg)
+  #endif
+#endif
+
+#ifndef __SWIFT_UNAVAILABLE
+  #define __SWIFT_UNAVAILABLE
+#endif
+
+#ifndef __SWIFT_UNAVAILABLE_MSG
+  #define __SWIFT_UNAVAILABLE_MSG(_msg)
+#endif
+
+/*
+ Macros for defining which versions/platform a given symbol can be used.
+ 
+ @see http://clang.llvm.org/docs/AttributeReference.html#availability
+ 
+ * Note that these macros are only compatible with clang compilers that
+ * support the following target selection options:
+ *
+ * -mmacosx-version-min
+ * -miphoneos-version-min
+ * -mwatchos-version-min
+ * -mtvos-version-min
+ */
+
+#if defined(__has_feature) && defined(__has_attribute)
+ #if __has_attribute(availability)
+
+    /*
+     * API Introductions
+     *
+     * Use to specify the release that a particular API became available.
+     *
+     * Platform names:
+     *   macos, ios, tvos, watchos
+     *
+     * Examples:
+     *    __API_AVAILABLE(macos(10.10))
+     *    __API_AVAILABLE(macos(10.9), ios(10.0))
+     *    __API_AVAILABLE(macos(10.4), ios(8.0), watchos(2.0), tvos(10.0))
+     *    __API_AVAILABLE(driverkit(19.0))
+     */
+    #define __API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE7, __API_AVAILABLE6, __API_AVAILABLE5, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1, 0)(__VA_ARGS__)
+    
+    #define __API_AVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_AVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_AVAILABLE_BEGIN7, __API_AVAILABLE_BEGIN6, __API_AVAILABLE_BEGIN5, __API_AVAILABLE_BEGIN4, __API_AVAILABLE_BEGIN3, __API_AVAILABLE_BEGIN2, __API_AVAILABLE_BEGIN1, 0)(__VA_ARGS__)
+    #define __API_AVAILABLE_END _Pragma("clang attribute pop")
+
+    /*
+     * API Deprecations
+     *
+     * Use to specify the release that a particular API became unavailable.
+     *
+     * Platform names:
+     *   macos, ios, tvos, watchos
+     *
+     * Examples:
+     *
+     *    __API_DEPRECATED("No longer supported", macos(10.4, 10.8))
+     *    __API_DEPRECATED("No longer supported", macos(10.4, 10.8), ios(2.0, 3.0), watchos(2.0, 3.0), tvos(9.0, 10.0))
+     *
+     *    __API_DEPRECATED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4), ios(9.0, 10.0))
+     *    __API_DEPRECATED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6), watchos(2.0, 3.0))
+     */
+    #define __API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_MSG8,__API_DEPRECATED_MSG7,__API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1, 0)(__VA_ARGS__)
+    #define __API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_REP8,__API_DEPRECATED_REP7,__API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1, 0)(__VA_ARGS__)
+
+    #define __API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_MSG8,__API_DEPRECATED_BEGIN_MSG7, __API_DEPRECATED_BEGIN_MSG6, __API_DEPRECATED_BEGIN_MSG5, __API_DEPRECATED_BEGIN_MSG4, __API_DEPRECATED_BEGIN_MSG3, __API_DEPRECATED_BEGIN_MSG2, __API_DEPRECATED_BEGIN_MSG1, 0)(__VA_ARGS__)
+    #define __API_DEPRECATED_END _Pragma("clang attribute pop")
+
+    #define __API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_REP8,__API_DEPRECATED_BEGIN_REP7, __API_DEPRECATED_BEGIN_REP6, __API_DEPRECATED_BEGIN_REP5, __API_DEPRECATED_BEGIN_REP4, __API_DEPRECATED_BEGIN_REP3, __API_DEPRECATED_BEGIN_REP2, __API_DEPRECATED_BEGIN_REP1, 0)(__VA_ARGS__)
+    #define __API_DEPRECATED_WITH_REPLACEMENT_END _Pragma("clang attribute pop")
+
+    /*
+     * API Unavailability
+     * Use to specify that an API is unavailable for a particular platform.
+     *
+     * Example:
+     *    __API_UNAVAILABLE(macos)
+     *    __API_UNAVAILABLE(watchos, tvos)
+     */
+    #define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)
+
+    #define __API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__)
+    #define __API_UNAVAILABLE_END _Pragma("clang attribute pop")
+ #else 
+
+    /* 
+     * Evaluate to nothing for compilers that don't support availability.
+     */
+    
+    #define __API_AVAILABLE(...)
+    #define __API_AVAILABLE_BEGIN(...)
+    #define __API_AVAILABLE_END
+    #define __API_DEPRECATED(...)
+    #define __API_DEPRECATED_WITH_REPLACEMENT(...)
+    #define __API_DEPRECATED_BEGIN(...)
+    #define __API_DEPRECATED_END
+    #define __API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...)
+    #define __API_DEPRECATED_WITH_REPLACEMENT_END
+    #define __API_UNAVAILABLE(...)
+    #define __API_UNAVAILABLE_BEGIN(...)
+    #define __API_UNAVAILABLE_END
+ #endif /* __has_attribute(availability) */
+#else
+
+    /* 
+     * Evaluate to nothing for compilers that don't support clang language extensions.
+     */
+    
+    #define __API_AVAILABLE(...)
+    #define __API_AVAILABLE_BEGIN(...)
+    #define __API_AVAILABLE_END
+    #define __API_DEPRECATED(...)
+    #define __API_DEPRECATED_WITH_REPLACEMENT(...)
+    #define __API_DEPRECATED_BEGIN(...)
+    #define __API_DEPRECATED_END
+    #define __API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...)
+    #define __API_DEPRECATED_WITH_REPLACEMENT_END
+    #define __API_UNAVAILABLE(...)
+    #define __API_UNAVAILABLE_BEGIN(...)
+    #define __API_UNAVAILABLE_END
+#endif /*  #if defined(__has_feature) && defined(__has_attribute) */
+
+#if __has_include(<AvailabilityProhibitedInternal.h>)
+  #include <AvailabilityProhibitedInternal.h>
+#endif
+
+/*
+ * If SPI decorations have not been defined elsewhere, disable them.
+ */
+
+#ifndef __SPI_AVAILABLE
+  #define __SPI_AVAILABLE(...)
+#endif
+
+#ifndef __SPI_DEPRECATED
+  #define __SPI_DEPRECATED(...)
+#endif
+
+#ifndef __SPI_DEPRECATED_WITH_REPLACEMENT
+  #define __SPI_DEPRECATED_WITH_REPLACEMENT(...)
+#endif
+
+#endif /* __AVAILABILITY__ */
+
lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h
@@ -0,0 +1,4672 @@
+/*
+ * Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+/*
+    File:       AvailabilityInternal.h
+ 
+    Contains:   implementation details of __OSX_AVAILABLE_* macros from <Availability.h>
+
+*/
+#ifndef __AVAILABILITY_INTERNAL__
+#define __AVAILABILITY_INTERNAL__
+
+#if __has_include(<AvailabilityInternalPrivate.h>)
+  #include <AvailabilityInternalPrivate.h>
+#endif
+
+#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+        /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
+        #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+    #endif
+#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
+
+#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
+        /* compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used */
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
+    #endif
+#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */
+
+#ifndef __TV_OS_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
+        /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
+        #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
+        #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_13_0 
+        /* for compatibility with existing code.  New code should use platform specific checks */
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
+    #endif
+#endif
+
+#ifndef __WATCH_OS_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
+        /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
+        #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
+        #define __WATCH_OS_VERSION_MAX_ALLOWED 60000
+        /* for compatibility with existing code.  New code should use platform specific checks */
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
+    #endif
+#endif
+
+#ifndef __BRIDGE_OS_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
+        
+        #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
+        #define __BRIDGE_OS_VERSION_MAX_ALLOWED 20000
+        /* for compatibility with existing code.  New code should use platform specific checks */
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000
+    #endif
+#endif
+
+#ifndef __DRIVERKIT_VERSION_MIN_REQUIRED
+    #ifdef __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
+        #define __DRIVERKIT_VERSION_MIN_REQUIRED __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
+    #endif
+#endif
+
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+    /* make sure a default max version is set */
+    #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
+        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_15
+    #endif
+#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
+
+#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
+    /* make sure a default max version is set */
+    #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
+        #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_13_0
+    #endif
+    /* make sure a valid min is set */
+    #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
+        #undef __IPHONE_OS_VERSION_MIN_REQUIRED
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED    __IPHONE_2_0
+    #endif
+#endif
+
+#define __AVAILABILITY_INTERNAL_DEPRECATED            __attribute__((deprecated))
+#ifdef __has_feature
+    #if __has_feature(attribute_deprecated_with_message)
+        #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg)  __attribute__((deprecated(_msg)))
+    #else
+        #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg)  __attribute__((deprecated))
+    #endif
+#elif defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))
+    #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg)  __attribute__((deprecated(_msg)))
+#else
+    #define __AVAILABILITY_INTERNAL_DEPRECATED_MSG(_msg)  __attribute__((deprecated))
+#endif
+#define __AVAILABILITY_INTERNAL_UNAVAILABLE           __attribute__((unavailable))
+#define __AVAILABILITY_INTERNAL_WEAK_IMPORT           __attribute__((weak_import))
+#define __AVAILABILITY_INTERNAL_REGULAR            
+
+#if defined(__has_builtin)
+ #if __has_builtin(__is_target_arch)
+  #if __has_builtin(__is_target_vendor)
+   #if __has_builtin(__is_target_os)
+    #if __has_builtin(__is_target_environment)
+     #if __has_builtin(__is_target_variant_os)
+      #if __has_builtin(__is_target_variant_environment)
+       #if (__is_target_arch(x86_64) && __is_target_vendor(apple) && ((__is_target_os(ios) && __is_target_environment(macabi)) || (__is_target_variant_os(ios) && __is_target_variant_environment(macabi))))
+         #define __ENABLE_LEGACY_IPHONE_AVAILABILITY 1
+         #define __ENABLE_LEGACY_MAC_AVAILABILITY 1
+       #endif /* # if __is_target_arch... */
+      #endif /* #if __has_builtin(__is_target_variant_environment) */
+     #endif /* #if __has_builtin(__is_target_variant_os) */
+    #endif /* #if __has_builtin(__is_target_environment) */
+   #endif /* #if __has_builtin(__is_target_os) */
+  #endif /* #if __has_builtin(__is_target_vendor) */
+ #endif /* #if __has_builtin(__is_target_arch) */
+#endif /* #if defined(__has_builtin) */
+
+#ifndef __ENABLE_LEGACY_IPHONE_AVAILABILITY
+ #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
+  #define __ENABLE_LEGACY_IPHONE_AVAILABILITY 1
+ #elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+  #define __ENABLE_LEGACY_MAC_AVAILABILITY 1
+ #endif
+#endif /* __ENABLE_LEGACY_IPHONE_AVAILABILITY */
+
+#ifdef __ENABLE_LEGACY_IPHONE_AVAILABILITY
+    #if defined(__has_attribute) && defined(__has_feature)
+        #if __has_attribute(availability)
+            /* use better attributes if possible */
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0                    __attribute__((availability(ios,introduced=2.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=2.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=2.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=2.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=2.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_11_0   __attribute__((availability(ios,introduced=2.0,deprecated=11.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_0   __attribute__((availability(ios,introduced=2.0,deprecated=2.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_1   __attribute__((availability(ios,introduced=2.0,deprecated=2.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_2   __attribute__((availability(ios,introduced=2.0,deprecated=2.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=2.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_0   __attribute__((availability(ios,introduced=2.0,deprecated=3.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_1   __attribute__((availability(ios,introduced=2.0,deprecated=3.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=2.0,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=2.0,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=2.0,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=2.0,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=2.0,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=2.0,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=2.0,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=2.0,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=2.0,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=2.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=2.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=2.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=2.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=2.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=2.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=2.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=2.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=2.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=2.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=2.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=2.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=2.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1                    __attribute__((availability(ios,introduced=2.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=2.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=2.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=2.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=2.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_1   __attribute__((availability(ios,introduced=2.1,deprecated=2.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=2.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=2.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_2   __attribute__((availability(ios,introduced=2.1,deprecated=2.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=2.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=2.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_0   __attribute__((availability(ios,introduced=2.1,deprecated=3.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_1   __attribute__((availability(ios,introduced=2.1,deprecated=3.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=2.1,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=2.1,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=2.1,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=2.1,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=2.1,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=2.1,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=2.1,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=2.1,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=2.1,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=2.1,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=2.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=2.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=2.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=2.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=2.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=2.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=2.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=2.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=2.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=2.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=2.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=2.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2                    __attribute__((availability(ios,introduced=2.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=2.2,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=2.2,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=2.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=2.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_2_2   __attribute__((availability(ios,introduced=2.2,deprecated=2.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=2.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_2_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=2.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_0   __attribute__((availability(ios,introduced=2.2,deprecated=3.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_1   __attribute__((availability(ios,introduced=2.2,deprecated=3.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=2.2,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=2.2,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=2.2,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=2.2,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=2.2,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=2.2,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=2.2,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=2.2,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=2.2,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=2.2,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=2.2,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=2.2,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=2.2,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=2.2,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=2.2,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=2.2,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=2.2,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=2.2,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=2.2,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=2.2,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=2.2,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=2.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_2_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=2.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0                    __attribute__((availability(ios,introduced=3.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=3.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=3.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=3.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=3.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_0   __attribute__((availability(ios,introduced=3.0,deprecated=3.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_1   __attribute__((availability(ios,introduced=3.0,deprecated=3.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=3.0,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=3.0,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=3.0,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=3.0,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=3.0,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=3.0,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=3.0,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=3.0,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=3.0,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=3.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=3.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=3.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=3.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=3.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=3.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=3.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=3.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=3.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=3.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=3.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=3.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=3.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1                    __attribute__((availability(ios,introduced=3.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=3.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=3.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=3.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=3.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_1   __attribute__((availability(ios,introduced=3.1,deprecated=3.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=3.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=3.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=3.1,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=3.1,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=3.1,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=3.1,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=3.1,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=3.1,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=3.1,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=3.1,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=3.1,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=3.1,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=3.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=3.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=3.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=3.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=3.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=3.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=3.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=3.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=3.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=3.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=3.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=3.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2                    __attribute__((availability(ios,introduced=3.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=3.2,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=3.2,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=3.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=3.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_3_2   __attribute__((availability(ios,introduced=3.2,deprecated=3.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=3.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_3_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=3.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=3.2,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=3.2,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=3.2,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=3.2,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=3.2,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=3.2,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=3.2,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=3.2,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=3.2,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=3.2,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=3.2,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=3.2,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=3.2,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=3.2,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=3.2,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=3.2,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=3.2,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=3.2,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=3.2,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=3.2,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=3.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_3_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=3.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0                    __attribute__((availability(ios,introduced=4.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=4.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=4.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=4.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=4.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_12_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=12.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_12_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=12.0)))
+            #endif            
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_0   __attribute__((availability(ios,introduced=4.0,deprecated=4.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=4.0,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=4.0,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=4.0,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=4.0,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=4.0,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=4.0,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=4.0,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=4.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=4.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=4.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=4.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=4.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=4.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=4.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=4.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=4.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=4.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=4.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=4.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=4.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1                    __attribute__((availability(ios,introduced=4.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=4.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=4.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=4.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=4.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_1   __attribute__((availability(ios,introduced=4.1,deprecated=4.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=4.1,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=4.1,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=4.1,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=4.1,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=4.1,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=4.1,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=4.1,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=4.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=4.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=4.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=4.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=4.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=4.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=4.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=4.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=4.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=4.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=4.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=4.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2                    __attribute__((availability(ios,introduced=4.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=4.2,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=4.2,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=4.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=4.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_2   __attribute__((availability(ios,introduced=4.2,deprecated=4.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=4.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=4.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=4.2,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=4.2,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=4.2,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=4.2,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=4.2,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=4.2,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=4.2,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=4.2,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=4.2,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=4.2,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=4.2,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=4.2,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=4.2,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=4.2,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=4.2,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=4.2,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.2,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=4.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=4.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3                    __attribute__((availability(ios,introduced=4.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=4.3,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=4.3,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=4.3,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=4.3,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_4_3   __attribute__((availability(ios,introduced=4.3,deprecated=4.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=4.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_4_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=4.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=4.3,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=4.3,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=4.3,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=4.3,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=4.3,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=4.3,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=4.3,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=4.3,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=4.3,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=4.3,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=4.3,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=4.3,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=4.3,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=4.3,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=4.3,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=4.3,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=4.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_4_3_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=4.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0                    __attribute__((availability(ios,introduced=5.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=5.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=5.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=5.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=5.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_11_0   __attribute__((availability(ios,introduced=5.0,deprecated=11.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_0   __attribute__((availability(ios,introduced=5.0,deprecated=5.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=5.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=5.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=5.0,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=5.0,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=5.0,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=5.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=5.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=5.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=5.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=5.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=5.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=5.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=5.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=5.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=5.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=5.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=5.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=5.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1                    __attribute__((availability(ios,introduced=5.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=5.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=5.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=5.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=5.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_5_1   __attribute__((availability(ios,introduced=5.1,deprecated=5.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=5.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_5_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=5.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=5.1,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=5.1,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=5.1,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=5.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=5.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=5.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=5.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=5.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=5.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=5.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=5.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=5.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=5.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=5.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=5.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_5_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=5.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0                    __attribute__((availability(ios,introduced=6.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=6.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=6.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=6.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=6.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_0   __attribute__((availability(ios,introduced=6.0,deprecated=6.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=6.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=6.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=6.0,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=6.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=6.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=6.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=6.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=6.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=6.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=6.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=6.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=6.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=6.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=6.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=6.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=6.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1                    __attribute__((availability(ios,introduced=6.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=6.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=6.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=6.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=6.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_6_1   __attribute__((availability(ios,introduced=6.1,deprecated=6.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=6.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_6_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=6.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=6.1,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=6.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=6.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=6.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=6.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=6.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=6.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=6.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=6.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=6.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=6.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=6.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=6.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_6_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=6.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0                    __attribute__((availability(ios,introduced=7.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=7.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=7.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=7.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=7.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_11_0   __attribute__((availability(ios,introduced=7.0,deprecated=11.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_11_3   __attribute__((availability(ios,introduced=7.0,deprecated=11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_12_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=12.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_12_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=12.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_0   __attribute__((availability(ios,introduced=7.0,deprecated=7.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=7.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=7.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=7.0,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=7.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=7.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=7.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=7.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=7.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=7.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=7.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=7.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=7.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=7.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=7.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1                    __attribute__((availability(ios,introduced=7.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=7.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=7.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=7.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=7.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_7_1   __attribute__((availability(ios,introduced=7.1,deprecated=7.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=7.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_7_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=7.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=7.1,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=7.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=7.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=7.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=7.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=7.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=7.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=7.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=7.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=7.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=7.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=7.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0                    __attribute__((availability(ios,introduced=8.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=8.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=8.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=8.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=8.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_11_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_11_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_11_3   __attribute__((availability(ios,introduced=8.0,deprecated=11.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_12_0   __attribute__((availability(ios,introduced=8.0,deprecated=12.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_0   __attribute__((availability(ios,introduced=8.0,deprecated=8.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=8.0,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=8.0,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=8.0,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=8.0,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=8.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=8.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=8.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=8.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=8.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=8.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1                    __attribute__((availability(ios,introduced=8.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=8.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=8.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=8.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=8.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_1   __attribute__((availability(ios,introduced=8.1,deprecated=8.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=8.1,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=8.1,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=8.1,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=8.1,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=8.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=8.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=8.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=8.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=8.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2                    __attribute__((availability(ios,introduced=8.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=8.2,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=8.2,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=8.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=8.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_2   __attribute__((availability(ios,introduced=8.2,deprecated=8.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=8.2,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=8.2,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=8.2,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=8.2,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=8.2,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=8.2,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.2,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=8.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=8.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3                    __attribute__((availability(ios,introduced=8.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=8.3,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=8.3,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=8.3,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=8.3,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_3   __attribute__((availability(ios,introduced=8.3,deprecated=8.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=8.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=8.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=8.3,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=8.3,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=8.3,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=8.3,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=8.3,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.3,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=8.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_3_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=8.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4                    __attribute__((availability(ios,introduced=8.4)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=8.4,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=8.4,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=8.4,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=8.4,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_8_4   __attribute__((availability(ios,introduced=8.4,deprecated=8.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=8.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_8_4_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=8.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=8.4,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=8.4,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=8.4,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=8.4,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=8.4,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=8.4)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_8_4_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=8.4)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0                    __attribute__((availability(ios,introduced=9.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=9.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=9.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=9.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=9.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_0   __attribute__((availability(ios,introduced=9.0,deprecated=9.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=9.0,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=9.0,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=9.0,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.0,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=9.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=9.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1                    __attribute__((availability(ios,introduced=9.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=9.1,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=9.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=9.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=9.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_1   __attribute__((availability(ios,introduced=9.1,deprecated=9.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=9.1,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=9.1,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.1,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=9.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=9.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2                    __attribute__((availability(ios,introduced=9.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=9.2,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=9.2,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=9.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=9.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_2   __attribute__((availability(ios,introduced=9.2,deprecated=9.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=9.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=9.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=9.2,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.2,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=9.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=9.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3                    __attribute__((availability(ios,introduced=9.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=9.3,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=9.3,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=9.3,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=9.3,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_9_3   __attribute__((availability(ios,introduced=9.3,deprecated=9.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=9.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_9_3_MSG(_msg)   __attribute__((availability(ios,introduced=9.3,deprecated=9.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=9.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_9_3_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=9.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0                    __attribute__((availability(ios,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_0   __attribute__((availability(ios,introduced=10.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_0_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=10.0,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=10.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=10.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_11_0   __attribute__((availability(ios,introduced=10.0,deprecated=11.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_12_0   __attribute__((availability(ios,introduced=10.0,deprecated=12.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_0_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1                    __attribute__((availability(ios,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_1   __attribute__((availability(ios,introduced=10.1,deprecated=10.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_1_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=10.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=10.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_1_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_2                    __attribute__((availability(ios,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_2   __attribute__((availability(ios,introduced=10.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_2_MSG(_msg)   __attribute__((availability(ios,introduced=10.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=10.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_2_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_3                    __attribute__((availability(ios,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_3_DEP__IPHONE_10_3   __attribute__((availability(ios,introduced=10.3,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.3,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_10_3_DEP__IPHONE_10_3_MSG(_msg)   __attribute__((availability(ios,introduced=10.3,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_3_DEP__IPHONE_NA   __attribute__((availability(ios,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_10_3_DEP__IPHONE_NA_MSG(_msg)   __attribute__((availability(ios,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_11                    __attribute__((availability(ios,introduced=11)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_11_0                    __attribute__((availability(ios,introduced=11.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_11_3                    __attribute__((availability(ios,introduced=11.3)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_12_0                    __attribute__((availability(ios,introduced=12.0)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_13_0                    __attribute__((availability(ios,introduced=13.0)))
+
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA                      __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA__IPHONE_NA           __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA_DEP__IPHONE_NA       __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA_DEP__IPHONE_NA_MSG(_msg) __attribute__((availability(ios,unavailable)))
+
+            #if __has_builtin(__is_target_arch)
+             #if __has_builtin(__is_target_vendor)
+              #if __has_builtin(__is_target_os)
+               #if __has_builtin(__is_target_environment)
+                #if __has_builtin(__is_target_variant_os)
+                 #if __has_builtin(__is_target_variant_environment)
+                  #if (__is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi))
+                    #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION __attribute__((availability(ios,introduced=4.0)))
+                    #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION               __attribute__((availability(ios,unavailable)))
+                    #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg)     __attribute__((availability(ios,unavailable)))
+                  #endif
+                 #endif /* #if __has_builtin(__is_target_variant_environment) */
+                #endif /* #if __has_builtin(__is_target_variant_os) */
+               #endif /* #if __has_builtin(__is_target_environment) */
+              #endif /* #if __has_builtin(__is_target_os) */
+             #endif /* #if __has_builtin(__is_target_vendor) */
+            #endif /* #if __has_builtin(__is_target_arch) */
+
+            #ifndef __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION
+                #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION __attribute__((availability(ios,introduced=4.0)))
+                #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION   __attribute__((availability(ios,introduced=4.0,deprecated=4.0)))
+                #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.0,message=_msg)))
+                #else
+                #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg)   __attribute__((availability(ios,introduced=4.0,deprecated=4.0)))
+                #endif
+            #endif /* __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION */
+        #endif
+    #endif
+#endif
+
+#if __ENABLE_LEGACY_MAC_AVAILABILITY
+    #if defined(__has_attribute) && defined(__has_feature)
+        #if __has_attribute(availability)
+            /* use better attributes if possible */
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.1,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.12)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_2   __attribute__((availability(macosx,introduced=10.1,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_3   __attribute__((availability(macosx,introduced=10.1,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_4   __attribute__((availability(macosx,introduced=10.1,deprecated=10.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.1,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.1,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.1,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.1,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.1,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2                    __attribute__((availability(macosx,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.2,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.2,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_2   __attribute__((availability(macosx,introduced=10.2,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_3   __attribute__((availability(macosx,introduced=10.2,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_4   __attribute__((availability(macosx,introduced=10.2,deprecated=10.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.2,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.2,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.2,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.2,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.2,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3                    __attribute__((availability(macosx,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.3,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.3,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_3   __attribute__((availability(macosx,introduced=10.3,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_4   __attribute__((availability(macosx,introduced=10.3,deprecated=10.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.3,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.3,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.3,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.3,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.3,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4                    __attribute__((availability(macosx,introduced=10.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.4,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.4,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_4   __attribute__((availability(macosx,introduced=10.4,deprecated=10.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.4,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.4,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.4,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.4,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.4,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5                    __attribute__((availability(macosx,introduced=10.5)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEPRECATED__MAC_10_7                    __attribute__((availability(macosx,introduced=10.5.DEPRECATED..MAC.10.7)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.5,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.5,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.5,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.5,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.5,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.5,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.5)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.5)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6                    __attribute__((availability(macosx,introduced=10.6)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.6,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.6,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.6,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.6,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.6,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.6,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.6)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.6)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7                    __attribute__((availability(macosx,introduced=10.7)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.7,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_13_2   __attribute__((availability(macosx,introduced=10.7,deprecated=10.13.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.7,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.7,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.7,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.7)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.7)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8                    __attribute__((availability(macosx,introduced=10.8)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.8,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.8,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.8,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.8,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.8)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.8)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9                    __attribute__((availability(macosx,introduced=10.9)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.9,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.9,deprecated=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_14   __attribute__((availability(macosx,introduced=10.9,deprecated=10.14)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.9,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9,deprecated=10.9)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.9)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.9)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0                    __attribute__((availability(macosx,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_0   __attribute__((availability(macosx,introduced=10.0,deprecated=10.0)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_0_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.0,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_0_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.0)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.0,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.0,deprecated=10.13)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_2   __attribute__((availability(macosx,introduced=10.0,deprecated=10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_3   __attribute__((availability(macosx,introduced=10.0,deprecated=10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_4   __attribute__((availability(macosx,introduced=10.0,deprecated=10.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_5   __attribute__((availability(macosx,introduced=10.0,deprecated=10.5)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.5,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_5_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.5)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_6   __attribute__((availability(macosx,introduced=10.0,deprecated=10.6)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.6,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_6_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.6)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_7   __attribute__((availability(macosx,introduced=10.0,deprecated=10.7)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.7,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_7_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.7)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_8   __attribute__((availability(macosx,introduced=10.0,deprecated=10.8)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.8,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_8_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.8)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_9   __attribute__((availability(macosx,introduced=10.0,deprecated=10.9)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.9,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_9_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.9)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0,deprecated=10.13)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.0)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_1                    __attribute__((availability(macosx,introduced=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10                    __attribute__((availability(macosx,introduced=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2                    __attribute__((availability(macosx,introduced=10.10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_2_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3                    __attribute__((availability(macosx,introduced=10.10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.10.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_3_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.10,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_2   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_3   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10.3)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_10_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.10)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.10,deprecated=10.13)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.13,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10,deprecated=10.13)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_13_4   __attribute__((availability(macosx,introduced=10.10,deprecated=10.13.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.10)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11                    __attribute__((availability(macosx,introduced=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2                    __attribute__((availability(macosx,introduced=10.11.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.11.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.11.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_2_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3                    __attribute__((availability(macosx,introduced=10.11.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.11.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.11.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_3_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.3)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4                    __attribute__((availability(macosx,introduced=10.11.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.11.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.11.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_4_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_1   __attribute__((availability(macosx,introduced=10.11,deprecated=10.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_2   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_3   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.3)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.3,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_3_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.3)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_4   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.11)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.11)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12                    __attribute__((availability(macosx,introduced=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1                    __attribute__((availability(macosx,introduced=10.12.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1,deprecated=10.12.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.12.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_1_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.1)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_2                    __attribute__((availability(macosx,introduced=10.12.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.2,deprecated=10.12.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.12.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_2_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.2)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_4                    __attribute__((availability(macosx,introduced=10.12.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_4_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.12.4,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.4,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_4_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.4,deprecated=10.12.4)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_4_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.12.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_4_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_1   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.1)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.1,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_1_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.1)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_2   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.2)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.2,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_2_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.2)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_4   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.4)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.4,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_4_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12.4)))
+            #endif
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_12_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.12)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_13   __attribute__((availability(macosx,introduced=10.12,deprecated=10.13)))
+            #if __has_feature(attribute_availability_with_message)
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.13,message=_msg)))
+            #else
+                #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_13_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12,deprecated=10.13)))
+            #endif
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_13_4   __attribute__((availability(macosx,introduced=10.12,deprecated=10.13.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_10_14   __attribute__((availability(macosx,introduced=10.12,deprecated=10.14)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_NA   __attribute__((availability(macosx,introduced=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_12_DEP__MAC_NA_MSG(_msg)   __attribute__((availability(macosx,introduced=10.12)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_13                    __attribute__((availability(macosx,introduced=10.13)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_13_4                    __attribute__((availability(macosx,introduced=10.13.4)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_14                    __attribute__((availability(macosx,introduced=10.14)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_14_DEP__MAC_10_14   __attribute__((availability(macosx,introduced=10.14,deprecated=10.14)))
+            #define __AVAILABILITY_INTERNAL__MAC_10_15                    __attribute__((availability(macosx,introduced=10.15)))
+
+            #define __AVAILABILITY_INTERNAL__MAC_NA                        __attribute__((availability(macosx,unavailable)))
+            #define __AVAILABILITY_INTERNAL__MAC_NA_DEP__MAC_NA            __attribute__((availability(macosx,unavailable)))
+            #define __AVAILABILITY_INTERNAL__MAC_NA_DEP__MAC_NA_MSG(_msg)  __attribute__((availability(macosx,unavailable)))
+
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA                      __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA__IPHONE_NA           __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA_DEP__IPHONE_NA       __attribute__((availability(ios,unavailable)))
+            #define __AVAILABILITY_INTERNAL__IPHONE_NA_DEP__IPHONE_NA_MSG(_msg) __attribute__((availability(ios,unavailable)))
+
+            #ifndef __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION
+             #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION                                          __attribute__((availability(ios,unavailable)))
+             #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION               __attribute__((availability(ios,unavailable)))
+             #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg)     __attribute__((availability(ios,unavailable)))
+            #endif /* __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION */
+        #endif
+    #endif
+#endif /* __ENABLE_LEGACY_MAC_AVAILABILITY */
+
+/*
+ Macros for defining which versions/platform a given symbol can be used.
+ 
+ @see http://clang.llvm.org/docs/AttributeReference.html#availability
+ */
+
+#if defined(__has_feature) && defined(__has_attribute)
+ #if __has_attribute(availability)
+
+    
+    #define __API_AVAILABLE_PLATFORM_macos(x) macos,introduced=x
+    #define __API_AVAILABLE_PLATFORM_macosx(x) macosx,introduced=x
+    #define __API_AVAILABLE_PLATFORM_ios(x) ios,introduced=x
+    #define __API_AVAILABLE_PLATFORM_watchos(x) watchos,introduced=x
+    #define __API_AVAILABLE_PLATFORM_tvos(x) tvos,introduced=x
+    
+    #define __API_AVAILABLE_PLATFORM_macCatalyst(x) macCatalyst,introduced=x
+    #define __API_AVAILABLE_PLATFORM_macCatalyst(x) macCatalyst,introduced=x
+    #ifndef __API_AVAILABLE_PLATFORM_uikitformac
+     #define __API_AVAILABLE_PLATFORM_uikitformac(x) uikitformac,introduced=x
+    #endif
+    #define __API_AVAILABLE_PLATFORM_driverkit(x) driverkit,introduced=x
+
+    #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
+    
+    #define __API_AVAILABLE1(x) __API_A(x)
+    #define __API_AVAILABLE2(x,y) __API_A(x) __API_A(y)
+    #define __API_AVAILABLE3(x,y,z)  __API_A(x) __API_A(y) __API_A(z)
+    #define __API_AVAILABLE4(x,y,z,t) __API_A(x) __API_A(y) __API_A(z) __API_A(t)
+    #define __API_AVAILABLE5(x,y,z,t,b) __API_A(x) __API_A(y) __API_A(z) __API_A(t) __API_A(b)
+    #define __API_AVAILABLE6(x,y,z,t,b,m) __API_A(x) __API_A(y) __API_A(z) __API_A(t) __API_A(b) __API_A(m)
+    #define __API_AVAILABLE7(x,y,z,t,b,m,d) __API_A(x) __API_A(y) __API_A(z) __API_A(t) __API_A(b) __API_A(m) __API_A(d)
+    #define __API_AVAILABLE_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,NAME,...) NAME
+
+    #define __API_APPLY_TO any(record, enum, enum_constant, function, objc_method, objc_category, objc_protocol, objc_interface, objc_property, type_alias, variable, field)
+    #define __API_RANGE_STRINGIFY(x) __API_RANGE_STRINGIFY2(x)
+    #define __API_RANGE_STRINGIFY2(x) #x 
+    
+    #define __API_A_BEGIN(x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_AVAILABLE_PLATFORM_##x))), apply_to = __API_APPLY_TO)))
+
+    #define __API_AVAILABLE_BEGIN1(a) __API_A_BEGIN(a)
+    #define __API_AVAILABLE_BEGIN2(a,b) __API_A_BEGIN(a) __API_A_BEGIN(b)
+    #define __API_AVAILABLE_BEGIN3(a,b,c) __API_A_BEGIN(a) __API_A_BEGIN(b) __API_A_BEGIN(c)
+    #define __API_AVAILABLE_BEGIN4(a,b,c,d) __API_A_BEGIN(a) __API_A_BEGIN(b) __API_A_BEGIN(c) __API_A_BEGIN(d)
+    #define __API_AVAILABLE_BEGIN5(a,b,c,d,e) __API_A_BEGIN(a) __API_A_BEGIN(b) __API_A_BEGIN(c) __API_A_BEGIN(d) __API_A_BEGIN(e)
+    #define __API_AVAILABLE_BEGIN6(a,b,c,d,e,f) __API_A_BEGIN(a) __API_A_BEGIN(b) __API_A_BEGIN(c) __API_A_BEGIN(d) __API_A_BEGIN(e) __API_A_BEGIN(f)
+    #define __API_AVAILABLE_BEGIN7(a,b,c,d,e,f,g) __API_A_BEGIN(a) __API_A_BEGIN(b) __API_A_BEGIN(c) __API_A_BEGIN(d) __API_A_BEGIN(e) __API_A_BEGIN(f) __API_A_BEGIN(g)
+    #define __API_AVAILABLE_BEGIN_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,NAME,...) NAME
+
+    
+    #define __API_DEPRECATED_PLATFORM_macos(x,y) macos,introduced=x,deprecated=y
+    #define __API_DEPRECATED_PLATFORM_macosx(x,y) macosx,introduced=x,deprecated=y
+    #define __API_DEPRECATED_PLATFORM_ios(x,y) ios,introduced=x,deprecated=y
+    #define __API_DEPRECATED_PLATFORM_watchos(x,y) watchos,introduced=x,deprecated=y
+    #define __API_DEPRECATED_PLATFORM_tvos(x,y) tvos,introduced=x,deprecated=y
+    
+    #define __API_DEPRECATED_PLATFORM_macCatalyst(x,y) macCatalyst,introduced=x,deprecated=y
+    #define __API_DEPRECATED_PLATFORM_macCatalyst(x,y) macCatalyst,introduced=x,deprecated=y
+    #ifndef __API_DEPRECATED_PLATFORM_uikitformac
+     #define __API_DEPRECATED_PLATFORM_uikitformac(x) uikitformac,introduced=x,deprecated=y
+    #endif
+    #define __API_DEPRECATED_PLATFORM_driverkit(x,y) driverkit,introduced=x,deprecated=y
+
+    #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
+    
+    #define __API_DEPRECATED_MSG2(msg,x) __API_D(msg,x)
+    #define __API_DEPRECATED_MSG3(msg,x,y) __API_D(msg,x) __API_D(msg,y)
+    #define __API_DEPRECATED_MSG4(msg,x,y,z) __API_DEPRECATED_MSG3(msg,x,y) __API_D(msg,z)
+    #define __API_DEPRECATED_MSG5(msg,x,y,z,t) __API_DEPRECATED_MSG4(msg,x,y,z) __API_D(msg,t)
+    #define __API_DEPRECATED_MSG6(msg,x,y,z,t,b) __API_DEPRECATED_MSG5(msg,x,y,z,t) __API_D(msg,b)
+    #define __API_DEPRECATED_MSG7(msg,x,y,z,t,b,m) __API_DEPRECATED_MSG6(msg,x,y,z,t,b) __API_D(msg,m)
+    #define __API_DEPRECATED_MSG8(msg,x,y,z,t,b,m,d) __API_DEPRECATED_MSG7(msg,x,y,z,t,b,m) __API_D(msg,d)
+    #define __API_DEPRECATED_MSG_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME
+
+    #define __API_D_BEGIN(msg, x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg))), apply_to = __API_APPLY_TO)))
+
+    #define __API_DEPRECATED_BEGIN_MSG2(msg,a) __API_D_BEGIN(msg,a)
+    #define __API_DEPRECATED_BEGIN_MSG3(msg,a,b) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b)
+    #define __API_DEPRECATED_BEGIN_MSG4(msg,a,b,c) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b) __API_D_BEGIN(msg,c)
+    #define __API_DEPRECATED_BEGIN_MSG5(msg,a,b,c,d) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b) __API_D_BEGIN(msg,c) __API_D_BEGIN(msg,d)
+    #define __API_DEPRECATED_BEGIN_MSG6(msg,a,b,c,d,e) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b) __API_D_BEGIN(msg,c) __API_D_BEGIN(msg,d) __API_D_BEGIN(msg,e)
+    #define __API_DEPRECATED_BEGIN_MSG7(msg,a,b,c,d,e,f) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b) __API_D_BEGIN(msg,c) __API_D_BEGIN(msg,d) __API_D_BEGIN(msg,e) __API_D_BEGIN(msg,f)
+    #define __API_DEPRECATED_BEGIN_MSG8(msg,a,b,c,d,e,f,g) __API_D_BEGIN(msg,a) __API_D_BEGIN(msg,b) __API_D_BEGIN(msg,c) __API_D_BEGIN(msg,d) __API_D_BEGIN(msg,e) __API_D_BEGIN(msg,f) __API_D_BEGIN(msg,g)
+    #define __API_DEPRECATED_BEGIN_MSG_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME
+
+    #if __has_feature(attribute_availability_with_replacement)
+        #define __API_R(rep,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,replacement=rep)))
+    #else
+        #define __API_R(rep,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x)))
+    #endif
+
+    #define __API_DEPRECATED_REP2(rep,x) __API_R(rep,x)
+    #define __API_DEPRECATED_REP3(rep,x,y) __API_R(rep,x) __API_R(rep,y)
+    #define __API_DEPRECATED_REP4(rep,x,y,z)  __API_DEPRECATED_REP3(rep,x,y) __API_R(rep,z)
+    #define __API_DEPRECATED_REP5(rep,x,y,z,t) __API_DEPRECATED_REP4(rep,x,y,z) __API_R(rep,t)
+    #define __API_DEPRECATED_REP6(rep,x,y,z,t,b) __API_DEPRECATED_REP5(rep,x,y,z,t) __API_R(rep,b)
+    #define __API_DEPRECATED_REP7(rep,x,y,z,t,b,m) __API_DEPRECATED_REP6(rep,x,y,z,t,b) __API_R(rep,m)
+    #define __API_DEPRECATED_REP8(rep,x,y,z,t,b,m,d) __API_DEPRECATED_REP7(rep,x,y,z,t,b,m) __API_R(rep,d)
+    #define __API_DEPRECATED_REP_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME
+
+    #if __has_feature(attribute_availability_with_replacement)
+        #define __API_R_BEGIN(rep,x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x,replacement=rep))), apply_to = __API_APPLY_TO)))    
+    #else
+        #define __API_R_BEGIN(rep,x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_DEPRECATED_PLATFORM_##x))), apply_to = __API_APPLY_TO)))    
+    #endif
+
+    #define __API_DEPRECATED_BEGIN_REP2(rep,a) __API_R_BEGIN(rep,a)
+    #define __API_DEPRECATED_BEGIN_REP3(rep,a,b) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b)
+    #define __API_DEPRECATED_BEGIN_REP4(rep,a,b,c) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b) __API_R_BEGIN(rep,c)
+    #define __API_DEPRECATED_BEGIN_REP5(rep,a,b,c,d) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b) __API_R_BEGIN(rep,c) __API_R_BEGIN(rep,d)
+    #define __API_DEPRECATED_BEGIN_REP6(rep,a,b,c,d,e) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b) __API_R_BEGIN(rep,c) __API_R_BEGIN(rep,d) __API_R_BEGIN(rep,e)
+    #define __API_DEPRECATED_BEGIN_REP7(rep,a,b,c,d,e,f) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b) __API_R_BEGIN(rep,c) __API_R_BEGIN(rep,d) __API_R_BEGIN(rep,e) __API_R_BEGIN(rep,f)
+    #define __API_DEPRECATED_BEGIN_REP8(rep,a,b,c,d,e,f,g) __API_R_BEGIN(rep,a) __API_R_BEGIN(rep,b) __API_R_BEGIN(rep,c) __API_R_BEGIN(rep,d) __API_R_BEGIN(rep,e) __API_R_BEGIN(rep,f) __API_R_BEGIN(rep,g)
+    #define __API_DEPRECATED_BEGIN_REP_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME
+
+    /*
+     * API Unavailability
+     * Use to specify that an API is unavailable for a particular platform.
+     *
+     * Example:
+     *    __API_UNAVAILABLE(macos)
+     *    __API_UNAVAILABLE(watchos, tvos)
+     */
+    #define __API_UNAVAILABLE_PLATFORM_macos macos,unavailable
+    #define __API_UNAVAILABLE_PLATFORM_macosx macosx,unavailable
+    #define __API_UNAVAILABLE_PLATFORM_ios ios,unavailable
+    #define __API_UNAVAILABLE_PLATFORM_watchos watchos,unavailable
+    #define __API_UNAVAILABLE_PLATFORM_tvos tvos,unavailable
+    
+    #define __API_UNAVAILABLE_PLATFORM_macCatalyst macCatalyst,unavailable
+    #define __API_UNAVAILABLE_PLATFORM_macCatalyst macCatalyst,unavailable
+    #ifndef __API_UNAVAILABLE_PLATFORM_uikitformac
+     #define __API_UNAVAILABLE_PLATFORM_uikitformac(x) uikitformac,unavailable
+    #endif
+    #define __API_UNAVAILABLE_PLATFORM_driverkit driverkit,unavailable
+
+    #if defined(__has_attribute)
+      #if __has_attribute(availability)
+        #define __API_U(x) __attribute__((availability(__API_UNAVAILABLE_PLATFORM_##x)))
+      #else
+        #define __API_U(x)
+      #endif
+    #else
+        #define __API_U(x)
+    #endif
+    
+    #define __API_UNAVAILABLE1(x) __API_U(x)
+    #define __API_UNAVAILABLE2(x,y) __API_U(x) __API_U(y)
+    #define __API_UNAVAILABLE3(x,y,z) __API_UNAVAILABLE2(x,y) __API_U(z)
+    #define __API_UNAVAILABLE4(x,y,z,t) __API_UNAVAILABLE3(x,y,z) __API_U(t)
+    #define __API_UNAVAILABLE5(x,y,z,t,b) __API_UNAVAILABLE4(x,y,z,t) __API_U(b)
+    #define __API_UNAVAILABLE6(x,y,z,t,b,m) __API_UNAVAILABLE5(x,y,z,t,b) __API_U(m)
+    #define __API_UNAVAILABLE7(x,y,z,t,b,m,d) __API_UNAVAILABLE6(x,y,z,t,b,m) __API_U(d)
+    #define __API_UNAVAILABLE_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,NAME,...) NAME
+
+    #define __API_U_BEGIN(x) _Pragma(__API_RANGE_STRINGIFY (clang attribute (__attribute__((availability(__API_UNAVAILABLE_PLATFORM_##x))), apply_to = __API_APPLY_TO)))
+
+    #define __API_UNAVAILABLE_BEGIN1(a) __API_U_BEGIN(a)
+    #define __API_UNAVAILABLE_BEGIN2(a,b) __API_U_BEGIN(a) __API_U_BEGIN(b)
+    #define __API_UNAVAILABLE_BEGIN3(a,b,c) __API_U_BEGIN(a) __API_U_BEGIN(b) __API_U_BEGIN(c)
+    #define __API_UNAVAILABLE_BEGIN4(a,b,c,d) __API_U_BEGIN(a) __API_U_BEGIN(b) __API_U_BEGIN(c) __API_U_BEGIN(d)
+    #define __API_UNAVAILABLE_BEGIN5(a,b,c,d,e) __API_U_BEGIN(a) __API_U_BEGIN(b) __API_U_BEGIN(c) __API_U_BEGIN(d) __API_U_BEGIN(e)
+    #define __API_UNAVAILABLE_BEGIN6(a,b,c,d,e,f) __API_U_BEGIN(a) __API_U_BEGIN(b) __API_U_BEGIN(c) __API_U_BEGIN(d) __API_U_BEGIN(e) __API_U_BEGIN(f)
+    #define __API_UNAVAILABLE_BEGIN7(a,b,c,d,e,f) __API_U_BEGIN(a) __API_U_BEGIN(b) __API_U_BEGIN(c) __API_U_BEGIN(d) __API_U_BEGIN(e) __API_U_BEGIN(f) __API_U_BEGIN(g)
+    #define __API_UNAVAILABLE_BEGIN_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,NAME,...) NAME
+ #else 
+
+ /* 
+  * Evaluate to nothing for compilers that don't support availability.
+  */
+    
+  #define __API_AVAILABLE_GET_MACRO(...)
+  #define __API_AVAILABLE_BEGIN_GET_MACRO(...)
+  #define __API_DEPRECATED_MSG_GET_MACRO(...)
+  #define __API_DEPRECATED_REP_GET_MACRO(...)
+  #define __API_DEPRECATED_BEGIN_MSG_GET_MACRO(...)
+  #define __API_DEPRECATED_BEGIN_REP_GET_MACRO
+  #define __API_UNAVAILABLE_GET_MACRO(...)
+  #define __API_UNAVAILABLE_BEGIN_GET_MACRO(...)
+ #endif /* __has_attribute(availability) */
+#else
+
+    /* 
+     * Evaluate to nothing for compilers that don't support clang language extensions.
+     */
+    
+    #define __API_AVAILABLE_GET_MACRO(...)
+    #define __API_AVAILABLE_BEGIN_GET_MACRO(...)
+    #define __API_DEPRECATED_MSG_GET_MACRO(...)
+    #define __API_DEPRECATED_REP_GET_MACRO(...)
+    #define __API_DEPRECATED_BEGIN_MSG_GET_MACRO(...)
+    #define __API_DEPRECATED_BEGIN_REP_GET_MACRO
+    #define __API_UNAVAILABLE_GET_MACRO(...)
+    #define __API_UNAVAILABLE_BEGIN_GET_MACRO(...)
+#endif /* #if defined(__has_feature) && defined(__has_attribute) */
+
+/*
+ * Swift compiler version
+ * Allows for project-agnostic โ€œepochsโ€ for frameworks imported into Swift via the Clang importer, like #if _compiler_version for Swift
+ * Example:
+ *
+ *  #if __swift_compiler_version_at_least(800, 2, 20)
+ *  - (nonnull NSString *)description;
+ *  #else
+ *  - (NSString *)description;
+ *  #endif
+ */
+ 
+#ifdef __SWIFT_COMPILER_VERSION
+    #define __swift_compiler_version_at_least_impl(X, Y, Z, a, b, ...) \
+    __SWIFT_COMPILER_VERSION >= ((X * UINT64_C(1000) * 1000 * 1000) + (Z * 1000 * 1000) + (a * 1000) + b)
+    #define __swift_compiler_version_at_least(...) __swift_compiler_version_at_least_impl(__VA_ARGS__, 0, 0, 0, 0)
+#else
+    #define __swift_compiler_version_at_least(...) 1
+#endif
+
+/*
+ * If __SPI_AVAILABLE has not been defined elsewhere, disable it.
+ */
+ 
+#ifndef __SPI_AVAILABLE
+  #define __SPI_AVAILABLE(...)
+#endif
+
+#endif /* __AVAILABILITY_INTERNAL__ */
lib/libc/include/x86_64-macos-gnu/complex.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2002-2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+/******************************************************************************
+ *                                                                            *
+ *     File:  complex.h                                                       *
+ *                                                                            *
+ *     Contains: prototypes and macros germane to C99 complex math.           *
+ *                                                                            *
+ ******************************************************************************/
+
+#ifndef __COMPLEX_H__
+#define __COMPLEX_H__
+
+#include <sys/cdefs.h>
+
+#undef complex
+#define complex _Complex
+#undef _Complex_I
+/*  Constant expression of type const float _Complex                          */
+#define _Complex_I (__extension__ 1.0iF)
+#undef I
+#define I _Complex_I
+
+#if (__STDC_VERSION__ > 199901L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL) \
+    && defined __clang__
+
+/*  Complex initializer macros.  These are a C11 feature, but are also provided
+    as an extension in C99 so long as strict POSIX conformance is not
+    requested.  They are available only when building with the llvm-clang
+    compiler, as there is no way to support them with the gcc-4.2 frontend.
+    These may be used for static initialization of complex values, like so:
+ 
+        static const float complex someVariable = CMPLXF(1.0, INFINITY);
+ 
+    they may, of course, be used outside of static contexts as well.          */
+
+#define  CMPLX(__real,__imag) \
+    _Pragma("clang diagnostic push") \
+    _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \
+    (double _Complex){(__real),(__imag)} \
+    _Pragma("clang diagnostic pop")
+
+#define CMPLXF(__real,__imag) \
+    _Pragma("clang diagnostic push") \
+    _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \
+    (float _Complex){(__real),(__imag)} \
+    _Pragma("clang diagnostic pop")
+
+#define CMPLXL(__real,__imag) \
+    _Pragma("clang diagnostic push") \
+    _Pragma("clang diagnostic ignored \"-Wcomplex-component-init\"") \
+    (long double _Complex){(__real),(__imag)} \
+    _Pragma("clang diagnostic pop")
+
+#endif /* End C11 features.                                                   */
+
+__BEGIN_DECLS
+extern float complex cacosf(float complex);
+extern double complex cacos(double complex);
+extern long double complex cacosl(long double complex);
+
+extern float complex casinf(float complex);
+extern double complex casin(double complex);
+extern long double complex casinl(long double complex);
+
+extern float complex catanf(float complex);
+extern double complex catan(double complex);
+extern long double complex catanl(long double complex);
+
+extern float complex ccosf(float complex);
+extern double complex ccos(double complex);
+extern long double complex ccosl(long double complex);
+
+extern float complex csinf(float complex);
+extern double complex csin(double complex);
+extern long double complex csinl(long double complex);
+
+extern float complex ctanf(float complex);
+extern double complex ctan(double complex);
+extern long double complex ctanl(long double complex);
+
+extern float complex cacoshf(float complex);
+extern double complex cacosh(double complex);
+extern long double complex cacoshl(long double complex);
+
+extern float complex casinhf(float complex);
+extern double complex casinh(double complex);
+extern long double complex casinhl(long double complex);
+
+extern float complex catanhf(float complex);
+extern double complex catanh(double complex);
+extern long double complex catanhl(long double complex);
+
+extern float complex ccoshf(float complex);
+extern double complex ccosh(double complex);
+extern long double complex ccoshl(long double complex);
+
+extern float complex csinhf(float complex);
+extern double complex csinh(double complex);
+extern long double complex csinhl(long double complex);
+
+extern float complex ctanhf(float complex);
+extern double complex ctanh(double complex);
+extern long double complex ctanhl(long double complex);
+
+extern float complex cexpf(float complex);
+extern double complex cexp(double complex);
+extern long double complex cexpl(long double complex);
+
+extern float complex clogf(float complex);
+extern double complex clog(double complex);
+extern long double complex clogl(long double complex);
+
+extern float cabsf(float complex);
+extern double cabs(double complex);
+extern long double cabsl(long double complex);
+
+extern float complex cpowf(float complex, float complex);
+extern double complex cpow(double complex, double complex);
+extern long double complex cpowl(long double complex, long double complex);
+
+extern float complex csqrtf(float complex);
+extern double complex csqrt(double complex);
+extern long double complex csqrtl(long double complex);
+
+extern float cargf(float complex);
+extern double carg(double complex);
+extern long double cargl(long double complex);
+
+extern float cimagf(float complex);
+extern double cimag(double complex);
+extern long double cimagl(long double complex);
+
+extern float complex conjf(float complex);
+extern double complex conj(double complex);
+extern long double complex conjl(long double complex);
+
+extern float complex cprojf(float complex);
+extern double complex cproj(double complex);
+extern long double complex cprojl(long double complex);
+
+extern float crealf(float complex);
+extern double creal(double complex);
+extern long double creall(long double complex);
+__END_DECLS
+
+#endif /* __COMPLEX_H__ */
lib/libc/include/x86_64-macos-gnu/ctype.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2000, 2005, 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ctype.h	8.4 (Berkeley) 1/21/94
+ */
+
+#ifndef	_CTYPE_H_
+#define _CTYPE_H_
+
+#include <_ctype.h>
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_ctype.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* !_CTYPE_H_ */
lib/libc/include/x86_64-macos-gnu/errno.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <sys/errno.h>
+
lib/libc/include/x86_64-macos-gnu/fenv.h
@@ -0,0 +1,361 @@
+/*
+ * Copyright (c) 2002-2013 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+ 
+/******************************************************************************
+ *                                                                            *
+ *  File:  fenv.h                                                             *
+ *                                                                            *
+ *  Contains: typedefs and prototypes for C99 floating point environment.     *
+ *                                                                            *
+ *  A collection of functions designed to provide access to the floating      *
+ *  point environment for numerical programming. It is compliant with the     *
+ *  floating-point requirements in C99.                                       *
+ *                                                                            *
+ *  The file <fenv.h> declares many functions in support of numerical         *
+ *  programming. Programs that test flags or run under non-default mode       *
+ *  must do so under the effect of an enabling "fenv_access" pragma:          *
+ *                                                                            *
+ *      #pragma STDC FENV_ACCESS on                                           *
+ *                                                                            *
+ ******************************************************************************/
+
+#ifndef __FENV_H__
+#define __FENV_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+/******************************************************************************
+ *                                                                            *
+ *  Architecture-specific types and macros.                                   *
+ *                                                                            *
+ *      fenv_t          a type for representing the entire floating-point     *
+ *                      environment in a single object.                       *
+ *                                                                            *
+ *      fexcept_t       a type for representing the floating-point            *
+ *                      exception flag state collectively.                    *
+ *                                                                            *
+ *      FE_INEXACT      macros representing the various floating-point        *
+ *      FE_UNDERFLOW    exceptions.                                           *
+ *      FE_OVERFLOW                                                           *
+ *      FE_DIVBYZERO                                                          *
+ *      FE_INVALID                                                            *
+ *      FE_ALL_EXCEPT                                                         *
+ *                                                                            *
+ *      FE_TONEAREST    macros representing the various floating-point        *
+ *      FE_UPWARD       rounding modes                                        *
+ *      FE_DOWNWARD                                                           *
+ *      FE_TOWARDZERO                                                         *
+ *                                                                            *
+ *      FE_DFL_ENV      a macro expanding to a pointer to an object           *
+ *                      representing the default floating-point environemnt   *
+ *                                                                            *
+ ******************************************************************************/
+    
+/******************************************************************************
+ *  ARM definitions of architecture-specific types and macros.                *
+ ******************************************************************************/
+     
+#if defined __arm__ && !defined __SOFTFP__
+     
+typedef struct {
+    unsigned int            __fpscr;    
+    unsigned int            __reserved0;
+    unsigned int            __reserved1;
+    unsigned int            __reserved2;
+} fenv_t;
+
+typedef unsigned short fexcept_t;
+    
+#define FE_INEXACT          0x0010
+#define FE_UNDERFLOW        0x0008
+#define FE_OVERFLOW         0x0004
+#define FE_DIVBYZERO        0x0002
+#define FE_INVALID          0x0001
+/*  FE_FLUSHTOZERO
+    An ARM-specific flag that is raised when a denormal is flushed to zero.
+    This is also called the "input denormal exception"                        */
+#define FE_FLUSHTOZERO      0x0080 
+#define FE_ALL_EXCEPT       0x009f
+    
+#define FE_TONEAREST        0x00000000
+#define FE_UPWARD           0x00400000
+#define FE_DOWNWARD         0x00800000
+#define FE_TOWARDZERO       0x00C00000
+
+/*  Masks for values that may be controlled in the FPSCR.  Modifying any other
+    bits invokes undefined behavior.                                          */
+enum {
+    __fpscr_trap_invalid   = 0x00000100,
+    __fpscr_trap_divbyzero = 0x00000200,
+    __fpscr_trap_overflow  = 0x00000400,
+    __fpscr_trap_underflow = 0x00000800,
+    __fpscr_trap_inexact   = 0x00001000,
+    __fpscr_trap_denormal  = 0x00008000,
+    __fpscr_flush_to_zero  = 0x01000000,
+    __fpscr_default_nan    = 0x02000000,
+    __fpscr_saturation     = 0x08000000,
+};
+
+extern const fenv_t _FE_DFL_ENV;
+#define FE_DFL_ENV &_FE_DFL_ENV
+    
+/******************************************************************************
+ *  ARM64 definitions of architecture-specific types and macros.              *
+ ******************************************************************************/
+    
+#elif defined __arm64__
+    
+typedef struct {
+    unsigned long long      __fpsr;
+    unsigned long long      __fpcr;
+} fenv_t;
+    
+typedef unsigned short fexcept_t;
+    
+#define FE_INEXACT          0x0010
+#define FE_UNDERFLOW        0x0008
+#define FE_OVERFLOW         0x0004
+#define FE_DIVBYZERO        0x0002
+#define FE_INVALID          0x0001
+/*  FE_FLUSHTOZERO
+    An ARM-specific flag that is raised when a denormal is flushed to zero.
+    This is also called the "input denormal exception"                        */
+#define FE_FLUSHTOZERO      0x0080 
+#define FE_ALL_EXCEPT       0x009f
+    
+#define FE_TONEAREST        0x00000000
+#define FE_UPWARD           0x00400000
+#define FE_DOWNWARD         0x00800000
+#define FE_TOWARDZERO       0x00C00000
+    
+/*  Masks for values that may be controlled in the FPCR.  Modifying any other
+    bits invokes undefined behavior.                                          */
+enum {
+    __fpcr_trap_invalid   = 0x00000100,
+    __fpcr_trap_divbyzero = 0x00000200,
+    __fpcr_trap_overflow  = 0x00000400,
+    __fpcr_trap_underflow = 0x00000800,
+    __fpcr_trap_inexact   = 0x00001000,
+    __fpcr_trap_denormal  = 0x00008000,
+    __fpcr_flush_to_zero  = 0x01000000,
+};
+
+/*  Mask for the QC bit of the FPSR                                           */
+enum { __fpsr_saturation  = 0x08000000 };
+    
+extern const fenv_t _FE_DFL_ENV;
+#define FE_DFL_ENV &_FE_DFL_ENV
+
+/*  FE_DFL_DISABLE_DENORMS_ENV
+ 
+    A pointer to a fenv_t object with the default floating-point state modified
+    to set the FZ (flush to zero) bit in the FPCR.  When using this environment
+    denormals encountered by floating-point calculations will be treated as
+    zero.  Denormal results of floating-point operations will also be treated
+    as zero.  This calculation mode is not IEEE-754 compliant, but it may
+    prevent lengthy stalls that occur in code that encounters denormals.  It is
+    suggested that you do not use this mode unless you have established that
+    denormals are the source of measurable performance problems.
+ 
+    Note that the math library, and other system libraries, are not guaranteed
+    to do the right thing if called in this mode.  Edge cases may be incorrect.
+    Use at your own risk.                                                     */
+extern const fenv_t _FE_DFL_DISABLE_DENORMS_ENV;
+#define FE_DFL_DISABLE_DENORMS_ENV &_FE_DFL_DISABLE_DENORMS_ENV
+    
+/******************************************************************************
+ *  x86 definitions of architecture-specific types and macros.                *
+ ******************************************************************************/
+    
+#elif defined __i386__ || defined __x86_64__
+
+typedef struct {
+    unsigned short          __control;      /* x87 control word               */
+    unsigned short          __status;       /* x87 status word                */
+    unsigned int            __mxcsr;        /* SSE status/control register    */
+    char                    __reserved[8];  /* Reserved for future expansion  */   
+} fenv_t;
+
+typedef unsigned short fexcept_t;
+    
+#define FE_INEXACT          0x0020
+#define FE_UNDERFLOW        0x0010
+#define FE_OVERFLOW         0x0008
+#define FE_DIVBYZERO        0x0004
+#define FE_INVALID          0x0001
+/*  FE_DENORMALOPERAND
+    An Intel-specific flag that is raised when an operand to a floating-point
+    arithmetic operation is denormal, or a single- or double-precision denormal
+    value is loaded on the x87 stack.  This flag is not raised by SSE
+    arithmetic when the DAZ control bit is set.                               */
+#define FE_DENORMALOPERAND  0x0002
+#define FE_ALL_EXCEPT       0x003f
+
+#define FE_TONEAREST        0x0000
+#define FE_DOWNWARD         0x0400
+#define FE_UPWARD           0x0800
+#define FE_TOWARDZERO       0x0c00
+
+extern const fenv_t _FE_DFL_ENV;
+#define FE_DFL_ENV &_FE_DFL_ENV
+
+/*  FE_DFL_DISABLE_SSE_DENORMS_ENV
+ 
+    A pointer to a fenv_t object with the default floating-point state modifed
+    to set the DAZ and FZ bits in the SSE status/control register.  When using
+    this environment, denormals encountered by SSE based calculation (which
+    normally should be all single and double precision scalar floating point
+    calculations, and all SSE/SSE2/SSE3 computation) will be treated as zero.
+    Calculation results that are denormals will also be truncated to zero.
+    This calculation mode is not IEEE-754 compliant, but may prevent lengthy
+    stalls that occur in code that encounters denormals. It is suggested that
+    you do not use this mode unless you have established that denormals are
+    causing trouble for your code. Please use wisely.
+    
+    CAUTION: The math library currently is not architected to do the right
+    thing in the face of DAZ + FZ mode.  For example, ceil( +denormal) might
+    return +denormal rather than 1.0 in some versions of MacOS X. In some
+    circumstances this may lead to unexpected application behavior. Use at
+    your own risk.
+ 
+    It is not possible to disable denormal stalls for calculations performed
+    on the x87 FPU                                                            */
+extern const fenv_t _FE_DFL_DISABLE_SSE_DENORMS_ENV;
+#define FE_DFL_DISABLE_SSE_DENORMS_ENV  &_FE_DFL_DISABLE_SSE_DENORMS_ENV
+
+/******************************************************************************
+ *  Totally generic definitions and macros if we don't know anything about    *
+ *  the target platform, or if the platform does not have hardware floating-  *
+ *  point support.                                                            *
+ ******************************************************************************/
+    
+#else /* Unknown architectures */
+
+typedef int fenv_t;
+typedef unsigned short fexcept_t;
+#define FE_ALL_EXCEPT       0
+#define FE_TONEAREST        0
+extern const fenv_t _FE_DFL_ENV;
+#define FE_DFL_ENV &_FE_DFL_ENV
+
+#endif
+
+/******************************************************************************
+ *  The following functions provide high level access to the exception flags. *  
+ *  The "int" input argument can be constructed by bitwise ORs of the         *
+ *  exception macros: for example: FE_OVERFLOW | FE_INEXACT.                  *
+ *                                                                            *
+ *  The function "feclearexcept" clears the supported floating point          *
+ *  exceptions represented by its argument.                                   *
+ *                                                                            *
+ *  The function "fegetexceptflag" stores a implementation-defined            *
+ *  representation of the states of the floating-point status flags indicated *
+ *  by its integer argument excepts in the object pointed to by the argument, * 
+ *  flagp.                                                                    *
+ *                                                                            *
+ *  The function "feraiseexcept" raises the supported floating-point          *
+ *  exceptions represented by its argument. The order in which these          *
+ *  floating-point exceptions are raised is unspecified.                      *
+ *                                                                            *
+ *  The function "fesetexceptflag" sets or clears the floating point status   *
+ *  flags indicated by the argument excepts to the states stored in the       *
+ *  object pointed to by flagp. The value of the *flagp shall have been set   *
+ *  by a previous call to fegetexceptflag whose second argument represented   *
+ *  at least those floating-point exceptions represented by the argument      *
+ *  excepts. This function does not raise floating-point exceptions; it just  *
+ *  sets the state of the flags.                                              *
+ *                                                                            *
+ *  The function "fetestexcept" determines which of the specified subset of   *
+ *  the floating-point exception flags are currently set.  The excepts        *
+ *  argument specifies the floating-point status flags to be queried. This    *
+ *  function returns the value of the bitwise OR of the floating-point        *
+ *  exception macros corresponding to the currently set floating-point        *
+ *  exceptions included in excepts.                                           *
+ ******************************************************************************/
+
+extern int feclearexcept(int /* excepts */);
+extern int fegetexceptflag(fexcept_t * /* flagp */, int /* excepts */);
+extern int feraiseexcept(int /* excepts */);
+extern int fesetexceptflag(const fexcept_t * /* flagp */, int /* excepts */);
+extern int fetestexcept(int /* excepts */);
+
+/******************************************************************************
+ *  The following functions provide control of rounding direction modes.      *
+ *                                                                            *
+ *  The function "fegetround" returns the value of the rounding direction     *
+ *  macro which represents the current rounding direction, or a negative      *
+ *  if there is no such rounding direction macro or the current rounding      *
+ *  direction is not determinable.                                            *
+ *                                                                            *
+ *  The function "fesetround" establishes the rounding direction represented  *
+ *  by its argument "round". If the argument is not equal to the value of a   *
+ *  rounding direction macro, the rounding direction is not changed.  It      *
+ *  returns zero if and only if the argument is equal to a rounding           *
+ *  direction macro.                                                          *
+ ******************************************************************************/
+    
+extern int fegetround(void);
+extern int fesetround(int /* round */);
+
+/******************************************************************************
+ *  The following functions manage the floating-point environment, exception  *
+ *  flags and dynamic modes, as one entity.                                   *
+ *                                                                            *
+ *  The fegetenv function stores the current floating-point enviornment in    *
+ *  the object pointed to by envp.                                            *
+ *                                                                            *
+ *  The feholdexcept function saves the current floating-point environment in *
+ *  the object pointed to by envp, clears the floating-point status flags,    *
+ *  and then installs a non-stop (continue on floating-point exceptions)      *
+ *  mode, if available, for all floating-point exceptions. The feholdexcept   *
+ *  function returns zero if and only if non-stop floating-point exceptions   *
+ *  handling was successfully installed.                                      *
+ *                                                                            *
+ *  The fesetnv function establishes the floating-point environment           *
+ *  represented by the object pointed to by envp. The argument envp shall     *
+ *  point to an object set by a call to fegetenv or feholdexcept, or equal to *
+ *  a floating-point environment macro to be C99 standard compliant and       *
+ *  portable to other architectures. Note that fesetnv merely installs the    *
+ *  state of the floating-point status flags represented through its          *
+ *  argument, and does not raise these floating-point exceptions.             *
+ *                                                                            *
+ *  The feupdateenv function saves the currently raised floating-point        *
+ *  exceptions in its automatic storage, installs the floating-point          *
+ *  environment represented by the object pointed to by envp, and then raises *
+ *  the saved floating-point exceptions. The argument envp shall point to an  *
+ *  object set by a call to feholdexcept or fegetenv or equal a               *
+ *  floating-point environment macro.                                         *
+ ******************************************************************************/
+    
+extern int fegetenv(fenv_t * /* envp */);
+extern int feholdexcept(fenv_t * /* envp */);
+extern int fesetenv(const fenv_t * /* envp */);
+extern int feupdateenv(const fenv_t * /* envp */);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FENV_H__ */
+
lib/libc/include/x86_64-macos-gnu/float.h
@@ -0,0 +1,140 @@
+/* Copyright (c) 2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef __FLOAT_H
+#define __FLOAT_H
+
+/* Undefine anything that we'll be redefining below. */
+#undef FLT_EVAL_METHOD
+#undef FLT_ROUNDS
+#undef FLT_RADIX
+#undef FLT_MANT_DIG
+#undef DBL_MANT_DIG
+#undef LDBL_MANT_DIG
+#undef FLT_DIG
+#undef DBL_DIG
+#undef LDBL_DIG
+#undef FLT_MIN_EXP
+#undef DBL_MIN_EXP
+#undef LDBL_MIN_EXP
+#undef FLT_MIN_10_EXP
+#undef DBL_MIN_10_EXP
+#undef LDBL_MIN_10_EXP
+#undef FLT_MAX_EXP
+#undef DBL_MAX_EXP
+#undef LDBL_MAX_EXP
+#undef FLT_MAX_10_EXP
+#undef DBL_MAX_10_EXP
+#undef LDBL_MAX_10_EXP
+#undef FLT_MAX
+#undef DBL_MAX
+#undef LDBL_MAX
+#undef FLT_EPSILON
+#undef DBL_EPSILON
+#undef LDBL_EPSILON
+#undef FLT_MIN
+#undef DBL_MIN
+#undef LDBL_MIN
+
+#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
+#  undef DECIMAL_DIG
+#endif
+
+#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
+#  undef FLT_HAS_SUBNORM
+#  undef DBL_HAS_SUBNORM
+#  undef LDBL_HAS_SUBNORM
+#  undef FLT_TRUE_MIN
+#  undef DBL_TRUE_MIN
+#  undef LDBL_TRUE_MIN
+#  undef FLT_DECIMAL_DIG
+#  undef DBL_DECIMAL_DIG
+#  undef LDBL_DECIMAL_DIG
+#endif
+
+/* Characteristics of floating point types, C99 5.2.4.2.2 */
+
+#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
+#define FLT_ROUNDS (__builtin_flt_rounds())
+#define FLT_RADIX __FLT_RADIX__
+
+#define FLT_MANT_DIG __FLT_MANT_DIG__
+#define DBL_MANT_DIG __DBL_MANT_DIG__
+#define LDBL_MANT_DIG __LDBL_MANT_DIG__
+
+#define FLT_DIG __FLT_DIG__
+#define DBL_DIG __DBL_DIG__
+#define LDBL_DIG __LDBL_DIG__
+
+#define FLT_MIN_EXP __FLT_MIN_EXP__
+#define DBL_MIN_EXP __DBL_MIN_EXP__
+#define LDBL_MIN_EXP __LDBL_MIN_EXP__
+
+#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
+#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
+#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
+
+#define FLT_MAX_EXP __FLT_MAX_EXP__
+#define DBL_MAX_EXP __DBL_MAX_EXP__
+#define LDBL_MAX_EXP __LDBL_MAX_EXP__
+
+#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
+#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
+#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
+
+#define FLT_MAX __FLT_MAX__
+#define DBL_MAX __DBL_MAX__
+#define LDBL_MAX __LDBL_MAX__
+
+#define FLT_EPSILON __FLT_EPSILON__
+#define DBL_EPSILON __DBL_EPSILON__
+#define LDBL_EPSILON __LDBL_EPSILON__
+
+#define FLT_MIN __FLT_MIN__
+#define DBL_MIN __DBL_MIN__
+#define LDBL_MIN __LDBL_MIN__
+
+#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
+#  define DECIMAL_DIG __DECIMAL_DIG__
+#endif
+
+#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
+#  if defined __arm__ /*  On 32-bit arm, denorms are not supported.           */
+#    define FLT_HAS_SUBNORM 0
+#    define DBL_HAS_SUBNORM 0
+#    define LDBL_HAS_SUBNORM 0
+#    define FLT_TRUE_MIN __FLT_MIN__
+#    define DBL_TRUE_MIN __DBL_MIN__
+#    define LDBL_TRUE_MIN __LDBL_MIN__
+#  else /* All Apple platforms except 32-bit arm have denorms.                */
+#    define FLT_HAS_SUBNORM 1
+#    define DBL_HAS_SUBNORM 1
+#    define LDBL_HAS_SUBNORM 1
+#    define FLT_TRUE_MIN __FLT_DENORM_MIN__
+#    define DBL_TRUE_MIN __DBL_DENORM_MIN__
+#    define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
+#  endif
+#  define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
+#  define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
+#  define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
+#endif
+
+#endif /* __FLOAT_H */
lib/libc/include/x86_64-macos-gnu/inttypes.h
@@ -0,0 +1,297 @@
+/*
+ * Copyright (c) 2000-2004, 2013 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+/*
+ * <inttypes.h> -- Standard C header, defined in ISO/IEC 9899:1999
+ * (aka "C99"), section 7.8.   This defines format string conversion
+ * specifiers suitable for use within arguments to fprintf and fscanf
+ * and their ilk.
+ */
+
+#if !defined(_INTTYPES_H_)
+#define _INTTYPES_H_
+
+#  define __PRI_8_LENGTH_MODIFIER__ "hh"
+#  define __PRI_64_LENGTH_MODIFIER__ "ll"
+#  define __SCN_64_LENGTH_MODIFIER__ "ll"
+#  define __PRI_MAX_LENGTH_MODIFIER__ "j"
+#  define __SCN_MAX_LENGTH_MODIFIER__ "j"
+
+#  define PRId8         __PRI_8_LENGTH_MODIFIER__ "d"
+#  define PRIi8         __PRI_8_LENGTH_MODIFIER__ "i"
+#  define PRIo8         __PRI_8_LENGTH_MODIFIER__ "o"
+#  define PRIu8         __PRI_8_LENGTH_MODIFIER__ "u"
+#  define PRIx8         __PRI_8_LENGTH_MODIFIER__ "x"
+#  define PRIX8         __PRI_8_LENGTH_MODIFIER__ "X"
+
+#  define PRId16        "hd"
+#  define PRIi16        "hi"
+#  define PRIo16        "ho"
+#  define PRIu16        "hu"
+#  define PRIx16        "hx"
+#  define PRIX16        "hX"
+
+#  define PRId32        "d"
+#  define PRIi32        "i"
+#  define PRIo32        "o"
+#  define PRIu32        "u"
+#  define PRIx32        "x"
+#  define PRIX32        "X"
+
+#  define PRId64        __PRI_64_LENGTH_MODIFIER__ "d"
+#  define PRIi64        __PRI_64_LENGTH_MODIFIER__ "i"
+#  define PRIo64        __PRI_64_LENGTH_MODIFIER__ "o"
+#  define PRIu64        __PRI_64_LENGTH_MODIFIER__ "u"
+#  define PRIx64        __PRI_64_LENGTH_MODIFIER__ "x"
+#  define PRIX64        __PRI_64_LENGTH_MODIFIER__ "X"
+
+#  define PRIdLEAST8    PRId8
+#  define PRIiLEAST8    PRIi8
+#  define PRIoLEAST8    PRIo8
+#  define PRIuLEAST8    PRIu8
+#  define PRIxLEAST8    PRIx8
+#  define PRIXLEAST8    PRIX8
+
+#  define PRIdLEAST16   PRId16
+#  define PRIiLEAST16   PRIi16
+#  define PRIoLEAST16   PRIo16
+#  define PRIuLEAST16   PRIu16
+#  define PRIxLEAST16   PRIx16
+#  define PRIXLEAST16   PRIX16
+
+#  define PRIdLEAST32   PRId32
+#  define PRIiLEAST32   PRIi32
+#  define PRIoLEAST32   PRIo32
+#  define PRIuLEAST32   PRIu32
+#  define PRIxLEAST32   PRIx32
+#  define PRIXLEAST32   PRIX32
+
+#  define PRIdLEAST64   PRId64
+#  define PRIiLEAST64   PRIi64
+#  define PRIoLEAST64   PRIo64
+#  define PRIuLEAST64   PRIu64
+#  define PRIxLEAST64   PRIx64
+#  define PRIXLEAST64   PRIX64
+
+#  define PRIdFAST8     PRId8
+#  define PRIiFAST8     PRIi8
+#  define PRIoFAST8     PRIo8
+#  define PRIuFAST8     PRIu8
+#  define PRIxFAST8     PRIx8
+#  define PRIXFAST8     PRIX8
+
+#  define PRIdFAST16    PRId16
+#  define PRIiFAST16    PRIi16
+#  define PRIoFAST16    PRIo16
+#  define PRIuFAST16    PRIu16
+#  define PRIxFAST16    PRIx16
+#  define PRIXFAST16    PRIX16
+
+#  define PRIdFAST32    PRId32
+#  define PRIiFAST32    PRIi32
+#  define PRIoFAST32    PRIo32
+#  define PRIuFAST32    PRIu32
+#  define PRIxFAST32    PRIx32
+#  define PRIXFAST32    PRIX32
+
+#  define PRIdFAST64    PRId64
+#  define PRIiFAST64    PRIi64
+#  define PRIoFAST64    PRIo64
+#  define PRIuFAST64    PRIu64
+#  define PRIxFAST64    PRIx64
+#  define PRIXFAST64    PRIX64
+
+/* int32_t is 'int', but intptr_t is 'long'.  */
+#  define PRIdPTR       "ld"
+#  define PRIiPTR       "li"
+#  define PRIoPTR       "lo"
+#  define PRIuPTR       "lu"
+#  define PRIxPTR       "lx"
+#  define PRIXPTR       "lX"
+
+#  define PRIdMAX        __PRI_MAX_LENGTH_MODIFIER__ "d"
+#  define PRIiMAX        __PRI_MAX_LENGTH_MODIFIER__ "i"
+#  define PRIoMAX        __PRI_MAX_LENGTH_MODIFIER__ "o"
+#  define PRIuMAX        __PRI_MAX_LENGTH_MODIFIER__ "u"
+#  define PRIxMAX        __PRI_MAX_LENGTH_MODIFIER__ "x"
+#  define PRIXMAX        __PRI_MAX_LENGTH_MODIFIER__ "X"
+
+#  define SCNd8         __PRI_8_LENGTH_MODIFIER__ "d"
+#  define SCNi8         __PRI_8_LENGTH_MODIFIER__ "i"
+#  define SCNo8         __PRI_8_LENGTH_MODIFIER__ "o"
+#  define SCNu8         __PRI_8_LENGTH_MODIFIER__ "u"
+#  define SCNx8         __PRI_8_LENGTH_MODIFIER__ "x"
+
+#  define SCNd16        "hd"
+#  define SCNi16        "hi"
+#  define SCNo16        "ho"
+#  define SCNu16        "hu"
+#  define SCNx16        "hx"
+
+#  define SCNd32        "d"
+#  define SCNi32        "i"
+#  define SCNo32        "o"
+#  define SCNu32        "u"
+#  define SCNx32        "x"
+
+#  define SCNd64        __SCN_64_LENGTH_MODIFIER__ "d"
+#  define SCNi64        __SCN_64_LENGTH_MODIFIER__ "i"
+#  define SCNo64        __SCN_64_LENGTH_MODIFIER__ "o"
+#  define SCNu64        __SCN_64_LENGTH_MODIFIER__ "u"
+#  define SCNx64        __SCN_64_LENGTH_MODIFIER__ "x"
+
+#  define SCNdLEAST8    SCNd8
+#  define SCNiLEAST8    SCNi8
+#  define SCNoLEAST8    SCNo8
+#  define SCNuLEAST8    SCNu8
+#  define SCNxLEAST8    SCNx8
+
+#  define SCNdLEAST16   SCNd16
+#  define SCNiLEAST16   SCNi16
+#  define SCNoLEAST16   SCNo16
+#  define SCNuLEAST16   SCNu16
+#  define SCNxLEAST16   SCNx16
+
+#  define SCNdLEAST32   SCNd32
+#  define SCNiLEAST32   SCNi32
+#  define SCNoLEAST32   SCNo32
+#  define SCNuLEAST32   SCNu32
+#  define SCNxLEAST32   SCNx32
+
+#  define SCNdLEAST64   SCNd64
+#  define SCNiLEAST64   SCNi64
+#  define SCNoLEAST64   SCNo64
+#  define SCNuLEAST64   SCNu64
+#  define SCNxLEAST64   SCNx64
+
+#  define SCNdFAST8     SCNd8
+#  define SCNiFAST8     SCNi8
+#  define SCNoFAST8     SCNo8
+#  define SCNuFAST8     SCNu8
+#  define SCNxFAST8     SCNx8
+
+#  define SCNdFAST16    SCNd16
+#  define SCNiFAST16    SCNi16
+#  define SCNoFAST16    SCNo16
+#  define SCNuFAST16    SCNu16
+#  define SCNxFAST16    SCNx16
+
+#  define SCNdFAST32    SCNd32
+#  define SCNiFAST32    SCNi32
+#  define SCNoFAST32    SCNo32
+#  define SCNuFAST32    SCNu32
+#  define SCNxFAST32    SCNx32
+
+#  define SCNdFAST64    SCNd64
+#  define SCNiFAST64    SCNi64
+#  define SCNoFAST64    SCNo64
+#  define SCNuFAST64    SCNu64
+#  define SCNxFAST64    SCNx64
+
+#  define SCNdPTR       "ld"
+#  define SCNiPTR       "li"
+#  define SCNoPTR       "lo"
+#  define SCNuPTR       "lu"
+#  define SCNxPTR       "lx"
+
+#  define SCNdMAX       __SCN_MAX_LENGTH_MODIFIER__ "d"
+#  define SCNiMAX       __SCN_MAX_LENGTH_MODIFIER__ "i"
+#  define SCNoMAX       __SCN_MAX_LENGTH_MODIFIER__ "o"
+#  define SCNuMAX       __SCN_MAX_LENGTH_MODIFIER__ "u"
+#  define SCNxMAX       __SCN_MAX_LENGTH_MODIFIER__ "x"
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#include <_types.h>
+#include <sys/_types/_wchar_t.h>
+
+#include <stdint.h>
+
+__BEGIN_DECLS
+
+/* 7.8.2.1 */
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern intmax_t
+imaxabs(intmax_t j);
+
+/* 7.8.2.2 */
+typedef struct {
+	intmax_t quot;
+	intmax_t rem;
+} imaxdiv_t;
+
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern imaxdiv_t
+imaxdiv(intmax_t __numer, intmax_t __denom);
+
+/* 7.8.2.3 */
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern intmax_t
+strtoimax(const char * __restrict __nptr,
+	  char ** __restrict __endptr,
+	  int __base);
+
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern uintmax_t
+strtoumax(const char * __restrict __nptr,
+	  char ** __restrict __endptr,
+	  int __base);
+
+/* 7.8.2.4 */
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern intmax_t
+wcstoimax(const wchar_t * __restrict __nptr,
+	  wchar_t ** __restrict __endptr,
+	  int __base);
+
+__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
+extern uintmax_t
+wcstoumax(const wchar_t * __restrict __nptr,
+	  wchar_t ** __restrict __endptr,
+	  int __base);
+
+/* Poison the following routines if -fshort-wchar is set */
+#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
+#pragma GCC poison wcstoimax wcstoumax
+#endif
+
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_inttypes.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+/*
+   No need to #undef the __*_{8,64}_LENGTH_MODIFIER__ macros;
+   in fact, you can't #undef them, because later uses of any of
+   their dependents will *not* then do the intended substitution.
+   Expansion of a #define like this one:
+
+        #define x IDENT y
+
+   uses the cpp value of IDENT at the location where x is *expanded*,
+   not where it is #defined.
+*/
+
+#endif /* !_INTTYPES_H_ */
lib/libc/include/x86_64-macos-gnu/limits.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2000, 2004-2007, 2009 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*	$NetBSD: limits.h,v 1.8 1996/10/21 05:10:50 jtc Exp $	*/
+
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)limits.h	8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _LIMITS_H_
+#define	_LIMITS_H_
+
+#include <sys/cdefs.h>
+#include <machine/limits.h>
+#include <sys/syslimits.h>
+
+#if __DARWIN_C_LEVEL > __DARWIN_C_ANSI
+#define	_POSIX_ARG_MAX		4096
+#define	_POSIX_CHILD_MAX	25
+#define	_POSIX_LINK_MAX		8
+#define	_POSIX_MAX_CANON	255
+#define	_POSIX_MAX_INPUT	255
+#define	_POSIX_NAME_MAX		14
+#define	_POSIX_NGROUPS_MAX	8
+#define	_POSIX_OPEN_MAX		20
+#define	_POSIX_PATH_MAX		256
+#define	_POSIX_PIPE_BUF		512
+#define	_POSIX_SSIZE_MAX	32767
+#define	_POSIX_STREAM_MAX	8
+#define	_POSIX_TZNAME_MAX	6
+
+#define	_POSIX2_BC_BASE_MAX		99
+#define	_POSIX2_BC_DIM_MAX		2048
+#define	_POSIX2_BC_SCALE_MAX		99
+#define	_POSIX2_BC_STRING_MAX		1000
+#define	_POSIX2_EQUIV_CLASS_MAX		2
+#define	_POSIX2_EXPR_NEST_MAX		32
+#define	_POSIX2_LINE_MAX		2048
+#define	_POSIX2_RE_DUP_MAX		255
+#endif /* __DARWIN_C_LEVEL > __DARWIN_C_ANSI */
+
+#if __DARWIN_C_LEVEL >= 199309L
+#define _POSIX_AIO_LISTIO_MAX   2
+#define _POSIX_AIO_MAX          1
+#define _POSIX_DELAYTIMER_MAX   32
+#define _POSIX_MQ_OPEN_MAX      8
+#define _POSIX_MQ_PRIO_MAX	32
+#define _POSIX_RTSIG_MAX 			8
+#define _POSIX_SEM_NSEMS_MAX 			256
+#define _POSIX_SEM_VALUE_MAX 			32767
+#define _POSIX_SIGQUEUE_MAX 			32
+#define _POSIX_TIMER_MAX 			32
+
+#define _POSIX_CLOCKRES_MIN 20000000
+#endif /* __DARWIN_C_LEVEL >= 199309L */
+
+#if __DARWIN_C_LEVEL >= 199506L
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 	4
+#define _POSIX_THREAD_KEYS_MAX 			128
+#define _POSIX_THREAD_THREADS_MAX 		64
+
+#define PTHREAD_DESTRUCTOR_ITERATIONS 	4
+#define PTHREAD_KEYS_MAX 		512
+#if defined(__arm__) || defined(__arm64__)
+#define PTHREAD_STACK_MIN 		16384
+#else
+#define PTHREAD_STACK_MIN 		8192
+#endif
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+#if __DARWIN_C_LEVEL >= 200112
+#define _POSIX_HOST_NAME_MAX    255
+#define _POSIX_LOGIN_NAME_MAX   9
+#define _POSIX_SS_REPL_MAX 			4
+#define _POSIX_SYMLINK_MAX 			255
+#define _POSIX_SYMLOOP_MAX 			8
+#define _POSIX_TRACE_EVENT_NAME_MAX 		30
+#define _POSIX_TRACE_NAME_MAX 			8
+#define _POSIX_TRACE_SYS_MAX 			8
+#define _POSIX_TRACE_USER_EVENT_MAX 		32
+#define _POSIX_TTY_NAME_MAX 			9
+#define _POSIX2_CHARCLASS_NAME_MAX	14
+#define	_POSIX2_COLL_WEIGHTS_MAX	2
+
+#define _POSIX_RE_DUP_MAX 		_POSIX2_RE_DUP_MAX
+#endif /* __DARWIN_C_LEVEL >= 200112 */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define OFF_MIN		LLONG_MIN	/* min value for an off_t */
+#define OFF_MAX		LLONG_MAX	/* max value for an off_t */
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+/* Actually for XSI Visible */
+#if __DARWIN_C_LEVEL > __DARWIN_C_ANSI
+
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+#define PASS_MAX	128
+#endif
+
+#define NL_ARGMAX	9
+#define NL_LANGMAX	14
+#define NL_MSGMAX	32767
+#define NL_NMAX		1
+#define NL_SETMAX	255
+#define NL_TEXTMAX	2048
+
+#define _XOPEN_IOV_MAX	16
+#define IOV_MAX		1024
+#define _XOPEN_NAME_MAX 255
+#define _XOPEN_PATH_MAX 1024
+
+#endif /* __DARWIN_C_LEVEL > __DARWIN_C_ANSI */
+
+/* NZERO to be defined here. TBD. See also sys/param.h  */
+
+#endif /* !_LIMITS_H_ */
lib/libc/include/x86_64-macos-gnu/locale.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)locale.h	8.1 (Berkeley) 6/2/93
+ * $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
+ */
+
+#ifndef _LOCALE_H_
+#define _LOCALE_H_
+
+#include <_locale.h>
+
+#define	LC_ALL		0
+#define	LC_COLLATE	1
+#define	LC_CTYPE	2
+#define	LC_MONETARY	3
+#define	LC_NUMERIC	4
+#define	LC_TIME		5
+#define	LC_MESSAGES	6
+
+#define	_LC_LAST	7		/* marks end */
+
+__BEGIN_DECLS
+char		*setlocale(int, const char *);
+__END_DECLS
+
+#endif /* _LOCALE_H_ */
lib/libc/include/x86_64-macos-gnu/math.h
@@ -0,0 +1,771 @@
+/*
+ * Copyright (c) 2002-2017 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef __MATH_H__
+#define __MATH_H__
+
+#ifndef __MATH__
+#define __MATH__
+#endif
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+__BEGIN_DECLS
+
+/******************************************************************************
+ * Floating point data types                                                  *
+ ******************************************************************************/
+
+/*  Define float_t and double_t per C standard, ISO/IEC 9899:2011 7.12 2,
+    taking advantage of GCC's __FLT_EVAL_METHOD__ (which a compiler may
+    define anytime and GCC does) that shadows FLT_EVAL_METHOD (which a
+    compiler must define only in float.h).                                    */
+#if __FLT_EVAL_METHOD__ == 0
+    typedef float float_t;
+    typedef double double_t;
+#elif __FLT_EVAL_METHOD__ == 1
+    typedef double float_t;
+    typedef double double_t;
+#elif __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ == -1
+    typedef long double float_t;
+    typedef long double double_t;
+#else /* __FLT_EVAL_METHOD__ */
+#   error "Unsupported value of __FLT_EVAL_METHOD__."
+#endif /* __FLT_EVAL_METHOD__ */
+
+#if defined(__GNUC__)
+#   define    HUGE_VAL     __builtin_huge_val()
+#   define    HUGE_VALF    __builtin_huge_valf()
+#   define    HUGE_VALL    __builtin_huge_vall()
+#   define    NAN          __builtin_nanf("0x7fc00000")
+#else
+#   define    HUGE_VAL     1e500
+#   define    HUGE_VALF    1e50f
+#   define    HUGE_VALL    1e5000L
+#   define    NAN          __nan()
+#endif
+
+#define INFINITY    HUGE_VALF
+
+/******************************************************************************
+ *      Taxonomy of floating point data types                                 *
+ ******************************************************************************/
+
+#define FP_NAN          1
+#define FP_INFINITE     2
+#define FP_ZERO         3
+#define FP_NORMAL       4
+#define FP_SUBNORMAL    5
+#define FP_SUPERNORMAL  6 /* legacy PowerPC support; this is otherwise unused */
+
+#if defined __arm64__ || defined __ARM_VFPV4__
+/*  On these architectures, fma(), fmaf( ), and fmal( ) are generally about as
+    fast as (or faster than) separate multiply and add of the same operands.  */
+#   define FP_FAST_FMA     1
+#   define FP_FAST_FMAF    1
+#   define FP_FAST_FMAL    1
+#elif (defined __i386__ || defined __x86_64__) && (defined __FMA__ || defined __AVX512F__)
+/*  When targeting the FMA ISA extension, fma() and fmaf( ) are generally
+    about as fast as (or faster than) separate multiply and add of the same
+    operands, but fmal( ) may be more costly.                                 */
+#   define FP_FAST_FMA     1
+#   define FP_FAST_FMAF    1
+#   undef  FP_FAST_FMAL
+#else
+/*  On these architectures, fma( ), fmaf( ), and fmal( ) function calls are
+    significantly more costly than separate multiply and add operations.      */
+#   undef  FP_FAST_FMA
+#   undef  FP_FAST_FMAF
+#   undef  FP_FAST_FMAL
+#endif
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+#define FP_ILOGB0      (-2147483647 - 1)
+#define FP_ILOGBNAN    (-2147483647 - 1)
+
+/* Bitmasks for the math_errhandling macro.  */
+#define MATH_ERRNO        1    /* errno set by math functions.  */
+#define MATH_ERREXCEPT    2    /* Exceptions raised by math functions.  */
+
+#define math_errhandling (__math_errhandling())
+extern int __math_errhandling(void);
+
+/******************************************************************************
+ *                                                                            *
+ *                              Inquiry macros                                *
+ *                                                                            *
+ *  fpclassify      Returns one of the FP_* values.                           *
+ *  isnormal        Non-zero if and only if the argument x is normalized.     *
+ *  isfinite        Non-zero if and only if the argument x is finite.         *
+ *  isnan           Non-zero if and only if the argument x is a NaN.          *
+ *  signbit         Non-zero if and only if the sign of the argument x is     *
+ *                  negative.  This includes, NaNs, infinities and zeros.     *
+ *                                                                            *
+ ******************************************************************************/
+
+#define fpclassify(x)                                                    \
+    ( sizeof(x) == sizeof(float)  ? __fpclassifyf((float)(x))            \
+    : sizeof(x) == sizeof(double) ? __fpclassifyd((double)(x))           \
+                                  : __fpclassifyl((long double)(x)))
+
+extern int __fpclassifyf(float);
+extern int __fpclassifyd(double);
+extern int __fpclassifyl(long double);
+
+#if (defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__)
+/*  These inline functions may fail to return expected results if unsafe
+    math optimizations like those enabled by -ffast-math are turned on.
+    Thus, (somewhat surprisingly) you only get the fast inline
+    implementations if such compiler options are NOT enabled.  This is
+    because the inline functions require the compiler to be adhering to
+    the standard in order to work properly; -ffast-math, among other
+    things, implies that NaNs don't happen, which allows the compiler to
+    optimize away checks like x != x, which might lead to things like
+    isnan(NaN) returning false.                                               
+ 
+    Thus, if you compile with -ffast-math, actual function calls are
+    generated for these utilities.                                            */
+    
+#define isnormal(x)                                                      \
+    ( sizeof(x) == sizeof(float)  ? __inline_isnormalf((float)(x))       \
+    : sizeof(x) == sizeof(double) ? __inline_isnormald((double)(x))      \
+                                  : __inline_isnormall((long double)(x)))
+
+#define isfinite(x)                                                      \
+    ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
+    : sizeof(x) == sizeof(double) ? __inline_isfinited((double)(x))      \
+                                  : __inline_isfinitel((long double)(x)))
+
+#define isinf(x)                                                         \
+    ( sizeof(x) == sizeof(float)  ? __inline_isinff((float)(x))          \
+    : sizeof(x) == sizeof(double) ? __inline_isinfd((double)(x))         \
+                                  : __inline_isinfl((long double)(x)))
+
+#define isnan(x)                                                         \
+    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
+    : sizeof(x) == sizeof(double) ? __inline_isnand((double)(x))         \
+                                  : __inline_isnanl((long double)(x)))
+
+#define signbit(x)                                                       \
+    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
+    : sizeof(x) == sizeof(double) ? __inline_signbitd((double)(x))       \
+                                  : __inline_signbitl((long double)(x)))
+
+__header_always_inline int __inline_isfinitef(float);
+__header_always_inline int __inline_isfinited(double);
+__header_always_inline int __inline_isfinitel(long double);
+__header_always_inline int __inline_isinff(float);
+__header_always_inline int __inline_isinfd(double);
+__header_always_inline int __inline_isinfl(long double);
+__header_always_inline int __inline_isnanf(float);
+__header_always_inline int __inline_isnand(double);
+__header_always_inline int __inline_isnanl(long double);
+__header_always_inline int __inline_isnormalf(float);
+__header_always_inline int __inline_isnormald(double);
+__header_always_inline int __inline_isnormall(long double);
+__header_always_inline int __inline_signbitf(float);
+__header_always_inline int __inline_signbitd(double);
+__header_always_inline int __inline_signbitl(long double);
+    
+__header_always_inline int __inline_isfinitef(float __x) {
+    return __x == __x && __builtin_fabsf(__x) != __builtin_inff();
+}
+__header_always_inline int __inline_isfinited(double __x) {
+    return __x == __x && __builtin_fabs(__x) != __builtin_inf();
+}
+__header_always_inline int __inline_isfinitel(long double __x) {
+    return __x == __x && __builtin_fabsl(__x) != __builtin_infl();
+}
+__header_always_inline int __inline_isinff(float __x) {
+    return __builtin_fabsf(__x) == __builtin_inff();
+}
+__header_always_inline int __inline_isinfd(double __x) {
+    return __builtin_fabs(__x) == __builtin_inf();
+}
+__header_always_inline int __inline_isinfl(long double __x) {
+    return __builtin_fabsl(__x) == __builtin_infl();
+}
+__header_always_inline int __inline_isnanf(float __x) {
+    return __x != __x;
+}
+__header_always_inline int __inline_isnand(double __x) {
+    return __x != __x;
+}
+__header_always_inline int __inline_isnanl(long double __x) {
+    return __x != __x;
+}
+__header_always_inline int __inline_signbitf(float __x) {
+    union { float __f; unsigned int __u; } __u;
+    __u.__f = __x;
+    return (int)(__u.__u >> 31);
+}
+__header_always_inline int __inline_signbitd(double __x) {
+    union { double __f; unsigned long long __u; } __u;
+    __u.__f = __x;
+    return (int)(__u.__u >> 63);
+}
+#if defined __i386__ || defined __x86_64__
+__header_always_inline int __inline_signbitl(long double __x) {
+    union {
+        long double __ld;
+        struct{ unsigned long long __m; unsigned short __sexp; } __p;
+    } __u;
+    __u.__ld = __x;
+    return (int)(__u.__p.__sexp >> 15);
+}
+#else
+__header_always_inline int __inline_signbitl(long double __x) {
+    union { long double __f; unsigned long long __u;} __u;
+    __u.__f = __x;
+    return (int)(__u.__u >> 63);
+}
+#endif
+__header_always_inline int __inline_isnormalf(float __x) {
+    return __inline_isfinitef(__x) && __builtin_fabsf(__x) >= __FLT_MIN__;
+}
+__header_always_inline int __inline_isnormald(double __x) {
+    return __inline_isfinited(__x) && __builtin_fabs(__x) >= __DBL_MIN__;
+}
+__header_always_inline int __inline_isnormall(long double __x) {
+    return __inline_isfinitel(__x) && __builtin_fabsl(__x) >= __LDBL_MIN__;
+}
+    
+#else /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */
+
+/*  Implementations making function calls to fall back on when -ffast-math
+    or similar is specified.  These are not available in iOS versions prior
+    to 6.0.  If you need them, you must target that version or later.         */
+    
+#define isnormal(x)                                               \
+    ( sizeof(x) == sizeof(float)  ? __isnormalf((float)(x))       \
+    : sizeof(x) == sizeof(double) ? __isnormald((double)(x))      \
+                                  : __isnormall((long double)(x)))
+    
+#define isfinite(x)                                               \
+    ( sizeof(x) == sizeof(float)  ? __isfinitef((float)(x))       \
+    : sizeof(x) == sizeof(double) ? __isfinited((double)(x))      \
+                                  : __isfinitel((long double)(x)))
+    
+#define isinf(x)                                                  \
+    ( sizeof(x) == sizeof(float)  ? __isinff((float)(x))          \
+    : sizeof(x) == sizeof(double) ? __isinfd((double)(x))         \
+                                  : __isinfl((long double)(x)))
+    
+#define isnan(x)                                                  \
+    ( sizeof(x) == sizeof(float)  ? __isnanf((float)(x))          \
+    : sizeof(x) == sizeof(double) ? __isnand((double)(x))         \
+                                  : __isnanl((long double)(x)))
+    
+#define signbit(x)                                                \
+    ( sizeof(x) == sizeof(float)  ? __signbitf((float)(x))        \
+    : sizeof(x) == sizeof(double) ? __signbitd((double)(x))       \
+                                  : __signbitl((long double)(x)))
+    
+extern int __isnormalf(float);
+extern int __isnormald(double);
+extern int __isnormall(long double);
+extern int __isfinitef(float);
+extern int __isfinited(double);
+extern int __isfinitel(long double);
+extern int __isinff(float);
+extern int __isinfd(double);
+extern int __isinfl(long double);
+extern int __isnanf(float);
+extern int __isnand(double);
+extern int __isnanl(long double);
+extern int __signbitf(float);
+extern int __signbitd(double);
+extern int __signbitl(long double);
+
+#endif /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */
+
+/******************************************************************************
+ *                                                                            *
+ *                              Math Functions                                *
+ *                                                                            *
+ ******************************************************************************/
+    
+extern float acosf(float);
+extern double acos(double);
+extern long double acosl(long double);
+    
+extern float asinf(float);
+extern double asin(double);
+extern long double asinl(long double);
+    
+extern float atanf(float);
+extern double atan(double);
+extern long double atanl(long double);
+    
+extern float atan2f(float, float);
+extern double atan2(double, double);
+extern long double atan2l(long double, long double);
+    
+extern float cosf(float);
+extern double cos(double);
+extern long double cosl(long double);
+    
+extern float sinf(float);
+extern double sin(double);
+extern long double sinl(long double);
+    
+extern float tanf(float);
+extern double tan(double);
+extern long double tanl(long double);
+    
+extern float acoshf(float);
+extern double acosh(double);
+extern long double acoshl(long double);
+    
+extern float asinhf(float);
+extern double asinh(double);
+extern long double asinhl(long double);
+    
+extern float atanhf(float);
+extern double atanh(double);
+extern long double atanhl(long double);
+    
+extern float coshf(float);
+extern double cosh(double);
+extern long double coshl(long double);
+    
+extern float sinhf(float);
+extern double sinh(double);
+extern long double sinhl(long double);
+    
+extern float tanhf(float);
+extern double tanh(double);
+extern long double tanhl(long double);
+    
+extern float expf(float);
+extern double exp(double);
+extern long double expl(long double);
+
+extern float exp2f(float);
+extern double exp2(double); 
+extern long double exp2l(long double); 
+
+extern float expm1f(float);
+extern double expm1(double); 
+extern long double expm1l(long double); 
+
+extern float logf(float);
+extern double log(double);
+extern long double logl(long double);
+
+extern float log10f(float);
+extern double log10(double);
+extern long double log10l(long double);
+
+extern float log2f(float);
+extern double log2(double);
+extern long double log2l(long double);
+
+extern float log1pf(float);
+extern double log1p(double);
+extern long double log1pl(long double);
+
+extern float logbf(float);
+extern double logb(double);
+extern long double logbl(long double);
+
+extern float modff(float, float *);
+extern double modf(double, double *);
+extern long double modfl(long double, long double *);
+
+extern float ldexpf(float, int);
+extern double ldexp(double, int);
+extern long double ldexpl(long double, int);
+
+extern float frexpf(float, int *);
+extern double frexp(double, int *);
+extern long double frexpl(long double, int *);
+
+extern int ilogbf(float);
+extern int ilogb(double);
+extern int ilogbl(long double);
+
+extern float scalbnf(float, int);
+extern double scalbn(double, int);
+extern long double scalbnl(long double, int);
+
+extern float scalblnf(float, long int);
+extern double scalbln(double, long int);
+extern long double scalblnl(long double, long int);
+
+extern float fabsf(float);
+extern double fabs(double);
+extern long double fabsl(long double);
+
+extern float cbrtf(float);
+extern double cbrt(double);
+extern long double cbrtl(long double);
+
+extern float hypotf(float, float);
+extern double hypot(double, double);
+extern long double hypotl(long double, long double);
+
+extern float powf(float, float);
+extern double pow(double, double);
+extern long double powl(long double, long double);
+
+extern float sqrtf(float);
+extern double sqrt(double);
+extern long double sqrtl(long double);
+
+extern float erff(float);
+extern double erf(double);
+extern long double erfl(long double);
+
+extern float erfcf(float);
+extern double erfc(double);
+extern long double erfcl(long double);
+
+/*	lgammaf, lgamma, and lgammal are not thread-safe. The thread-safe
+    variants lgammaf_r, lgamma_r, and lgammal_r are made available if
+    you define the _REENTRANT symbol before including <math.h>                */
+extern float lgammaf(float);
+extern double lgamma(double);
+extern long double lgammal(long double);
+
+extern float tgammaf(float);
+extern double tgamma(double);
+extern long double tgammal(long double);
+
+extern float ceilf(float);
+extern double ceil(double);
+extern long double ceill(long double);
+
+extern float floorf(float);
+extern double floor(double);
+extern long double floorl(long double);
+
+extern float nearbyintf(float);
+extern double nearbyint(double);
+extern long double nearbyintl(long double);
+
+extern float rintf(float);
+extern double rint(double);
+extern long double rintl(long double);
+
+extern long int lrintf(float);
+extern long int lrint(double);
+extern long int lrintl(long double);
+
+extern float roundf(float);
+extern double round(double);
+extern long double roundl(long double);
+
+extern long int lroundf(float);
+extern long int lround(double);
+extern long int lroundl(long double);
+    
+/*  long long is not part of C90. Make sure you are passing -std=c99 or
+    -std=gnu99 or higher if you need these functions returning long longs     */
+#if !(__DARWIN_NO_LONG_LONG)
+extern long long int llrintf(float);
+extern long long int llrint(double);
+extern long long int llrintl(long double);
+
+extern long long int llroundf(float);
+extern long long int llround(double);
+extern long long int llroundl(long double);
+#endif /* !(__DARWIN_NO_LONG_LONG) */
+
+extern float truncf(float);
+extern double trunc(double);
+extern long double truncl(long double);
+
+extern float fmodf(float, float);
+extern double fmod(double, double);
+extern long double fmodl(long double, long double);
+
+extern float remainderf(float, float);
+extern double remainder(double, double);
+extern long double remainderl(long double, long double);
+
+extern float remquof(float, float, int *);
+extern double remquo(double, double, int *);
+extern long double remquol(long double, long double, int *);
+
+extern float copysignf(float, float);
+extern double copysign(double, double);
+extern long double copysignl(long double, long double);
+
+extern float nanf(const char *);
+extern double nan(const char *);
+extern long double nanl(const char *);
+
+extern float nextafterf(float, float);
+extern double nextafter(double, double);
+extern long double nextafterl(long double, long double);
+
+extern double nexttoward(double, long double);
+extern float nexttowardf(float, long double);
+extern long double nexttowardl(long double, long double);
+
+extern float fdimf(float, float);
+extern double fdim(double, double);
+extern long double fdiml(long double, long double);
+
+extern float fmaxf(float, float);
+extern double fmax(double, double);
+extern long double fmaxl(long double, long double);
+
+extern float fminf(float, float);
+extern double fmin(double, double);
+extern long double fminl(long double, long double);
+
+extern float fmaf(float, float, float);
+extern double fma(double, double, double);
+extern long double fmal(long double, long double, long double);
+
+#define isgreater(x, y) __builtin_isgreater((x),(y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y))
+#define isless(x, y) __builtin_isless((x),(y))
+#define islessequal(x, y) __builtin_islessequal((x),(y))
+#define islessgreater(x, y) __builtin_islessgreater((x),(y))
+#define isunordered(x, y) __builtin_isunordered((x),(y))
+
+/* Deprecated functions; use the INFINITY and NAN macros instead.             */
+extern float __inff(void)
+__API_DEPRECATED("use `(float)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+extern double __inf(void)
+__API_DEPRECATED("use `INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+extern long double __infl(void)
+__API_DEPRECATED("use `(long double)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+extern float __nan(void)
+__API_DEPRECATED("use `NAN` instead", macos(10.0, 10.14)) __API_UNAVAILABLE(ios, watchos, tvos);
+
+/******************************************************************************
+ *  Reentrant variants of lgamma[fl]                                          *
+ ******************************************************************************/
+
+#ifdef _REENTRANT
+/*  Reentrant variants of the lgamma[fl] functions.                           */
+extern float lgammaf_r(float, int *) __API_AVAILABLE(macos(10.6), ios(3.1));
+extern double lgamma_r(double, int *) __API_AVAILABLE(macos(10.6), ios(3.1));
+extern long double lgammal_r(long double, int *) __API_AVAILABLE(macos(10.6), ios(3.1));
+#endif /* _REENTRANT */
+
+/******************************************************************************
+ *  Apple extensions to the C standard                                        *
+ ******************************************************************************/
+
+/*  Because these functions are not specified by any relevant standard, they
+    are prefixed with __, which places them in the implementor's namespace, so
+    they should not conflict with any developer or third-party code.  If they
+    are added to a relevant standard in the future, un-prefixed names may be
+    added to the library and they may be moved out of this section of the
+    header.                                                                   
+ 
+    Because these functions are non-standard, they may not be available on non-
+    Apple platforms.                                                          */
+
+/*  __exp10(x) returns 10**x.  Edge cases match those of exp( ) and exp2( ).  */
+extern float __exp10f(float) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern double __exp10(double) __API_AVAILABLE(macos(10.9), ios(7.0));
+
+/*  __sincos(x,sinp,cosp) computes the sine and cosine of x with a single
+    function call, storing the sine in the memory pointed to by sinp, and
+    the cosine in the memory pointed to by cosp. Edge cases match those of
+    separate calls to sin( ) and cos( ).                                      */
+__header_always_inline void __sincosf(float __x, float *__sinp, float *__cosp);
+__header_always_inline void __sincos(double __x, double *__sinp, double *__cosp);
+
+/*  __sinpi(x) returns the sine of pi times x; __cospi(x) and __tanpi(x) return
+    the cosine and tangent, respectively.  These functions can produce a more
+    accurate answer than expressions of the form sin(M_PI * x) because they
+    avoid any loss of precision that results from rounding the result of the
+    multiplication M_PI * x.  They may also be significantly more efficient in
+    some cases because the argument reduction for these functions is easier
+    to compute.  Consult the man pages for edge case details.                 */
+extern float __cospif(float) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern double __cospi(double) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern float __sinpif(float) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern double __sinpi(double) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern float __tanpif(float) __API_AVAILABLE(macos(10.9), ios(7.0));
+extern double __tanpi(double) __API_AVAILABLE(macos(10.9), ios(7.0));
+
+#if (defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED < 1090) || \
+    (defined __IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED < 70000)
+/*  __sincos and __sincosf were introduced in OSX 10.9 and iOS 7.0.  When
+    targeting an older system, we simply split them up into discrete calls
+    to sin( ) and cos( ).                                                     */
+__header_always_inline void __sincosf(float __x, float *__sinp, float *__cosp) {
+  *__sinp = sinf(__x);
+  *__cosp = cosf(__x);
+}
+
+__header_always_inline void __sincos(double __x, double *__sinp, double *__cosp) {
+  *__sinp = sin(__x);
+  *__cosp = cos(__x);
+}
+#else
+/*  __sincospi(x,sinp,cosp) computes the sine and cosine of pi times x with a
+    single function call, storing the sine in the memory pointed to by sinp,
+    and the cosine in the memory pointed to by cosp.  Edge cases match those
+    of separate calls to __sinpi( ) and __cospi( ), and are documented in the
+    man pages.
+ 
+    These functions were introduced in OSX 10.9 and iOS 7.0.  Because they are
+    implemented as header inlines, weak-linking does not function as normal,
+    and they are simply hidden when targeting earlier OS versions.            */
+__header_always_inline void __sincospif(float __x, float *__sinp, float *__cosp);
+__header_always_inline void __sincospi(double __x, double *__sinp, double *__cosp);
+
+/*  Implementation details of __sincos and __sincospi allowing them to return
+    two results while allowing the compiler to optimize away unnecessary load-
+    store traffic.  Although these interfaces are exposed in the math.h header
+    to allow compilers to generate better code, users should call __sincos[f]
+    and __sincospi[f] instead and allow the compiler to emit these calls.     */
+struct __float2 { float __sinval; float __cosval; };
+struct __double2 { double __sinval; double __cosval; };
+
+extern struct __float2 __sincosf_stret(float);
+extern struct __double2 __sincos_stret(double);
+extern struct __float2 __sincospif_stret(float);
+extern struct __double2 __sincospi_stret(double);
+
+__header_always_inline void __sincosf(float __x, float *__sinp, float *__cosp) {
+    const struct __float2 __stret = __sincosf_stret(__x);
+    *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
+}
+
+__header_always_inline void __sincos(double __x, double *__sinp, double *__cosp) {
+    const struct __double2 __stret = __sincos_stret(__x);
+    *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
+}
+
+__header_always_inline void __sincospif(float __x, float *__sinp, float *__cosp) {
+    const struct __float2 __stret = __sincospif_stret(__x);
+    *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
+}
+
+__header_always_inline void __sincospi(double __x, double *__sinp, double *__cosp) {
+    const struct __double2 __stret = __sincospi_stret(__x);
+    *__sinp = __stret.__sinval; *__cosp = __stret.__cosval;
+}
+#endif
+
+/******************************************************************************
+ *  POSIX/UNIX extensions to the C standard                                   *
+ ******************************************************************************/
+
+#if __DARWIN_C_LEVEL >= 199506L
+extern double j0(double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double j1(double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double jn(int, double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double y0(double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double y1(double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double yn(int, double) __API_AVAILABLE(macos(10.0), ios(3.2));
+extern double scalb(double, double); 
+extern int signgam;
+
+/*  Even though these might be more useful as long doubles, POSIX requires
+    that they be double-precision literals.                                   */
+#define M_E         2.71828182845904523536028747135266250   /* e              */
+#define M_LOG2E     1.44269504088896340735992468100189214   /* log2(e)        */
+#define M_LOG10E    0.434294481903251827651128918916605082  /* log10(e)       */
+#define M_LN2       0.693147180559945309417232121458176568  /* loge(2)        */
+#define M_LN10      2.30258509299404568401799145468436421   /* loge(10)       */
+#define M_PI        3.14159265358979323846264338327950288   /* pi             */
+#define M_PI_2      1.57079632679489661923132169163975144   /* pi/2           */
+#define M_PI_4      0.785398163397448309615660845819875721  /* pi/4           */
+#define M_1_PI      0.318309886183790671537767526745028724  /* 1/pi           */
+#define M_2_PI      0.636619772367581343075535053490057448  /* 2/pi           */
+#define M_2_SQRTPI  1.12837916709551257389615890312154517   /* 2/sqrt(pi)     */
+#define M_SQRT2     1.41421356237309504880168872420969808   /* sqrt(2)        */
+#define M_SQRT1_2   0.707106781186547524400844362104849039  /* 1/sqrt(2)      */
+
+#define MAXFLOAT    0x1.fffffep+127f
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+/*  Long-double versions of M_E, etc for convenience on Intel where long-
+    double is not the same as double.  Define __MATH_LONG_DOUBLE_CONSTANTS
+    to make these constants available.                                        */
+#if defined __MATH_LONG_DOUBLE_CONSTANTS
+#define M_El        0xa.df85458a2bb4a9bp-2L
+#define M_LOG2El    0xb.8aa3b295c17f0bcp-3L
+#define M_LOG10El   0xd.e5bd8a937287195p-5L
+#define M_LN2l      0xb.17217f7d1cf79acp-4L
+#define M_LN10l     0x9.35d8dddaaa8ac17p-2L
+#define M_PIl       0xc.90fdaa22168c235p-2L
+#define M_PI_2l     0xc.90fdaa22168c235p-3L
+#define M_PI_4l     0xc.90fdaa22168c235p-4L
+#define M_1_PIl     0xa.2f9836e4e44152ap-5L
+#define M_2_PIl     0xa.2f9836e4e44152ap-4L
+#define M_2_SQRTPIl 0x9.06eba8214db688dp-3L
+#define M_SQRT2l    0xb.504f333f9de6484p-3L
+#define M_SQRT1_2l  0xb.504f333f9de6484p-4L
+#endif /* defined __MATH_LONG_DOUBLE_CONSTANTS */
+
+/******************************************************************************
+ *  Legacy BSD extensions to the C standard                                   *
+ ******************************************************************************/
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#define FP_SNAN		FP_NAN
+#define FP_QNAN		FP_NAN
+#define	HUGE		MAXFLOAT
+#define X_TLOSS		1.41484755040568800000e+16 
+#define	DOMAIN		1
+#define	SING		2
+#define	OVERFLOW	3
+#define	UNDERFLOW	4
+#define	TLOSS		5
+#define	PLOSS		6
+
+/* Legacy BSD API; use the C99 `lrint( )` function instead.                   */
+extern long int rinttol(double)
+__API_DEPRECATED_WITH_REPLACEMENT("lrint", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+/* Legacy BSD API; use the C99 `lround( )` function instead.                  */
+extern long int roundtol(double)
+__API_DEPRECATED_WITH_REPLACEMENT("lround", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+/* Legacy BSD API; use the C99 `remainder( )` function instead.               */
+extern double drem(double, double)
+__API_DEPRECATED_WITH_REPLACEMENT("remainder", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+/* Legacy BSD API; use the C99 `isfinite( )` macro instead.                   */
+extern int finite(double)
+__API_DEPRECATED("Use `isfinite((double)x)` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+/* Legacy BSD API; use the C99 `tgamma( )` function instead.                  */
+extern double gamma(double)
+__API_DEPRECATED_WITH_REPLACEMENT("tgamma", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+/* Legacy BSD API; use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead.        */
+extern double significand(double)
+__API_DEPRECATED("Use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
+
+#if !defined __cplusplus
+struct exception {
+    int type;
+    char *name;
+    double arg1;
+    double arg2;
+    double retval;
+};
+
+#endif /* !defined __cplusplus */
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+__END_DECLS
+#endif /* __MATH_H__ */
lib/libc/include/x86_64-macos-gnu/runetype.h
@@ -0,0 +1,115 @@
+/*-
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)runetype.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef	_RUNETYPE_H_
+#define	_RUNETYPE_H_
+
+#include <_types.h>
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_ct_rune_t.h>
+#include <sys/_types/_rune_t.h>
+#include <sys/_types/_wchar_t.h>
+#include <sys/_types/_wint_t.h>
+
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#define	_CACHED_RUNES	(1 <<8 )	/* Must be a power of 2 */
+#define	_CRMASK		(~(_CACHED_RUNES - 1))
+
+/*
+ * The lower 8 bits of runetype[] contain the digit value of the rune.
+ */
+typedef struct {
+	__darwin_rune_t	__min;		/* First rune of the range */
+	__darwin_rune_t	__max;		/* Last rune (inclusive) of the range */
+	__darwin_rune_t	__map;		/* What first maps to in maps */
+	__uint32_t	*__types;	/* Array of types in range */
+} _RuneEntry;
+
+typedef struct {
+	int		__nranges;	/* Number of ranges stored */
+	_RuneEntry	*__ranges;	/* Pointer to the ranges */
+} _RuneRange;
+
+typedef struct {
+	char		__name[14];	/* CHARCLASS_NAME_MAX = 14 */
+	__uint32_t	__mask;		/* charclass mask */
+} _RuneCharClass;
+
+typedef struct {
+	char		__magic[8];	/* Magic saying what version we are */
+	char		__encoding[32];	/* ASCII name of this encoding */
+
+	__darwin_rune_t	(*__sgetrune)(const char *, __darwin_size_t, char const **);
+	int		(*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **);
+	__darwin_rune_t	__invalid_rune;
+
+	__uint32_t	__runetype[_CACHED_RUNES];
+	__darwin_rune_t	__maplower[_CACHED_RUNES];
+	__darwin_rune_t	__mapupper[_CACHED_RUNES];
+
+	/*
+	 * The following are to deal with Runes larger than _CACHED_RUNES - 1.
+	 * Their data is actually contiguous with this structure so as to make
+	 * it easier to read/write from/to disk.
+	 */
+	_RuneRange	__runetype_ext;
+	_RuneRange	__maplower_ext;
+	_RuneRange	__mapupper_ext;
+
+	void		*__variable;	/* Data which depends on the encoding */
+	int		__variable_len;	/* how long that data is */
+
+	/*
+	 * extra fields to deal with arbitrary character classes
+	 */
+	int		__ncharclasses;
+	_RuneCharClass	*__charclasses;
+} _RuneLocale;
+
+#define	_RUNE_MAGIC_A	"RuneMagA"	/* Indicates version A of RuneLocale */
+
+__BEGIN_DECLS
+extern _RuneLocale _DefaultRuneLocale;
+extern _RuneLocale *_CurrentRuneLocale;
+__END_DECLS
+
+#endif	/* !_RUNETYPE_H_ */
lib/libc/include/x86_64-macos-gnu/setjmp.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#ifndef _BSD_SETJMP_H
+#define _BSD_SETJMP_H
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#if defined(__x86_64__)
+/*
+ * _JBLEN is number of ints required to save the following:
+ * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each
+ * mxcsr, fp control word, sigmask... these are 4 bytes each
+ * add 16 ints for future expansion needs...
+ */
+#define _JBLEN ((9 * 2) + 3 + 16)
+typedef int jmp_buf[_JBLEN];
+typedef int sigjmp_buf[_JBLEN + 1];
+
+#elif defined(__i386__)
+
+/*
+ * _JBLEN is number of ints required to save the following:
+ * eax, ebx, ecx, edx, edi, esi, ebp, esp, ss, eflags, eip,
+ * cs, de, es, fs, gs == 16 ints
+ * onstack, mask = 2 ints
+ */
+
+#define _JBLEN (18)
+typedef int jmp_buf[_JBLEN];
+typedef int sigjmp_buf[_JBLEN + 1];
+
+#elif defined(__arm__) && !defined(__ARM_ARCH_7K__)
+
+#include <machine/signal.h>
+
+/*
+ *	_JBLEN is number of ints required to save the following:
+ *	r4-r8, r10, fp, sp, lr, sig  == 10 register_t sized
+ *	s16-s31 == 16 register_t sized + 1 int for FSTMX
+ *	1 extra int for future use
+ */
+#define _JBLEN		(10 + 16 + 2)
+#define _JBLEN_MAX	_JBLEN
+
+typedef int jmp_buf[_JBLEN];
+typedef int sigjmp_buf[_JBLEN + 1];
+
+#elif defined(__arm64__) || defined(__ARM_ARCH_7K__)
+/*
+ * _JBLEN is the number of ints required to save the following:
+ * r21-r29, sp, fp, lr == 12 registers, 8 bytes each. d8-d15
+ * are another 8 registers, each 8 bytes long. (aapcs64 specifies
+ * that only 64-bit versions of FP registers need to be saved).
+ * Finally, two 8-byte fields for signal handling purposes.
+ */
+#define _JBLEN		((14 + 8 + 2) * 2)
+
+typedef int jmp_buf[_JBLEN];
+typedef int sigjmp_buf[_JBLEN + 1];
+
+#else
+#	error Undefined platform for setjmp
+#endif
+
+__BEGIN_DECLS
+extern int	setjmp(jmp_buf);
+extern void longjmp(jmp_buf, int) __dead2;
+
+#ifndef _ANSI_SOURCE
+int	_setjmp(jmp_buf);
+void	_longjmp(jmp_buf, int) __dead2;
+int	sigsetjmp(sigjmp_buf, int);
+void	siglongjmp(sigjmp_buf, int) __dead2;
+#endif /* _ANSI_SOURCE  */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+void	longjmperror(void);
+#endif /* neither ANSI nor POSIX */
+__END_DECLS
+
+#endif /* _BSD_SETJMP_H */
lib/libc/include/x86_64-macos-gnu/signal.h
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)signal.h	8.3 (Berkeley) 3/30/94
+ */
+
+#ifndef _USER_SIGNAL_H
+#define _USER_SIGNAL_H
+
+#include <sys/cdefs.h>
+#include <_types.h>
+#include <sys/signal.h>
+
+#include <sys/_pthread/_pthread_types.h>
+#include <sys/_pthread/_pthread_t.h>
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+extern __const char *__const sys_signame[NSIG];
+extern __const char *__const sys_siglist[NSIG];
+#endif
+
+__BEGIN_DECLS
+int	raise(int);
+__END_DECLS
+
+#ifndef	_ANSI_SOURCE
+__BEGIN_DECLS
+void	(* _Nullable bsd_signal(int, void (* _Nullable)(int)))(int);
+int	kill(pid_t, int) __DARWIN_ALIAS(kill);
+int	killpg(pid_t, int) __DARWIN_ALIAS(killpg);
+int	pthread_kill(pthread_t, int);
+int	pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
+int	sigaction(int, const struct sigaction * __restrict,
+	    struct sigaction * __restrict);
+int	sigaddset(sigset_t *, int);
+int	sigaltstack(const stack_t * __restrict, stack_t * __restrict)  __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+int	sigdelset(sigset_t *, int);
+int	sigemptyset(sigset_t *);
+int	sigfillset(sigset_t *);
+int	sighold(int);
+int	sigignore(int);
+int	siginterrupt(int, int);
+int	sigismember(const sigset_t *, int);
+int	sigpause(int) __DARWIN_ALIAS_C(sigpause);
+int	sigpending(sigset_t *);
+int	sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
+int	sigrelse(int);
+void    (* _Nullable sigset(int, void (* _Nullable)(int)))(int);
+int	sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
+int	sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+void	psignal(unsigned int, const char *);
+int	sigblock(int);
+int	sigsetmask(int);
+int	sigvec(int, struct sigvec *, struct sigvec *);
+#endif	/* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+__END_DECLS
+
+/* List definitions after function declarations, or Reiser cpp gets upset. */
+#if defined(__i386__) || defined(__x86_64__)
+/* The left shift operator on intel is modulo 32 */
+__header_always_inline int
+__sigbits(int __signo)
+{
+    return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1));
+}
+#else /* !__i386__ && !__x86_64__ */
+#define __sigbits(signo)	(1 << ((signo) - 1))
+#endif /* __i386__ || __x86_64__ */
+
+#define	sigaddset(set, signo)	(*(set) |= __sigbits(signo), 0)
+#define	sigdelset(set, signo)	(*(set) &= ~__sigbits(signo), 0)
+#define	sigismember(set, signo)	((*(set) & __sigbits(signo)) != 0)
+#define	sigemptyset(set)	(*(set) = 0, 0)
+#define	sigfillset(set)		(*(set) = ~(sigset_t)0, 0)
+#endif	/* !_ANSI_SOURCE */
+
+#endif	/* !_USER_SIGNAL_H */
lib/libc/include/x86_64-macos-gnu/stdint.h
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2000-2010 Apple Inc.
+ * All rights reserved.
+ */
+
+#ifndef _STDINT_H_
+#define _STDINT_H_
+
+#if __LP64__
+#define __WORDSIZE 64
+#else
+#define __WORDSIZE 32
+#endif
+
+/* from ISO/IEC 988:1999 spec */
+
+/* 7.18.1.1 Exact-width integer types */
+#include <sys/_types/_int8_t.h>
+#include <sys/_types/_int16_t.h>
+#include <sys/_types/_int32_t.h>
+#include <sys/_types/_int64_t.h>
+
+#include <_types/_uint8_t.h>
+#include <_types/_uint16_t.h>
+#include <_types/_uint32_t.h>
+#include <_types/_uint64_t.h>
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef int8_t           int_least8_t;
+typedef int16_t         int_least16_t;
+typedef int32_t         int_least32_t;
+typedef int64_t         int_least64_t;
+typedef uint8_t         uint_least8_t;
+typedef uint16_t       uint_least16_t;
+typedef uint32_t       uint_least32_t;
+typedef uint64_t       uint_least64_t;
+
+
+/* 7.18.1.3 Fastest-width integer types */
+typedef int8_t            int_fast8_t;
+typedef int16_t          int_fast16_t;
+typedef int32_t          int_fast32_t;
+typedef int64_t          int_fast64_t;
+typedef uint8_t          uint_fast8_t;
+typedef uint16_t        uint_fast16_t;
+typedef uint32_t        uint_fast32_t;
+typedef uint64_t        uint_fast64_t;
+
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+
+#include <sys/_types.h>
+#include <sys/_types/_intptr_t.h>
+#include <sys/_types/_uintptr_t.h>
+
+
+/* 7.18.1.5 Greatest-width integer types */
+#include <_types/_intmax_t.h>
+#include <_types/_uintmax_t.h>
+
+/* 7.18.4 Macros for integer constants */
+#define INT8_C(v)    (v)
+#define INT16_C(v)   (v)
+#define INT32_C(v)   (v)
+#define INT64_C(v)   (v ## LL)
+
+#define UINT8_C(v)   (v)
+#define UINT16_C(v)  (v)
+#define UINT32_C(v)  (v ## U)
+#define UINT64_C(v)  (v ## ULL)
+
+#ifdef __LP64__
+#define INTMAX_C(v)  (v ## L)
+#define UINTMAX_C(v) (v ## UL)
+#else
+#define INTMAX_C(v)  (v ## LL)
+#define UINTMAX_C(v) (v ## ULL)
+#endif
+
+/* 7.18.2 Limits of specified-width integer types:
+ *   These #defines specify the minimum and maximum limits
+ *   of each of the types declared above.
+ *
+ *   They must have "the same type as would an expression that is an
+ *   object of the corresponding type converted according to the integer
+ *   promotion".
+ */
+
+
+/* 7.18.2.1 Limits of exact-width integer types */
+#define INT8_MAX         127
+#define INT16_MAX        32767
+#define INT32_MAX        2147483647
+#define INT64_MAX        9223372036854775807LL
+
+#define INT8_MIN          -128
+#define INT16_MIN         -32768
+   /*
+      Note:  the literal "most negative int" cannot be written in C --
+      the rules in the standard (section 6.4.4.1 in C99) will give it
+      an unsigned type, so INT32_MIN (and the most negative member of
+      any larger signed type) must be written via a constant expression.
+   */
+#define INT32_MIN        (-INT32_MAX-1)
+#define INT64_MIN        (-INT64_MAX-1)
+
+#define UINT8_MAX         255
+#define UINT16_MAX        65535
+#define UINT32_MAX        4294967295U
+#define UINT64_MAX        18446744073709551615ULL
+
+/* 7.18.2.2 Limits of minimum-width integer types */
+#define INT_LEAST8_MIN    INT8_MIN
+#define INT_LEAST16_MIN   INT16_MIN
+#define INT_LEAST32_MIN   INT32_MIN
+#define INT_LEAST64_MIN   INT64_MIN
+
+#define INT_LEAST8_MAX    INT8_MAX
+#define INT_LEAST16_MAX   INT16_MAX
+#define INT_LEAST32_MAX   INT32_MAX
+#define INT_LEAST64_MAX   INT64_MAX
+
+#define UINT_LEAST8_MAX   UINT8_MAX
+#define UINT_LEAST16_MAX  UINT16_MAX
+#define UINT_LEAST32_MAX  UINT32_MAX
+#define UINT_LEAST64_MAX  UINT64_MAX
+
+/* 7.18.2.3 Limits of fastest minimum-width integer types */
+#define INT_FAST8_MIN     INT8_MIN
+#define INT_FAST16_MIN    INT16_MIN
+#define INT_FAST32_MIN    INT32_MIN
+#define INT_FAST64_MIN    INT64_MIN
+
+#define INT_FAST8_MAX     INT8_MAX
+#define INT_FAST16_MAX    INT16_MAX
+#define INT_FAST32_MAX    INT32_MAX
+#define INT_FAST64_MAX    INT64_MAX
+
+#define UINT_FAST8_MAX    UINT8_MAX
+#define UINT_FAST16_MAX   UINT16_MAX
+#define UINT_FAST32_MAX   UINT32_MAX
+#define UINT_FAST64_MAX   UINT64_MAX
+
+/* 7.18.2.4 Limits of integer types capable of holding object pointers */
+
+#if __WORDSIZE == 64
+#define INTPTR_MAX        9223372036854775807L
+#else
+#define INTPTR_MAX        2147483647L
+#endif
+#define INTPTR_MIN        (-INTPTR_MAX-1)
+
+#if __WORDSIZE == 64
+#define UINTPTR_MAX       18446744073709551615UL
+#else
+#define UINTPTR_MAX       4294967295UL
+#endif
+
+/* 7.18.2.5 Limits of greatest-width integer types */
+#define INTMAX_MAX        INTMAX_C(9223372036854775807)
+#define UINTMAX_MAX       UINTMAX_C(18446744073709551615)
+#define INTMAX_MIN        (-INTMAX_MAX-1)
+
+/* 7.18.3 "Other" */
+#if __WORDSIZE == 64
+#define PTRDIFF_MIN	  INTMAX_MIN
+#define PTRDIFF_MAX	  INTMAX_MAX
+#else
+#define PTRDIFF_MIN       INT32_MIN
+#define PTRDIFF_MAX       INT32_MAX
+#endif
+
+#define SIZE_MAX          UINTPTR_MAX
+
+#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
+#define RSIZE_MAX         (SIZE_MAX >> 1)
+#endif
+
+#ifndef WCHAR_MAX
+#  ifdef __WCHAR_MAX__
+#    define WCHAR_MAX     __WCHAR_MAX__
+#  else
+#    define WCHAR_MAX     0x7fffffff
+#  endif
+#endif
+
+/* WCHAR_MIN should be 0 if wchar_t is an unsigned type and
+   (-WCHAR_MAX-1) if wchar_t is a signed type.  Unfortunately,
+   it turns out that -fshort-wchar changes the signedness of
+   the type. */
+#ifndef WCHAR_MIN
+#  if WCHAR_MAX == 0xffff
+#    define WCHAR_MIN       0
+#  else
+#    define WCHAR_MIN       (-WCHAR_MAX-1)
+#  endif
+#endif
+
+#define WINT_MIN	  INT32_MIN
+#define WINT_MAX	  INT32_MAX
+
+#define SIG_ATOMIC_MIN	  INT32_MIN
+#define SIG_ATOMIC_MAX	  INT32_MAX
+
+#endif /* _STDINT_H_ */
lib/libc/include/x86_64-macos-gnu/stdio.h
@@ -0,0 +1,410 @@
+/*
+ * Copyright (c) 2000, 2005, 2007, 2009, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
+ */
+
+#ifndef	_STDIO_H_
+#define	_STDIO_H_
+
+#include <_stdio.h>
+
+__BEGIN_DECLS
+extern FILE *__stdinp;
+extern FILE *__stdoutp;
+extern FILE *__stderrp;
+__END_DECLS
+
+#define	__SLBF	0x0001		/* line buffered */
+#define	__SNBF	0x0002		/* unbuffered */
+#define	__SRD	0x0004		/* OK to read */
+#define	__SWR	0x0008		/* OK to write */
+	/* RD and WR are never simultaneously asserted */
+#define	__SRW	0x0010		/* open for reading & writing */
+#define	__SEOF	0x0020		/* found EOF */
+#define	__SERR	0x0040		/* found error */
+#define	__SMBF	0x0080		/* _buf is from malloc */
+#define	__SAPP	0x0100		/* fdopen()ed in append mode */
+#define	__SSTR	0x0200		/* this is an sprintf/snprintf string */
+#define	__SOPT	0x0400		/* do fseek() optimisation */
+#define	__SNPT	0x0800		/* do not do fseek() optimisation */
+#define	__SOFF	0x1000		/* set iff _offset is in fact correct */
+#define	__SMOD	0x2000		/* true => fgetln modified _p text */
+#define __SALC  0x4000		/* allocate string space dynamically */
+#define __SIGN  0x8000		/* ignore this file in _fwalk */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define	_IOFBF	0		/* setvbuf should set fully buffered */
+#define	_IOLBF	1		/* setvbuf should set line buffered */
+#define	_IONBF	2		/* setvbuf should set unbuffered */
+
+#define	BUFSIZ	1024		/* size of buffer used by setbuf */
+#define	EOF	(-1)
+
+				/* must be == _POSIX_STREAM_MAX <limits.h> */
+#define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */
+#define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#ifndef _ANSI_SOURCE
+#define	P_tmpdir	"/var/tmp/"
+#endif
+#define	L_tmpnam	1024	/* XXX must be == PATH_MAX */
+#define	TMP_MAX		308915776
+
+#ifndef SEEK_SET
+#define	SEEK_SET	0	/* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define	SEEK_CUR	1	/* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define	SEEK_END	2	/* set file offset to EOF plus offset */
+#endif
+
+#define	stdin	__stdinp
+#define	stdout	__stdoutp
+#define	stderr	__stderrp
+
+#ifdef _DARWIN_UNLIMITED_STREAMS
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
+#error "_DARWIN_UNLIMITED_STREAMS specified, but -miphoneos-version-min version does not support it."
+#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6
+#error "_DARWIN_UNLIMITED_STREAMS specified, but -mmacosx-version-min version does not support it."
+#endif
+#endif
+
+/* ANSI-C */
+
+__BEGIN_DECLS
+void	 clearerr(FILE *);
+int	 fclose(FILE *);
+int	 feof(FILE *);
+int	 ferror(FILE *);
+int	 fflush(FILE *);
+int	 fgetc(FILE *);
+int	 fgetpos(FILE * __restrict, fpos_t *);
+char	*fgets(char * __restrict, int, FILE *);
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fopen));
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fopen));
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+int	 fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3);
+int	 fputc(int, FILE *);
+int	 fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs);
+size_t	 fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream);
+FILE	*freopen(const char * __restrict, const char * __restrict,
+                 FILE * __restrict) __DARWIN_ALIAS(freopen);
+int	 fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3);
+int	 fseek(FILE *, long, int);
+int	 fsetpos(FILE *, const fpos_t *);
+long	 ftell(FILE *);
+size_t	 fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite);
+int	 getc(FILE *);
+int	 getchar(void);
+char	*gets(char *);
+void	 perror(const char *) __cold;
+int	 printf(const char * __restrict, ...) __printflike(1, 2);
+int	 putc(int, FILE *);
+int	 putchar(int);
+int	 puts(const char *);
+int	 remove(const char *);
+int	 rename (const char *__old, const char *__new);
+void	 rewind(FILE *);
+int	 scanf(const char * __restrict, ...) __scanflike(1, 2);
+void	 setbuf(FILE * __restrict, char * __restrict);
+int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t);
+int	 sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3) __swift_unavailable("Use snprintf instead.");
+int	 sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3);
+FILE	*tmpfile(void);
+
+__swift_unavailable("Use mkstemp(3) instead.")
+#if !defined(_POSIX_C_SOURCE)
+__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
+#endif
+char	*tmpnam(char *);
+int	 ungetc(int, FILE *);
+int	 vfprintf(FILE * __restrict, const char * __restrict, va_list) __printflike(2, 0);
+int	 vprintf(const char * __restrict, va_list) __printflike(1, 0);
+int	 vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0) __swift_unavailable("Use vsnprintf instead.");
+__END_DECLS
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-1988
+ */
+
+#if __DARWIN_C_LEVEL >= 198808L
+#define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */
+
+__BEGIN_DECLS
+#include <_ctermid.h>
+
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen));
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+int	 fileno(FILE *);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 198808L */
+
+
+/* Additional functionality provided by:
+ * POSIX.2-1992 C Language Binding Option
+ */
+#if TARGET_OS_EMBEDDED
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
+#else
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
+#endif
+
+#if __DARWIN_C_LEVEL >= 199209L
+__BEGIN_DECLS
+int	 pclose(FILE *) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE)
+FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */
+FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable.");
+#endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 199209L */
+
+#undef __swift_unavailable_on
+
+/* Additional functionality provided by:
+ * POSIX.1c-1995,
+ * POSIX.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ */
+
+#if __DARWIN_C_LEVEL >= 199506L
+
+/* Functions internal to the implementation. */
+__BEGIN_DECLS
+int	__srget(FILE *);
+int	__svfscanf(FILE *, const char *, va_list) __scanflike(2, 0);
+int	__swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__) && defined(__STDC__)
+__header_always_inline int __sputc(int _c, FILE *_p) {
+	if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+		return (*_p->_p++ = _c);
+	else
+		return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define	__sputc(c, p) \
+	(--(p)->_w < 0 ? \
+		(p)->_w >= (p)->_lbfsize ? \
+			(*(p)->_p = (c)), *(p)->_p != '\n' ? \
+				(int)*(p)->_p++ : \
+				__swbuf('\n', p) : \
+			__swbuf((int)(c), p) : \
+		(*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define	__sfeof(p)	(((p)->_flags & __SEOF) != 0)
+#define	__sferror(p)	(((p)->_flags & __SERR) != 0)
+#define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define	__sfileno(p)	((p)->_file)
+
+__BEGIN_DECLS
+void	 flockfile(FILE *);
+int	 ftrylockfile(FILE *);
+void	 funlockfile(FILE *);
+int	 getc_unlocked(FILE *);
+int	 getchar_unlocked(void);
+int	 putc_unlocked(int, FILE *);
+int	 putchar_unlocked(int);
+
+/* Removed in Issue 6 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
+int	 getw(FILE *);
+int	 putw(int, FILE *);
+#endif
+
+__swift_unavailable("Use mkstemp(3) instead.")
+#if !defined(_POSIX_C_SOURCE)
+__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.")
+#endif
+char	*tempnam(const char *__dir, const char *__prefix) __DARWIN_ALIAS(tempnam);
+__END_DECLS
+
+#ifndef lint
+#define	getc_unlocked(fp)	__sgetc(fp)
+#define putc_unlocked(x, fp)	__sputc(x, fp)
+#endif /* lint */
+
+#define	getchar_unlocked()	getc_unlocked(stdin)
+#define	putchar_unlocked(x)	putc_unlocked(x, stdout)
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2001
+ * ISO C99
+ */
+
+#if __DARWIN_C_LEVEL >= 200112L
+#include <sys/_types/_off_t.h>
+
+__BEGIN_DECLS
+int	 fseeko(FILE * __stream, off_t __offset, int __whence);
+off_t	 ftello(FILE * __stream);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+#if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus)
+__BEGIN_DECLS
+int	 snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4);
+int	 vfscanf(FILE * __restrict __stream, const char * __restrict __format, va_list) __scanflike(2, 0);
+int	 vscanf(const char * __restrict __format, va_list) __scanflike(1, 0);
+int	 vsnprintf(char * __restrict __str, size_t __size, const char * __restrict __format, va_list) __printflike(3, 0);
+int	 vsscanf(const char * __restrict __str, const char * __restrict __format, va_list) __scanflike(2, 0);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2008
+ */
+
+#if __DARWIN_C_LEVEL >= 200809L
+#include <sys/_types/_ssize_t.h>
+
+__BEGIN_DECLS
+int	dprintf(int, const char * __restrict, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+int	vdprintf(int, const char * __restrict, va_list) __printflike(2, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+ssize_t getdelim(char ** __restrict __linep, size_t * __restrict __linecapp, int __delimiter, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+FILE *fmemopen(void * __restrict __buf, size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+FILE *open_memstream(char **__bufp, size_t *__sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+
+
+/* Darwin extensions */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+__BEGIN_DECLS
+extern __const int sys_nerr;		/* perror(3) external variables */
+extern __const char *__const sys_errlist[];
+
+int	 asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3);
+char	*ctermid_r(char *);
+char	*fgetln(FILE *, size_t *);
+__const char *fmtcheck(const char *, const char *);
+int	 fpurge(FILE *);
+void	 setbuffer(FILE *, char *, int);
+int	 setlinebuf(FILE *);
+int	 vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0);
+FILE	*zopen(const char *, const char *, int);
+
+
+/*
+ * Stdio function-access interface.
+ */
+FILE	*funopen(const void *,
+                 int (* _Nullable)(void *, char *, int),
+                 int (* _Nullable)(void *, const char *, int),
+                 fpos_t (* _Nullable)(void *, fpos_t, int),
+                 int (* _Nullable)(void *));
+__END_DECLS
+#define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+
+#define	feof_unlocked(p)	__sfeof(p)
+#define	ferror_unlocked(p)	__sferror(p)
+#define	clearerr_unlocked(p)	__sclearerr(p)
+#define	fileno_unlocked(p)	__sfileno(p)
+
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_stdio.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus)
+/* Security checking functions.  */
+#include <secure/_stdio.h>
+#endif
+
+#endif /* _STDIO_H_ */
lib/libc/include/x86_64-macos-gnu/stdlib.h
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
+ */
+
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <Availability.h>
+#include <sys/cdefs.h>
+
+#include <_types.h>
+#if !defined(_ANSI_SOURCE)
+#include <sys/wait.h>
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <alloca.h>
+#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+#endif /* !_ANSI_SOURCE */
+
+/* DO NOT REMOVE THIS COMMENT: fixincludes needs to see:
+ * _GCC_SIZE_T */
+#include <sys/_types/_size_t.h>
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <sys/_types/_ct_rune_t.h>
+#include <sys/_types/_rune_t.h>
+#endif	/* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
+
+#include <sys/_types/_wchar_t.h>
+
+typedef struct {
+	int quot;		/* quotient */
+	int rem;		/* remainder */
+} div_t;
+
+typedef struct {
+	long quot;		/* quotient */
+	long rem;		/* remainder */
+} ldiv_t;
+
+#if !__DARWIN_NO_LONG_LONG
+typedef struct {
+	long long quot;
+	long long rem;
+} lldiv_t;
+#endif /* !__DARWIN_NO_LONG_LONG */
+
+#include <sys/_types/_null.h>
+
+#define	EXIT_FAILURE	1
+#define	EXIT_SUCCESS	0
+
+#define	RAND_MAX	0x7fffffff
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <_xlocale.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#ifndef MB_CUR_MAX
+#ifdef _USE_EXTENDED_LOCALES_
+#define	MB_CUR_MAX	(___mb_cur_max())
+#ifndef MB_CUR_MAX_L
+#define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x))
+#endif /* !MB_CUR_MAX_L */
+#else /* !_USE_EXTENDED_LOCALES_ */
+extern int __mb_cur_max;
+#define	MB_CUR_MAX	__mb_cur_max
+#endif /* _USE_EXTENDED_LOCALES_ */
+#endif /* MB_CUR_MAX */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \
+    && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L)
+#define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x))
+#endif
+
+#include <malloc/_malloc.h>
+
+__BEGIN_DECLS
+void	 abort(void) __cold __dead2;
+int	 abs(int) __pure2;
+int	 atexit(void (* _Nonnull)(void));
+double	 atof(const char *);
+int	 atoi(const char *);
+long	 atol(const char *);
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 atoll(const char *);
+#endif /* !__DARWIN_NO_LONG_LONG */
+void	*bsearch(const void *__key, const void *__base, size_t __nel,
+	    size_t __width, int (* _Nonnull __compar)(const void *, const void *));
+/* calloc is now declared in _malloc.h */
+div_t	 div(int, int) __pure2;
+void	 exit(int) __dead2;
+/* free is now declared in _malloc.h */
+char	*getenv(const char *);
+long	 labs(long) __pure2;
+ldiv_t	 ldiv(long, long) __pure2;
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 llabs(long long);
+lldiv_t	 lldiv(long long, long long);
+#endif /* !__DARWIN_NO_LONG_LONG */
+/* malloc is now declared in _malloc.h */
+int	 mblen(const char *__s, size_t __n);
+size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
+int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
+/* posix_memalign is now declared in _malloc.h */
+void	 qsort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+int	 rand(void) __swift_unavailable("Use arc4random instead.");
+/* realloc is now declared in _malloc.h */
+void	 srand(unsigned) __swift_unavailable("Use arc4random instead.");
+double	 strtod(const char *, char **) __DARWIN_ALIAS(strtod);
+float	 strtof(const char *, char **) __DARWIN_ALIAS(strtof);
+long	 strtol(const char *__str, char **__endptr, int __base);
+long double
+	 strtold(const char *, char **);
+#if !__DARWIN_NO_LONG_LONG
+long long 
+	 strtoll(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+unsigned long
+	 strtoul(const char *__str, char **__endptr, int __base);
+#if !__DARWIN_NO_LONG_LONG
+unsigned long long
+	 strtoull(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+
+#if TARGET_OS_EMBEDDED
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
+#else
+#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
+#endif
+
+__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable")
+__API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
+__WATCHOS_PROHIBITED __TVOS_PROHIBITED
+int	 system(const char *) __DARWIN_ALIAS_C(system);
+
+#undef __swift_unavailable_on
+
+size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
+int	 wctomb(char *, wchar_t);
+
+#ifndef _ANSI_SOURCE
+void	_Exit(int) __dead2;
+long	 a64l(const char *);
+double	 drand48(void);
+char	*ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */
+double	 erand48(unsigned short[3]);
+char	*fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */
+char	*gcvt(double, int, char *); /* LEGACY */
+int	 getsubopt(char **, char * const *, char **);
+int	 grantpt(int);
+#if __DARWIN_UNIX03
+char	*initstate(unsigned, char *, size_t); /* no  __DARWIN_ALIAS needed */
+#else /* !__DARWIN_UNIX03 */
+char	*initstate(unsigned long, char *, long);
+#endif /* __DARWIN_UNIX03 */
+long	 jrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead.");
+char	*l64a(long);
+void	 lcong48(unsigned short[7]);
+long	 lrand48(void) __swift_unavailable("Use arc4random instead.");
+char	*mktemp(char *);
+int	 mkstemp(char *);
+long	 mrand48(void) __swift_unavailable("Use arc4random instead.");
+long	 nrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead.");
+int	 posix_openpt(int);
+char	*ptsname(int);
+
+#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3));
+#endif
+
+int	 putenv(char *) __DARWIN_ALIAS(putenv);
+long	 random(void) __swift_unavailable("Use arc4random instead.");
+int	 rand_r(unsigned *) __swift_unavailable("Use arc4random instead.");
+#if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH)
+char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath);
+#else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */
+char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath);
+#endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */
+unsigned short
+	*seed48(unsigned short[3]);
+int	 setenv(const char * __name, const char * __value, int __overwrite) __DARWIN_ALIAS(setenv);
+#if __DARWIN_UNIX03
+void	 setkey(const char *) __DARWIN_ALIAS(setkey);
+#else /* !__DARWIN_UNIX03 */
+int	 setkey(const char *);
+#endif /* __DARWIN_UNIX03 */
+char	*setstate(const char *);
+void	 srand48(long);
+#if __DARWIN_UNIX03
+void	 srandom(unsigned);
+#else /* !__DARWIN_UNIX03 */
+void	 srandom(unsigned long);
+#endif /* __DARWIN_UNIX03 */
+int	 unlockpt(int);
+#if __DARWIN_UNIX03
+int	 unsetenv(const char *) __DARWIN_ALIAS(unsetenv);
+#else /* !__DARWIN_UNIX03 */
+void	 unsetenv(const char *);
+#endif /* __DARWIN_UNIX03 */
+#endif	/* !_ANSI_SOURCE */
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+#include <machine/types.h>
+#include <sys/_types/_dev_t.h>
+#include <sys/_types/_mode_t.h>
+#include <_types/_uint32_t.h>
+
+uint32_t arc4random(void);
+void	 arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/)
+    __OSX_DEPRECATED(10.0, 10.12, "use arc4random_stir")
+    __IOS_DEPRECATED(2.0, 10.0, "use arc4random_stir")
+    __TVOS_DEPRECATED(2.0, 10.0, "use arc4random_stir")
+    __WATCHOS_DEPRECATED(1.0, 3.0, "use arc4random_stir");
+void	 arc4random_buf(void * __buf, size_t __nbytes) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+void	 arc4random_stir(void);
+uint32_t
+	 arc4random_uniform(uint32_t __upper_bound) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+#ifdef __BLOCKS__
+int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+void	*bsearch_b(const void *__key, const void *__base, size_t __nel,
+	    size_t __width, int (^ _Nonnull __compar)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+
+	 /* getcap(3) functions */
+char	*cgetcap(char *, const char *, int);
+int	 cgetclose(void);
+int	 cgetent(char **, char **, const char *);
+int	 cgetfirst(char **, char **);
+int	 cgetmatch(const char *, const char *);
+int	 cgetnext(char **, char **);
+int	 cgetnum(char *, const char *, long *);
+int	 cgetset(const char *);
+int	 cgetstr(char *, const char *, char **);
+int	 cgetustr(char *, const char *, char **);
+
+int	 daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
+char	*devname(dev_t, mode_t);
+char	*devname_r(dev_t, mode_t, char *buf, int len);
+char	*getbsize(int *, long *);
+int	 getloadavg(double [], int);
+const char
+	*getprogname(void);
+void	 setprogname(const char *);
+
+#ifdef __BLOCKS__
+#if __has_attribute(noescape)
+#define __sort_noescape __attribute__((__noescape__))
+#else
+#define __sort_noescape
+#endif
+#endif /* __BLOCKS__ */
+
+int	 heapsort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int	 heapsort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+int	 mergesort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int	 mergesort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void	 psort(void *__base, size_t __nel, size_t __width,
+	    int (* _Nonnull __compar)(const void *, const void *))
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#ifdef __BLOCKS__
+void	 psort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void	 psort_r(void *__base, size_t __nel, size_t __width, void *,
+	    int (* _Nonnull __compar)(void *, const void *, const void *))
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#ifdef __BLOCKS__
+void	 qsort_b(void *__base, size_t __nel, size_t __width,
+	    int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void	 qsort_r(void *__base, size_t __nel, size_t __width, void *,
+	    int (* _Nonnull __compar)(void *, const void *, const void *));
+int	 radixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
+	    unsigned __endbyte);
+int	rpmatch(const char *)
+	__API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
+int	 sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
+	    unsigned __endbyte);
+void	 sranddev(void);
+void	 srandomdev(void);
+void	*reallocf(void *__ptr, size_t __size) __alloc_size(2);
+#if !__DARWIN_NO_LONG_LONG
+long long
+	 strtoq(const char *__str, char **__endptr, int __base);
+unsigned long long
+	 strtouq(const char *__str, char **__endptr, int __base);
+#endif /* !__DARWIN_NO_LONG_LONG */
+extern char *suboptarg;		/* getsubopt(3) external variable */
+/* valloc is now declared in _malloc.h */
+#endif	/* !_ANSI_SOURCE && !_POSIX_SOURCE */
+
+/* Poison the following routines if -fshort-wchar is set */
+#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
+#pragma GCC poison mbstowcs mbtowc wcstombs wctomb
+#endif
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_stdlib.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* _STDLIB_H_ */
lib/libc/include/x86_64-macos-gnu/string.h
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2000, 2007, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)string.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _STRING_H_
+#define	_STRING_H_
+
+#include <_types.h>
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_null.h>
+
+/* ANSI-C */
+
+__BEGIN_DECLS
+void	*memchr(const void *__s, int __c, size_t __n);
+int	 memcmp(const void *__s1, const void *__s2, size_t __n);
+void	*memcpy(void *__dst, const void *__src, size_t __n);
+void	*memmove(void *__dst, const void *__src, size_t __len);
+void	*memset(void *__b, int __c, size_t __len);
+char	*strcat(char *__s1, const char *__s2);
+char	*strchr(const char *__s, int __c);
+int	 strcmp(const char *__s1, const char *__s2);
+int	 strcoll(const char *__s1, const char *__s2);
+char	*strcpy(char *__dst, const char *__src);
+size_t	 strcspn(const char *__s, const char *__charset);
+char	*strerror(int __errnum) __DARWIN_ALIAS(strerror);
+size_t	 strlen(const char *__s);
+char	*strncat(char *__s1, const char *__s2, size_t __n);
+int	 strncmp(const char *__s1, const char *__s2, size_t __n);
+char	*strncpy(char *__dst, const char *__src, size_t __n);
+char	*strpbrk(const char *__s, const char *__charset);
+char	*strrchr(const char *__s, int __c);
+size_t	 strspn(const char *__s, const char *__charset);
+char	*strstr(const char *__big, const char *__little);
+char	*strtok(char *__str, const char *__sep);
+size_t	 strxfrm(char *__s1, const char *__s2, size_t __n);
+__END_DECLS
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1c-1995,
+ * POSIX.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ */
+
+#if __DARWIN_C_LEVEL >= 199506L
+__BEGIN_DECLS
+char	*strtok_r(char *__str, const char *__sep, char **__lasts);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 199506L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2001
+ */
+
+#if __DARWIN_C_LEVEL >= 200112L
+__BEGIN_DECLS
+int	 strerror_r(int __errnum, char *__strerrbuf, size_t __buflen);
+char	*strdup(const char *__s1);
+void	*memccpy(void *__dst, const void *__src, int __c, size_t __n);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200112L */
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2008
+ */
+
+#if __DARWIN_C_LEVEL >= 200809L
+__BEGIN_DECLS
+char	*stpcpy(char *__dst, const char *__src);
+char    *stpncpy(char *__dst, const char *__src, size_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+char	*strndup(const char *__s1, size_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+size_t   strnlen(const char *__s1, size_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+char	*strsignal(int __sig);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+/* C11 Annex K */
+
+#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
+#include <sys/_types/_rsize_t.h>
+#include <sys/_types/_errno_t.h>
+
+__BEGIN_DECLS
+errno_t	memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
+__END_DECLS
+#endif
+
+/* Darwin extensions */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+#include <sys/_types/_ssize_t.h>
+
+__BEGIN_DECLS
+void	*memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+void     memset_pattern4(void *__b, const void *__pattern4, size_t __len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_0);
+void     memset_pattern8(void *__b, const void *__pattern8, size_t __len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_0);
+void     memset_pattern16(void *__b, const void *__pattern16, size_t __len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_0);
+
+char	*strcasestr(const char *__big, const char *__little);
+char	*strnstr(const char *__big, const char *__little, size_t __len);
+size_t	 strlcat(char *__dst, const char *__source, size_t __size);
+size_t	 strlcpy(char *__dst, const char *__source, size_t __size);
+void	 strmode(int __mode, char *__bp);
+char	*strsep(char **__stringp, const char *__delim);
+
+/* SUS places swab() in unistd.h.  It is listed here for source compatibility */
+void	 swab(const void * __restrict, void * __restrict, ssize_t);
+
+__OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1)
+__TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1)
+int	timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len);
+__END_DECLS
+
+/* Some functions historically defined in string.h were placed in strings.h
+ * by SUS.  We are using "strings.h" instead of <strings.h> to avoid an issue
+ * where /Developer/Headers/FlatCarbon/Strings.h could be included instead on
+ * case-insensitive file systems.
+ */
+#include "strings.h"
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_string.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus)
+/* Security checking functions.  */
+#include <secure/_string.h>
+#endif
+
+#endif /* _STRING_H_ */
lib/libc/include/x86_64-macos-gnu/strings.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2000, 2007, 2010 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)strings.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <_types.h>
+
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <sys/_types/_size_t.h>
+
+__BEGIN_DECLS
+/* Removed in Issue 7 */
+#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L
+int	 bcmp(const void *, const void *, size_t) __POSIX_C_DEPRECATED(200112L);
+void	 bcopy(const void *, void *, size_t) __POSIX_C_DEPRECATED(200112L);
+void	 bzero(void *, size_t) __POSIX_C_DEPRECATED(200112L);
+char	*index(const char *, int) __POSIX_C_DEPRECATED(200112L);
+char	*rindex(const char *, int) __POSIX_C_DEPRECATED(200112L);
+#endif
+
+int	 ffs(int);
+int	 strcasecmp(const char *, const char *);
+int	 strncasecmp(const char *, const char *, size_t);
+__END_DECLS
+
+/* Darwin extensions */
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+__BEGIN_DECLS
+int	 ffsl(long) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int	 ffsll(long long) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
+int	 fls(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int	 flsl(long) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+int	 flsll(long long) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
+__END_DECLS
+
+#include <string.h>
+#endif
+
+#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus)
+/* Security checking functions.  */
+#include <secure/_strings.h>
+#endif
+
+#endif  /* _STRINGS_H_ */
+
lib/libc/include/x86_64-macos-gnu/tgmath.h
@@ -0,0 +1,1372 @@
+/*
+ * Copyright (c) 2009 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef __TGMATH_H
+#define __TGMATH_H
+
+/* C99 7.22 Type-generic math <tgmath.h>. */
+#include <math.h>
+
+/* C++ handles type genericity with overloading in math.h. */
+#ifndef __cplusplus
+#include <complex.h>
+
+#define _TG_ATTRSp __attribute__((__overloadable__))
+#define _TG_ATTRS __attribute__((__overloadable__, __always_inline__))
+
+// promotion
+
+typedef void _Argument_type_is_not_arithmetic;
+static _Argument_type_is_not_arithmetic __tg_promote(...)
+  __attribute__((__unavailable__,__overloadable__));
+static double               _TG_ATTRSp __tg_promote(int);
+static double               _TG_ATTRSp __tg_promote(unsigned int);
+static double               _TG_ATTRSp __tg_promote(long);
+static double               _TG_ATTRSp __tg_promote(unsigned long);
+static double               _TG_ATTRSp __tg_promote(long long);
+static double               _TG_ATTRSp __tg_promote(unsigned long long);
+static float                _TG_ATTRSp __tg_promote(float);
+static double               _TG_ATTRSp __tg_promote(double);
+static long double          _TG_ATTRSp __tg_promote(long double);
+static float _Complex       _TG_ATTRSp __tg_promote(float _Complex);
+static double _Complex      _TG_ATTRSp __tg_promote(double _Complex);
+static long double _Complex _TG_ATTRSp __tg_promote(long double _Complex);
+
+#define __tg_promote1(__x)           (__typeof__(__tg_promote(__x)))
+#define __tg_promote2(__x, __y)      (__typeof__(__tg_promote(__x) + \
+                                                 __tg_promote(__y)))
+#define __tg_promote3(__x, __y, __z) (__typeof__(__tg_promote(__x) + \
+                                                 __tg_promote(__y) + \
+                                                 __tg_promote(__z)))
+
+// acos
+
+static float
+    _TG_ATTRS
+    __tg_acos(float __x) {return acosf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_acos(double __x) {return acos(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_acos(long double __x) {return acosl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_acos(float _Complex __x) {return cacosf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_acos(double _Complex __x) {return cacos(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_acos(long double _Complex __x) {return cacosl(__x);}
+
+#undef acos
+#define acos(__x) __tg_acos(__tg_promote1((__x))(__x))
+
+// asin
+
+static float
+    _TG_ATTRS
+    __tg_asin(float __x) {return asinf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_asin(double __x) {return asin(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_asin(long double __x) {return asinl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_asin(float _Complex __x) {return casinf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_asin(double _Complex __x) {return casin(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_asin(long double _Complex __x) {return casinl(__x);}
+
+#undef asin
+#define asin(__x) __tg_asin(__tg_promote1((__x))(__x))
+
+// atan
+
+static float
+    _TG_ATTRS
+    __tg_atan(float __x) {return atanf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_atan(double __x) {return atan(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_atan(long double __x) {return atanl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_atan(float _Complex __x) {return catanf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_atan(double _Complex __x) {return catan(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_atan(long double _Complex __x) {return catanl(__x);}
+
+#undef atan
+#define atan(__x) __tg_atan(__tg_promote1((__x))(__x))
+
+// acosh
+
+static float
+    _TG_ATTRS
+    __tg_acosh(float __x) {return acoshf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_acosh(double __x) {return acosh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_acosh(long double __x) {return acoshl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_acosh(float _Complex __x) {return cacoshf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_acosh(double _Complex __x) {return cacosh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_acosh(long double _Complex __x) {return cacoshl(__x);}
+
+#undef acosh
+#define acosh(__x) __tg_acosh(__tg_promote1((__x))(__x))
+
+// asinh
+
+static float
+    _TG_ATTRS
+    __tg_asinh(float __x) {return asinhf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_asinh(double __x) {return asinh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_asinh(long double __x) {return asinhl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_asinh(float _Complex __x) {return casinhf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_asinh(double _Complex __x) {return casinh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_asinh(long double _Complex __x) {return casinhl(__x);}
+
+#undef asinh
+#define asinh(__x) __tg_asinh(__tg_promote1((__x))(__x))
+
+// atanh
+
+static float
+    _TG_ATTRS
+    __tg_atanh(float __x) {return atanhf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_atanh(double __x) {return atanh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_atanh(long double __x) {return atanhl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_atanh(float _Complex __x) {return catanhf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_atanh(double _Complex __x) {return catanh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_atanh(long double _Complex __x) {return catanhl(__x);}
+
+#undef atanh
+#define atanh(__x) __tg_atanh(__tg_promote1((__x))(__x))
+
+// cos
+
+static float
+    _TG_ATTRS
+    __tg_cos(float __x) {return cosf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_cos(double __x) {return cos(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_cos(long double __x) {return cosl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_cos(float _Complex __x) {return ccosf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_cos(double _Complex __x) {return ccos(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_cos(long double _Complex __x) {return ccosl(__x);}
+
+#undef cos
+#define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
+
+// sin
+
+static float
+    _TG_ATTRS
+    __tg_sin(float __x) {return sinf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_sin(double __x) {return sin(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_sin(long double __x) {return sinl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_sin(float _Complex __x) {return csinf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_sin(double _Complex __x) {return csin(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_sin(long double _Complex __x) {return csinl(__x);}
+
+#undef sin
+#define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
+
+// tan
+
+static float
+    _TG_ATTRS
+    __tg_tan(float __x) {return tanf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_tan(double __x) {return tan(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_tan(long double __x) {return tanl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_tan(float _Complex __x) {return ctanf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_tan(double _Complex __x) {return ctan(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_tan(long double _Complex __x) {return ctanl(__x);}
+
+#undef tan
+#define tan(__x) __tg_tan(__tg_promote1((__x))(__x))
+
+// cosh
+
+static float
+    _TG_ATTRS
+    __tg_cosh(float __x) {return coshf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_cosh(double __x) {return cosh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_cosh(long double __x) {return coshl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_cosh(float _Complex __x) {return ccoshf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_cosh(double _Complex __x) {return ccosh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_cosh(long double _Complex __x) {return ccoshl(__x);}
+
+#undef cosh
+#define cosh(__x) __tg_cosh(__tg_promote1((__x))(__x))
+
+// sinh
+
+static float
+    _TG_ATTRS
+    __tg_sinh(float __x) {return sinhf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_sinh(double __x) {return sinh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_sinh(long double __x) {return sinhl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_sinh(float _Complex __x) {return csinhf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_sinh(double _Complex __x) {return csinh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_sinh(long double _Complex __x) {return csinhl(__x);}
+
+#undef sinh
+#define sinh(__x) __tg_sinh(__tg_promote1((__x))(__x))
+
+// tanh
+
+static float
+    _TG_ATTRS
+    __tg_tanh(float __x) {return tanhf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_tanh(double __x) {return tanh(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_tanh(long double __x) {return tanhl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_tanh(float _Complex __x) {return ctanhf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_tanh(double _Complex __x) {return ctanh(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_tanh(long double _Complex __x) {return ctanhl(__x);}
+
+#undef tanh
+#define tanh(__x) __tg_tanh(__tg_promote1((__x))(__x))
+
+// exp
+
+static float
+    _TG_ATTRS
+    __tg_exp(float __x) {return expf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_exp(double __x) {return exp(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_exp(long double __x) {return expl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_exp(float _Complex __x) {return cexpf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_exp(double _Complex __x) {return cexp(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_exp(long double _Complex __x) {return cexpl(__x);}
+
+#undef exp
+#define exp(__x) __tg_exp(__tg_promote1((__x))(__x))
+
+// log
+
+static float
+    _TG_ATTRS
+    __tg_log(float __x) {return logf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_log(double __x) {return log(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_log(long double __x) {return logl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_log(float _Complex __x) {return clogf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_log(double _Complex __x) {return clog(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_log(long double _Complex __x) {return clogl(__x);}
+
+#undef log
+#define log(__x) __tg_log(__tg_promote1((__x))(__x))
+
+// pow
+
+static float
+    _TG_ATTRS
+    __tg_pow(float __x, float __y) {return powf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_pow(double __x, double __y) {return pow(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_pow(long double __x, long double __y) {return powl(__x, __y);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_pow(float _Complex __x, float _Complex __y) {return cpowf(__x, __y);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_pow(double _Complex __x, double _Complex __y) {return cpow(__x, __y);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_pow(long double _Complex __x, long double _Complex __y) 
+    {return cpowl(__x, __y);}
+
+#undef pow
+#define pow(__x, __y) __tg_pow(__tg_promote2((__x), (__y))(__x), \
+                               __tg_promote2((__x), (__y))(__y))
+
+// sqrt
+
+static float
+    _TG_ATTRS
+    __tg_sqrt(float __x) {return sqrtf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_sqrt(double __x) {return sqrt(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_sqrt(long double __x) {return sqrtl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_sqrt(float _Complex __x) {return csqrtf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_sqrt(double _Complex __x) {return csqrt(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_sqrt(long double _Complex __x) {return csqrtl(__x);}
+
+#undef sqrt
+#define sqrt(__x) __tg_sqrt(__tg_promote1((__x))(__x))
+
+// fabs
+
+static float
+    _TG_ATTRS
+    __tg_fabs(float __x) {return fabsf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_fabs(double __x) {return fabs(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_fabs(long double __x) {return fabsl(__x);}
+
+static float
+    _TG_ATTRS
+    __tg_fabs(float _Complex __x) {return cabsf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_fabs(double _Complex __x) {return cabs(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_fabs(long double _Complex __x) {return cabsl(__x);}
+
+#undef fabs
+#define fabs(__x) __tg_fabs(__tg_promote1((__x))(__x))
+
+// atan2
+
+static float
+    _TG_ATTRS
+    __tg_atan2(float __x, float __y) {return atan2f(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_atan2(double __x, double __y) {return atan2(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_atan2(long double __x, long double __y) {return atan2l(__x, __y);}
+
+#undef atan2
+#define atan2(__x, __y) __tg_atan2(__tg_promote2((__x), (__y))(__x), \
+                                   __tg_promote2((__x), (__y))(__y))
+
+// cbrt
+
+static float
+    _TG_ATTRS
+    __tg_cbrt(float __x) {return cbrtf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_cbrt(double __x) {return cbrt(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_cbrt(long double __x) {return cbrtl(__x);}
+
+#undef cbrt
+#define cbrt(__x) __tg_cbrt(__tg_promote1((__x))(__x))
+
+// ceil
+
+static float
+    _TG_ATTRS
+    __tg_ceil(float __x) {return ceilf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_ceil(double __x) {return ceil(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_ceil(long double __x) {return ceill(__x);}
+
+#undef ceil
+#define ceil(__x) __tg_ceil(__tg_promote1((__x))(__x))
+
+// copysign
+
+static float
+    _TG_ATTRS
+    __tg_copysign(float __x, float __y) {return copysignf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_copysign(double __x, double __y) {return copysign(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_copysign(long double __x, long double __y) {return copysignl(__x, __y);}
+
+#undef copysign
+#define copysign(__x, __y) __tg_copysign(__tg_promote2((__x), (__y))(__x), \
+                                         __tg_promote2((__x), (__y))(__y))
+
+// erf
+
+static float
+    _TG_ATTRS
+    __tg_erf(float __x) {return erff(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_erf(double __x) {return erf(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_erf(long double __x) {return erfl(__x);}
+
+#undef erf
+#define erf(__x) __tg_erf(__tg_promote1((__x))(__x))
+
+// erfc
+
+static float
+    _TG_ATTRS
+    __tg_erfc(float __x) {return erfcf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_erfc(double __x) {return erfc(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_erfc(long double __x) {return erfcl(__x);}
+
+#undef erfc
+#define erfc(__x) __tg_erfc(__tg_promote1((__x))(__x))
+
+// exp2
+
+static float
+    _TG_ATTRS
+    __tg_exp2(float __x) {return exp2f(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_exp2(double __x) {return exp2(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_exp2(long double __x) {return exp2l(__x);}
+
+#undef exp2
+#define exp2(__x) __tg_exp2(__tg_promote1((__x))(__x))
+
+// expm1
+
+static float
+    _TG_ATTRS
+    __tg_expm1(float __x) {return expm1f(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_expm1(double __x) {return expm1(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_expm1(long double __x) {return expm1l(__x);}
+
+#undef expm1
+#define expm1(__x) __tg_expm1(__tg_promote1((__x))(__x))
+
+// fdim
+
+static float
+    _TG_ATTRS
+    __tg_fdim(float __x, float __y) {return fdimf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_fdim(double __x, double __y) {return fdim(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_fdim(long double __x, long double __y) {return fdiml(__x, __y);}
+
+#undef fdim
+#define fdim(__x, __y) __tg_fdim(__tg_promote2((__x), (__y))(__x), \
+                                 __tg_promote2((__x), (__y))(__y))
+
+// floor
+
+static float
+    _TG_ATTRS
+    __tg_floor(float __x) {return floorf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_floor(double __x) {return floor(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_floor(long double __x) {return floorl(__x);}
+
+#undef floor
+#define floor(__x) __tg_floor(__tg_promote1((__x))(__x))
+
+// fma
+
+static float
+    _TG_ATTRS
+    __tg_fma(float __x, float __y, float __z)
+    {return fmaf(__x, __y, __z);}
+
+static double
+    _TG_ATTRS
+    __tg_fma(double __x, double __y, double __z)
+    {return fma(__x, __y, __z);}
+
+static long double
+    _TG_ATTRS
+    __tg_fma(long double __x,long double __y, long double __z)
+    {return fmal(__x, __y, __z);}
+
+#undef fma
+#define fma(__x, __y, __z)                                \
+        __tg_fma(__tg_promote3((__x), (__y), (__z))(__x), \
+                 __tg_promote3((__x), (__y), (__z))(__y), \
+                 __tg_promote3((__x), (__y), (__z))(__z))
+
+// fmax
+
+static float
+    _TG_ATTRS
+    __tg_fmax(float __x, float __y) {return fmaxf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_fmax(double __x, double __y) {return fmax(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_fmax(long double __x, long double __y) {return fmaxl(__x, __y);}
+
+#undef fmax
+#define fmax(__x, __y) __tg_fmax(__tg_promote2((__x), (__y))(__x), \
+                                 __tg_promote2((__x), (__y))(__y))
+
+// fmin
+
+static float
+    _TG_ATTRS
+    __tg_fmin(float __x, float __y) {return fminf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_fmin(double __x, double __y) {return fmin(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_fmin(long double __x, long double __y) {return fminl(__x, __y);}
+
+#undef fmin
+#define fmin(__x, __y) __tg_fmin(__tg_promote2((__x), (__y))(__x), \
+                                 __tg_promote2((__x), (__y))(__y))
+
+// fmod
+
+static float
+    _TG_ATTRS
+    __tg_fmod(float __x, float __y) {return fmodf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_fmod(double __x, double __y) {return fmod(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_fmod(long double __x, long double __y) {return fmodl(__x, __y);}
+
+#undef fmod
+#define fmod(__x, __y) __tg_fmod(__tg_promote2((__x), (__y))(__x), \
+                                 __tg_promote2((__x), (__y))(__y))
+
+// frexp
+
+static float
+    _TG_ATTRS
+    __tg_frexp(float __x, int* __y) {return frexpf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_frexp(double __x, int* __y) {return frexp(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_frexp(long double __x, int* __y) {return frexpl(__x, __y);}
+
+#undef frexp
+#define frexp(__x, __y) __tg_frexp(__tg_promote1((__x))(__x), __y)
+
+// hypot
+
+static float
+    _TG_ATTRS
+    __tg_hypot(float __x, float __y) {return hypotf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_hypot(double __x, double __y) {return hypot(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_hypot(long double __x, long double __y) {return hypotl(__x, __y);}
+
+#undef hypot
+#define hypot(__x, __y) __tg_hypot(__tg_promote2((__x), (__y))(__x), \
+                                   __tg_promote2((__x), (__y))(__y))
+
+// ilogb
+
+static int
+    _TG_ATTRS
+    __tg_ilogb(float __x) {return ilogbf(__x);}
+
+static int
+    _TG_ATTRS
+    __tg_ilogb(double __x) {return ilogb(__x);}
+
+static int
+    _TG_ATTRS
+    __tg_ilogb(long double __x) {return ilogbl(__x);}
+
+#undef ilogb
+#define ilogb(__x) __tg_ilogb(__tg_promote1((__x))(__x))
+
+// ldexp
+
+static float
+    _TG_ATTRS
+    __tg_ldexp(float __x, int __y) {return ldexpf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_ldexp(double __x, int __y) {return ldexp(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_ldexp(long double __x, int __y) {return ldexpl(__x, __y);}
+
+#undef ldexp
+#define ldexp(__x, __y) __tg_ldexp(__tg_promote1((__x))(__x), __y)
+
+// lgamma
+
+static float
+    _TG_ATTRS
+    __tg_lgamma(float __x) {return lgammaf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_lgamma(double __x) {return lgamma(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_lgamma(long double __x) {return lgammal(__x);}
+
+#undef lgamma
+#define lgamma(__x) __tg_lgamma(__tg_promote1((__x))(__x))
+
+// llrint
+
+static long long
+    _TG_ATTRS
+    __tg_llrint(float __x) {return llrintf(__x);}
+
+static long long
+    _TG_ATTRS
+    __tg_llrint(double __x) {return llrint(__x);}
+
+static long long
+    _TG_ATTRS
+    __tg_llrint(long double __x) {return llrintl(__x);}
+
+#undef llrint
+#define llrint(__x) __tg_llrint(__tg_promote1((__x))(__x))
+
+// llround
+
+static long long
+    _TG_ATTRS
+    __tg_llround(float __x) {return llroundf(__x);}
+
+static long long
+    _TG_ATTRS
+    __tg_llround(double __x) {return llround(__x);}
+
+static long long
+    _TG_ATTRS
+    __tg_llround(long double __x) {return llroundl(__x);}
+
+#undef llround
+#define llround(__x) __tg_llround(__tg_promote1((__x))(__x))
+
+// log10
+
+static float
+    _TG_ATTRS
+    __tg_log10(float __x) {return log10f(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_log10(double __x) {return log10(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_log10(long double __x) {return log10l(__x);}
+
+#undef log10
+#define log10(__x) __tg_log10(__tg_promote1((__x))(__x))
+
+// log1p
+
+static float
+    _TG_ATTRS
+    __tg_log1p(float __x) {return log1pf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_log1p(double __x) {return log1p(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_log1p(long double __x) {return log1pl(__x);}
+
+#undef log1p
+#define log1p(__x) __tg_log1p(__tg_promote1((__x))(__x))
+
+// log2
+
+static float
+    _TG_ATTRS
+    __tg_log2(float __x) {return log2f(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_log2(double __x) {return log2(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_log2(long double __x) {return log2l(__x);}
+
+#undef log2
+#define log2(__x) __tg_log2(__tg_promote1((__x))(__x))
+
+// logb
+
+static float
+    _TG_ATTRS
+    __tg_logb(float __x) {return logbf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_logb(double __x) {return logb(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_logb(long double __x) {return logbl(__x);}
+
+#undef logb
+#define logb(__x) __tg_logb(__tg_promote1((__x))(__x))
+
+// lrint
+
+static long
+    _TG_ATTRS
+    __tg_lrint(float __x) {return lrintf(__x);}
+
+static long
+    _TG_ATTRS
+    __tg_lrint(double __x) {return lrint(__x);}
+
+static long
+    _TG_ATTRS
+    __tg_lrint(long double __x) {return lrintl(__x);}
+
+#undef lrint
+#define lrint(__x) __tg_lrint(__tg_promote1((__x))(__x))
+
+// lround
+
+static long
+    _TG_ATTRS
+    __tg_lround(float __x) {return lroundf(__x);}
+
+static long
+    _TG_ATTRS
+    __tg_lround(double __x) {return lround(__x);}
+
+static long
+    _TG_ATTRS
+    __tg_lround(long double __x) {return lroundl(__x);}
+
+#undef lround
+#define lround(__x) __tg_lround(__tg_promote1((__x))(__x))
+
+// nearbyint
+
+static float
+    _TG_ATTRS
+    __tg_nearbyint(float __x) {return nearbyintf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_nearbyint(double __x) {return nearbyint(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_nearbyint(long double __x) {return nearbyintl(__x);}
+
+#undef nearbyint
+#define nearbyint(__x) __tg_nearbyint(__tg_promote1((__x))(__x))
+
+// nextafter
+
+static float
+    _TG_ATTRS
+    __tg_nextafter(float __x, float __y) {return nextafterf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_nextafter(double __x, double __y) {return nextafter(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_nextafter(long double __x, long double __y) {return nextafterl(__x, __y);}
+
+#undef nextafter
+#define nextafter(__x, __y) __tg_nextafter(__tg_promote2((__x), (__y))(__x), \
+                                           __tg_promote2((__x), (__y))(__y))
+
+// nexttoward
+
+static float
+    _TG_ATTRS
+    __tg_nexttoward(float __x, long double __y) {return nexttowardf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_nexttoward(double __x, long double __y) {return nexttoward(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_nexttoward(long double __x, long double __y) {return nexttowardl(__x, __y);}
+
+#undef nexttoward
+#define nexttoward(__x, __y) __tg_nexttoward(__tg_promote1((__x))(__x), (__y))
+
+// remainder
+
+static float
+    _TG_ATTRS
+    __tg_remainder(float __x, float __y) {return remainderf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_remainder(double __x, double __y) {return remainder(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_remainder(long double __x, long double __y) {return remainderl(__x, __y);}
+
+#undef remainder
+#define remainder(__x, __y) __tg_remainder(__tg_promote2((__x), (__y))(__x), \
+                                           __tg_promote2((__x), (__y))(__y))
+
+// remquo
+
+static float
+    _TG_ATTRS
+    __tg_remquo(float __x, float __y, int* __z)
+    {return remquof(__x, __y, __z);}
+
+static double
+    _TG_ATTRS
+    __tg_remquo(double __x, double __y, int* __z)
+    {return remquo(__x, __y, __z);}
+
+static long double
+    _TG_ATTRS
+    __tg_remquo(long double __x,long double __y, int* __z)
+    {return remquol(__x, __y, __z);}
+
+#undef remquo
+#define remquo(__x, __y, __z)                         \
+        __tg_remquo(__tg_promote2((__x), (__y))(__x), \
+                    __tg_promote2((__x), (__y))(__y), \
+                    (__z))
+
+// rint
+
+static float
+    _TG_ATTRS
+    __tg_rint(float __x) {return rintf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_rint(double __x) {return rint(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_rint(long double __x) {return rintl(__x);}
+
+#undef rint
+#define rint(__x) __tg_rint(__tg_promote1((__x))(__x))
+
+// round
+
+static float
+    _TG_ATTRS
+    __tg_round(float __x) {return roundf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_round(double __x) {return round(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_round(long double __x) {return roundl(__x);}
+
+#undef round
+#define round(__x) __tg_round(__tg_promote1((__x))(__x))
+
+// scalbn
+
+static float
+    _TG_ATTRS
+    __tg_scalbn(float __x, int __y) {return scalbnf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_scalbn(double __x, int __y) {return scalbn(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_scalbn(long double __x, int __y) {return scalbnl(__x, __y);}
+
+#undef scalbn
+#define scalbn(__x, __y) __tg_scalbn(__tg_promote1((__x))(__x), __y)
+
+// scalbln
+
+static float
+    _TG_ATTRS
+    __tg_scalbln(float __x, long __y) {return scalblnf(__x, __y);}
+
+static double
+    _TG_ATTRS
+    __tg_scalbln(double __x, long __y) {return scalbln(__x, __y);}
+
+static long double
+    _TG_ATTRS
+    __tg_scalbln(long double __x, long __y) {return scalblnl(__x, __y);}
+
+#undef scalbln
+#define scalbln(__x, __y) __tg_scalbln(__tg_promote1((__x))(__x), __y)
+
+// tgamma
+
+static float
+    _TG_ATTRS
+    __tg_tgamma(float __x) {return tgammaf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_tgamma(double __x) {return tgamma(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_tgamma(long double __x) {return tgammal(__x);}
+
+#undef tgamma
+#define tgamma(__x) __tg_tgamma(__tg_promote1((__x))(__x))
+
+// trunc
+
+static float
+    _TG_ATTRS
+    __tg_trunc(float __x) {return truncf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_trunc(double __x) {return trunc(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_trunc(long double __x) {return truncl(__x);}
+
+#undef trunc
+#define trunc(__x) __tg_trunc(__tg_promote1((__x))(__x))
+
+// carg
+
+static float
+    _TG_ATTRS
+    __tg_carg(float __x) {return atan2f(0.F, __x);}
+
+static double
+    _TG_ATTRS
+    __tg_carg(double __x) {return atan2(0., __x);}
+
+static long double
+    _TG_ATTRS
+    __tg_carg(long double __x) {return atan2l(0.L, __x);}
+
+static float
+    _TG_ATTRS
+    __tg_carg(float _Complex __x) {return cargf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_carg(double _Complex __x) {return carg(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_carg(long double _Complex __x) {return cargl(__x);}
+
+#undef carg
+#define carg(__x) __tg_carg(__tg_promote1((__x))(__x))
+
+// cimag
+
+static float
+    _TG_ATTRS
+    __tg_cimag(float __x) {return 0;}
+
+static double
+    _TG_ATTRS
+    __tg_cimag(double __x) {return 0;}
+
+static long double
+    _TG_ATTRS
+    __tg_cimag(long double __x) {return 0;}
+
+static float
+    _TG_ATTRS
+    __tg_cimag(float _Complex __x) {return cimagf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_cimag(double _Complex __x) {return cimag(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_cimag(long double _Complex __x) {return cimagl(__x);}
+
+#undef cimag
+#define cimag(__x) __tg_cimag(__tg_promote1((__x))(__x))
+
+// conj
+
+static float _Complex
+    _TG_ATTRS
+    __tg_conj(float __x) {return __x;}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_conj(double __x) {return __x;}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_conj(long double __x) {return __x;}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_conj(float _Complex __x) {return conjf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_conj(double _Complex __x) {return conj(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_conj(long double _Complex __x) {return conjl(__x);}
+
+#undef conj
+#define conj(__x) __tg_conj(__tg_promote1((__x))(__x))
+
+// cproj
+
+static float _Complex
+    _TG_ATTRS
+    __tg_cproj(float __x) {return cprojf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_cproj(double __x) {return cproj(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_cproj(long double __x) {return cprojl(__x);}
+
+static float _Complex
+    _TG_ATTRS
+    __tg_cproj(float _Complex __x) {return cprojf(__x);}
+
+static double _Complex
+    _TG_ATTRS
+    __tg_cproj(double _Complex __x) {return cproj(__x);}
+
+static long double _Complex
+    _TG_ATTRS
+    __tg_cproj(long double _Complex __x) {return cprojl(__x);}
+
+#undef cproj
+#define cproj(__x) __tg_cproj(__tg_promote1((__x))(__x))
+
+// creal
+
+static float
+    _TG_ATTRS
+    __tg_creal(float __x) {return __x;}
+
+static double
+    _TG_ATTRS
+    __tg_creal(double __x) {return __x;}
+
+static long double
+    _TG_ATTRS
+    __tg_creal(long double __x) {return __x;}
+
+static float
+    _TG_ATTRS
+    __tg_creal(float _Complex __x) {return crealf(__x);}
+
+static double
+    _TG_ATTRS
+    __tg_creal(double _Complex __x) {return creal(__x);}
+
+static long double
+    _TG_ATTRS
+    __tg_creal(long double _Complex __x) {return creall(__x);}
+
+#undef creal
+#define creal(__x) __tg_creal(__tg_promote1((__x))(__x))
+
+#undef _TG_ATTRSp
+#undef _TG_ATTRS
+
+#endif /* __cplusplus */
+#endif /* __TGMATH_H */
lib/libc/include/x86_64-macos-gnu/time.h
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)time.h	8.3 (Berkeley) 1/21/94
+ */
+
+#ifndef _TIME_H_
+#define	_TIME_H_
+
+#include <_types.h>
+#include <sys/cdefs.h>
+#include <Availability.h>
+#include <sys/_types/_clock_t.h>
+#include <sys/_types/_null.h>
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_time_t.h>
+#include <sys/_types/_timespec.h>
+
+struct tm {
+	int	tm_sec;		/* seconds after the minute [0-60] */
+	int	tm_min;		/* minutes after the hour [0-59] */
+	int	tm_hour;	/* hours since midnight [0-23] */
+	int	tm_mday;	/* day of the month [1-31] */
+	int	tm_mon;		/* months since January [0-11] */
+	int	tm_year;	/* years since 1900 */
+	int	tm_wday;	/* days since Sunday [0-6] */
+	int	tm_yday;	/* days since January 1 [0-365] */
+	int	tm_isdst;	/* Daylight Savings Time flag */
+	long	tm_gmtoff;	/* offset from UTC in seconds */
+	char	*tm_zone;	/* timezone abbreviation */
+};
+
+#if __DARWIN_UNIX03
+#define CLOCKS_PER_SEC  1000000	/* [XSI] */
+#else /* !__DARWIN_UNIX03 */
+#include <machine/_limits.h>	/* Include file containing CLK_TCK. */
+
+#define CLOCKS_PER_SEC  (__DARWIN_CLK_TCK)
+#endif /* __DARWIN_UNIX03 */
+
+#ifndef _ANSI_SOURCE
+extern char *tzname[];
+#endif
+
+extern int getdate_err;
+#if __DARWIN_UNIX03
+extern long timezone __DARWIN_ALIAS(timezone);
+#endif /* __DARWIN_UNIX03 */
+extern int daylight;
+
+__BEGIN_DECLS
+char *asctime(const struct tm *);
+clock_t clock(void) __DARWIN_ALIAS(clock);
+char *ctime(const time_t *);
+double difftime(time_t, time_t);
+struct tm *getdate(const char *);
+struct tm *gmtime(const time_t *);
+struct tm *localtime(const time_t *);
+time_t mktime(struct tm *) __DARWIN_ALIAS(mktime);
+size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime);
+char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime);
+time_t time(time_t *);
+
+#ifndef _ANSI_SOURCE
+void tzset(void);
+#endif /* not ANSI */
+
+/* [TSF] Thread safe functions */
+char *asctime_r(const struct tm * __restrict, char * __restrict);
+char *ctime_r(const time_t *, char *);
+struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict);
+struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict);
+
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+time_t posix2time(time_t);
+#if !__DARWIN_UNIX03
+char *timezone(int, int);
+#endif /* !__DARWIN_UNIX03 */
+void tzsetwall(void);
+time_t time2posix(time_t);
+time_t timelocal(struct tm * const);
+time_t timegm(struct tm * const);
+#endif /* neither ANSI nor POSIX */
+
+#if !defined(_ANSI_SOURCE)
+int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep);
+#endif
+
+#if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0
+#if __DARWIN_C_LEVEL >= 199309L
+#if __has_feature(enumerator_attributes)
+#define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
+#else
+#define __CLOCK_AVAILABILITY
+#endif
+
+typedef enum {
+_CLOCK_REALTIME __CLOCK_AVAILABILITY = 0,
+#define CLOCK_REALTIME _CLOCK_REALTIME
+_CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6,
+#define CLOCK_MONOTONIC _CLOCK_MONOTONIC
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+_CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4,
+#define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW
+_CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5,
+#define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX
+_CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8,
+#define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW
+_CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9,
+#define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX
+#endif
+_CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12,
+#define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID
+_CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16
+#define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID
+} clockid_t;
+
+__CLOCK_AVAILABILITY
+int clock_getres(clockid_t __clock_id, struct timespec *__res);
+
+__CLOCK_AVAILABILITY
+int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+__CLOCK_AVAILABILITY
+__uint64_t clock_gettime_nsec_np(clockid_t __clock_id);
+#endif
+
+__OSX_AVAILABLE(10.12) __IOS_PROHIBITED
+__TVOS_PROHIBITED __WATCHOS_PROHIBITED
+int clock_settime(clockid_t __clock_id, const struct timespec *__tp);
+
+#undef __CLOCK_AVAILABILITY
+#endif /* __DARWIN_C_LEVEL */
+#endif /* _DARWIN_FEATURE_CLOCK_GETTIME */
+
+#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \
+        ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+        (defined(__cplusplus) && __cplusplus >= 201703L))
+/* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
+#define TIME_UTC	1	/* time elapsed since epoch */
+__API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0))
+int timespec_get(struct timespec *ts, int base);
+#endif
+
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_time.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* !_TIME_H_ */
lib/libc/include/x86_64-macos-gnu/wchar.h
@@ -0,0 +1,231 @@
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: /repoman/r/ncvs/src/include/wchar.h,v 1.34 2003/03/13 06:29:53 tjr Exp $
+ */
+
+/*-
+ * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	$NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $
+ */
+
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <_types.h>
+#include <sys/cdefs.h>
+#include <Availability.h>
+
+#include <sys/_types/_null.h>
+#include <sys/_types/_size_t.h>
+#include <sys/_types/_mbstate_t.h>
+#include <sys/_types/_ct_rune_t.h>
+#include <sys/_types/_rune_t.h>
+#include <sys/_types/_wchar_t.h>
+
+#ifndef WCHAR_MIN
+#define WCHAR_MIN	__DARWIN_WCHAR_MIN
+#endif
+
+#ifndef WCHAR_MAX
+#define WCHAR_MAX	__DARWIN_WCHAR_MAX
+#endif
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <time.h>
+#include <_wctype.h>
+
+
+/* Initially added in Issue 4 */
+__BEGIN_DECLS
+wint_t	btowc(int);
+wint_t	fgetwc(FILE *);
+wchar_t	*fgetws(wchar_t * __restrict, int, FILE * __restrict);
+wint_t	fputwc(wchar_t, FILE *);
+int	fputws(const wchar_t * __restrict, FILE * __restrict);
+int	fwide(FILE *, int);
+int	fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
+int	fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
+wint_t	getwc(FILE *);
+wint_t	getwchar(void);
+size_t	mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
+size_t	mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
+	    mbstate_t * __restrict);
+int	mbsinit(const mbstate_t *);
+size_t	mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
+	    mbstate_t * __restrict);
+wint_t	putwc(wchar_t, FILE *);
+wint_t	putwchar(wchar_t);
+int	swprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, ...);
+int	swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
+wint_t	ungetwc(wint_t, FILE *);
+int	vfwprintf(FILE * __restrict, const wchar_t * __restrict,
+	    __darwin_va_list);
+int	vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict,
+	    __darwin_va_list);
+int	vwprintf(const wchar_t * __restrict, __darwin_va_list);
+size_t	wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
+wchar_t	*wcscat(wchar_t * __restrict, const wchar_t * __restrict);
+wchar_t	*wcschr(const wchar_t *, wchar_t);
+int	wcscmp(const wchar_t *, const wchar_t *);
+int	wcscoll(const wchar_t *, const wchar_t *);
+wchar_t	*wcscpy(wchar_t * __restrict, const wchar_t * __restrict);
+size_t	wcscspn(const wchar_t *, const wchar_t *);
+size_t	wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict,
+	    const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
+size_t	wcslen(const wchar_t *);
+wchar_t	*wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t);
+int	wcsncmp(const wchar_t *, const wchar_t *, size_t);
+wchar_t	*wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t);
+wchar_t	*wcspbrk(const wchar_t *, const wchar_t *);
+wchar_t	*wcsrchr(const wchar_t *, wchar_t);
+size_t	wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
+	    mbstate_t * __restrict);
+size_t	wcsspn(const wchar_t *, const wchar_t *);
+wchar_t	*wcsstr(const wchar_t * __restrict, const wchar_t * __restrict);
+size_t	wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t);
+int	wctob(wint_t);
+double	wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
+wchar_t	*wcstok(wchar_t * __restrict, const wchar_t * __restrict,
+	    wchar_t ** __restrict);
+long	 wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int);
+unsigned long
+	 wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
+wchar_t	*wmemchr(const wchar_t *, wchar_t, size_t);
+int	wmemcmp(const wchar_t *, const wchar_t *, size_t);
+wchar_t	*wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
+wchar_t	*wmemmove(wchar_t *, const wchar_t *, size_t);
+wchar_t	*wmemset(wchar_t *, wchar_t, size_t);
+int	wprintf(const wchar_t * __restrict, ...);
+int	wscanf(const wchar_t * __restrict, ...);
+int	wcswidth(const wchar_t *, size_t);
+int	wcwidth(wchar_t);
+__END_DECLS
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2001
+ * ISO C99
+ */
+
+#if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus)
+__BEGIN_DECLS
+int	vfwscanf(FILE * __restrict, const wchar_t * __restrict,
+	    __darwin_va_list);
+int	vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
+	    __darwin_va_list);
+int	vwscanf(const wchar_t * __restrict, __darwin_va_list);
+float	wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
+long double
+	wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
+#if !__DARWIN_NO_LONG_LONG
+long long
+	wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int);
+unsigned long long
+	wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int);
+#endif /* !__DARWIN_NO_LONG_LONG */
+__END_DECLS
+#endif
+
+
+
+/* Additional functionality provided by:
+ * POSIX.1-2008
+ */
+
+#if __DARWIN_C_LEVEL >= 200809L
+__BEGIN_DECLS
+size_t  mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
+            size_t, mbstate_t * __restrict);
+wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+wchar_t *wcsdup(const wchar_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+int     wcscasecmp(const wchar_t *, const wchar_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+int     wcsncasecmp(const wchar_t *, const wchar_t *, size_t n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+size_t  wcsnlen(const wchar_t *, size_t) __pure __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+size_t  wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
+            size_t, mbstate_t * __restrict);
+FILE *open_wmemstream(wchar_t ** __bufp, size_t * __sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= 200809L */
+
+
+
+/* Darwin extensions */
+
+#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
+__BEGIN_DECLS
+wchar_t *fgetwln(FILE * __restrict, size_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+size_t	wcslcat(wchar_t *, const wchar_t *, size_t);
+size_t	wcslcpy(wchar_t *, const wchar_t *, size_t);
+__END_DECLS
+#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
+
+
+/* Poison the following routines if -fshort-wchar is set */
+#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
+#pragma GCC poison fgetwln fgetws fputwc fputws fwprintf fwscanf mbrtowc mbsnrtowcs mbsrtowcs putwc putwchar swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf vwprintf vwscanf wcrtomb wcscat wcschr wcscmp wcscoll wcscpy wcscspn wcsftime wcsftime wcslcat wcslcpy wcslen wcsncat wcsncmp wcsncpy wcsnrtombs wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wcstod wcstof wcstok wcstol wcstold wcstoll wcstoul wcstoull wcswidth wcsxfrm wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wprintf wscanf
+#endif
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_wchar.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif /* !_WCHAR_H_ */
lib/libc/include/x86_64-macos-gnu/wctype.h
@@ -0,0 +1,130 @@
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp
+ *	$NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $
+ * $FreeBSD: /repoman/r/ncvs/src/include/wctype.h,v 1.10 2002/08/21 16:19:55 mike Exp $
+ */
+
+#ifndef _WCTYPE_H_
+#define	_WCTYPE_H_
+
+#include <sys/cdefs.h>
+#include <_types.h>
+#include <_types/_wctrans_t.h>
+
+#define __DARWIN_WCTYPE_TOP_inline	__header_inline
+
+#include <_wctype.h>
+#include <ctype.h>
+
+/*
+ * Use inline functions if we are allowed to and the compiler supports them.
+ */
+#if !defined(_DONT_USE_CTYPE_INLINE_) && \
+    (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
+
+__DARWIN_WCTYPE_TOP_inline int
+iswblank(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_B));
+}
+
+#if !defined(_ANSI_SOURCE)
+__DARWIN_WCTYPE_TOP_inline int
+iswascii(wint_t _wc)
+{
+	return ((_wc & ~0x7F) == 0);
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswhexnumber(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_X));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswideogram(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_I));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswnumber(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_D));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswphonogram(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_Q));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswrune(wint_t _wc)
+{
+	return (__istype(_wc, 0xFFFFFFF0L));
+}
+
+__DARWIN_WCTYPE_TOP_inline int
+iswspecial(wint_t _wc)
+{
+	return (__istype(_wc, _CTYPE_T));
+}
+#endif /* !_ANSI_SOURCE */
+
+#else /* not using inlines */
+
+__BEGIN_DECLS
+int	iswblank(wint_t);
+
+#if !defined(_ANSI_SOURCE)
+wint_t	iswascii(wint_t);
+wint_t	iswhexnumber(wint_t);
+wint_t	iswideogram(wint_t);
+wint_t	iswnumber(wint_t);
+wint_t	iswphonogram(wint_t);
+wint_t	iswrune(wint_t);
+wint_t	iswspecial(wint_t);
+#endif
+__END_DECLS
+
+#endif /* using inlines */
+
+__BEGIN_DECLS
+#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+wint_t	nextwctype(wint_t, wctype_t);
+#endif
+wint_t	towctrans(wint_t, wctrans_t);
+wctrans_t
+	wctrans(const char *);
+__END_DECLS
+
+#ifdef _USE_EXTENDED_LOCALES_
+#include <xlocale/_wctype.h>
+#endif /* _USE_EXTENDED_LOCALES_ */
+
+#endif		/* _WCTYPE_H_ */
src/target.zig
@@ -54,6 +54,7 @@ pub const available_libcs = [_]ArchOsAbi{
     .{ .arch = .x86_64, .os = .linux, .abi = .gnux32 },
     .{ .arch = .x86_64, .os = .linux, .abi = .musl },
     .{ .arch = .x86_64, .os = .windows, .abi = .gnu },
+    .{ .arch = .x86_64, .os = .macos, .abi = .gnu },
 };
 
 pub fn libCGenericName(target: std.Target) [:0]const u8 {