[libc] Remove more header template files (#189066)

Get rid of several .h.def files which were used to ensure that the
macro definitions from llvm-libc-macro would be included in the public
header. Replace this logic with YAML instead - add entries to the
"macros" list that point to the correct "macro_header" to ensure it
would be included.

For C standard library headers, list several standard-define macros
to document their availability. For POSIX/Linux headers, only reference
a handful of macro, since more planning is needed to decide how to
represent platform-specific macro in YAML.
This commit is contained in:
Alexey Samsonov 2026-03-27 16:06:39 -07:00 committed by GitHub
parent 7be9972cb2
commit ae63230c23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 321 additions and 439 deletions

View File

@ -1,17 +0,0 @@
//===-- POSIX header endian.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_ENDIAN_H
#define LLVM_LIBC_ENDIAN_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/endian-macros.h"
%%public_api()
#endif // LLVM_LIBC_ENDIAN_H

View File

@ -1,9 +1,41 @@
header: endian.h
header_template: endian.h.def
standards:
- POSIX
macros: []
types: []
- posix
macros:
- macro_name: BYTE_ORDER
macro_header: endian-macros.h
- macro_name: LITTLE_ENDIAN
macro_header: endian-macros.h
- macro_name: BIG_ENDIAN
macro_header: endian-macros.h
- macro_name: be16toh
macro_header: endian-macros.h
- macro_name: be32toh
macro_header: endian-macros.h
- macro_name: be64toh
macro_header: endian-macros.h
- macro_name: htobe16
macro_header: endian-macros.h
- macro_name: htobe32
macro_header: endian-macros.h
- macro_name: htobe64
macro_header: endian-macros.h
- macro_name: htole16
macro_header: endian-macros.h
- macro_name: htole32
macro_header: endian-macros.h
- macro_name: htole64
macro_header: endian-macros.h
- macro_name: le16toh
macro_header: endian-macros.h
- macro_name: le32toh
macro_header: endian-macros.h
- macro_name: le64toh
macro_header: endian-macros.h
types:
- type_name: uint16_t
- type_name: uint32_t
- type_name: uint64_t
enums: []
objects: []
functions: []

View File

@ -1,17 +0,0 @@
//===-- C standard library header features.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_FEATURES_H
#define LLVM_LIBC_FEATURES_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/features-macros.h"
%%public_api()
#endif // LLVM_LIBC_FEATURES_H

View File

@ -1,7 +1,6 @@
header: features.h
header_template: features.h.def
standards:
- stdc
- gnu
macros: []
types: []
enums: []

View File

@ -1,14 +0,0 @@
//===-- C standard library header float.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_FLOAT_H
#define LLVM_LIBC_FLOAT_H
#include "llvm-libc-macros/float-macros.h"
#endif // LLVM_LIBC_FLOAT_H

View File

@ -1,8 +1,87 @@
header: float.h
header_template: float.h.def
standards:
- stdc
macros: []
macros:
- macro_name: FLT_RADIX
macro_header: float-macros.h
- macro_name: FLT_EVAL_METHOD
macro_header: float-macros.h
- macro_name: FLT_ROUNDS
macro_header: float-macros.h
- macro_name: FLT_DECIMAL_DIG
macro_header: float-macros.h
- macro_name: DBL_DECIMAL_DIG
macro_header: float-macros.h
- macro_name: LDBL_DECIMAL_DIG
macro_header: float-macros.h
- macro_name: DECIMAL_DIG
macro_header: float-macros.h
- macro_name: FLT_DIG
macro_header: float-macros.h
- macro_name: DBL_DIG
macro_header: float-macros.h
- macro_name: LDBL_DIG
macro_header: float-macros.h
- macro_name: FLT_MANT_DIG
macro_header: float-macros.h
- macro_name: DBL_MANT_DIG
macro_header: float-macros.h
- macro_name: LDBL_MANT_DIG
macro_header: float-macros.h
- macro_name: FLT_MIN
macro_header: float-macros.h
- macro_name: DBL_MIN
macro_header: float-macros.h
- macro_name: LDBL_MIN
macro_header: float-macros.h
- macro_name: FLT_MAX
macro_header: float-macros.h
- macro_name: DBL_MAX
macro_header: float-macros.h
- macro_name: LDBL_MAX
macro_header: float-macros.h
- macro_name: FLT_TRUE_MIN
macro_header: float-macros.h
- macro_name: DBL_TRUE_MIN
macro_header: float-macros.h
- macro_name: LDBL_TRUE_MIN
macro_header: float-macros.h
- macro_name: FLT_EPSILON
macro_header: float-macros.h
- macro_name: DBL_EPSILON
macro_header: float-macros.h
- macro_name: LDBL_EPSILON
macro_header: float-macros.h
- macro_name: FLT_MIN_EXP
macro_header: float-macros.h
- macro_name: DBL_MIN_EXP
macro_header: float-macros.h
- macro_name: LDBL_MIN_EXP
macro_header: float-macros.h
- macro_name: FLT_MIN_10_EXP
macro_header: float-macros.h
- macro_name: DBL_MIN_10_EXP
macro_header: float-macros.h
- macro_name: LDBL_MIN_10_EXP
macro_header: float-macros.h
- macro_name: FLT_MAX_EXP
macro_header: float-macros.h
- macro_name: DBL_MAX_EXP
macro_header: float-macros.h
- macro_name: LDBL_MAX_EXP
macro_header: float-macros.h
- macro_name: FLT_MAX_10_EXP
macro_header: float-macros.h
- macro_name: DBL_MAX_10_EXP
macro_header: float-macros.h
- macro_name: LDBL_MAX_10_EXP
macro_header: float-macros.h
- macro_name: FLT_HAS_SUBNORM
macro_header: float-macros.h
- macro_name: DBL_HAS_SUBNORM
macro_header: float-macros.h
- macro_name: LDBL_HAS_SUBNORM
macro_header: float-macros.h
types: []
enums: []
objects: []

View File

@ -1,18 +0,0 @@
//===-- C standard library header stdckdint.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_STDCKDINT_H
#define LLVM_LIBC_STDCKDINT_H
#include "__llvm-libc-common.h"
%%public_api()
#include "llvm-libc-macros/stdckdint-macros.h"
#endif // LLVM_LIBC_STDCKDINT_H

View File

@ -1,8 +1,13 @@
header: stdckdint.h
header_template: stdckdint.h.def
standards:
- stdc
macros: []
macros:
- macro_name: ckd_add
macro_header: stdckdint-macros.h
- macro_name: ckd_sub
macro_header: stdckdint-macros.h
- macro_name: ckd_mul
macro_header: stdckdint-macros.h
types: []
enums: []
objects: []

View File

@ -1,14 +0,0 @@
//===-- C standard library header stdint.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_STDINT_H
#define LLVM_LIBC_STDINT_H
#include "llvm-libc-macros/stdint-macros.h"
#endif // LLVM_LIBC_STDINT_H

View File

@ -1,8 +1,129 @@
header: stdint.h
header_template: stdint.h.def
standards:
- stdc
macros: []
macros:
- macro_name: INT8_MAX
macro_header: stdint-macros.h
- macro_name: INT16_MAX
macro_header: stdint-macros.h
- macro_name: INT32_MAX
macro_header: stdint-macros.h
- macro_name: INT64_MAX
macro_header: stdint-macros.h
- macro_name: INT8_MIN
macro_header: stdint-macros.h
- macro_name: INT16_MIN
macro_header: stdint-macros.h
- macro_name: INT32_MIN
macro_header: stdint-macros.h
- macro_name: INT64_MIN
macro_header: stdint-macros.h
- macro_name: UINT8_MAX
macro_header: stdint-macros.h
- macro_name: UINT16_MAX
macro_header: stdint-macros.h
- macro_name: UINT32_MAX
macro_header: stdint-macros.h
- macro_name: UINT64_MAX
macro_header: stdint-macros.h
- macro_name: INT_LEAST8_MAX
macro_header: stdint-macros.h
- macro_name: INT_LEAST16_MAX
macro_header: stdint-macros.h
- macro_name: INT_LEAST32_MAX
macro_header: stdint-macros.h
- macro_name: INT_LEAST64_MAX
macro_header: stdint-macros.h
- macro_name: INT_LEAST8_MIN
macro_header: stdint-macros.h
- macro_name: INT_LEAST16_MIN
macro_header: stdint-macros.h
- macro_name: INT_LEAST32_MIN
macro_header: stdint-macros.h
- macro_name: INT_LEAST64_MIN
macro_header: stdint-macros.h
- macro_name: UINT_LEAST8_MAX
macro_header: stdint-macros.h
- macro_name: UINT_LEAST16_MAX
macro_header: stdint-macros.h
- macro_name: UINT_LEAST32_MAX
macro_header: stdint-macros.h
- macro_name: UINT_LEAST64_MAX
macro_header: stdint-macros.h
- macro_name: INT_FAST8_MAX
macro_header: stdint-macros.h
- macro_name: INT_FAST16_MAX
macro_header: stdint-macros.h
- macro_name: INT_FAST32_MAX
macro_header: stdint-macros.h
- macro_name: INT_FAST64_MAX
macro_header: stdint-macros.h
- macro_name: INT_FAST8_MIN
macro_header: stdint-macros.h
- macro_name: INT_FAST16_MIN
macro_header: stdint-macros.h
- macro_name: INT_FAST32_MIN
macro_header: stdint-macros.h
- macro_name: INT_FAST64_MIN
macro_header: stdint-macros.h
- macro_name: UINT_FAST8_MAX
macro_header: stdint-macros.h
- macro_name: UINT_FAST16_MAX
macro_header: stdint-macros.h
- macro_name: UINT_FAST32_MAX
macro_header: stdint-macros.h
- macro_name: UINT_FAST64_MAX
macro_header: stdint-macros.h
- macro_name: INTPTR_MAX
macro_header: stdint-macros.h
- macro_name: INTPTR_MIN
macro_header: stdint-macros.h
- macro_name: UINTPTR_MAX
macro_header: stdint-macros.h
- macro_name: INTMAX_MAX
macro_header: stdint-macros.h
- macro_name: INTMAX_MIN
macro_header: stdint-macros.h
- macro_name: UINTMAX_MAX
macro_header: stdint-macros.h
- macro_name: PTRDIFF_MAX
macro_header: stdint-macros.h
- macro_name: PTRDIFF_MIN
macro_header: stdint-macros.h
- macro_name: SIG_ATOMIC_MAX
macro_header: stdint-macros.h
- macro_name: SIG_ATOMIC_MIN
macro_header: stdint-macros.h
- macro_name: SIZE_MAX
macro_header: stdint-macros.h
- macro_name: WCHAR_MAX
macro_header: stdint-macros.h
- macro_name: WCHAR_MIN
macro_header: stdint-macros.h
- macro_name: WINT_MAX
macro_header: stdint-macros.h
- macro_name: WINT_MIN
macro_header: stdint-macros.h
- macro_name: INT8_C
macro_header: stdint-macros.h
- macro_name: INT16_C
macro_header: stdint-macros.h
- macro_name: INT32_C
macro_header: stdint-macros.h
- macro_name: INT64_C
macro_header: stdint-macros.h
- macro_name: UINT8_C
macro_header: stdint-macros.h
- macro_name: UINT16_C
macro_header: stdint-macros.h
- macro_name: UINT32_C
macro_header: stdint-macros.h
- macro_name: UINT64_C
macro_header: stdint-macros.h
- macro_name: INTMAX_C
macro_header: stdint-macros.h
- macro_name: UINTMAX_C
macro_header: stdint-macros.h
types: []
enums: []
objects: []

View File

@ -1,18 +0,0 @@
//===-- GNU header auxv.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_AUXV_H
#define LLVM_LIBC_SYS_AUXV_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-auxv-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_AUXV_H

View File

@ -1,13 +1,14 @@
header: sys/auxv.h
header_template: auxv.h.def
macros: []
standards:
- gnu
macros:
- macro_name: AT_NULL
macro_header: sys-auxv-macros.h
types: []
enums: []
objects: []
functions:
- name: getauxval
standards:
- GNUExtensions
return_type: unsigned long
arguments:
- type: unsigned long

View File

@ -1,18 +0,0 @@
//===-- Linux header epoll.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_EPOLL_H
#define LLVM_LIBC_SYS_EPOLL_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-epoll-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_EPOLL_H

View File

@ -1,6 +1,9 @@
header: sys/epoll.h
header_template: epoll.h.def
macros: []
standards:
- linux
macros:
- macro_name: EPOLLIN
macro_header: sys-epoll-macros.h
types:
- type_name: struct_epoll_event
- type_name: struct_epoll_data
@ -10,20 +13,14 @@ enums: []
objects: []
functions:
- name: epoll_create
standards:
- Linux
return_type: int
arguments:
- type: int
- name: epoll_create1
standards:
- Linux
return_type: int
arguments:
- type: int
- name: epoll_ctl
standards:
- Linux
return_type: int
arguments:
- type: int
@ -31,8 +28,6 @@ functions:
- type: int
- type: struct epoll_event *
- name: epoll_pwait
standards:
- Linux
return_type: int
arguments:
- type: int
@ -41,8 +36,6 @@ functions:
- type: int
- type: const sigset_t *
- name: epoll_pwait2
standards:
- Linux
return_type: int
arguments:
- type: int
@ -51,8 +44,6 @@ functions:
- type: const struct timespec *
- type: const sigset_t *
- name: epoll_wait
standards:
- Linux
return_type: int
arguments:
- type: int

View File

@ -1,18 +0,0 @@
//===-- POSIX header ioctl.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_IOCTL_H
#define LLVM_LIBC_SYS_IOCTL_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-ioctl-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_IOCTL_H

View File

@ -1,14 +1,14 @@
header: sys/ioctl.h
header_template: ioctl.h.def
standards: POSIX
macros: []
standards:
- linux
macros:
- macro_name: FIONREAD
macro_header: sys-ioctl-macros.h
types: []
enums: []
objects: []
functions:
- name: ioctl
standards:
- Linux
return_type: int
arguments:
- type: int

View File

@ -1,18 +0,0 @@
//===-- POSIX header mman.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_MMAN_H
#define LLVM_LIBC_SYS_MMAN_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-mman-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_MMAN_H

View File

@ -1,6 +1,9 @@
header: sys/mman.h
header_template: mman.h.def
macros: []
standards:
- posix
macros:
- macro_name: MAP_FAILED
macro_header: sys-mman-macros.h
types:
- type_name: mode_t
- type_name: size_t

View File

@ -1,18 +0,0 @@
//===-- Linux sys/random.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_RANDOM_H
#define LLVM_LIBC_SYS_RANDOM_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-random-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_RANDOM_H

View File

@ -1,6 +1,9 @@
header: sys/random.h
header_template: random.h.def
macros: []
standards:
- linux
macros:
- macro_name: GRND_RANDOM
macro_header: sys-random-macros.h
types:
- type_name: ssize_t
- type_name: size_t
@ -8,8 +11,6 @@ enums: []
objects: []
functions:
- name: getrandom
standards:
- Linux
return_type: ssize_t
arguments:
- type: void *
@ -17,7 +18,7 @@ functions:
- type: unsigned int
- name: getentropy
standards:
- GNUExtensions
- gnu
return_type: int
arguments:
- type: void *

View File

@ -1,18 +0,0 @@
//===-- POSIX header resource.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_RESOURCE_H
#define LLVM_LIBC_SYS_RESOURCE_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-resource-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_RESOURCE_H

View File

@ -1,6 +1,9 @@
header: sys/resource.h
header_template: resource.h.def
macros: []
standards:
- posix
macros:
- macro_name: RLIMIT_CPU
macro_header: sys-resource-macros.h
types:
- type_name: struct_rlimit
- type_name: rlim_t

View File

@ -1,18 +0,0 @@
//===-- Linux sys/select.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_SELECT_H
#define LLVM_LIBC_SYS_SELECT_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-select-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_SELECT_H

View File

@ -1,6 +1,9 @@
header: sys/select.h
header_template: select.h.def
macros: []
standards:
- posix
macros:
- macro_name: FD_SETSIZE
macro_header: sys-select-macros.h
types:
- type_name: struct_timeval
- type_name: struct_timespec

View File

@ -1,18 +0,0 @@
//===-- POSIX header sys/socket.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_SOCKET_H
#define LLVM_LIBC_SYS_SOCKET_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-socket-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_SOCKET_H

View File

@ -1,6 +1,9 @@
header: sys/socket.h
header_template: socket.h.def
macros: []
standards:
- posix
macros:
- macro_name: AF_UNSPEC
macro_header: sys-socket-macros.h
types:
- type_name: struct_sockaddr
- type_name: socklen_t

View File

@ -1,18 +0,0 @@
//===-- POSIX header stat.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_STAT_H
#define LLVM_LIBC_SYS_STAT_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-stat-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_STAT_H

View File

@ -1,6 +1,9 @@
header: sys/stat.h
header_template: stat.h.def
macros: []
standards:
- posix
macros:
- macro_name: S_IFMT
macro_header: sys-stat-macros.h
types:
- type_name: blkcnt_t
- type_name: blksize_t
@ -18,22 +21,16 @@ enums: []
objects: []
functions:
- name: chmod
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: mode_t
- name: fchmod
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: mode_t
- name: fchmodat
standards:
- POSIX
return_type: int
arguments:
- type: int
@ -41,44 +38,32 @@ functions:
- type: mode_t
- type: int
- name: fstat
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: struct stat *
- name: lstat
standards:
- POSIX
return_type: int
arguments:
- type: const char *__restrict
- type: struct stat *__restrict
- name: mkdir
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: mode_t
- name: mkdirat
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: const char *
- type: mode_t
- name: stat
standards:
- POSIX
return_type: int
arguments:
- type: const char *__restrict
- type: struct stat *__restrict
- name: utimensat
standards:
- POSIX
return_type: int
arguments:
- type: int

View File

@ -1,18 +0,0 @@
//===-- Linux header time.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_TIME_H
#define LLVM_LIBC_SYS_TIME_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-time-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_TIME_H

View File

@ -1,7 +1,9 @@
header: sys/time.h
header_template: time.h.def
standards: Linux
macros: []
standards:
- posix
macros:
- macro_name: timeradd
macro_header: sys-time-macros.h
types:
- type_name: struct_timeval
- type_name: struct_itimerval
@ -15,8 +17,6 @@ functions:
- type: const struct timeval*
- name: setitimer
standards:
- POSIX
return_type: int
arguments:
- type: int
@ -24,8 +24,6 @@ functions:
- type: struct itimerval *__restrict
- name: getitimer
standards:
- POSIX
return_type: int
arguments:
- type: int

View File

@ -1,16 +0,0 @@
//===-- Header for sys/types.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_TYPES_H
#define LLVM_LIBC_SYS_TYPES_H
#include "__llvm-libc-common.h"
%%public_api()
#endif // LLVM_LIBC_SYS_TYPES_H

View File

@ -1,18 +0,0 @@
//===-- POSIX header wait.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_WAIT_H
#define LLVM_LIBC_SYS_WAIT_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/sys-wait-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYS_WAIT_H

View File

@ -1,6 +1,9 @@
header: sys/wait.h
header_template: wait.h.def
macros: []
standards:
- posix
macros:
- macro_name: WCOREDUMP
macro_header: sys-wait-macros.h
types:
- type_name: siginfo_t
- type_name: struct_rusage

View File

@ -128,10 +128,6 @@ LLVM_LIBC_HEADERS = [
"elf",
has_def_template = True,
),
libc_header_info(
"endian",
has_def_template = True,
),
libc_header_info(
"errno",
has_def_template = True,
@ -140,14 +136,6 @@ LLVM_LIBC_HEADERS = [
"fcntl",
has_def_template = True,
),
libc_header_info(
"features",
has_def_template = True,
),
libc_header_info(
"float",
has_def_template = True,
),
libc_header_info(
"inttypes",
has_def_template = True,
@ -180,18 +168,10 @@ LLVM_LIBC_HEADERS = [
"stdbit",
has_def_template = True,
),
libc_header_info(
"stdckdint",
has_def_template = True,
),
libc_header_info(
"stdfix",
has_def_template = True,
),
libc_header_info(
"stdint",
has_def_template = True,
),
libc_header_info(
"stdio",
has_def_template = True,
@ -200,62 +180,14 @@ LLVM_LIBC_HEADERS = [
"sysexits",
has_def_template = True,
),
libc_header_info(
"sys/auxv",
has_def_template = True,
),
libc_header_info(
"sys/epoll",
has_def_template = True,
),
libc_header_info(
"sys/ioctl",
has_def_template = True,
),
libc_header_info(
"sys/mman",
has_def_template = True,
),
libc_header_info(
"sys/prctl",
has_def_template = True,
),
libc_header_info(
"sys/random",
has_def_template = True,
),
libc_header_info(
"sys/resource",
has_def_template = True,
),
libc_header_info(
"sys/select",
has_def_template = True,
),
libc_header_info(
"sys/socket",
has_def_template = True,
),
libc_header_info(
"sys/stat",
has_def_template = True,
),
libc_header_info(
"sys/syscall",
has_def_template = True,
),
libc_header_info(
"sys/time",
has_def_template = True,
),
libc_header_info(
"sys/types",
has_def_template = True,
),
libc_header_info(
"sys/wait",
has_def_template = True,
),
libc_header_info(
"termios",
has_def_template = True,
@ -267,7 +199,10 @@ LLVM_LIBC_HEADERS = [
libc_header_info("ctype"),
libc_header_info("dirent"),
libc_header_info("dlfcn"),
libc_header_info("endian"),
libc_header_info("features"),
libc_header_info("fenv"),
libc_header_info("float"),
libc_header_info("limits"),
libc_header_info("locale"),
libc_header_info("nl_types"),
@ -275,11 +210,25 @@ LLVM_LIBC_HEADERS = [
libc_header_info("search"),
libc_header_info("setjmp"),
libc_header_info("spawn"),
libc_header_info("stdckdint"),
libc_header_info("stdint"),
libc_header_info("string"),
libc_header_info("strings"),
libc_header_info("sys/auxv"),
libc_header_info("sys/epoll"),
libc_header_info("sys/ioctl"),
libc_header_info("sys/ipc"),
libc_header_info("sys/mman"),
libc_header_info("sys/random"),
libc_header_info("sys/resource"),
libc_header_info("sys/select"),
libc_header_info("sys/socket"),
libc_header_info("sys/stat"),
libc_header_info("sys/statvfs"),
libc_header_info("sys/time"),
libc_header_info("sys/types"),
libc_header_info("sys/utsname"),
libc_header_info("sys/wait"),
libc_header_info("threads"),
libc_header_info("time"),
libc_header_info("uchar"),