32 lines
1.3 KiB
TOML
32 lines
1.3 KiB
TOML
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html
|
|
#
|
|
# Spec quotations relating to includes:
|
|
# - "The <arpa/inet.h> header shall define the in_port_t and in_addr_t types as described in <netinet/in.h> and the socklen_t type as defined in <sys/socket.h>."
|
|
# - "The <arpa/inet.h> header shall define the in_addr structure as described in <netinet/in.h>."
|
|
# - "The <arpa/inet.h> header shall define the INET_ADDRSTRLEN and INET6_ADDRSTRLEN macros as described in <netinet/in.h>."
|
|
# - "The <arpa/inet.h> header shall define the uint32_t and uint16_t types as described in <inttypes.h>."
|
|
# - "Inclusion of the <arpa/inet.h> header may also make visible all symbols from <netinet/in.h> and <inttypes.h>."
|
|
#
|
|
# Possible cycle between arpa/inet.h and netinet/in.h solved by:
|
|
# - 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"]
|
|
include_guard = "_RELIBC_ARPA_INET_H"
|
|
after_includes = """
|
|
#include <bits/arpainet.h> // for htonl, htons, ntohl, ntohs
|
|
#include <bits/socklen-t.h> // for socklen_t
|
|
"""
|
|
language = "C"
|
|
style = "Tag"
|
|
no_includes = true
|
|
cpp_compat = true
|
|
|
|
[enum]
|
|
prefix_with_name = true
|
|
|
|
[export.rename]
|
|
"in_addr" = "struct in_addr"
|