This subsystem should hold away operating system issues from the rest of the program. If a C source file requires something that is not ISO C90, it should include "posix.h" as the first header file and this module should take care to provide the required functionality as specified by SUSv4. This allows to write cleaner code (that normally would only be accepted by much more recent operating systems) and nevertheless run it on old machines. More...
This subsystem should hold away operating system issues from the rest of the program. If a C source file requires something that is not ISO C90, it should include "posix.h" as the first header file and this module should take care to provide the required functionality as specified by SUSv4. This allows to write cleaner code (that normally would only be accepted by much more recent operating systems) and nevertheless run it on old machines.
This module is based on the POSIX.1-1990, POSIX.1b-1993, POSIX.1c-1996 and BSD socket APIs. This means it expects that the operating system provides these APIs. Workarounds for operating system bugs should be implemented here.
Version numbers for Single Unix Specification (X/Open XSI extension):
This module can use the XSI extension for SUSv2, SUSv3 or SUSv4 respectively. POSIX Networking Services (XNS) are used instead of the BSD socket API for SUSv2 and POSIX.1-2001 (or later versions).
The namespaces reserved for the XNS module of the OS are defined by SUSv2:
http://pubs.opengroup.org/onlinepubs/007908799/xns/namespace.html
For this module the "posix_" namespace is used. All elements provided by this module have a "posix_" (or "POSIX_") prefix.
Functions not defined in POSIX.1-1990, POSIX.1b-1993, POSIX.1c-1996 or SUSv2, but defined in a later version should be implemented here in a POSIX conformant way but with a "posix_" prefix. For partial implementations the parts that are implemented should be POSIX or SUS conformant respectively.
Currently the following functions are completely implemented:
posix_freeaddrinfo()
posix_fsync()
posix_getline()
posix_inet_pton()
posix_poll()
posix_random()
posix_scandir()
posix_srandom()
posix_mkstemp()
posix_gai_strerror()
Currently the following functions are only partially implemented:
posix_getaddrinfo()
posix_inet_addr()
posix_snprintf()
posix_newlocale()
posix_freelocale()
posix_strcasecmp_l()
posix_strncasecmp_l()
struct
sockaddr_storage
is broken on AIX if POSIX or SUS mode is used: