X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..2acb89982f71719aec26ca16705bd2c0400a9550:/include/stdlib.h diff --git a/include/stdlib.h b/include/stdlib.h index 2405804..8530607 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -68,31 +68,16 @@ #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ #endif /* !_ANSI_SOURCE */ -#ifndef _SIZE_T -#define _SIZE_T /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: * _GCC_SIZE_T */ -typedef __darwin_size_t size_t; -#endif +#include #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) -#ifndef _CT_RUNE_T -#define _CT_RUNE_T -typedef __darwin_ct_rune_t ct_rune_t; -#endif - -#ifndef _RUNE_T -#define _RUNE_T -typedef __darwin_rune_t rune_t; -#endif +#include +#include #endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ -#ifndef __cplusplus -#ifndef _WCHAR_T -#define _WCHAR_T -typedef __darwin_wchar_t wchar_t; -#endif /* _WCHAR_T */ -#endif /* __cplusplus */ +#include typedef struct { int quot; /* quotient */ @@ -111,9 +96,7 @@ typedef struct { } lldiv_t; #endif /* !__DARWIN_NO_LONG_LONG */ -#ifndef NULL -#define NULL __DARWIN_NULL -#endif /* ! NULL */ +#include #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 @@ -148,7 +131,7 @@ extern int __mb_cur_max; __BEGIN_DECLS void abort(void) __dead2; //Begin-Libc -__private_extern__ +__attribute__((visibility("hidden"))) void abort_report_np(const char *, ...) __dead2 __printflike(1, 2); //End-Libc int abs(int) __pure2; @@ -188,7 +171,7 @@ double strtod(const char *, char **) __DARWIN_ALIAS(strtod); float strtof(const char *, char **) __DARWIN_ALIAS(strtof); long strtol(const char *, char **, int); long double - strtold(const char *, char **) __DARWIN_LDBL_COMPAT(strtold); + strtold(const char *, char **); #if !__DARWIN_NO_LONG_LONG long long strtoll(const char *, char **, int); @@ -202,7 +185,7 @@ unsigned long long //Begin-Libc #ifndef LIBC_ALIAS_SYSTEM //End-Libc -int system(const char *) __DARWIN_ALIAS_C(system); +int system(const char *) __DARWIN_ALIAS_C(system) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0,__MAC_NA,__IPHONE_2_0,__IPHONE_8_0, "Use posix_spawn APIs instead."); //Begin-Libc #else /* LIBC_ALIAS_SYSTEM */ int system(const char *) LIBC_ALIAS_C(system); @@ -318,18 +301,10 @@ void unsetenv(const char *); #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) #include -#ifndef _DEV_T -typedef __darwin_dev_t dev_t; -#define _DEV_T -#endif - -#ifndef _MODE_T -typedef __darwin_mode_t mode_t; -#define _MODE_T -#endif +#include +#include -u_int32_t - arc4random(void); +u_int32_t arc4random(void); void arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/); void arc4random_buf(void * /*buf*/, size_t /*nbytes*/) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); void arc4random_stir(void);