#include <limits.h>
#include <stddef.h>
|
| #define | PIPE_BUF 512 /* POSIX says that. -- Mikulas */ |
| |
| #define | INET_ADDRSTRLEN 16 |
| |
| #define | INET6_ADDRSTRLEN 46 |
| |
| #define | IP_ADDRESS_BUFFER_SIZE INET_ADDRSTRLEN |
| |
| #define | PF_INET AF_INET |
| |
| #define | PF_INET6 AF_INET6 |
| |
| #define | safe_read(fd, buf, count) read(fd, buf, count) |
| |
| #define | safe_write(fd, buf, count) write(fd, buf, count) |
| |
| #define | ftello(stream) ftell(stream) |
| |
| #define | fseeko(stream, offset, whence) fseek(stream, offset, whence) |
| |
| #define | offsetof(type, ident) ((size_t) &(((type *) 0)->ident)) |
| |
| #define | alignof(TYPE) offsetof(struct { unsigned char dummy1; TYPE dummy2; }, dummy2) |
| |
| #define | copy_struct(destination, source) do { (*(destination) = *(source)); } while (0) |
| |
| #define | sizeof_array(array) (sizeof(array)/sizeof(*(array))) |
| |
◆ alignof
| #define alignof |
( |
|
TYPE | ) |
offsetof(struct { unsigned char dummy1; TYPE dummy2; }, dummy2) |
◆ copy_struct
| #define copy_struct |
( |
|
destination, |
|
|
|
source |
|
) |
| do { (*(destination) = *(source)); } while (0) |
◆ fseeko
| #define fseeko |
( |
|
stream, |
|
|
|
offset, |
|
|
|
whence |
|
) |
| fseek(stream, offset, whence) |
◆ ftello
| #define ftello |
( |
|
stream | ) |
ftell(stream) |
◆ INET6_ADDRSTRLEN
| #define INET6_ADDRSTRLEN 46 |
◆ INET_ADDRSTRLEN
| #define INET_ADDRSTRLEN 16 |
◆ IP_ADDRESS_BUFFER_SIZE
◆ offsetof
| #define offsetof |
( |
|
type, |
|
|
|
ident |
|
) |
| ((size_t) &(((type *) 0)->ident)) |
◆ PF_INET
◆ PF_INET6
| #define PF_INET6 AF_INET6 |
◆ PIPE_BUF
| #define PIPE_BUF 512 /* POSIX says that. -- Mikulas */ |
◆ safe_read
| #define safe_read |
( |
|
fd, |
|
|
|
buf, |
|
|
|
count |
|
) |
| read(fd, buf, count) |
◆ safe_write
| #define safe_write |
( |
|
fd, |
|
|
|
buf, |
|
|
|
count |
|
) |
| write(fd, buf, count) |
◆ sizeof_array
| #define sizeof_array |
( |
|
array | ) |
(sizeof(array)/sizeof(*(array))) |