Loading...
include/stdlib.h Libc-1353.11.2 Libc-1534.40.2
--- Libc/Libc-1353.11.2/include/stdlib.h
+++ Libc/Libc-1534.40.2/include/stdlib.h
@@ -128,11 +128,6 @@
     && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L)
 #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x))
 #endif
-//Begin-Libc
-#include "libc_private.h"
-/* f must be a literal string */
-#define LIBC_ABORT(f,...)	abort_report_np("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__)
-//End-Libc
 
 #ifndef UNIFDEF_DRIVERKIT
 #include <malloc/_malloc.h>
@@ -205,13 +200,7 @@
 #ifndef LIBC_ALIAS_SYSTEM
 //End-Libc
 
-#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")
+__swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)")
 __API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
 __WATCHOS_PROHIBITED __TVOS_PROHIBITED
 int	 system(const char *) __DARWIN_ALIAS_C(system);
@@ -221,7 +210,6 @@
 #endif /* !LIBC_ALIAS_SYSTEM */
 //End-Libc
 
-#undef __swift_unavailable_on
 #endif /* UNIFDEF_DRIVERKIT */
 
 size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
@@ -247,6 +235,9 @@
 char	*l64a(long);
 void	 lcong48(unsigned short[7]);
 long	 lrand48(void) __swift_unavailable("Use arc4random 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 mktemp(3), it is highly recommended that you use mkstemp(3) instead.")
+#endif
 char	*mktemp(char *);
 int	 mkstemp(char *);
 long	 mrand48(void) __swift_unavailable("Use arc4random instead.");
@@ -362,8 +353,17 @@
 #ifndef UNIFDEF_DRIVERKIT
 int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
 #endif /* UNIFDEF_DRIVERKIT */
+
+#ifdef __BLOCKS__
+#if __has_attribute(noescape)
+#define __bsearch_noescape __attribute__((__noescape__))
+#else
+#define __bsearch_noescape
+#endif
+#endif /* __BLOCKS__ */
 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);
+	    size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __bsearch_noescape)
+	    __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
 #endif /* __BLOCKS__ */
 
 #ifndef UNIFDEF_DRIVERKIT
@@ -441,6 +441,9 @@
 void	 sranddev(void);
 void	 srandomdev(void);
 void	*reallocf(void *__ptr, size_t __size) __alloc_size(2);
+long long
+	strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp)
+	__API_AVAILABLE(macos(10.16), ios(14.0), tvos(14.0), watchos(7.0));
 #endif /* UNIFDEF_DRIVERKIT */
 #if !__DARWIN_NO_LONG_LONG
 long long