Skip to content
Hub Nexus

No author yetClaim it

Version 1Updated 4 min read

Support

The C POSIX library is a language-independent library (using C calling conventions) that adds functions specific to POSIX systems. POSIX (and the Single Unix Specification) specifies a number of routines that should be available over and above those in the C standard library proper. It was developed at the same time as the ANSI C standard and is closely related to C. Some effort was made to make the C and POSIX libraries compatible, but there are a few POSIX functions that were never introduced into ANSI C.

Facilities are often implemented alongside the C standard library functionality, with varying degrees of closeness. For example, glibc implements functions such as fork within libc.so, but before NPTL was merged into glibc it constituted a separate library with its own linker flag. Often, this POSIX-specified functionality will be regarded as part of the library; the C library proper may be identified as the ANSI or ISO C library.

Header files

aio.hAsynchronous input and output.
arpa/inet.hDefinitions for internet operations.
cpio.hMagic numbers for the cpio archive format.
dirent.hAllows the opening and listing of directories.
fcntl.hFile opening, locking and other operations.
fmtmsg.hMessage display structures.
fnmatch.hFilename-matching types.
ftw.hFile tree traversal.
glob.hPathname pattern-matching types.
grp.hUser group information and control.
iconv.hCodeset conversion facility.
langinfo.hLanguage information constants.
libgen.hDefinitions for pattern matching functions.
monetary.hMonetary types.
mqueue.hMessage queues (REALTIME).
ndbm.hDefinitions for ndbm database operations.
net/if.hSockets local interfaces.
netdb.hDefinitions for network database operations.
netinet/in.hInternet address family.
netinet/tcp.hDefinitions for the Internet Transmission Control Protocol (TCP).
nl_types.hData types.
poll.hDefinitions for the poll() function.
pthread.hDefines an API for creating and manipulating POSIX threads.
pwd.hPasswd (user information) access and control.
regex.hRegular expression matching types.
sched.hExecution scheduling.
search.hSearch tables.
semaphore.hSemaphores.
spawn.hCreate a new process to run an executable program.
strings.hString operations.
stropts.hSTREAMS interface (STREAMS).
sys/ipc.hInter-process communication (IPC).
sys/mman.hPOSIX memory management declarations.
sys/msg.hPOSIX message queues.
sys/resource.hDefinitions for XSI resource operations.
sys/select.hSelect types.
sys/sem.hPOSIX semaphores.
sys/shm.hXSI shared memory facility.
sys/socket.hMain sockets header.
sys/stat.hFile information (stat et al.).
sys/statvfs.hVFS File System information structure.
sys/time.hTime and date functions and structures.
sys/times.hFile access and modification times structure.
sys/types.hVarious data types used elsewhere.
sys/uio.hDefinitions for vector I/O operations.
sys/un.hDefinitions for UNIX domain sockets.
sys/utsname.huname and related structures.
sys/wait.hStatus of terminated child processes.
syslog.hDefinitions for system error logging.
tar.hMagic numbers for the tar archive format.
termios.hAllows terminal I/O interfaces.
trace.hTracing.
ulimit.hulimit commands.
unistd.hVarious essential POSIX functions and constants.
utime.hFile access and modification times.
utmpx.hUser accounting database definitions.
wordexp.hWord-expansion types.

Standard overlap headers

Headers that overlap/extend the C standard.

assert.hVerify program assertion.
complex.hComplex arithmetic.
ctype.hCharacter types.
fenv.hFloating-point environment.
float.hFloating types.
inttypes.hFixed size integer types.
iso646.hAlternative spellings.
limits.hImplementation-defined constants.
locale.hCategory macros.
math.hMathematical declarations.
setjmp.hStack environment declarations.
signal.hSignals.
stdarg.hHandle variable argument list.
stdbool.hBoolean type and values.
stddef.hStandard type definitions.
stdint.hInteger types.
stdio.hStandard buffered input/output.
stdlib.hStandard library definitions.
string.hString operations.
tgmath.hType-generic macros.
time.hTime types.
wchar.hWide-character handling.
wctype.hWide-character classification and mapping utilities.

References

Bibliography

Where this page came from

This page was imported from Wikibooks. From “C programming” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

Get each new page of

C programming

Following means one email when a page is added, nothing when a page changes.

Following means one email when a page is added, nothing when a page changes.

Comments

Spinner Logo

Next in C programming

CC BY-SA 4.0
C was designed in English and assumes the common [ASCII]( character set made for English, which includes such characters as {, }, [, ], and so on. Some other character sets (like [EBCDIC]( on mainframes), however, do not have these or other characters which are required by C. Since even the simplest
CC BY-SA 4.0
This is a basic introduction to good coding style in the C Programming Language. It is designed to provide information on how to effectively use indentation, comments, and other elements that will make your C code more readable. It is not a tutorial on actual C programming. As a beginning programmer
CC BY-SA 4.0
- Only the underscore can be used. - for example, **#nm*rt** is not allowed because # and * are not the valid characters for the name of a variable. #include #include main() { int a, b, c, max; #ifdef __WIN32 system("cls"); // for Windows #else system("clear"); // for Unix and Linux #endif printf("\
CC BY-SA 4.0
[C]( is the most commonly used programming language for writing [operating systems]( The first operating system written in C was [Unix]( Later operating systems like [GNU/Linux]( were all written in C. Not only is C the language of operating systems, but it is also the precursor and inspiration for
CC BY-SA 4.0
The Algorithmic Language ([Algol 58]( was derived from Fortran in 1958 and evolved into [Algol 60]( in 1960. The [Combined Programming Language (CPL)]( was then created out of Algol 60 in 1963. In 1967, it evolved into [Basic CPL]( (BCPL), which was the basis for [B]( which was created in 1971, and
CC BY-SA 4.0
It's also assumed you have some experience interacting with your operating system through a terminal window using its **command line interface.** If you aren't sure what this means, consider seeking out a tutorial for your chosen platform that can get you comfortable with getting around your compute