diff options
Diffstat (limited to 'libc/include')
27 files changed, 188 insertions, 317 deletions
diff --git a/libc/include/dirent.h.def b/libc/include/dirent.h.def deleted file mode 100644 index 6786578..0000000 --- a/libc/include/dirent.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- POSIX header dirent.h ---------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_DIRENT_H -#define LLVM_LIBC_DIRENT_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_DIRENT_H diff --git a/libc/include/dirent.yaml b/libc/include/dirent.yaml index 3fc522f..66570bc 100644 --- a/libc/include/dirent.yaml +++ b/libc/include/dirent.yaml @@ -1,47 +1,45 @@ header: dirent.h -header_template: dirent.h.def -macros: [] +standards: + - posix types: - type_name: struct_dirent - type_name: DIR - type_name: ino_t -enums: [] -objects: [] functions: - name: alphasort standards: - - POSIX + - posix return_type: int arguments: - type: const struct dirent ** - type: const struct dirent ** - name: closedir standards: - - POSIX + - posix return_type: int arguments: - type: DIR * - name: dirfd standards: - - POSIX + - posix return_type: int arguments: - type: DIR * - name: fdopendir standards: - - POSIX + - posix return_type: DIR * arguments: - type: int - name: opendir standards: - - POSIX + - posix return_type: DIR * arguments: - type: const char * - name: readdir standards: - - POSIX + - posix return_type: struct dirent * arguments: - type: DIR * diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h index 2f05d75..6697ce5 100644 --- a/libc/include/llvm-libc-macros/math-macros.h +++ b/libc/include/llvm-libc-macros/math-macros.h @@ -50,4 +50,105 @@ #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) #endif +// POSIX math constants +// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/math.h.html +#define M_E (__extension__ 0x1.5bf0a8b145769p1) +#define M_EGAMMA (__extension__ 0x1.2788cfc6fb619p-1) +#define M_LOG2E (__extension__ 0x1.71547652b82fep0) +#define M_LOG10E (__extension__ 0x1.bcb7b1526e50ep-2) +#define M_LN2 (__extension__ 0x1.62e42fefa39efp-1) +#define M_LN10 (__extension__ 0x1.26bb1bbb55516p1) +#define M_PHI (__extension__ 0x1.9e3779b97f4a8p0) +#define M_PI (__extension__ 0x1.921fb54442d18p1) +#define M_PI_2 (__extension__ 0x1.921fb54442d18p0) +#define M_PI_4 (__extension__ 0x1.921fb54442d18p-1) +#define M_1_PI (__extension__ 0x1.45f306dc9c883p-2) +#define M_1_SQRTPI (__extension__ 0x1.20dd750429b6dp-1) +#define M_2_PI (__extension__ 0x1.45f306dc9c883p-1) +#define M_2_SQRTPI (__extension__ 0x1.20dd750429b6dp0) +#define M_SQRT2 (__extension__ 0x1.6a09e667f3bcdp0) +#define M_SQRT3 (__extension__ 0x1.bb67ae8584caap0) +#define M_SQRT1_2 (__extension__ 0x1.6a09e667f3bcdp-1) +#define M_SQRT1_3 (__extension__ 0x1.279a74590331cp-1) + +#define M_Ef (__extension__ 0x1.5bf0a8p1f) +#define M_EGAMMAf (__extension__ 0x1.2788dp-1f) +#define M_LOG2Ef (__extension__ 0x1.715476p0f) +#define M_LOG10Ef (__extension__ 0x1.bcb7b2p-2f) +#define M_LN2f (__extension__ 0x1.62e43p-1f) +#define M_LN10f (__extension__ 0x1.26bb1cp1f) +#define M_PHIf (__extension__ 0x1.9e377ap0f) +#define M_PIf (__extension__ 0x1.921fb6p1f) +#define M_PI_2f (__extension__ 0x1.921fb6p0f) +#define M_PI_4f (__extension__ 0x1.921fb6p-1f) +#define M_1_PIf (__extension__ 0x1.45f306p-2f) +#define M_1_SQRTPIf (__extension__ 0x1.20dd76p-1f) +#define M_2_PIf (__extension__ 0x1.45f306p-1f) +#define M_2_SQRTPIf (__extension__ 0x1.20dd76p0f) +#define M_SQRT2f (__extension__ 0x1.6a09e6p0f) +#define M_SQRT3f (__extension__ 0x1.bb67aep0f) +#define M_SQRT1_2f (__extension__ 0x1.6a09e6p-1f) +#define M_SQRT1_3f (__extension__ 0x1.279a74p-1f) + +#define M_El (__extension__ 0x1.5bf0a8b1457695355fb8ac404e7ap1L) +#define M_EGAMMAl (__extension__ 0x1.2788cfc6fb618f49a37c7f0202a6p-1L) +#define M_LOG2El (__extension__ 0x1.71547652b82fe1777d0ffda0d23ap0L) +#define M_LOG10El (__extension__ 0x1.bcb7b1526e50e32a6ab7555f5a68p-2L) +#define M_LN2l (__extension__ 0x1.62e42fefa39ef35793c7673007e6p-1L) +#define M_LN10l (__extension__ 0x1.26bb1bbb5551582dd4adac5705a6p1L) +#define M_PHIl (__extension__ 0x1.9e3779b97f4a7c15f39cc0605ceep0L) +#define M_PIl (__extension__ 0x1.921fb54442d18469898cc51701b8p1L) +#define M_PI_2l (__extension__ 0x1.921fb54442d18469898cc51701b8p0L) +#define M_PI_4l (__extension__ 0x1.921fb54442d18469898cc51701b8p-1L) +#define M_1_PIl (__extension__ 0x1.45f306dc9c882a53f84eafa3ea6ap-2L) +#define M_1_SQRTPIl (__extension__ 0x1.20dd750429b6d11ae3a914fed7fep-1L) +#define M_2_PIl (__extension__ 0x1.45f306dc9c882a53f84eafa3ea6ap-1L) +#define M_2_SQRTPIl (__extension__ 0x1.20dd750429b6d11ae3a914fed7fep0L) +#define M_SQRT2l (__extension__ 0x1.6a09e667f3bcc908b2fb1366ea95p0L) +#define M_SQRT3l (__extension__ 0x1.bb67ae8584caa73b25742d7078b8p0L) +#define M_SQRT1_2l (__extension__ 0x1.6a09e667f3bcc908b2fb1366ea95p-1L) +#define M_SQRT1_3l (__extension__ 0x1.279a74590331c4d218f81e4afb25p-1L) + +#ifdef __FLT16_MANT_DIG__ +#define M_Ef16 (__extension__ 0x1.5cp1f16) +#define M_EGAMMAf16 (__extension__ 0x1.278p-1f16) +#define M_LOG2Ef16 (__extension__ 0x1.714f16) +#define M_LOG10Ef16 (__extension__ 0x1.bccp-2f16) +#define M_LN2f16 (__extension__ 0x1.63p-1f16) +#define M_LN10f16 (__extension__ 0x1.26cp1f16) +#define M_PHIf16 (__extension__ 0x1.9e4p0f16) +#define M_PIf16 (__extension__ 0x1.92p1f16) +#define M_PI_2f16 (__extension__ 0x1.92p0f16) +#define M_PI_4f16 (__extension__ 0x1.92p-1f16) +#define M_1_PIf16 (__extension__ 0x1.46p-2f16) +#define M_1_SQRTPIf16 (__extension__ 0x1.20cp-1f16) +#define M_2_PIf16 (__extension__ 0x1.46p-1f16) +#define M_2_SQRTPIf16 (__extension__ 0x1.20cp0f16) +#define M_SQRT2f16 (__extension__ 0x1.6ap0f16) +#define M_SQRT3f16 (__extension__ 0x1.bb8p0f16) +#define M_SQRT1_2f16 (__extension__ 0x1.6ap-1f16) +#define M_SQRT1_3f16 (__extension__ 0x1.278p-1f16) +#endif // __FLT16_MANT_DIG__ + +#ifdef __SIZEOF_FLOAT128__ +#define M_Ef128 (__extension__ 0x1.5bf0a8b1457695355fb8ac404e7ap1q) +#define M_EGAMMAf128 (__extension__ 0x1.2788cfc6fb618f49a37c7f0202a6p-1q) +#define M_LOG2Ef128 (__extension__ 0x1.71547652b82fe1777d0ffda0d23ap0q) +#define M_LOG10Ef128 (__extension__ 0x1.bcb7b1526e50e32a6ab7555f5a68p-2q) +#define M_LN2f128 (__extension__ 0x1.62e42fefa39ef35793c7673007e6p-1q) +#define M_LN10f128 (__extension__ 0x1.26bb1bbb5551582dd4adac5705a6p1q) +#define M_PHIf128 (__extension__ 0x1.9e3779b97f4a7c15f39cc0605ceep0q) +#define M_PIf128 (__extension__ 0x1.921fb54442d18469898cc51701b8p1q) +#define M_PI_2f128 (__extension__ 0x1.921fb54442d18469898cc51701b8p0q) +#define M_PI_4f128 (__extension__ 0x1.921fb54442d18469898cc51701b8p-1q) +#define M_1_PIf128 (__extension__ 0x1.45f306dc9c882a53f84eafa3ea6ap-2q) +#define M_1_SQRTPIf128 (__extension__ 0x1.20dd750429b6d11ae3a914fed7fep-1q) +#define M_2_PIf128 (__extension__ 0x1.45f306dc9c882a53f84eafa3ea6ap-1q) +#define M_2_SQRTPIf128 (__extension__ 0x1.20dd750429b6d11ae3a914fed7fep0q) +#define M_SQRT2f128 (__extension__ 0x1.6a09e667f3bcc908b2fb1366ea95p0q) +#define M_SQRT3f128 (__extension__ 0x1.bb67ae8584caa73b25742d7078b8p0q) +#define M_SQRT1_2f128 (__extension__ 0x1.6a09e667f3bcc908b2fb1366ea95p-1q) +#define M_SQRT1_3f128 (__extension__ 0x1.279a74590331c4d218f81e4afb25p-1q) +#endif // __SIZEOF_FLOAT128__ + #endif // LLVM_LIBC_MACROS_MATH_MACROS_H diff --git a/libc/include/math.yaml b/libc/include/math.yaml index 3044ec3..007be23 100644 --- a/libc/include/math.yaml +++ b/libc/include/math.yaml @@ -33,14 +33,14 @@ functions: return_type: float arguments: - type: float - name: acoshf16 + - name: acoshf16 standards: - stdc return_type: _Float16 arguments: - type: _Float16 guard: LIBC_TYPES_HAS_FLOAT16 - name: acospif16 + - name: acospif16 standards: - stdc return_type: _Float16 diff --git a/libc/include/search.h.def b/libc/include/search.h.def deleted file mode 100644 index 6301ba7..0000000 --- a/libc/include/search.h.def +++ /dev/null @@ -1,18 +0,0 @@ -//===-- POSIX header search.h ---------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SEARCH_H -#define LLVM_LIBC_SEARCH_H - -#include "__llvm-libc-common.h" -#define __need_size_t -#include <stddef.h> - -%%public_api() - -#endif // LLVM_LIBC_SEARCH_H diff --git a/libc/include/search.yaml b/libc/include/search.yaml index e0247af..8a3a0c5 100644 --- a/libc/include/search.yaml +++ b/libc/include/search.yaml @@ -1,6 +1,6 @@ header: search.h -header_template: search.h.def -macros: [] +standards: + - posix types: - type_name: ACTION - type_name: ENTRY @@ -12,35 +12,35 @@ objects: [] functions: - name: hcreate standards: - - POSIX + - posix return_type: int arguments: - type: size_t - name: hcreate_r - standards: GNUExtensions + standards: gnu return_type: int arguments: - type: size_t - type: struct hsearch_data * - name: hdestroy - standards: GNUExtensions + standards: gnu return_type: void arguments: [] - name: hdestroy_r standards: - - POSIX + - posix return_type: void arguments: - type: struct hsearch_data * - name: hsearch standards: - - POSIX + - posix return_type: ENTRY * arguments: - type: ENTRY - type: ACTION - name: hsearch_r - standards: GNUExtensions + standards: gnu return_type: int arguments: - type: ENTRY @@ -49,20 +49,20 @@ functions: - type: struct hsearch_data * - name: insque standards: - - POSIX + - posix return_type: void arguments: - type: void * - type: void * - name: remque standards: - - POSIX + - posix return_type: void arguments: - type: void * - name: lfind standards: - - POSIX + - posix return_type: void * arguments: - type: const void * @@ -72,7 +72,7 @@ functions: - type: __search_compare_t - name: lsearch standards: - - POSIX + - posix return_type: void * arguments: - type: const void * diff --git a/libc/include/setjmp.h.def b/libc/include/setjmp.h.def deleted file mode 100644 index 670bc1a..0000000 --- a/libc/include/setjmp.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- C standard library header setjmp.h --------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SETJMP_H -#define LLVM_LIBC_SETJMP_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_SETJMP_H diff --git a/libc/include/setjmp.yaml b/libc/include/setjmp.yaml index 00049e5..55e0347 100644 --- a/libc/include/setjmp.yaml +++ b/libc/include/setjmp.yaml @@ -1,10 +1,8 @@ header: setjmp.h -header_template: setjmp.h.def -macros: [] +standards: + - stdc types: - type_name: jmp_buf -enums: [] -objects: [] functions: - name: longjmp standards: @@ -23,7 +21,7 @@ functions: - type: jmp_buf - name: sigsetjmp standards: - - POSIX + - posix return_type: int attributes: - _Returns_twice @@ -32,7 +30,7 @@ functions: - type: int - name: siglongjmp standards: - - POSIX + - posix return_type: _Noreturn void arguments: - type: sigjmp_buf diff --git a/libc/include/spawn.h.def b/libc/include/spawn.h.def deleted file mode 100644 index a8d7015..0000000 --- a/libc/include/spawn.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- POSIX header spawn.h ----------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SPAWN_H -#define LLVM_LIBC_SPAWN_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_SPAWN_H diff --git a/libc/include/spawn.yaml b/libc/include/spawn.yaml index c763cc7..ef39f66 100644 --- a/libc/include/spawn.yaml +++ b/libc/include/spawn.yaml @@ -1,17 +1,15 @@ header: spawn.h -header_template: spawn.h.def -macros: [] +standards: + - posix types: - type_name: posix_spawn_file_actions_t - type_name: posix_spawnattr_t - type_name: pid_t - type_name: mode_t -enums: [] -objects: [] functions: - name: posix_spawn standards: - - POSIX + - posix return_type: int arguments: - type: pid_t *__restrict @@ -22,14 +20,14 @@ functions: - type: char * const * __restrict - name: posix_spawn_file_actions_addclose standards: - - POSIX + - posix return_type: int arguments: - type: posix_spawn_file_actions_t * - type: int - name: posix_spawn_file_actions_adddup2 standards: - - POSIX + - posix return_type: int arguments: - type: posix_spawn_file_actions_t * @@ -37,7 +35,7 @@ functions: - type: int - name: posix_spawn_file_actions_addopen standards: - - POSIX + - posix return_type: int arguments: - type: posix_spawn_file_actions_t *__restrict @@ -47,13 +45,13 @@ functions: - type: mode_t - name: posix_spawn_file_actions_destroy standards: - - POSIX + - posix return_type: int arguments: - type: posix_spawn_file_actions_t * - name: posix_spawn_file_actions_init standards: - - POSIX + - posix return_type: int arguments: - type: posix_spawn_file_actions_t * diff --git a/libc/include/string.h.def b/libc/include/string.h.def deleted file mode 100644 index 339d005..0000000 --- a/libc/include/string.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- C standard library header string.h --------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_STRING_H -#define LLVM_LIBC_STRING_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_STRING_H diff --git a/libc/include/string.yaml b/libc/include/string.yaml index 736dece..0bf297e 100644 --- a/libc/include/string.yaml +++ b/libc/include/string.yaml @@ -1,5 +1,6 @@ header: string.h -header_template: string.h.def +standards: + - stdc macros: - macro_name: NULL macro_header: null-macro.h @@ -11,7 +12,7 @@ objects: [] functions: - name: memccpy standards: - - POSIX + - posix return_type: void * arguments: - type: void *__restrict @@ -61,7 +62,7 @@ functions: - type: size_t - name: mempcpy standards: - - POSIX + - posix return_type: void * arguments: - type: void *__restrict @@ -93,14 +94,14 @@ functions: - type: size_t - name: stpcpy standards: - - POSIX + - posix return_type: char * arguments: - type: char *__restrict - type: const char *__restrict - name: stpncpy standards: - - POSIX + - posix return_type: char * arguments: - type: char *__restrict @@ -243,7 +244,7 @@ functions: - type: size_t - name: strnlen standards: - - POSIX + - posix return_type: size_t arguments: - type: const char * @@ -271,7 +272,7 @@ functions: - type: const char *__restrict - name: strsignal standards: - - POSIX + - posix return_type: char * arguments: - type: int @@ -298,7 +299,7 @@ functions: - type: const char *__restrict - name: strtok_r standards: - - POSIX + - posix return_type: char * arguments: - type: char *__restrict diff --git a/libc/include/strings.h.def b/libc/include/strings.h.def deleted file mode 100644 index 9b016bf..0000000 --- a/libc/include/strings.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- C standard library header strings.h -------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_STRINGS_H -#define LLVM_LIBC_STRINGS_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_STRINGS_H diff --git a/libc/include/strings.yaml b/libc/include/strings.yaml index 855800d..1e78f0e 100644 --- a/libc/include/strings.yaml +++ b/libc/include/strings.yaml @@ -1,15 +1,14 @@ header: strings.h -header_template: strings.h.def -macros: [] +standards: + - bsd + - posix types: - type_name: size_t - type_name: locale_t -enums: [] -objects: [] functions: - name: bcmp standards: - - llvm_libc_ext + - bsd return_type: int arguments: - type: const void * @@ -17,7 +16,7 @@ functions: - type: size_t - name: bcopy standards: - - llvm_libc_ext + - bsd return_type: void arguments: - type: const void * @@ -25,69 +24,61 @@ functions: - type: size_t - name: bzero standards: - - llvm_libc_ext + - bsd return_type: void arguments: - type: void * - type: size_t - name: ffs standards: - - POSIX + - posix return_type: int arguments: - type: int - name: ffsl standards: - - POSIX + - posix return_type: int arguments: - type: long - name: ffsll standards: - - POSIX + - posix return_type: int arguments: - type: long long - name: index standards: - - BSDExtensions + - bsd return_type: char * arguments: - type: const char * - type: int - name: rindex standards: - - BSDExtensions + - bsd return_type: char * arguments: - type: const char * - type: int - name: strcasecmp - standards: - - BSDExtensions return_type: int arguments: - type: const char * - type: const char * - name: strcasecmp_l - standards: - - BSDExtensions return_type: int arguments: - type: const char * - type: const char * - type: locale_t - name: strncasecmp - standards: - - BSDExtensions return_type: int arguments: - type: const char * - type: const char * - type: size_t - name: strncasecmp_l - standards: - - BSDExtensions return_type: int arguments: - type: const char * diff --git a/libc/include/sys/sendfile.h.def b/libc/include/sys/sendfile.h.def deleted file mode 100644 index d7f21f9..0000000 --- a/libc/include/sys/sendfile.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Linux sys/sendfile.h ----------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SYS_SENDFILE_H -#define LLVM_LIBC_SYS_SENDFILE_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_SYS_SENDFILE_H diff --git a/libc/include/sys/sendfile.yaml b/libc/include/sys/sendfile.yaml index 259ab83..a845dab 100644 --- a/libc/include/sys/sendfile.yaml +++ b/libc/include/sys/sendfile.yaml @@ -1,16 +1,8 @@ header: sys/sendfile.h -header_template: sendfile.h.def -macros: [] -types: - - type_name: ssize_t - - type_name: size_t - - type_name: off_t -enums: [] -objects: [] +standards: + - linux functions: - name: sendfile - standards: - - GNUExtensions return_type: ssize_t arguments: - type: int diff --git a/libc/include/sys/statvfs.h.def b/libc/include/sys/statvfs.h.def deleted file mode 100644 index f23c9a3..0000000 --- a/libc/include/sys/statvfs.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- POSIX header statvfs.h --------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SYS_STATVFS_H -#define LLVM_LIBC_SYS_STATVFS_H - -#include <__llvm-libc-common.h> - -%%public_api() - -#endif // LLVM_LIBC_SYS_STATVFS_H diff --git a/libc/include/sys/statvfs.yaml b/libc/include/sys/statvfs.yaml index 8c1d254..e083677 100644 --- a/libc/include/sys/statvfs.yaml +++ b/libc/include/sys/statvfs.yaml @@ -1,23 +1,21 @@ header: sys/statvfs.h -header_template: statvfs.h.def -macros: [] +standards: + - posix types: - type_name: struct_statvfs - type_name: fsblkcnt_t - type_name: fsfilcnt_t -enums: [] -objects: [] functions: - name: fstatvfs standards: - - POSIX + - posix return_type: int arguments: - type: int - type: struct statvfs * - name: statvfs standards: - - POSIX + - posix return_type: int arguments: - type: const char *__restrict diff --git a/libc/include/sys/types.yaml b/libc/include/sys/types.yaml index 6fa0b44..a00429d 100644 --- a/libc/include/sys/types.yaml +++ b/libc/include/sys/types.yaml @@ -1,32 +1,28 @@ header: sys/types.h -header_template: types.h.def -standards: POSIX -macros: [] +standards: + - posix types: - - type_name: uid_t - - type_name: time_t - - type_name: pthread_t - - type_name: pthread_rwlock_t - - type_name: pthread_rwlockattr_t - - type_name: pthread_mutex_t - type_name: blkcnt_t - type_name: blksize_t - type_name: clockid_t - - type_name: ssize_t - - type_name: pthread_mutexattr_t - - type_name: ino_t - - type_name: pthread_once_t - - type_name: mode_t - type_name: dev_t - - type_name: pthread_attr_t - type_name: gid_t - - type_name: pid_t + - type_name: ino_t + - type_name: mode_t - type_name: nlink_t - - type_name: suseconds_t - type_name: off_t - - type_name: size_t - - type_name: pthread_key_t + - type_name: pid_t + - type_name: pthread_attr_t - type_name: pthread_condattr_t -enums: [] -objects: [] -functions: [] + - type_name: pthread_key_t + - type_name: pthread_mutex_t + - type_name: pthread_mutexattr_t + - type_name: pthread_once_t + - type_name: pthread_rwlock_t + - type_name: pthread_rwlockattr_t + - type_name: pthread_t + - type_name: size_t + - type_name: ssize_t + - type_name: suseconds_t + - type_name: time_t + - type_name: uid_t diff --git a/libc/include/sys/uio.h.def b/libc/include/sys/uio.h.def deleted file mode 100644 index 76496cb..0000000 --- a/libc/include/sys/uio.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- POSIX header uio.h ------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SYS_UIO_H -#define LLVM_LIBC_SYS_UIO_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_SYS_UIO_H diff --git a/libc/include/sys/uio.yaml b/libc/include/sys/uio.yaml index 6d3f336..929911e 100644 --- a/libc/include/sys/uio.yaml +++ b/libc/include/sys/uio.yaml @@ -1,15 +1,13 @@ header: sys/uio.h -header_template: uio.h.def -macros: [] +standards: + - posix types: - type_name: struct_iovec - type_name: ssize_t -enums: [] -objects: [] functions: - name: writev standards: - - POSIX + - posix return_type: ssize_t arguments: - type: int @@ -17,7 +15,7 @@ functions: - type: int - name: readv standards: - - POSIX + - posix return_type: ssize_t arguments: - type: int diff --git a/libc/include/sys/utsname.h.def b/libc/include/sys/utsname.h.def deleted file mode 100644 index 08dbbfc..0000000 --- a/libc/include/sys/utsname.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- Linux sys/utsname.h -----------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_SYS_UTSNAME_H -#define LLVM_LIBC_SYS_UTSNAME_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_SYS_UTSNAME_H diff --git a/libc/include/sys/utsname.yaml b/libc/include/sys/utsname.yaml index 6c7cb71..0f0e4cd 100644 --- a/libc/include/sys/utsname.yaml +++ b/libc/include/sys/utsname.yaml @@ -1,14 +1,12 @@ header: sys/utsname.h -header_template: utsname.h.def -macros: [] +standards: + - posix types: - type_name: struct_utsname -enums: [] -objects: [] functions: - name: uname standards: - - POSIX + - posix return_type: int arguments: - type: struct utsname * diff --git a/libc/include/threads.h.def b/libc/include/threads.h.def deleted file mode 100644 index b114bea..0000000 --- a/libc/include/threads.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- C standard library header threads.h -------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_THREADS_H -#define LLVM_LIBC_THREADS_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_THREADS_H diff --git a/libc/include/threads.yaml b/libc/include/threads.yaml index 7014822..99b29f1 100644 --- a/libc/include/threads.yaml +++ b/libc/include/threads.yaml @@ -1,5 +1,6 @@ header: threads.h -header_template: threads.h.def +standards: + - stdc macros: - macro_name: ONCE_FLAG_INIT macro_value: '{0}' diff --git a/libc/include/uchar.h.def b/libc/include/uchar.h.def deleted file mode 100644 index 31b7fcb..0000000 --- a/libc/include/uchar.h.def +++ /dev/null @@ -1,16 +0,0 @@ -//===-- C standard library header uchar.h ---------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_UCHAR_H -#define LLVM_LIBC_UCHAR_H - -#include "__llvm-libc-common.h" - -%%public_api() - -#endif // LLVM_LIBC_UCHAR_H diff --git a/libc/include/uchar.yaml b/libc/include/uchar.yaml index 7139197..d0799e2 100644 --- a/libc/include/uchar.yaml +++ b/libc/include/uchar.yaml @@ -1,14 +1,9 @@ header: uchar.h -header_template: uchar.h.def standards: - stdc -macros: [] types: - type_name: char32_t - type_name: char16_t - type_name: char8_t - type_name: mbstate_t - type_name: size_t -enums: [] -objects: [] -functions: [] |