This adds a new main command-line entry point for hdrgen, in the new main.py. This new interface is used for generating a header. The old ways of invoking yaml_to_classes.py for other purposes are left there for now, but `--e` is renamed to `--entry-point` for consistency with the new CLI. The YAML schema is expanded with the `header_template` key where the corresponding `.h.def` file's path is given relative to where the YAML file is found. The build integration no longer gives the `.h.def` path on the command line. Instead, the script now emits a depfile that's used by the cmake rules to track that. The output file is always explicit in the script command line rather than sometimes being derived from a directory path.
120 lines
2.3 KiB
YAML
120 lines
2.3 KiB
YAML
header: sys/socket.h
|
|
header_template: socket.h.def
|
|
macros: []
|
|
types:
|
|
- type_name: struct_sockaddr_un
|
|
- type_name: struct_sockaddr
|
|
- type_name: socklen_t
|
|
- type_name: sa_family_t
|
|
- type_name: struct_msghdr
|
|
- type_name: struct_iovec
|
|
- type_name: size_t
|
|
- type_name: ssize_t
|
|
enums: []
|
|
objects: []
|
|
functions:
|
|
- name: accept
|
|
standards:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: sockaddr *__restrict
|
|
- type: socklen_t *__restrict
|
|
- name: bind
|
|
standards:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: const struct sockaddr *
|
|
- type: socklen_t
|
|
- name: connect
|
|
standards:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: const struct sockaddr *
|
|
- type: socklen_t
|
|
- name: listen
|
|
standards:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: int
|
|
- name: recv
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: void *
|
|
- type: size_t
|
|
- type: int
|
|
- name: recvfrom
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: void *
|
|
- type: size_t
|
|
- type: int
|
|
- type: struct sockaddr *__restrict
|
|
- type: socklen_t *__restrict
|
|
- name: recvmsg
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: struct msghdr *
|
|
- type: int
|
|
- name: send
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: const void*
|
|
- type: size_t
|
|
- type: int
|
|
- name: sendmsg
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: const struct msghdr *
|
|
- type: int
|
|
- name: sendto
|
|
standards:
|
|
- POSIX
|
|
return_type: ssize_t
|
|
arguments:
|
|
- type: int
|
|
- type: const void *
|
|
- type: size_t
|
|
- type: int
|
|
- type: const struct sockaddr *
|
|
- type: socklen_t
|
|
- name: socket
|
|
standards:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: int
|
|
- type: int
|
|
- name: socketpair
|
|
standards:
|
|
- posix
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: int
|
|
- type: int
|
|
- type: int*
|