Copyright © 2000, 2001, 2002, 2003, 2004 Free Standards Group
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
Portions of the text are copyrighted by the following parties:
The Regents of the University of California
Free Software Foundation
Ian F. Darwin
Paul Vixie
BSDI (now Wind River)
Andrew G Morgan
Jean-loup Gailly and Mark Adler
Massachusetts Institute of Technology
These excerpts are being used in accordance with their respective licenses.
Linux is a trademark of Linus Torvalds.
UNIX a registered trademark of the Open Group in the United States and other countries.
LSB is a trademark of the Free Standards Group in the USA and other countries.
AMD is a trademark of Advanced Micro Devices, Inc.
Intel and Itanium are registered trademarks and Intel386 is a trademarks of Intel Corporation.
OpenGL is a registered trademark of Silicon Graphics, Inc.
This is version 3.0Preview1 of the Linux Standard Base Specification. An implementation of this version of the specification may not claim to be an implementation of the Linux Standard Base unless it has successfully completed the compliance process as defined by the Free Standards Group.
The LSB defines a binary interface for application programs that are compiled and packaged for LSB-conforming implementations on many different hardware architectures. Since a binary specification shall include information specific to the computer processor architecture for which it is intended, it is not possible for a single document to specify the interface for all possible LSB-conforming implementations. Therefore, the LSB is a family of specifications, rather than a single one.
This document should be used in conjunction with the documents it references. This document enumerates the system components it includes, but descriptions of those components may be included entirely or partly in this document, partly in other documents, or entirely in other reference documents. For example, the section that describes system service routines includes a list of the system routines supported in this interface, formal declarations of the data structures they use that are visible to applications, and a pointer to the underlying referenced specification for information about the syntax and semantics of each call. Only those routines not described in standards referenced by this document, or extensions to those standards, are described in the detail. Information referenced in this way is as much a part of this document as is the information explicitly included here.
The specification carries a version number of either the form x.y or x.y.z. This version number carries the following meaning:
The first number (x) is the major version number. All versions with the same major version number should share binary compatibility. Any addition or deletion of a new library results in a new version number. Interfaces marked as deprecated may be removed from the specification at a major version change.
The second number (y) is the minor version number. Individual interfaces may be added if all certified implementations already had that (previously undocumented) interface. Interfaces may be marked as deprecated at a minor version change. Other minor changes may be permitted at the discretion of the LSB workgroup.
The third number (z), if present, is the editorial level. Only editorial changes should be included in such versions.
The Linux Standard Base (LSB) defines a system interface for compiled applications and a minimal environment for support of installation scripts. Its purpose is to enable a uniform industry standard environment for high-volume applications conforming to the LSB.
These specifications are composed of two basic parts: A common specification ("LSB-generic") describing those parts of the interface that remain constant across all implementations of the LSB, and an architecture-specific specification ("LSB-arch") describing the parts of the interface that vary by processor architecture. Together, the LSB-generic and the architecture-specific supplement for a single hardware architecture provide a complete interface specification for compiled application programs on systems that share a common hardware architecture.
The LSB-generic document shall be used in conjunction with an architecture-specific supplement. Whenever a section of the LSB-generic specification shall be supplemented by architecture-specific information, the LSB-generic document includes a reference to the architecture supplement. Architecture supplements may also contain additional information that is not referenced in the LSB-generic document.
The LSB contains both a set of Application Program Interfaces (APIs) and Application Binary Interfaces (ABIs). APIs may appear in the source code of portable applications, while the compiled binary of that application may use the larger set of ABIs. A conforming implementation shall provide all of the ABIs listed here. The compilation system may replace (e.g. by macro definition) certain APIs with calls to one or more of the underlying binary interfaces, and may insert calls to binary interfaces as needed.
The LSB is primarily a binary interface definition. Not all of the source level APIs available to applications may be contained in this specification.
This is the Core module of the Linux Standards Base (LSB). This module provides the fundamental system interfaces, libraries, and runtime environment upon which all conforming applications and libraries depend.
Interfaces described in this module are mandatory except where explicitly listed otherwise. Core interfaces may be supplemented by other modules; all modules are built upon the core.
The specifications listed below are referenced in whole or in part by the Linux Standard Base. In this specification, where only a particular section of one of these references is identified, then the normative reference is to that section alone, and the rest of the referenced document is informative.
Table 2-1. Normative References
| Name | Title | URL |
|---|---|---|
| DWARF Debugging Information Format | DWARF Debugging Information Format, Revision 2.0.0 (July 27, 1993) | http://www.eagercon.com/dwarf/dwarf-2.0.0.pdf |
| Filesystem Hierarchy Standard | Filesystem Hierarchy Standard (FHS) 2.3 | http://www.pathname.com/fhs/ |
| Gdk 2.6.2 Reference Manual | Gdk 2.6.2 Reference Manual | http://www.gtk.org/api/2.6/gdk/index.html |
| Gdk-pixbuf 2.6.2 Reference Manual | Gdk-pixbuf 2.6.2 Reference Manual | http://www.gtk.org/api/2.6/gdk-pixbuf/index.html |
| Glib 2.6.2 Reference Manual | Glib 2.6.2 Reference Manual | http://www.gtk.org/api/2.6/glib/index.html |
| Gobject 2.6.2 Reference Manual | Gobject 2.6.2 Reference Manual | http://www.gtk.org/api/2.6/gobject/index.html |
| Gtk 2.6.2 Reference Manual | Gtk 2.6.2 Reference Manual | http://www.gtk.org/api/2.6/gtk/index.html |
| IEEE Std 754-1985 | IEEE Standard 754 for Binary Floating-Point Arithmetic | http://www.ieee.org/ |
| ISO C (1999) | ISO/IEC 9899: 1999, Programming Languages --C | |
| ISO POSIX (2003) | ISO/IEC 9945-1:2003 Information technology -- Portable Operating System Interface (POSIX) -- Part 1: Base Definitions ISO/IEC 9945-2:2003 Information technology -- Portable Operating System Interface (POSIX) -- Part 2: System Interfaces ISO/IEC 9945-3:2003 Information technology -- Portable Operating System Interface (POSIX) -- Part 3: Shell and Utilities ISO/IEC 9945-4:2003 Information technology -- Portable Operating System Interface (POSIX) -- Part 4: Rationale Including Technical Cor. 1: 2004 | http://www.unix.org/version3/ |
| ISO/IEC TR14652 | ISO/IEC Technical Report 14652:2002 Specification method for cultural conventions | |
| ITU-T V.42 | International Telecommunication Union Recommendation V.42 (2002): Error-correcting procedures for DCEs using asynchronous-to-synchronous conversionITUV | http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&parent=T-REC-V.42 |
| Large File Support | Large File Support | http://www.UNIX-systems.org/version2/whatsnew/lfs20mar.html |
| Li18nux Globalization Specification | LI18NUX 2000 Globalization Specification, Version 1.0 with Amendment 4 | http://www.li18nux.org/docs/html/LI18NUX-2000-amd4.htm |
| Linux Allocated Device Registry | LINUX ALLOCATED DEVICES | http://www.lanana.org/docs/device-list/devices.txt |
| PAM | Open Software Foundation, Request For Comments: 86.0 , October 1995, V. Samar & R.Schemers (SunSoft) | http://www.opengroup.org/tech/rfc/mirror-rfc/rfc86.0.txt |
| RFC 1321: The MD5 Message-Digest Algorithm | IETF RFC 1321: The MD5 Message-Digest Algorithm | http://www.ietf.org/rfc/rfc1321.txt |
| RFC 1833: Binding Protocols for ONC RPC Version 2 | IETF RFC 1833: Binding Protocols for ONC RPC Version 2 | http://www.ietf.org/rfc/rfc1833.txt |
| RFC 1950: ZLIB Compressed Data Format Specication | IETF RFC 1950: ZLIB Compressed Data Format Specification | http://www.ietf.org/rfc/rfc1950.txt |
| RFC 1951: DEFLATE Compressed Data Format Specification | IETF RFC 1951: DEFLATE Compressed Data Format Specification version 1.3 | http://www.ietf.org/rfc/rfc1951.txt |
| RFC 1952: GZIP File Format Specification | IETF RFC 1952: GZIP file format specification version 4.3 | http://www.ietf.org/rfc/rfc1952.txt |
| RFC 2440: OpenPGP Message Format | IETF RFC 2440: OpenPGP Message Format | http://www.ietf.org/rfc/rfc2440.txt |
| RFC 2821:Simple Mail Transfer Protocol | IETF RFC 2821: Simple Mail Transfer Protocol | http://www.ietf.org/rfc/rfc2821.txt |
| RFC 2822:Internet Message Format | IETF RFC 2822: Internet Message Format | http://www.ietf.org/rfc/rfc2822.txt |
| RFC 791:Internet Protocol | IETF RFC 791: Internet Protocol Specification | http://www.ietf.org/rfc/rfc791.txt |
| SUSv2 | CAE Specification, January 1997, System Interfaces and Headers (XSH),Issue 5 (ISBN: 1-85912-181-0, C606) | http://www.opengroup.org/publications/catalog/un.htm |
| SUSv2 Commands and Utilities | The Single UNIX® Specification(SUS) Version 2, Commands and Utilities (XCU), Issue 5 (ISBN: 1-85912-191-8, C604) | http://www.opengroup.org/publications/catalog/un.htm |
| SVID Issue 3 | American Telephone and Telegraph Company, System V Interface Definition, Issue 3 ; Morristown, NJ, UNIX Press, 1989.(ISBN 0201566524) | |
| SVID Issue 4 | System V Interface Definition,Fourth Edition | |
| System V ABI | System V Application Binary Interface, Edition 4.1 | http://www.caldera.com/developers/devspecs/gabi41.pdf |
| System V ABI Update | System V Application Binary Interface - DRAFT - 17 December 2003 | http://www.caldera.com/developers/gabi/2003-12-17/contents.html |
| this specification | Linux Standard Base | http://www.linuxbase.org/spec/ |
| X/Open Curses | CAE Specification, May 1996, X/Open Curses, Issue 4, Version 2 (ISBN: 1-85912-171-3, C610), plus Corrigendum U018 | http://www.opengroup.org/publications/catalog/un.htm |
The libraries listed in Table 3-1 shall be available on a Linux Standard Base system, with the specified runtime names. The libraries listed in Table 3-2 are architecture specific, but shall be available on all LSB conforming systems. This list may be supplemented or amended by the architecture-specific specification.
Table 3-1. Standard Library Names
| Library | Runtime Name |
|---|---|
| libdl | libdl.so.2 |
| libcrypt | libcrypt.so.1 |
| libz | libz.so.1 |
| libncurses | libncurses.so.5 |
| libutil | libutil.so.1 |
| libpthread | libpthread.so.0 |
| libpam | libpam.so.0 |
| libgcc_s | libgcc_s.so.1 |
Table 3-2. Standard Library Names defined in the Architecture Specific Supplement
| Library | Runtime Name |
|---|---|
| libm | See archLSB |
| libc | See archLSB |
| proginterp | See archLSB |
These libraries will be in an implementation-defined directory which the dynamic linker shall search by default.
A conforming implementation shall satisfy the following requirements:
The implementation shall implement fully the architecture described in the hardware manual for the target processor architecture.
The implementation shall be capable of executing compiled applications having the format and using the system interfaces described in this document.
The implementation shall provide libraries containing the interfaces specified by this document, and shall provide a dynamic linking mechanism that allows these interfaces to be attached to applications at runtime. All the interfaces shall behave as specified in this document.
The map of virtual memory provided by the implementation shall conform to the requirements of this document.
The implementation's low-level behavior with respect to function call linkage, system traps, signals, and other such activities shall conform to the formats described in this document.
The implementation shall provide all of the mandatory interfaces in their entirety.
The implementation may provide one or more of the optional interfaces. Each optional interface that is provided shall be provided in its entirety. The product documentation shall state which optional interfaces are provided.
The implementation shall provide all files and utilities specified as part of this document in the format defined here and in other referenced documents. All commands and utilities shall behave as required by this document. The implementation shall also provide all mandatory components of an application's runtime environment that are included or referenced in this document.
The implementation, when provided with standard data formats and values at a named interface, shall provide the behavior defined for those values and data formats at that interface. However, a conforming implementation may consist of components which are separately packaged and/or sold. For example, a vendor of a conforming implementation might sell the hardware, operating system, and windowing system as separately packaged items.
The implementation may provide additional interfaces with different names. It may also provide additional behavior corresponding to data values outside the standard ranges, for standard named interfaces.
A conforming application shall satisfy the following requirements:
Its executable files are either shell scripts or object files in the format defined for the Object File Format system interface.
Its object files participate in dynamic linking as defined in the Program Loading and Linking System interface.
It employs only the instructions, traps, and other low-level facilities defined in the Low-Level System interface as being for use by applications.
If it requires any optional interface defined in this document in order to be installed or to execute successfully, the requirement for that optional interface is stated in the application's documentation.
It does not use any interface or data format that is not required to be provided by a conforming implementation, unless:
If such an interface or data format is supplied by another application through direct invocation of that application during execution, that application is in turn an LSB conforming application.
The use of that interface or data format, as well as its source, is identified in the documentation of the application.
It shall not use any values for a named interface that are reserved for vendor extensions.
For the purposes of this document, the following definitions, as specified in the ISO/IEC Directives, Part 2, 2001, 4th Edition, apply:
be able to; there is a possibility of; it is possible to
be unable to; there is no possibilty of; it is not possible to
is permitted; is allowed; is permissible
it is not required that; no...is required
is to; is required to; it is required that; has to; only...is permitted; it is necessary
is not allowed [permitted] [acceptable] [permissible]; is required to be not; is required that...be not; is not to be
it is recommended that; ought to
it is not recommended that; ought not to
For the purposes of this document, the following terms apply:
The architectural part of the LSB Specification which describes the specific parts of the interface that are platform specific. The archLSB is complementary to the gLSB.
The total set of interfaces that are available to be used in the compiled binary code of a conforming application.
The common part of the LSB Specification that describes those parts of the interface that remain constant across all hardware implementations of the LSB.
Describes a value or behavior that is not defined by this document but is selected by an implementor. The value or behavior may vary among implementations that conform to this document. An application should not rely on the existence of the value or behavior. An application that relies on such a value or behavior cannot be assured to be portable across conforming implementations. The implementor shall document such a value or behavior so that it can be used correctly by an application.
A file that is read by an interpreter (e.g., awk). The first line of the shell script includes a reference to its interpreter binary.
The set of interfaces that are available to be used in the source code of a conforming application.
Describes the nature of a value or behavior not defined by this document which results from use of an invalid program construct or invalid data input. The value or behavior may vary among implementations that conform to this document. An application should not rely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannot be assured to be portable across conforming implementations.
Describes the nature of a value or behavior not specified by this document which results from use of a valid program construct or valid data input. The value or behavior may vary among implementations that conform to this document. An application should not rely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannot be assured to be portable across conforming implementations.
Other terms and definitions used in this document shall have the same meaning as defined in Chapter 3 of the Base Definitions volume of ISO POSIX (2003).
Throughout this document, the following typographic conventions are used:
the name of a function
the name of a command or utility
CONSTANTa constant value
a parameter
variablea variable
Throughout this specification, several tables of interfaces are presented. Each entry in these tables has the following format:
the name of the interface
An optional symbol version identifier, if required.
A reference number indexing the table of referenced specifications that follows this table.
For example,
refers to the interface named forkpty() with symbol versionGLIBC_2.0 that is defined in the
first of the listed references below the table.This specification includes many interfaces described in ISO POSIX (2003). Unless otherwise specified, such interfaces should behave exactly as described in that specification. Any conflict between the requirements described here and the ISO POSIX (2003) standard is unintentional, except as explicitly noted otherwise.
Note: In addition to the differences noted inline in this specification, PDTR 24715 has extracted the differences between this specification and ISO POSIX (2003) into a single place. It is the long term plan of the LSB to converge with ISO/IEC 9945 POSIX.
The LSB Specification Authority is responsible for deciding the meaning of conformance to normative referenced standards in the LSB context. Problem Reports regarding underlying or referenced standards in any other context will be referred to the relevant maintenance body for that standard.
An LSB-conforming implementation shall support the following base libraries which provide interfaces for accessing the operating system, processor and other hardware in the system.
libc
libm
libgcc_s
libdl
libcrypt
libpam
The Program Interpreter is specified in the appropriate architecture-specific LSB specification.
Table 8-1 defines the library name and shared object name for the libc library
The behavior of the interfaces in this library is specified by the following specifications:
| Large File Support |
| this specification |
| SUSv2 |
| ISO POSIX (2003) |
| SVID Issue 3 |
| SVID Issue 4 |
An LSB conforming implementation shall provide the generic functions for RPC specified in Table 8-2, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-2. libc - RPC Function Interfaces
| authnone_create [1] | svc_getreqset [2] | svcudp_create [3] | xdr_int [2] | xdr_u_long [2] |
| clnt_create [1] | svc_register [3] | xdr_accepted_reply [2] | xdr_long [2] | xdr_u_short [2] |
| clnt_pcreateerror [1] | svc_run [3] | xdr_array [2] | xdr_opaque [2] | xdr_union [2] |
| clnt_perrno [1] | svc_sendreply [3] | xdr_bool [2] | xdr_opaque_auth [2] | xdr_vector [2] |
| clnt_perror [1] | svcerr_auth [2] | xdr_bytes [2] | xdr_pointer [2] | xdr_void [2] |
| clnt_spcreateerror [1] | svcerr_decode [2] | xdr_callhdr [2] | xdr_reference [2] | xdr_wrapstring [2] |
| clnt_sperrno [1] | svcerr_noproc [2] | xdr_callmsg [2] | xdr_rejected_reply [2] | xdrmem_create [2] |
| clnt_sperror [1] | svcerr_noprog [2] | xdr_char [2] | xdr_replymsg [2] | xdrrec_create [2] |
| key_decryptsession [2] | svcerr_progvers [2] | xdr_double [2] | xdr_short [2] | xdrrec_eof [2] |
| pmap_getport [3] | svcerr_systemerr [2] | xdr_enum [2] | xdr_string [2] | |
| pmap_set [3] | svcerr_weakauth [2] | xdr_float [2] | xdr_u_char [2] | |
| pmap_unset [3] | svctcp_create [3] | xdr_free [2] | xdr_u_int [3] |
Referenced Specification(s)
[1]. SVID Issue 4
[2]. SVID Issue 3
[3]. this specification
An LSB conforming implementation shall provide the generic functions for System Calls specified in Table 8-3, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-3. libc - System Calls Function Interfaces
| __fxstat [1] | fchmod [2] | getwd [2] | read [2] | setrlimit [2] |
| __getpgid [1] | fchown [2] | initgroups [1] | readdir [2] | setrlimit64 [3] |
| __lxstat [1] | fcntl [1] | ioctl [1] | readdir_r [2] | setsid [2] |
| __xmknod [1] | fdatasync [2] | kill [1] | readlink [2] | setuid [2] |
| __xstat [1] | flock [1] | killpg [2] | readv [2] | sleep [2] |
| access [2] | fork [2] | lchown [2] | rename [2] | statvfs [2] |
| acct [1] | fstatvfs [2] | link [1] | rmdir [2] | stime [1] |
| alarm [2] | fsync [2] | lockf [2] | sbrk [4] | symlink [2] |
| brk [4] | ftime [2] | lseek [2] | sched_get_priority_max [2] | sync [2] |
| chdir [2] | ftruncate [2] | mkdir [2] | sched_get_priority_min [2] | sysconf [2] |
| chmod [2] | getcontext [2] | mkfifo [2] | sched_getparam [2] | time [2] |
| chown [2] | getegid [2] | mlock [2] | sched_getscheduler [2] | times [2] |
| chroot [4] | geteuid [2] | mlockall [2] | sched_rr_get_interval [2] | truncate [2] |
| clock [2] | getgid [2] | mmap [2] | sched_setparam [2] | ulimit [2] |
| close [2] | getgroups [2] | mprotect [2] | sched_setscheduler [2] | umask [2] |
| closedir [2] | getitimer [2] | msync [2] | sched_yield [2] | uname [2] |
| creat [2] | getloadavg [1] | munlock [2] | select [2] | unlink [1] |
| dup [2] | getpagesize [4] | munlockall [2] | setcontext [2] | utime [2] |
| dup2 [2] | getpgid [2] | munmap [2] | setegid [2] | utimes [2] |
| execl [2] | getpgrp [2] | nanosleep [2] | seteuid [2] | vfork [2] |
| execle [2] | getpid [2] | nice [2] | setgid [2] | wait [2] |
| execlp [2] | getppid [2] | open [2] | setitimer [2] | wait4 [1] |
| execv [2] | getpriority [2] | opendir [2] | setpgid [2] | waitpid [1] |
| execve [2] | getrlimit [2] | pathconf [2] | setpgrp [2] | write [2] |
| execvp [2] | getrusage [2] | pause [2] | setpriority [2] | writev [2] |
| exit [2] | getsid [2] | pipe [2] | setregid [2] | |
| fchdir [2] | getuid [2] | poll [2] | setreuid [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
[3]. Large File Support
[4]. SUSv2
An LSB conforming implementation shall provide the generic functions for Standard I/O specified in Table 8-4, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-4. libc - Standard I/O Function Interfaces
| _IO_feof [1] | fgetpos [2] | fsetpos [2] | putchar [2] | sscanf [1] |
| _IO_getc [1] | fgets [2] | ftell [2] | putchar_unlocked [2] | telldir [2] |
| _IO_putc [1] | fgetwc_unlocked [1] | ftello [2] | puts [2] | tempnam [2] |
| _IO_puts [1] | fileno [2] | fwrite [2] | putw [3] | ungetc [2] |
| asprintf [1] | flockfile [2] | getc [2] | remove [2] | vasprintf [1] |
| clearerr [2] | fopen [2] | getc_unlocked [2] | rewind [2] | vdprintf [1] |
| ctermid [2] | fprintf [2] | getchar [2] | rewinddir [2] | vfprintf [2] |
| fclose [2] | fputc [2] | getchar_unlocked [2] | scanf [1] | vprintf [2] |
| fdopen [2] | fputs [2] | getw [3] | seekdir [2] | vsnprintf [2] |
| feof [2] | fread [2] | pclose [2] | setbuf [2] | vsprintf [2] |
| ferror [2] | freopen [2] | popen [2] | setbuffer [1] | |
| fflush [2] | fscanf [1] | printf [2] | setvbuf [2] | |
| fflush_unlocked [1] | fseek [2] | putc [2] | snprintf [2] | |
| fgetc [2] | fseeko [2] | putc_unlocked [2] | sprintf [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
[3]. SUSv2
An LSB conforming implementation shall provide the generic data interfaces for Standard I/O specified in Table 8-5, with the full mandatory functionality as described in the referenced underlying specification.
Referenced Specification(s)
[1]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for Signal Handling specified in Table 8-6, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-6. libc - Signal Handling Function Interfaces
| __libc_current_sigrtmax [1] | sigaction [2] | sighold [2] | sigorset [1] | sigset [2] |
| __libc_current_sigrtmin [1] | sigaddset [2] | sigignore [2] | sigpause [2] | sigsuspend [2] |
| __sigsetjmp [1] | sigaltstack [2] | siginterrupt [2] | sigpending [2] | sigtimedwait [2] |
| __sysv_signal [1] | sigandset [1] | sigisemptyset [1] | sigprocmask [2] | sigwait [2] |
| bsd_signal [2] | sigdelset [2] | sigismember [2] | sigqueue [2] | sigwaitinfo [2] |
| psignal [1] | sigemptyset [2] | siglongjmp [2] | sigrelse [2] | |
| raise [2] | sigfillset [2] | signal [2] | sigreturn [1] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic data interfaces for Signal Handling specified in Table 8-7, with the full mandatory functionality as described in the referenced underlying specification.
Referenced Specification(s)
[1]. this specification
An LSB conforming implementation shall provide the generic functions for Localization Functions specified in Table 8-8, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-8. libc - Localization Functions Function Interfaces
| bind_textdomain_codeset [1] | dcgettext [1] | freelocale(GLIBC_2.3) [1] | localeconv [2] | textdomain [1] |
| bindtextdomain [1] | dcngettext [1] | gettext [1] | newlocale(GLIBC_2.3) [1] | uselocale(GLIBC_2.3) [1] |
| catclose [2] | dgettext [1] | iconv [2] | ngettext [1] | |
| catgets [2] | dngettext [1] | iconv_close [2] | nl_langinfo [2] | |
| catopen [2] | duplocale(GLIBC_2.3) [1] | iconv_open [2] | setlocale [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic data interfaces for Localization Functions specified in Table 8-9, with the full mandatory functionality as described in the referenced underlying specification.
Referenced Specification(s)
[1]. this specification
An LSB conforming implementation shall provide the generic functions for Socket Interface specified in Table 8-10, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-10. libc - Socket Interface Function Interfaces
| __h_errno_location [1] | gethostname [2] | if_nameindex [2] | send [2] | socket [2] |
| accept [2] | getpeername [2] | if_nametoindex [2] | sendmsg [2] | socketpair [2] |
| bind [2] | getsockname [2] | listen [2] | sendto [2] | |
| bindresvport [1] | getsockopt [1] | recv [2] | setsockopt [1] | |
| connect [2] | if_freenameindex [2] | recvfrom [2] | shutdown [2] | |
| gethostid [2] | if_indextoname [2] | recvmsg [2] | sockatmark [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for Wide Characters specified in Table 8-11, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-11. libc - Wide Characters Function Interfaces
| __wcstod_internal [1] | mbsinit [2] | vwscanf [1] | wcsnlen [1] | wcstoumax [2] |
| __wcstof_internal [1] | mbsnrtowcs [1] | wcpcpy [1] | wcsnrtombs [1] | wcstouq [1] |
| __wcstol_internal [1] | mbsrtowcs [2] | wcpncpy [1] | wcspbrk [2] | wcswcs [2] |
| __wcstold_internal [1] | mbstowcs [2] | wcrtomb [2] | wcsrchr [2] | wcswidth [2] |
| __wcstoul_internal [1] | mbtowc [2] | wcscasecmp [1] | wcsrtombs [2] | wcsxfrm [2] |
| btowc [2] | putwc [2] | wcscat [2] | wcsspn [2] | wctob [2] |
| fgetwc [2] | putwchar [2] | wcschr [2] | wcsstr [2] | wctomb [2] |
| fgetws [2] | swprintf [2] | wcscmp [2] | wcstod [2] | wctrans [2] |
| fputwc [2] | swscanf [1] | wcscoll [2] | wcstof [2] | wctype [2] |
| fputws [2] | towctrans [2] | wcscpy [2] | wcstoimax [2] | wcwidth [2] |
| fwide [2] | towlower [2] | wcscspn [2] | wcstok [2] | wmemchr [2] |
| fwprintf [2] | towupper [2] | wcsdup [1] | wcstol [2] | wmemcmp [2] |
| fwscanf [1] | ungetwc [2] | wcsftime [2] | wcstold [2] | wmemcpy [2] |
| getwc [2] | vfwprintf [2] | wcslen [2] | wcstoll [2] | wmemmove [2] |
| getwchar [2] | vfwscanf [1] | wcsncasecmp [1] | wcstombs [2] | wmemset [2] |
| mblen [2] | vswprintf [2] | wcsncat [2] | wcstoq [1] | wprintf [2] |
| mbrlen [2] | vswscanf [1] | wcsncmp [2] | wcstoul [2] | wscanf [1] |
| mbrtowc [2] | vwprintf [2] | wcsncpy [2] | wcstoull [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for String Functions specified in Table 8-12, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-12. libc - String Functions Function Interfaces
| __mempcpy [1] | bzero [2] | strcasestr [1] | strncat [2] | strtok [2] |
| __rawmemchr [1] | ffs [2] | strcat [2] | strncmp [2] | strtok_r [2] |
| __stpcpy [1] | index [2] | strchr [2] | strncpy [2] | strtold [2] |
| __strdup [1] | memccpy [2] | strcmp [2] | strndup [1] | strtoll [2] |
| __strtod_internal [1] | memchr [2] | strcoll [2] | strnlen [1] | strtoq [1] |
| __strtof_internal [1] | memcmp [2] | strcpy [2] | strpbrk [2] | strtoull [2] |
| __strtok_r [1] | memcpy [2] | strcspn [2] | strptime [1] | strtoumax [2] |
| __strtol_internal [1] | memmove [2] | strdup [2] | strrchr [2] | strtouq [1] |
| __strtold_internal [1] | memrchr [1] | strerror [2] | strsep [1] | strxfrm [2] |
| __strtoll_internal [1] | memset [2] | strerror_r [1] | strsignal [1] | swab [2] |
| __strtoul_internal [1] | rindex [2] | strfmon [2] | strspn [2] | |
| __strtoull_internal [1] | stpcpy [1] | strftime [2] | strstr [2] | |
| bcmp [2] | stpncpy [1] | strlen [2] | strtof [2] | |
| bcopy [2] | strcasecmp [2] | strncasecmp [2] | strtoimax [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for IPC Functions specified in Table 8-13, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-13. libc - IPC Functions Function Interfaces
| ftok [1] | msgrcv [1] | semget [1] | shmctl [1] | |
| msgctl [1] | msgsnd [1] | semop [1] | shmdt [1] | |
| msgget [1] | semctl [1] | shmat [1] | shmget [1] |
Referenced Specification(s)
[1]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for Regular Expressions specified in Table 8-14, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-14. libc - Regular Expressions Function Interfaces
| regcomp [1] | regerror [1] | regexec [2] | regfree [1] |
Referenced Specification(s)
[1]. ISO POSIX (2003)
[2]. this specification
An LSB conforming implementation shall provide the generic functions for Character Type Functions specified in Table 8-15, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-15. libc - Character Type Functions Function Interfaces
| __ctype_b_loc(GLIBC_2.3) [1] | isalpha [2] | ispunct [2] | iswctype [2] | iswupper [2] |
| __ctype_get_mb_cur_max [1] | isascii [2] | isspace [2] | iswdigit [2] | iswxdigit [2] |
| __ctype_tolower_loc(GLIBC_2.3) [1] | iscntrl [2] | isupper [2] | iswgraph [2] | isxdigit [2] |
| __ctype_toupper_loc(GLIBC_2.3) [1] | isdigit [2] | iswalnum [2] | iswlower [2] | toascii [2] |
| _tolower [2] | isgraph [2] | iswalpha [2] | iswprint [2] | tolower [2] |
| _toupper [2] | islower [2] | iswblank [2] | iswpunct [2] | toupper [2] |
| isalnum [2] | isprint [2] | iswcntrl [2] | iswspace [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for Time Manipulation specified in Table 8-16, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-16. libc - Time Manipulation Function Interfaces
| adjtime [1] | ctime [2] | gmtime [2] | localtime_r [2] | ualarm [2] |
| asctime [2] | ctime_r [2] | gmtime_r [2] | mktime [2] | |
| asctime_r [2] | difftime [2] | localtime [2] | tzset [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic data interfaces for Time Manipulation specified in Table 8-17, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-17. libc - Time Manipulation Data Interfaces
| __daylight [1] | __tzname [1] | timezone [2] | ||
| __timezone [1] | daylight [2] | tzname [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
An LSB conforming implementation shall provide the generic functions for Terminal Interface Functions specified in Table 8-18, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-18. libc - Terminal Interface Functions Function Interfaces
| cfgetispeed [1] | cfsetispeed [1] | tcdrain [1] | tcgetattr [1] | tcsendbreak [1] |
| cfgetospeed [1] | cfsetospeed [1] | tcflow [1] | tcgetpgrp [1] | tcsetattr [1] |
| cfmakeraw [2] | cfsetspeed [2] | tcflush [1] | tcgetsid [1] | tcsetpgrp [1] |
Referenced Specification(s)
[1]. ISO POSIX (2003)
[2]. this specification
An LSB conforming implementation shall provide the generic functions for System Database Interface specified in Table 8-19, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-19. libc - System Database Interface Function Interfaces
| endgrent [1] | getgrgid_r [1] | getprotoent [1] | getservent [1] | setgroups [2] |
| endprotoent [1] | getgrnam [1] | getpwent [1] | getutent [2] | setprotoent [1] |
| endpwent [1] | getgrnam_r [1] | getpwnam [1] | getutent_r [2] | setpwent [1] |
| endservent [1] | getgrouplist [2] | getpwnam_r [1] | getutxent [1] | setservent [1] |
| endutent [3] | gethostbyaddr [1] | getpwuid [1] | getutxid [1] | setutent [2] |
| endutxent [1] | gethostbyname [1] | getpwuid_r [1] | getutxline [1] | setutxent [1] |
| getgrent [1] | getprotobyname [1] | getservbyname [1] | pututxline [1] | utmpname [2] |
| getgrgid [1] | getprotobynumber [1] | getservbyport [1] | setgrent [1] |
Referenced Specification(s)
[1]. ISO POSIX (2003)
[2]. this specification
[3]. SUSv2
An LSB conforming implementation shall provide the generic functions for Language Support specified in Table 8-20, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-20. libc - Language Support Function Interfaces
| __libc_start_main [1] | __register_atfork(GLIBC_2.3.2) [1] |
Referenced Specification(s)
[1]. this specification
An LSB conforming implementation shall provide the generic functions for Large File Support specified in Table 8-21, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-21. libc - Large File Support Function Interfaces
| __fxstat64 [1] | fopen64 [2] | ftello64 [2] | lseek64 [2] | readdir64 [2] |
| __lxstat64 [1] | freopen64 [2] | ftruncate64 [2] | mkstemp64 [2] | statvfs64 [2] |
| __xstat64 [1] | fseeko64 [2] | ftw64 [2] | mmap64 [2] | tmpfile64 [2] |
| creat64 [2] | fsetpos64 [2] | getrlimit64 [2] | nftw64 [2] | truncate64 [2] |
| fgetpos64 [2] | fstatvfs64 [2] | lockf64 [2] | open64 [2] |
Referenced Specification(s)
[1]. this specification
[2]. Large File Support
An LSB conforming implementation shall provide the generic functions for Standard Library specified in Table 8-22, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-22. libc - Standard Library Function Interfaces
| _Exit [1] | dirname [1] | glob [1] | lsearch [1] | srand48 [1] |
| __assert_fail [2] | div [1] | glob64 [2] | makecontext [1] | srandom [1] |
| __cxa_atexit [2] | drand48 [1] | globfree [1] | malloc [1] | strtod [1] |
| __errno_location [2] | ecvt [1] | globfree64 [2] | memmem [2] | strtol [1] |
| __fpending [2] | erand48 [1] | grantpt [1] | mkstemp [1] | strtoul [1] |
| __getpagesize [2] | err [2] | hcreate [1] | mktemp [1] | swapcontext [1] |
| __isinf [2] | error [2] | hdestroy [1] | mrand48 [1] | syslog [1] |
| __isinff [2] | errx [2] | hsearch [1] | nftw [1] | system [2] |
| __isinfl [2] | fcvt [1] | htonl [1] | nrand48 [1] | tdelete [1] |
| __isnan [2] | fmtmsg [1] | htons [1] | ntohl [1] | tfind [1] |
| __isnanf [2] | fnmatch [1] | imaxabs [1] | ntohs [1] | tmpfile [1] |
| __isnanl [2] | fpathconf [1] | imaxdiv [1] | openlog [1] | tmpnam [1] |
| __sysconf [2] | free [1] | inet_addr [1] | perror [1] | tsearch [1] |
| _exit [1] | freeaddrinfo [1] | inet_ntoa [1] | posix_memalign [1] | ttyname [1] |
| _longjmp [1] | ftrylockfile [1] | inet_ntop [1] | posix_openpt [1] | ttyname_r [1] |
| _setjmp [1] | ftw [1] | inet_pton [1] | ptsname [1] | twalk [1] |
| a64l [1] | funlockfile [1] | initstate [1] | putenv [1] | unlockpt [1] |
| abort [1] | gai_strerror [1] | insque [1] | qsort [1] | unsetenv [1] |
| abs [1] | gcvt [1] | isatty [1] | rand [1] | usleep [1] |
| atof [1] | getaddrinfo [1] | isblank [1] | rand_r [1] | verrx [2] |
| atoi [1] | getcwd [1] | jrand48 [1] | random [1] | vfscanf [2] |
| atol [1] | getdate [1] | l64a [1] | realloc [1] | vscanf [2] |
| atoll [1] | getenv [1] | labs [1] | realpath [1] | vsscanf [2] |
| basename [1] | getlogin [1] | lcong48 [1] | remque [1] | vsyslog [2] |
| bsearch [1] | getnameinfo [1] | ldiv [1] | seed48 [1] | warn [2] |
| calloc [1] | getopt [2] | lfind [1] | setenv [1] | warnx [2] |
| closelog [1] | getopt_long [2] | llabs [1] | sethostname [2] | wordexp [1] |
| confstr [1] | getopt_long_only [2] | lldiv [1] | setlogmask [1] | wordfree [1] |
| cuserid [3] | getsubopt [1] | longjmp [1] | setstate [1] | |
| daemon [2] | gettimeofday [1] | lrand48 [1] | srand [1] |
Referenced Specification(s)
[1]. ISO POSIX (2003)
[2]. this specification
[3]. SUSv2
An LSB conforming implementation shall provide the generic data interfaces for Standard Library specified in Table 8-23, with the full mandatory functionality as described in the referenced underlying specification.
Table 8-23. libc - Standard Library Data Interfaces
| __environ [1] | _sys_errlist [1] | getdate_err [2] | opterr [2] | optopt [2] |
| _environ [1] | environ [2] | optarg [2] | optind [2] |
Referenced Specification(s)
[1]. this specification
[2]. ISO POSIX (2003)
This section defines global identifiers and their values that are associated with interfaces contained in libc. These definitions are organized into groups that correspond to system headers. This convention is used as a convenience for the reader, and does not imply the existence of these headers, or their content.
These definitions are intended to supplement those provided in the referenced underlying specifications.
This specification uses ISO/IEC 9899 C Language as the reference programming language, and data definitions are specified in ISO C format. The C language is used here as a convenient notation. Using a C language description of these data objects does not preclude their use by other programming languages.
enum
{
_ISupper, _ISlower, _ISalpha, _ISdigit, _ISxdigit, _ISspace, _ISprint,
_ISgraph, _ISblank, _IScntrl, _ISpunct, _ISalnum
}
; |
typedef struct __dirstream DIR;
struct dirent
{
long int d_ino;
off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[256];
}
;
struct dirent64
{
uint64_t d_ino;
int64_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[256];
}
; |
ISO POSIX (2003) requires that each error value shall be unique, with permission for EAGAIN and EWOULDBLOCK possibly having the same value. This specification also requires that ENOTSUP and EOPNOTSUPP have the same value.
Note: A defect report against ISO POSIX (2003) has been filed to request that specification also permit these two symbols to have the same value.
#define errno (*__errno_location()) #define EPERM 1 #define ECHILD 10 #define ENETDOWN 100 #define ENETUNREACH 101 #define ENETRESET 102 #define ECONNABORTED 103 #define ECONNRESET 104 #define ENOBUFS 105 #define EISCONN 106 #define ENOTCONN 107 #define ESHUTDOWN 108 #define ETOOMANYREFS 109 #define EAGAIN 11 #define ETIMEDOUT 110 #define ECONNREFUSED 111 #define EHOSTDOWN 112 #define EHOSTUNREACH 113 #define EALREADY 114 #define EINPROGRESS 115 #define ESTALE 116 #define EUCLEAN 117 #define ENOTNAM 118 #define ENAVAIL 119 #define ENOMEM 12 #define EISNAM 120 #define EREMOTEIO 121 #define EDQUOT 122 #define ENOMEDIUM 123 #define EMEDIUMTYPE 124 #define ECANCELED 125 #define EACCES 13 #define EFAULT 14 #define ENOTBLK 15 #define EBUSY 16 #define EEXIST 17 #define EXDEV 18 #define ENODEV 19 #define ENOENT 2 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 #define ENFILE 23 #define EMFILE 24 #define ENOTTY 25 #define ETXTBSY 26 #define EFBIG 27 #define ENOSPC 28 #define ESPIPE 29 #define ESRCH 3 #define EROFS 30 #define EMLINK 31 #define EPIPE 32 #define EDOM 33 #define ERANGE 34 #define EDEADLK 35 #define ENAMETOOLONG 36 #define ENOLCK 37 #define ENOSYS 38 #define ENOTEMPTY 39 #define EINTR 4 #define ELOOP 40 #define ENOMSG 42 #define EIDRM 43 #define ECHRNG 44 #define EL2NSYNC 45 #define EL3HLT 46 #define EL3RST 47 #define ELNRNG 48 #define EUNATCH 49 #define EIO 5 #define ENOANO 55 #define EBADRQC 56 #define EBADSLT 57 #define EBFONT 59 #define ENXIO 6 #define ENOSTR 60 #define ENODATA 61 #define ETIME 62 #define ENOSR 63 #define ENONET 64 #define ENOPKG 65 #define EREMOTE 66 #define ENOLINK 67 #define EADV 68 #define ESRMNT 69 #define E2BIG 7 #define ECOMM 70 #define EPROTO 71 #define EMULTIHOP 72 #define EDOTDOT 73 #define EBADMSG 74 #define EOVERFLOW 75 #define ENOTUNIQ 76 #define EBADFD 77 #define EREMCHG 78 #define ELIBACC 79 #define ENOEXEC 8 #define ELIBBAD 80 #define ELIBSCN 81 #define ELIBMAX 82 #define ELIBEXEC 83 #define EILSEQ 84 #define ERESTART 85 #define ESTRPIPE 86 #define EUSERS 87 #define ENOTSOCK 88 #define EDEST |