Connector Switch 5b3416caf9
[libc] implement inet_aton (#162651)
This patch adds the implementation for `inet_aton` function. Since this
function is not explicitly included in POSIX, I have marked it with
`llvm_libc_ext`. It is widely available and commonly used, and can also
be used to implement `inet_addr`, which is included in POSIX.
2025-10-21 23:47:38 +08:00

40 lines
702 B
YAML

header: arpa/inet.h
header_template: inet.h.def
macros: []
types:
- type_name: in_addr
enums: []
objects: []
functions:
- name: htonl
standards:
- POSIX
return_type: uint32_t
arguments:
- type: uint32_t
- name: htons
standards:
- POSIX
return_type: uint16_t
arguments:
- type: uint16_t
- name: inet_aton
standards:
- llvm_libc_ext
return_type: int
arguments:
- type: const char *
- type: in_addr *
- name: ntohl
standards:
- POSIX
return_type: uint32_t
arguments:
- type: uint32_t
- name: ntohs
standards:
- POSIX
return_type: uint16_t
arguments:
- type: uint16_t