# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdlib.h.html # # Spec quotations relating to includes: # - "The header shall define NULL as described in ." # - "size_t As described in ." # - "wchar_t As described in ." # - "In addition, the header shall define the following symbolic constants and macros as described in : WCOREDUMP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED" # - "The header shall define the following symbolic constants as described in : O_APPEND, O_CLOEXEC, O_CLOFORK, O_DSYNC, O_NOCTTY, O_RDWR, O_RSYNC, O_SYNC" # - "Inclusion of the header may also make visible all symbols from , , , , and ." # # POSIX allows inclusion of stdint.h via: fcntl.h > unistd.h > stdint.h (our fcntl.h doesn't include unistd.h so just include stdint.h here directly instead) # stdint.h needed for unintptr_t for __stack_chk_guard # sys/wait.h brings in signal.h which brings in features.h # features required for deprecated and no return annotations sys_includes = ["stddef.h", "sys/wait.h", "stdint.h"] include_guard = "_RELIBC_STDLIB_H" after_includes = """ #include // __deprecated #include // for O_* constants, shared with fcntl.h """ trailer = """ #ifndef _RELIBC_STDLIB_EXTRA_H #define _RELIBC_STDLIB_EXTRA_H #ifdef __cplusplus extern "C" { #endif long double strtold(const char *nptr, char **endptr); #ifdef __cplusplus } #endif #endif """ language = "C" style = "Type" no_includes = true cpp_compat = true [enum] prefix_with_name = true