C POSIX library

{{Short description|C language standard library specifically for POSIX systems}}

{{C POSIX library}}

The C POSIX library is a specification of a C standard library for POSIX systems. It was developed at the same time as the ANSI C standard. Some effort was made to make POSIX compatible with standard C; POSIX includes additional functions to those introduced in standard C. On the other hand, the 5 headers that were added to the C standard library with C11, were not likewise included in subsequent revisions of POSIX.

It may be included in any C++ project, however the C++ standard library may have its own implementation of certain features, such as rather than , rather than , or rather than .

C POSIX library header files

class="wikitable sortable"

! Header file!! Description !! First released !! C Standard

{{tag|aio.h|open}}Asynchronous input and outputIssue 5
{{tag|arpa/inet.h|open}}Functions for manipulating numeric IP addresses (part of Berkeley sockets)Issue 6
{{tag|assert.h|open}}Verify assumptionsIssue 1ANSI (89)
{{tag|complex.h|open}}Complex Arithmetic, see C mathematical functionsIssue 6C99
{{tag|cpio.h|open}}Magic numbers for the cpio archive formatIssue 3
{{tag|ctype.h|open}}

|Character types

|Issue 1

|ANSI (89)

{{tag|dirent.h|open}}Allows the opening and listing of directoriesIssue 2
{{tag|dlfcn.h|open}}Dynamic linkingIssue 5
{{tag|errno.h|open}}Retrieving Error NumberIssue 1ANSI (89)
{{tag|fcntl.h|open}}File opening, locking and other operationsIssue 1
{{tag|fenv.h|open}}Floating-Point Environment (FPE), see C mathematical functionsIssue 6C99
{{tag|float.h|open}}Floating-point types, see C data typesIssue 4ANSI (89)
{{tag|fmtmsg.h|open}}Message display structuresIssue 4
{{tag|fnmatch.h|open}}Filename matchingIssue 4
{{tag|ftw.h|open}}File tree traversalIssue 1
{{tag|glob.h|open}}Pathname "globbing" (pattern-matching)Issue 4
{{tag|grp.h|open}}User group information and controlIssue 1
{{tag|iconv.h|open}}Codeset conversion facilityIssue 4
{{tag|inttypes.h|open}}Fixed sized integer types, see C data typesIssue 5C99
{{tag|iso646.h|open}}Alternative spellings, see C alternative tokensIssue 5NA1 (95)
{{tag|langinfo.h|open}}Language information constants – builds on C localization functionsIssue 2
{{tag|libgen.h|open}}Pathname manipulationIssue 4
{{tag|limits.h|open}}Implementation-defined constants, see C data typesIssue 1ANSI (89)
{{tag|locale.h|open}}Category macros, see C localization functionsIssue 3ANSI (89)
{{tag|math.h|open}}Mathematical declarations, see C mathematical functionsIssue 1ANSI (89)
{{tag|monetary.h|open}}String formatting of monetary unitsIssue 4
{{tag|mqueue.h|open}}Message queueIssue 5
{{tag|ndbm.h|open}}NDBM database operationsIssue 4
{{tag|net/if.h|open}}Listing of local network interfacesIssue 6
{{tag|netdb.h|open}}Translating protocol and host names into numeric addresses (part of Berkeley sockets)Issue 6
{{tag|netinet/in.h|open}}Defines Internet protocol and address family (part of Berkeley sockets)Issue 6
{{tag|netinet/tcp.h|open}}Additional TCP control options (part of Berkeley sockets)Issue 6
{{tag|nl_types.h|open}}Localization message catalog functionsIssue 2
{{tag|poll.h|open}}Asynchronous file descriptor multiplexingIssue 4
{{tag|pthread.h|open}}Defines an API for creating and manipulating POSIX threadsIssue 5
{{tag|pwd.h|open}}passwd (user information) access and controlIssue 1
{{anchor|regex|regex.h}}{{tag|regex.h|open}}Regular expression matchingIssue 4
{{tag|sched.h|open}}Execution schedulingIssue 5
{{tag|search.h|open}}Search tablesIssue 1
{{tag|semaphore.h|open}}POSIX semaphoresIssue 5
{{tag|setjmp.h|open}}Stack environment declarationsIssue 1ANSI (89)
{{tag|signal.h|open}}Signals, see C signal handlingIssue 1ANSI (89)
{{tag|spawn.h|open}}Process spawningIssue 6
{{tag|stdarg.h|open}}Handle Variable Argument ListIssue 4ANSI (89)
{{tag|stdbool.h|open}}Boolean type and values, see C data typesIssue 6C99
{{tag|stddef.h|open}}Standard type definitions, see C data typesIssue 4ANSI (89)
{{tag|stdint.h|open}}Integer types, see C data typesIssue 6C99
{{tag|stdio.h|open}}Standard buffered input/output, see C file input/outputIssue 1ANSI (89)
{{tag|stdlib.h|open}}Standard library definitions, see C standard libraryIssue 3ANSI (89)
{{tag|string.h|open}}Several String Operations, see C string handlingIssue 1ANSI (89)
{{tag|strings.h|open}}Case-insensitive string comparisonsIssue 4
{{tag|stropts.h|open}}Stream manipulation, including ioctlIssue 4
{{tag|sys/ipc.h|open}}Inter-process communication (IPC)Issue 2
{{tag|sys/mman.h|open}}Memory management, including POSIX shared memory and memory mapped filesIssue 4
{{tag|sys/msg.h|open}}POSIX message queuesIssue 2
{{tag|sys/resource.h|open}}Resource usage, priorities, and limitingIssue 4
{{tag|sys/select.h|open}}Synchronous I/O multiplexingIssue 6
{{tag|sys/sem.h|open}}XSI (SysV style) semaphoresIssue 2
{{tag|sys/shm.h|open}}XSI (SysV style) shared memoryIssue 2
{{tag|sys/socket.h|open}}Main Berkeley sockets headerIssue 6
{{tag|sys/stat.h|open}}File information (stat et al.)Issue 1
{{tag|sys/statvfs.h|open}}File System informationIssue 4
{{tag|sys/time.h|open}}Time and date functions and structuresIssue 4
{{tag|sys/times.h|open}}File access and modification timesIssue 1
{{tag|sys/types.h|open}}Various data types used elsewhereIssue 1
{{tag|sys/uio.h|open}}Vectored I/O operationsIssue 4
{{tag|sys/un.h|open}}Unix domain socketsIssue 6
{{tag|sys/utsname.h|open}}Operating system information, including unameIssue 1
{{tag|sys/wait.h|open}}Status of terminated child processes (see wait)Issue 3
{{tag|syslog.h|open}}System error loggingIssue 4
{{tag|tar.h|open}}Magic numbers for the tar archive formatIssue 3
{{tag|termios.h|open}}Allows terminal I/O interfacesIssue 3
{{tag|tgmath.h|open}}Type-Generic Macros, see C mathematical functionsIssue 6C99
{{tag|time.h|open}}Type-Generic Macros, see C date and time functionsIssue 1ANSI (89)
{{tag|trace.h|open}}Tracing of runtime behavior (DEPRECATED)Issue 6
{{tag|ulimit.h|open}}Resource limiting (DEPRECATED in favor of )Issue 1
{{tag|unistd.h|open}}Various essential POSIX functions and constantsIssue 1
{{tag|utime.h|open}}inode access and modification timesIssue 3
{{tag|utmpx.h|open}}User accounting database functionsIssue 4
{{tag|wchar.h|open}}Wide-Character Handling, see C string handlingIssue 4NA1 (95)
{{tag|wctype.h|open}}Wide-Character Classification and Mapping Utilities, see C character classificationIssue 5NA1 (95)
{{tag|wordexp.h|open}}Word-expansion like the shell would performIssue 4

See also

References

  • [http://www.opengroup.org/onlinepubs/9699919799/idx/head.html Official List of headers in the POSIX library on opengroup.org]
  • {{Cite web |url=http://www.space.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/funcref.htm |title=Lists headers in the POSIX library |access-date=November 6, 2007 |archive-url=https://web.archive.org/web/20100724201155/http://www.space.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/funcref.htm |archive-date=July 24, 2010 |url-status=dead |df=mdy-all }}
  • [http://www.cs.utah.edu/flux/oskit/html/oskit-wwwch20.html Description of the posix library from the Flux OSKit]

Further reading

{{Refbegin}}

  • {{citation

| last = Gallmeister

| first = Bill

| date = January 1, 1995

| title = POSIX.4 Programmers Guide: Programming for the Real World

| edition = 1st

| publisher = O'Reilly Media

| isbn = 1-56592-074-0

| url = http://oreilly.com/catalog/9781565920743/

}}

{{Refend}}

{{CProLang}}

Category:POSIX