X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/blobdiff_plain/b27f3669043631b3cfbc4424e1868552669470c8..920d8dfc4cd17a2f41f47e3e3be6ef7e963814dd:/include/stdlib.h?ds=sidebyside diff --git a/include/stdlib.h b/include/stdlib.h index b6e46a9bc0..59978bd863 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -41,6 +41,13 @@ #include #include +#if __BSD_VISIBLE +#ifndef _RUNE_T_DECLARED +typedef __rune_t rune_t; +#define _RUNE_T_DECLARED +#endif +#endif + #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED @@ -68,10 +75,14 @@ typedef struct { #define RAND_MAX 0x7fffffff +__BEGIN_DECLS +#ifdef _XLOCALE_H_ +#include +#endif extern int __mb_cur_max; -#define MB_CUR_MAX __mb_cur_max +extern int ___mb_cur_max(void); +#define MB_CUR_MAX (___mb_cur_max()) -__BEGIN_DECLS void abort(void) __dead2; /* void abort2(const char *, int, void **) __dead2; */ #if !defined(_KERNEL_VIRTUAL) @@ -285,13 +296,6 @@ void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); -/* - * C11 functions. - */ -int at_quick_exit(void (*func)(void)); -void quick_exit(int); -void *aligned_alloc(size_t, size_t); - /* Deprecated interfaces. */ #if !defined(_KERNEL_VIRTUAL) __int64_t @@ -302,6 +306,17 @@ __uint64_t extern char *suboptarg; /* getsubopt(3) external variable */ #endif /* __BSD_VISIBLE */ + +/* + * C11 functions. + */ +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L || __BSD_VISIBLE +int at_quick_exit(void (*func)(void)); +_Noreturn void + quick_exit(int); +void *aligned_alloc(size_t, size_t); +#endif /* __ISO_C_VISIBLE >= 2011 */ + __END_DECLS #endif /* !_STDLIB_H_ */