Skip to content

Commit

Permalink
macos: vendored libc: bump to SDK 15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikdusan authored and alexrp committed Dec 13, 2024
1 parent 130f7c2 commit a68119f
Show file tree
Hide file tree
Showing 184 changed files with 12,385 additions and 4,102 deletions.
2 changes: 1 addition & 1 deletion lib/libc/darwin/SDKSettings.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"MinimalDisplayName":"14.0"}
{"MinimalDisplayName":"15.1"}
1,578 changes: 815 additions & 763 deletions lib/libc/darwin/libSystem.tbd

Large diffs are not rendered by default.

38 changes: 26 additions & 12 deletions lib/libc/include/any-macos-any/AssertMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,32 @@
#ifdef KERNEL
#include <libkern/libkern.h>
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
printf( "AssertMacros: %s, %s file: %s, line: %d, value: %lld\n", assertion, (message!=0) ? message : "", file, line, (long long) (value));
#elif TARGET_OS_DRIVERKIT
#include <os/log.h>
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
os_log(OS_LOG_DEFAULT, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
os_log(OS_LOG_DEFAULT, "AssertMacros: %s, %s file: %s, line: %d, value: %lld\n", assertion, (message!=0) ? message : "", file, line, (long long) (value));
#else
#include <stdio.h>
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %lld\n", assertion, (message!=0) ? message : "", file, line, (long long) (value));
#endif
#endif

/*
* DEBUG_ASSERT_FORCE_64_BIT_ERROR_CODE
*
* Summary:
* By default the errorCode passed to DEBUG_ASSERT_MESSAGE will be the system word
* length. If DEBUG_ASSERT_FORCE_64_BIT_ERROR_CODE is set then it will be changed
* to a 64 bit integer, even on 32 bit platforms.
*/
#ifndef DEBUG_ASSERT_FORCE_64_BIT_ERROR_CODE
#define DEBUG_ASSERT_ERROR_TYPE long
#else
#define DEBUG_ASSERT_ERROR_TYPE long long
#endif




Expand Down Expand Up @@ -361,7 +375,7 @@
#define __Check_noErr(errorCode) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -397,7 +411,7 @@
#define __Check_noErr_String(errorCode, message) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -523,7 +537,7 @@
#define __Verify_noErr(errorCode) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -565,7 +579,7 @@
#define __Verify_noErr_String(errorCode, message) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -605,7 +619,7 @@
#else
#define __Verify_noErr_Action(errorCode, action) \
do { \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) { \
DEBUG_ASSERT_MESSAGE( \
DEBUG_ASSERT_COMPONENT_NAME_STRING, \
Expand Down Expand Up @@ -970,7 +984,7 @@
#define __Require_noErr(errorCode, exceptionLabel) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -1022,7 +1036,7 @@
#define __Require_noErr_Action(errorCode, exceptionLabel, action) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -1131,7 +1145,7 @@
#define __Require_noErr_String(errorCode, exceptionLabel, message) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down Expand Up @@ -1186,7 +1200,7 @@
#define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \
do \
{ \
long evalOnceErrorCode = (errorCode); \
DEBUG_ASSERT_ERROR_TYPE evalOnceErrorCode = (errorCode); \
if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
Expand Down
41 changes: 31 additions & 10 deletions lib/libc/include/any-macos-any/Availability.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,26 @@
#define __API_TO_BE_DEPRECATED_DRIVERKIT 100000
#endif

#ifndef __API_TO_BE_DEPRECATED_XROS
#define __API_TO_BE_DEPRECATED_XROS 100000
#ifndef __API_TO_BE_DEPRECATED_VISIONOS
#define __API_TO_BE_DEPRECATED_VISIONOS 100000
#endif

#ifndef __API_TO_BE_DEPRECATED_EXCLAVEKIT

#endif



#ifndef __OPEN_SOURCE__

#endif /* __OPEN_SOURCE__ */

#include <AvailabilityVersions.h>
#include <AvailabilityInternal.h>
#include <AvailabilityInternalLegacy.h>
#if __has_include(<AvailabilityInternalPrivate.h>)
#include <AvailabilityInternalPrivate.h>
#endif

#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_ios
Expand Down Expand Up @@ -419,9 +432,9 @@
* __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,__API_AVAILABLE0,0)(__VA_ARGS__)
#define __API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE8,__API_AVAILABLE7,__API_AVAILABLE6,__API_AVAILABLE5,__API_AVAILABLE4,__API_AVAILABLE3,__API_AVAILABLE2,__API_AVAILABLE1,__API_AVAILABLE0,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,__API_AVAILABLE_BEGIN0,0)(__VA_ARGS__)
#define __API_AVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_AVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_AVAILABLE_BEGIN8,__API_AVAILABLE_BEGIN7,__API_AVAILABLE_BEGIN6,__API_AVAILABLE_BEGIN5,__API_AVAILABLE_BEGIN4,__API_AVAILABLE_BEGIN3,__API_AVAILABLE_BEGIN2,__API_AVAILABLE_BEGIN1,__API_AVAILABLE_BEGIN0,0)(__VA_ARGS__)
#define __API_AVAILABLE_END _Pragma("clang attribute pop")

/*
Expand All @@ -440,13 +453,13 @@
* __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_MSG7,__API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1,__API_DEPRECATED_MSG0,0,0)(__VA_ARGS__)
#define __API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_REP7,__API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1,__API_DEPRECATED_REP0,0,0)(__VA_ARGS__)
#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,__API_DEPRECATED_MSG0,0,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,__API_DEPRECATED_REP0,0,0)(__VA_ARGS__)

#define __API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN7,__API_DEPRECATED_BEGIN6,__API_DEPRECATED_BEGIN5,__API_DEPRECATED_BEGIN4,__API_DEPRECATED_BEGIN3,__API_DEPRECATED_BEGIN2,__API_DEPRECATED_BEGIN1,__API_DEPRECATED_BEGIN0,0,0)(__VA_ARGS__)
#define __API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN8,__API_DEPRECATED_BEGIN7,__API_DEPRECATED_BEGIN6,__API_DEPRECATED_BEGIN5,__API_DEPRECATED_BEGIN4,__API_DEPRECATED_BEGIN3,__API_DEPRECATED_BEGIN2,__API_DEPRECATED_BEGIN1,__API_DEPRECATED_BEGIN0,0,0)(__VA_ARGS__)
#define __API_DEPRECATED_END _Pragma("clang attribute pop")

#define __API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_WITH_REPLACEMENT_BEGIN_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN7,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN6,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN5,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN4,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN3,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN2,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN1,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__)
#define __API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_WITH_REPLACEMENT_BEGIN_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN8,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN7,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN6,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN5,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN4,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN3,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN2,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN1,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__)
#define __API_DEPRECATED_WITH_REPLACEMENT_END _Pragma("clang attribute pop")

/*
Expand All @@ -457,9 +470,9 @@
* __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,__API_UNAVAILABLE0,0)(__VA_ARGS__)
#define __API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1,__API_UNAVAILABLE0,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,__API_UNAVAILABLE_BEGIN0,0)(__VA_ARGS__)
#define __API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN8,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6,__API_UNAVAILABLE_BEGIN5,__API_UNAVAILABLE_BEGIN4,__API_UNAVAILABLE_BEGIN3,__API_UNAVAILABLE_BEGIN2,__API_UNAVAILABLE_BEGIN1,__API_UNAVAILABLE_BEGIN0,0)(__VA_ARGS__)
#define __API_UNAVAILABLE_END _Pragma("clang attribute pop")
#endif /* __has_attribute(availability) */
#endif /* #if defined(__has_feature) && defined(__has_attribute) */
Expand Down Expand Up @@ -524,6 +537,14 @@
#define __SPI_AVAILABLE(...)
#endif

#ifndef __SPI_AVAILABLE_BEGIN
#define __SPI_AVAILABLE_BEGIN(...)
#endif

#ifndef __SPI_AVAILABLE_END
#define __SPI_AVAILABLE_END(...)
#endif

#ifndef __SPI_DEPRECATED
#define __SPI_DEPRECATED(...)
#endif
Expand Down
Loading

0 comments on commit a68119f

Please sign in to comment.