diff --git a/src/header/arpa_inet/cbindgen.toml b/src/header/arpa_inet/cbindgen.toml index cc6241d6de..3e61225886 100644 --- a/src/header/arpa_inet/cbindgen.toml +++ b/src/header/arpa_inet/cbindgen.toml @@ -11,16 +11,15 @@ # - including netinet/in.h in arpa/inet.h # - splitting out functions (htonl, htons, ntohl, ntohs) into bits/arpainet.h # -# features.h needed for #[deprecated] annotation # bits/arpainet.h brings in inttypes.h -sys_includes = ["features.h", "netinet/in.h"] +# features.h needed for deprecated annotation +sys_includes = ["netinet/in.h", "features.h"] include_guard = "_RELIBC_ARPA_INET_H" after_includes = """ -#include // for htonl, htons, ntohl, ntohs -#include // for socklen_t +#include // for htonl, htons, ntohl, ntohs +#include // for socklen_t from sys/socket.h """ language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/cpio/cbindgen.toml b/src/header/cpio/cbindgen.toml index c578d9b65e..e54267cdf5 100644 --- a/src/header/cpio/cbindgen.toml +++ b/src/header/cpio/cbindgen.toml @@ -1,14 +1,12 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/cpio.h.html # # There are no spec quotations relating to includes -sys_includes = [] include_guard = "_RELIBC_CPIO_H" # cbindgen still can't handle exporting CStr after_includes = """ #define MAGIC "070707" """ language = "C" -style = "Type" no_includes = true cpp_compat = true diff --git a/src/header/dirent/cbindgen.toml b/src/header/dirent/cbindgen.toml index 29bbd91edb..6e8d9fbba9 100644 --- a/src/header/dirent/cbindgen.toml +++ b/src/header/dirent/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the ino_t, reclen_t, size_t, and ssize_t types as described in ." -sys_includes = [] include_guard = "_RELIBC_DIRENT_H" language = "C" style = "Both" diff --git a/src/header/dlfcn/cbindgen.toml b/src/header/dlfcn/cbindgen.toml index 833eef84bf..4c9654444e 100644 --- a/src/header/dlfcn/cbindgen.toml +++ b/src/header/dlfcn/cbindgen.toml @@ -1,7 +1,6 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dlfcn.h.html # # There are no spec quotations relating to includes -sys_includes = [] include_guard = "_RELIBC_DLFCN_H" language = "C" style = "Type" diff --git a/src/header/errno/cbindgen.toml b/src/header/errno/cbindgen.toml index 93f418381d..bb0f55f0e8 100644 --- a/src/header/errno/cbindgen.toml +++ b/src/header/errno/cbindgen.toml @@ -1,7 +1,6 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html # # There are no spec quotations relating to includes -sys_includes = [] after_includes = """ #define errno (*__errno_location()) #define program_invocation_name (*__program_invocation_name()) @@ -9,7 +8,6 @@ after_includes = """ """ include_guard = "_RELIBC_ERRNO_H" language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/fcntl/cbindgen.toml b/src/header/fcntl/cbindgen.toml index fa5631ad21..912e56c8d6 100644 --- a/src/header/fcntl/cbindgen.toml +++ b/src/header/fcntl/cbindgen.toml @@ -9,6 +9,8 @@ # To prevent a cycle between fcntl.h and unistd.h relibc only includes fcntl.h in unistd.h. # This approach was chosen because unistd.h requires parts of fcntl.h but not the other way around. # +# TODO split out va_list from stdarg.h +# # stdarg.h brings in va_list for ... # sys/stat.h brings in mode_t, off_t and file mode constants sys_includes = ["stdarg.h", "sys/stat.h"] diff --git a/src/header/glob/cbindgen.toml b/src/header/glob/cbindgen.toml index 9ac0ac63ad..5c8d05d830 100644 --- a/src/header/glob/cbindgen.toml +++ b/src/header/glob/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the size_t type as described in ." -sys_includes = [] after_includes = """ #include // for size_t from sys/types.h """ diff --git a/src/header/grp/cbindgen.toml b/src/header/grp/cbindgen.toml index 35dc5bcf32..81daec4f85 100644 --- a/src/header/grp/cbindgen.toml +++ b/src/header/grp/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the gid_t and size_t types as described in ." -sys_includes = [] after_includes = """ #include // for gid_t from sys/types.h #include // for size_t from sys/types.h diff --git a/src/header/libgen/cbindgen.toml b/src/header/libgen/cbindgen.toml index 0dfb9a44a7..e6358cd613 100644 --- a/src/header/libgen/cbindgen.toml +++ b/src/header/libgen/cbindgen.toml @@ -1,10 +1,8 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/libgen.h.html # # There are no spec quotations relating to includes -sys_includes = [] include_guard = "_RELIBC_LIBGEN_H" language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/limits/cbindgen.toml b/src/header/limits/cbindgen.toml index 8d03b1ee3f..8ef9934bb4 100644 --- a/src/header/limits/cbindgen.toml +++ b/src/header/limits/cbindgen.toml @@ -1,13 +1,11 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html # # There are no spec quotations relating to includes -sys_includes = [] after_includes = """ #include // for ssize_t from sys/types.h """ include_guard = "_RELIBC_LIMITS_H" language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/math/cbindgen.toml b/src/header/math/cbindgen.toml index 97345d7770..3ec3983de5 100644 --- a/src/header/math/cbindgen.toml +++ b/src/header/math/cbindgen.toml @@ -1,8 +1,10 @@ -# Note: changing this file requires `make clean`. -sys_includes = [] +# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/math.h.html +# +# There are no spec quotations relating to includes +# +# NOTE: changing this file requires `make clean`. include_guard = "_RELIBC_MATH_H" language = "C" -style = "Type" no_includes = true cpp_compat = true # constants from openlibm diff --git a/src/header/monetary/cbindgen.toml b/src/header/monetary/cbindgen.toml index e0d8670e94..d4cf67d456 100644 --- a/src/header/monetary/cbindgen.toml +++ b/src/header/monetary/cbindgen.toml @@ -4,7 +4,6 @@ # - "The header shall define the locale_t type as described in ." # - "The header shall define the size_t type as described in ." # - "The header shall define the ssize_t type as described in ." -sys_includes = [] include_guard = "_RELIBC_MONETARY_H" after_includes = """ #include // for locale_t from locale.h diff --git a/src/header/netinet_tcp/cbindgen.toml b/src/header/netinet_tcp/cbindgen.toml index a5df2552fd..77ba515cc2 100644 --- a/src/header/netinet_tcp/cbindgen.toml +++ b/src/header/netinet_tcp/cbindgen.toml @@ -1,10 +1,8 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_tcp.h.html # # There are no spec quotations relating to includes -sys_includes = [] include_guard = "_RELIBC_NETINET_TCP_H" language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/poll/cbindgen.toml b/src/header/poll/cbindgen.toml index c45d820b7f..33c01e2056 100644 --- a/src/header/poll/cbindgen.toml +++ b/src/header/poll/cbindgen.toml @@ -4,7 +4,6 @@ # - "The header shall define the sigset_t type as described in ." # - "The header shall define the timespec structure as described in ." # - "Inclusion of the header may make visible all symbols from the headers and ." -sys_includes = [] include_guard = "_RELIBC_POLL_H" after_includes = """ #include // for sigset_t from signal.h diff --git a/src/header/pwd/cbindgen.toml b/src/header/pwd/cbindgen.toml index a12aec9356..349cb7a720 100644 --- a/src/header/pwd/cbindgen.toml +++ b/src/header/pwd/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the gid_t, uid_t, and size_t types as described in ." -sys_includes = [] after_includes = """ #include // for gid_t from sys/types.h #include // for size_t from sys/types.h diff --git a/src/header/regex/cbindgen.toml b/src/header/regex/cbindgen.toml index 8c3b2a54e0..4eb25bebfa 100644 --- a/src/header/regex/cbindgen.toml +++ b/src/header/regex/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the size_t type as described in ." -sys_includes = [] after_includes = """ #include // for size_t from sys/types.h """ diff --git a/src/header/sched/cbindgen.toml b/src/header/sched/cbindgen.toml index f238b93f25..29c9b5012f 100644 --- a/src/header/sched/cbindgen.toml +++ b/src/header/sched/cbindgen.toml @@ -7,7 +7,6 @@ # - "Inclusion of the header may make visible all symbols from the header." # # bits/timespec.h brings in time_t -sys_includes = [] include_guard = "_RELIBC_SCHED_H" after_includes = """ #include // for pid_t from sys/types diff --git a/src/header/signal/cbindgen.toml b/src/header/signal/cbindgen.toml index 23486bc6d6..05cdd28ba8 100644 --- a/src/header/signal/cbindgen.toml +++ b/src/header/signal/cbindgen.toml @@ -11,6 +11,8 @@ # POSIX states signal.h may include time.h and time.h may include signal.h. # To prevent a cycle between both headers we only import the needed types through bits. # +# TODO split out types from bits/pthread.h +# # features.h required for deprecated annotations sys_includes = ["features.h"] include_guard = "_RELIBC_SIGNAL_H" diff --git a/src/header/sys_shm/cbindgen.toml b/src/header/sys_shm/cbindgen.toml index 0b3f953d5f..e199598ffe 100644 --- a/src/header/sys_shm/cbindgen.toml +++ b/src/header/sys_shm/cbindgen.toml @@ -4,6 +4,8 @@ # - "The header shall define the type intptr_t as described in ." # - "The header shall define the pid_t, size_t, and time_t types as described in ." # - "In addition, the header shall include the header." +# +# TODO split out intptr_t from stdint.h sys_includes = ["sys/ipc.h", "stdint.h"] include_guard = "_RELIBC_SYS_SHM_H" after_includes = """ diff --git a/src/header/sys_socket/cbindgen.toml b/src/header/sys_socket/cbindgen.toml index 1237d47818..e37f7b7d62 100644 --- a/src/header/sys_socket/cbindgen.toml +++ b/src/header/sys_socket/cbindgen.toml @@ -5,6 +5,8 @@ # - "The header shall define the size_t and ssize_t types as described in ." # - "Inclusion of may also make visible all symbols from ." # +# TODO split out uint32_t from stdint.h in bits/socklen-t.h +# # bits/iovec.h brings in size_t # bits/socklen_t brings in stdint.h for uint32_t for socklen_t include_guard = "_RELIBC_SYS_SOCKET_H" diff --git a/src/header/sys_stat/cbindgen.toml b/src/header/sys_stat/cbindgen.toml index f6d3889d90..8113f6953b 100644 --- a/src/header/sys_stat/cbindgen.toml +++ b/src/header/sys_stat/cbindgen.toml @@ -6,7 +6,6 @@ # - "Inclusion of the header may make visible all symbols from the header." # # bits/timespec.h brings in time_t -sys_includes = [] include_guard = "_RELIBC_SYS_STAT_H" after_includes = """ #include // for blkcnt_t and blksize_t from sys/types.h diff --git a/src/header/sys_statvfs/cbindgen.toml b/src/header/sys_statvfs/cbindgen.toml index 5adeac207e..f1ba2d5e1e 100644 --- a/src/header/sys_statvfs/cbindgen.toml +++ b/src/header/sys_statvfs/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the fsblkcnt_t and fsfilcnt_t types as described in ." -sys_includes = [] after_includes = """ #include // for fsblkcnt_t and fsfilcnt_t from sys/types.h """ diff --git a/src/header/sys_types/cbindgen.toml b/src/header/sys_types/cbindgen.toml index cd00479de9..46bfa12592 100644 --- a/src/header/sys_types/cbindgen.toml +++ b/src/header/sys_types/cbindgen.toml @@ -2,7 +2,7 @@ # # There are no spec quotations relating to includes # -# - sys/types/internal.h are fundamental C types (which includes stddef.h) +# - sys/types/internal.h are fundamental C types # - sys/types/internal.h brings in features.h for deprecated annotations for useconds_t # - bits/pthread.h is separate for convenience sys_includes = [ @@ -10,10 +10,9 @@ sys_includes = [ "sys/types/internal.h", "bits/pthread.h", ] -include_guard = "_SYS_TYPES_H" +include_guard = "_RELIBC_SYS_TYPES_H" no_includes = true language = "C" -style = "Tag" [enum] prefix_with_name = true diff --git a/src/header/sys_uio/cbindgen.toml b/src/header/sys_uio/cbindgen.toml index 8e6ede28bb..14fe43aeaa 100644 --- a/src/header/sys_uio/cbindgen.toml +++ b/src/header/sys_uio/cbindgen.toml @@ -4,7 +4,6 @@ # - "The header shall define the ssize_t and size_t types as described in ." # # bits/iovec.h brings in size_t -sys_includes = [] after_includes = """ #include // for ssize_t from sys/types.h #include // for iovec @@ -14,7 +13,6 @@ after_includes = """ """ include_guard = "_RELIBC_SYS_UIO_H" language = "C" -style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/sys_un/cbindgen.toml b/src/header/sys_un/cbindgen.toml index d5ebca0687..af00db5f3e 100644 --- a/src/header/sys_un/cbindgen.toml +++ b/src/header/sys_un/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the sa_family_t type as described in ." -sys_includes = [] after_includes = """ #include // for sa_family_t from sys/socket.h """ diff --git a/src/header/termios/cbindgen.toml b/src/header/termios/cbindgen.toml index 21dddfa3f4..4abef2f33d 100644 --- a/src/header/termios/cbindgen.toml +++ b/src/header/termios/cbindgen.toml @@ -2,7 +2,6 @@ # # Spec quotations relating to includes: # - "The header shall define the pid_t type as described in ." -sys_includes = [] after_includes = """ #include // for pid_t from sys/types.h #include // for winsize diff --git a/src/header/time/cbindgen.toml b/src/header/time/cbindgen.toml index 29b1507705..493fed0888 100644 --- a/src/header/time/cbindgen.toml +++ b/src/header/time/cbindgen.toml @@ -9,6 +9,10 @@ # - "NULL As described in ." # - "Inclusion of the header may make visible all symbols from the header." # +# Cycle warning: +# POSIX states signal.h may include time.h and time.h may include signal.h. +# To prevent a cycle between both headers we only import the needed types through bits. +# # bits/timespec.h brings in time_t # features.h included for deprecated annotations sys_includes = ["features.h"]