标准C函数库和POSIX函数库的关系

转载链接:点击打开链接

POSIX表示可移植操作系统接口(Portable Operating System Interface of UNIX,缩写为 POSIX )

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.

一言以蔽之:POSIX库函数是C标准库函数的超集。

1 标准C库

      Contains the assert macro, used to assist with detecting logical errors and other types of bug in debugging versions of a program.
 C99 A set of functions for manipulating complex numbers.
       Defines set of functions used to classify characters by their types or to convert between upper and lower case in a way that is independent of the used character set (typically ASCII or one of its extensions, although implementations utilizing EBCDIC are also known).
       For testing error codes reported by library functions.
    C99 Defines a set of functions for controlling floating-point environment.
       Defines macro constants specifying the implementation-specific properties of the floating-point library.
    C99 Defines exact width integer types.
  NA1 Defines several macros that implement alternative ways to express several standard tokens. For programming in ISO 646 variant character sets.
      Defines macro constants specifying the implementation-specific properties of the integer types.
      Defines localization functions.
        Defines common mathematical functions.
      Declares the macros setjmp and longjmp, which are used for non-local exits.
      Defines signal handling functions.
    C11 For querying and specifying the alignment of objects.
      For accessing a varying number of arguments passed to functions.
   C11 For atomic operations on data shared between threads.
 C99 Defines a boolean data type.
      Defines several useful types and macros.
  C99 Defines exact width integer types.
       Defines core input and output functions
      Defines numeric conversion functions, pseudo-random numbers generation functions, memory allocation, process control functions
 C11 For specifying non-returning functions.
      Defines string handling functions.
  C99 Defines type-generic mathematical functions.
 C11 Defines functions for managing multiple Threads as well as mutexes and condition variables.
        Defines date and time handling functions
   C11 Types and functions for manipulating Unicode characters.
   NA1 Defines wide string handling functions.
  NA1 Defines set of functions used to classify wide characters by their types or to convert between upper and lower case
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29

2 POSIX库(标准C库除外)


 Asynchronous input and output   Issue 5
   Functions for manipulating numeric IP addresses (part of Berkeley sockets)  Issue 6
  Verify assumptions   ??
 Complex Arithmetic, see C mathematical functions     ??
    Magic numbers for the cpio archive format   Issue 3
  Allows the opening and listing of directories   Issue 2
   Dynamic linking Issue 5
   Retrieving Error Number  ??
   File opening, locking and other operations  Issue 1
    Floating-Point Environment (FPE), see C mathematical functions   ??
   Floating-point types, see C data types   ??
  Message display structures  Issue 4
 Filename matching   Issue 4
 File tree traversal Issue 1
    Pathname "globbing" (pattern-matching)  Issue 4
 User group information and control  Issue 1
   Codeset conversion facility Issue 4
    Fixed sized integer types, see C data types  ??
  Alternative spellings, see C alternative tokens  ??
    Language information constants – builds on C localization functions Issue 2
  Pathname manipulation   Issue 4
  Implementation-defined constants, see C data types   ??
  Category macros, see C localization functions    ??
    Mathematical declarations, see C mathematical functions  ??
    String formatting of monetary units Issue 4
  Message queue   Issue 5
    NDBM database operations    Issue 4
  Listing of local network interfaces Issue 6
   Translating protocol and host names into numeric addresses (part of Berkeley sockets)   Issue 6
  Defines Internet protocol and address family (part of Berkeley sockets) Issue 6
 Additional TCP control options (part of Berkeley sockets)   Issue 6
    Localization message catalog functions  Issue 2
    Asynchronous file descriptor multiplexing   Issue 4
 Defines an API for creating and manipulating POSIX threads  Issue 5
 passwd (user information) access and control    Issue 1
   Regular expression matching Issue 4
   Execution scheduling    Issue 5
  Search tables   Issue 1
   POSIX semaphores    Issue 5
  Stack environment declarations   ??
  Signals, see C signal handling   ??
   Process spawning    Issue 6
  Handle Variable Argument List    ??
 Boolean type and values, see C data types    ??
  Standard type definitions, see C data types  ??
  Integer types, see C data types  ??
   Standard buffered input/output, see C file input/output  ??
  Standard library definitions, see C standard library     ??
  Several String Operations, see C string handling     ??
 Case-insensitive string comparisons Issue 4
 Stream manipulation, including ioctl    Issue 4
 Inter-process communication (IPC)   Issue 2
    Memory management, including POSIX shared memory and memory mapped files    Issue 4
 POSIX message queues    Issue 2
    Resource usage, priorities, and limiting    Issue 4
  Synchronous I/O multiplexing    Issue 6
 XSI (SysV style) semaphores Issue 2
 XSI (SysV style) shared memory  Issue 2
  Main Berkley sockets header Issue 6
    File information (stat et al.)  Issue 1
 File System information Issue 4
    Time and date functions and structures  Issue 4
   File access and modification times  Issue 1
   Various data types used elsewhere   Issue 1
 Vectored I/O operations Issue 4
  Unix domain sockets Issue 6
 Operating system information, including uname   Issue 1
    Status of terminated child processes (see wait) Issue 3
  System error logging    Issue 4
 Magic numbers for the tar archive format    Issue 3
 Allows terminal I/O interfaces  Issue 3
  Type-Generic Macros, see C mathematical functions    ??
    Type-Generic Macros, see C date and time functions   ??
   Tracing of runtime behavior (DEPRECATED)    Issue 6
  Resource limiting (DEPRECATED in favor of ) Issue 1
  Various essential POSIX functions and constants Issue 1
   inode access and modification times Issue 3
   User accounting database functions  Issue 4
   Wide-Character Handling, see C string handling   ??
  Wide-Character Classification and Mapping Utilities, see C character classification  ??
 Word-expansion like the shell would perform

 

你可能感兴趣的:(C语言)