Loading...
--- Libc/Libc-1244.1.7/include/stdlib.h
+++ Libc/Libc-1158.1.2/include/stdlib.h
@@ -129,14 +129,6 @@
#define LIBC_ABORT(f,...) abort_report_np("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__)
//End-Libc
-#ifndef __alloc_size
-#if __has_attribute(alloc_size)
-#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))
-#else
-#define __alloc_size(...)
-#endif
-#endif // __alloc_size
-
__BEGIN_DECLS
void abort(void) __dead2;
int abs(int) __pure2;
@@ -150,7 +142,7 @@
#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 *));
-void *calloc(size_t __count, size_t __size) __result_use_check __alloc_size(1,2);
+void *calloc(size_t __count, size_t __size) __result_use_check;
div_t div(int, int) __pure2;
void exit(int) __dead2;
void free(void *);
@@ -162,7 +154,7 @@
llabs(long long);
lldiv_t lldiv(long long, long long);
#endif /* !__DARWIN_NO_LONG_LONG */
-void *malloc(size_t __size) __result_use_check __alloc_size(1);
+void *malloc(size_t __size) __result_use_check;
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);
@@ -170,7 +162,7 @@
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.");
-void *realloc(void *__ptr, size_t __size) __result_use_check __alloc_size(2);
+void *realloc(void *__ptr, size_t __size) __result_use_check;
void srand(unsigned) __swift_unavailable("Use arc4random instead.");
double strtod(const char *, char **) __DARWIN_ALIAS(strtod);
float strtof(const char *, char **) __DARWIN_ALIAS(strtof);
@@ -198,7 +190,7 @@
#endif
__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable")
-__API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
+__OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0,__MAC_NA,__IPHONE_2_0,__IPHONE_8_0, "Use posix_spawn APIs instead.")
__WATCHOS_PROHIBITED __TVOS_PROHIBITED
int system(const char *) __DARWIN_ALIAS_C(system);
//Begin-Libc
@@ -392,7 +384,7 @@
unsigned __endbyte);
void sranddev(void);
void srandomdev(void);
-void *reallocf(void *__ptr, size_t __size) __alloc_size(2);
+void *reallocf(void *__ptr, size_t __size);
#if !__DARWIN_NO_LONG_LONG
long long
strtoq(const char *__str, char **__endptr, int __base);
@@ -400,7 +392,7 @@
strtouq(const char *__str, char **__endptr, int __base);
#endif /* !__DARWIN_NO_LONG_LONG */
extern char *suboptarg; /* getsubopt(3) external variable */
-void *valloc(size_t) __alloc_size(1);
+void *valloc(size_t);
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
/* Poison the following routines if -fshort-wchar is set */