2006-09-19 02:49:20 +04:00
This subsystem ensures that we can always use a certain core set of
functions and types, that are either provided by the OS or by replacement
functions / definitions in this subsystem. The aim is to try to stick
to POSIX functions in here as much as possible. Convenience functions
that are available on no platform at all belong in other subsystems
(such as LIBUTIL).
The following functions are guaranteed:
ftruncate
strlcpy
strlcat
mktime
rename
initgroups
memmove
strdup
setlinebuf
vsyslog
timegm
setenv
2007-04-16 00:12:09 +04:00
unsetenv
2006-09-19 02:49:20 +04:00
strndup
strnlen
waitpid
seteuid
setegid
asprintf
snprintf
vasprintf
vsnprintf
opendir
readdir
telldir
seekdir
closedir
dlopen
dlclose
dlsym
dlerror
chroot
bzero
strerror
errno
mkdtemp
mkstemp (a secure one!)
pread
pwrite
getpass
readline (the library)
inet_ntoa
2007-10-07 03:07:33 +04:00
inet_ntop
inet_pton
2008-03-14 10:49:34 +03:00
inet_aton
2006-09-19 02:49:20 +04:00
strtoll
strtoull
2007-01-15 22:10:54 +03:00
socketpair
2007-04-16 00:12:09 +04:00
strptime
2007-10-07 03:07:33 +04:00
getaddrinfo
freeaddrinfo
getnameinfo
gai_strerror
2007-12-16 16:50:11 +03:00
getifaddrs
freeifaddrs
2008-05-07 15:10:31 +04:00
utime
utimes
2006-09-19 02:49:20 +04:00
Types:
bool
socklen_t
uint_t
uint{8,16,32,64}_t
int{8,16,32,64}_t
intptr_t
2008-10-28 01:23:15 +03:00
sig_atomic_t
2006-09-19 02:49:20 +04:00
Constants:
PATH_NAME_MAX
UINT{16,32,64}_MAX
INT32_MAX
2006-09-24 06:29:12 +04:00
RTLD_LAZY
HOST_NAME_MAX
UINT16_MAX
UINT32_MAX
UINT64_MAX
CHAR_BIT
2006-09-19 02:49:20 +04:00
Macros:
va_copy
__FUNCTION__
2007-04-16 23:23:00 +04:00
__FILE__
__LINE__
2007-04-16 23:46:06 +04:00
__LINESTR__
2007-04-16 23:23:00 +04:00
__location__
2006-09-19 02:49:20 +04:00
__STRING
2007-04-16 23:46:06 +04:00
__STRINGSTRING
2006-09-19 02:49:20 +04:00
MIN
MAX
2006-09-24 06:29:12 +04:00
QSORT_CAST
2007-04-17 12:03:29 +04:00
ZERO_STRUCT
ZERO_STRUCTP
ZERO_STRUCTPN
ZERO_ARRAY
ARRAY_SIZE
PTR_DIFF
2006-09-19 02:49:20 +04:00
2007-02-16 18:35:26 +03:00
Headers:
stdint.h
stdbool.h
2008-10-28 01:23:15 +03:00
Optional C keywords:
volatile
2006-09-19 02:49:20 +04:00
Prerequisites:
memset (for bzero)
syslog (for vsyslog)
mktemp (for mkstemp and mkdtemp)