POSIX: Portable Operating System Interface

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).

Attention
The random number generation functions provided by this module may use weak (or even trivial) algorithms and are not suited for cryptographic tasks!
Note that POSIX.1-1990 has no C++ binding, therefore a C++ file is not allowed to include "posix.h".

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:

Currently the following functions are only partially implemented:

Attention
struct sockaddr_storage is broken on AIX if POSIX or SUS mode is used:
  • The structure is not exposed at all if '_ALL_SOURCE' is not defined
  • The member 'ss_family' required by SUSv2 and POSIX.1-2001 is missing
  • At least on AIX 5.3 the structure is not large enough
    Using this structure should be avoided. Using '_ALL_SOURCE' as workaround has unwanted side effects and would solve only the first problem.

Generated at 2024-04-27 using  doxygen