Requirements from standard libraries

The posix module naturally relies on relevant system libraries to provide the POSIX APIs it uses. These may be provided by diverse libraries (e.g. libpthread.so) or all by a single /lib/libc.so.*; platforms using this code need to work out those details for themselves and ensure their build systems provide suitable include paths to compilation and libraries to the linker.

Some projects' clients may wish to reduce their foot-print by using a stripped-down library. It should be noted that µClibc, a.k.a. uCLibc, provides a standard C library for embedded Linux systems, with a strong emphasis on small foot-print: it may be more constructive to simply switch to this instead of trying to strip down (at risk of breaking applications that use) some other system libc. However, for the benefit of those helping clients to decide what can be stripped, this page lists the library functions known to be in use in this module. Note that your configuration of the system system may also imply dependencies on system library functions; such of these as are used by this module are also listed below, by the name of the macro via which they are accessed – e.g. with their op_ prefix.

Note that which APIs you actually use shall depend on which of the APIs exported by the module are currently being imported. The sections below group system APIs loosely by type; each lists relevant module APIs, although no attempt is made to exhaustively identify the mapping between module and system APIs.

Contents:

Input/Output APIs

Primary module API: API_POSIX_LOG. Requirements:

File system APIs

Primary module APIs: API_POSIX_DIR, API_POSIX_FILE and API_POSIX_PATH. Requirements:

Time APIs

Primary module API: API_POSIX_CLOCK, API_POSIX_TIME_ZONE Requirements:

Locale APIs

Primary module APIs: API_POSIX_LOCALE, API_POSIX_SYS_LOCALE and API_POSIX_NATIVE. Requirements:

Thread APIs

Primary module API: API_POSIX_THREAD. Requirements:

Network query APIs

Primary module APIs: API_POSIX_NETIF and API_POSIX_DNS. Very variable, depending on tweaks; see documentation of tweaks for more detail. Requirements:

Network queries imply socket addresses, hence the APIs they use (see next section). API_POSIX_NETWORK is implemented on top of API_POSIX_NETIF using features of addresses.

Socket address API

Primary module API: API_POSIX_SOCKADDR. Various structs and macros with a 6 in their names are only used if TWEAK_POSIX_SUPPORT_IPV6 is enabled. Requirements:

API_POSIX_NETADDR extends this to serve other APIs; the system functions it needs to do so are listed against those APIs.

Socket APIs

Primary module APIs: API_POSIX_SOCKET, API_POSIX_UDP_SOCKET. Each needs socket addresses, listed above. Requirements:

Miscellaneous APIs

Primary module APIs: API_POSIX_SYS (API_POSIX_HOST, API_POSIX_PROCESS), API_POSIX_IRREGULAR, API_POSIX_SETENV, API_POSIX_SO, API_POSIX_SIGNAL and API_POSIX_SIMPLE_SELECTOR. Requirements:

Note that API_POSIX_SELECT_CALLBACK and API_POSIX_ASYNC use no system APIs directly, although they may do so via other APIs.

System system APIs

Requirements:

See also:

Edward Welbourne