C POSIX library

Last updated

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.

Contents

C POSIX library header files

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

Related Research Articles

<span class="mw-page-title-main">Cygwin</span> Unix subsystem for Windows machines

Cygwin is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.

The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system and user-level application programming interfaces (APIs), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems. POSIX is also a trademark of the IEEE. POSIX is intended to be used by both application and system developers.

The Single UNIX Specification (SUS) is a standard for computer operating systems, compliance with which is required to qualify for using the "UNIX" trademark. The standard specifies programming interfaces for the C language, a command-line shell, and user commands. The core specifications of the SUS known as Base Specifications are developed and maintained by the Austin Group, which is a joint working group of IEEE, ISO/IEC JTC 1/SC 22/WG 15 and The Open Group. If an operating system is submitted to The Open Group for certification, and passes conformance tests, then it is deemed to be compliant with a UNIX standard such as UNIX 98 or UNIX 03.

In computing, tar is a computer software utility for collecting many files into one archive file, often referred to as a tarball, for distribution or backup purposes. The name is derived from "tape archive", as it was originally developed to write data to sequential I/O devices with no file system of their own. The archive data sets created by tar contain various file system parameters, such as name, timestamps, ownership, file-access permissions, and directory organization. POSIX abandoned tar in favor of pax, yet tar sees continued widespread use.

The C programming language provides many standard library functions for file input and output. These functions make up the bulk of the C standard library header <stdio.h>. The functionality descends from a "portable I/O package" written by Mike Lesk at Bell Labs in the early 1970s, and officially became part of the Unix operating system in Version 7.

glibc Standard C Library of the GNU Project

The GNU C Library, commonly known as glibc, is the GNU Project's implementation of the C standard library. Despite its name, it now also directly supports C++. It was started in the 1980s by the Free Software Foundation (FSF) for the GNU operating system.

The C standard library or libc is the standard library for the C programming language, as specified in the ISO C standard. Starting from the original ANSI C standard, it was developed at the same time as the C library POSIX specification, which is a superset of it. Since ANSI C was adopted by the International Organization for Standardization, the C standard library is also called the ISO C library.

MinGW, formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.

errno.h is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno.

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries. An implementation of ar is included as one of the GNU Binutils.

in computer programming languages CTime or ctime may refer to:

POSIX Threads, commonly known as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model. It allows a program to control multiple different flows of work that overlap in time. Each flow of work is referred to as a thread, and creation and control over these flows is achieved by making calls to the POSIX Threads API. POSIX Threads is an API defined by the standard POSIX.1c, Threads extensions .

<span class="mw-page-title-main">Linux kernel interfaces</span> An overview and comparison of the Linux kernal APIs and ABIs.

The Linux kernel provides several interfaces to user-space applications that are used for different purposes and that have different properties by design. There are two types of application programming interface (API) in the Linux kernel that are not to be confused: the "kernel–user space" API and the "kernel internal" API.

C mathematical operations are a group of functions in the standard library of the C programming language implementing basic mathematical functions. All functions use floating-point numbers in one manner or another. Different C standards provide different, albeit backwards-compatible, sets of functions. Most of these functions are also available in the C++ standard library, though in different headers.

conio.h is a C header file used mostly by MS-DOS compilers to provide console input/output. It is not part of the C standard library or ISO C, nor is it defined by POSIX.

Java Native Access (JNA) is a community-developed library that provides Java programs easy access to native shared libraries without using the Java Native Interface (JNI). JNA's design aims to provide native access in a natural way with a minimum of effort. Unlike JNI, no boilerplate or generated glue code is required.

In the C and C++ programming languages, unistd.h is the name of the header file that provides access to the POSIX operating system API. It is defined by the POSIX.1 standard, the base of the Single Unix Specification, and should therefore be available in any POSIX-compliant operating system and compiler. For instance, this includes Unix and Unix-like operating systems, such as GNU variants, distributions of Linux and BSD, and macOS, and compilers such as GCC and LLVM.

C11 is an informal name for ISO/IEC 9899:2011, a past standard for the C programming language. It replaced C99 and has been superseded by C17. C11 mainly standardizes features already supported by common contemporary compilers, and includes a detailed memory model to better support multiple threads of execution. Due to delayed availability of conforming C99 implementations, C11 makes certain features optional, to make it easier to comply with the core language standard.

Getopt is a C library function used to parse command-line options of the Unix/POSIX style. It is a part of the POSIX specification, and is universal to Unix-like systems. It is also the name of a Unix program for parsing command line arguments in shell scripts.

Bionic is an implementation of the standard C library, developed by Google for its Android operating system. It differs from the GNU C Library (glibc) in being designed for devices with less memory and processor power than a typical Linux system. It is a combination of new code and code from FreeBSD, NetBSD, and OpenBSD released under a BSD license, rather than glibc, which uses the GNU Lesser General Public License. This difference was important in the early days of Android, when static linking was common, and is still helpful in introducing Android to software companies used to proprietary operating systems, who can be wary of the LGPL, and unclear about the differences between it and the full GNU General Public License (GPL).

References

Further reading