Jump to content

C POSIX library

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Sutekh.destroyer (talk | contribs) at 17:51, 6 November 2007 (→‎References: "This page has moved. Please adjust your bookmarks." So I did.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The C POSIX library is a language-independent library (using C calling conventions) that adds functions specific to POSIX systems. POSIX (and SUS) 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.

C POSIX library header files

<cpio.h> Magic numbers for the cpio archive format.
<dirent.h> Allows the opening and listing of directories.
<fcntl.h> File opening, locking and other operations.
<grp.h> User group information and control.
<pwd.h> passwd (user information) access and control.
<sys/ipc.h> Inter-process communication (IPC).
<sys/msg.h> POSIX message queues.
<sys/sem.h> POSIX semaphores.
<sys/stat.h> File information (stat et al).
<sys/time.h> Time and date functions and structures.
<sys/types.h> Various data types used elsewhere.
<sys/utsname.h> uname and related structures.
<sys/wait.h> Status of terminated child processes (see wait)
<tar.h> Magic numbers for the tar archive format.
<termios.h> Allows terminal I/O interfaces.
<unistd.h> Various essential POSIX functions and constants.
<utime.h> inode access and modification times.

References