| 1 |
.\" Copyright 2007, Michael Kerrisk <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH intro 3 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
intro \- introduction to library functions |
| 9 |
.SH DESCRIPTION |
| 10 |
Section 3 of the manual describes all library functions |
| 11 |
excluding the library functions |
| 12 |
(system call wrappers) |
| 13 |
described in Section 2, |
| 14 |
which implement system calls. |
| 15 |
.P |
| 16 |
Many of the functions described in the section are part of the |
| 17 |
Standard C Library |
| 18 |
.RI ( libc ). |
| 19 |
Some functions are part of other libraries |
| 20 |
(e.g., |
| 21 |
the math library, |
| 22 |
.IR libm , |
| 23 |
or the real-time library, |
| 24 |
.IR librt ) |
| 25 |
in which case the manual page will indicate |
| 26 |
the linker option needed to link against the required library |
| 27 |
(e.g., |
| 28 |
.I \-lm |
| 29 |
and |
| 30 |
.IR \-lrt , |
| 31 |
respectively, |
| 32 |
for the aforementioned libraries). |
| 33 |
.P |
| 34 |
In some cases, |
| 35 |
the programmer must define a feature test macro in order to obtain |
| 36 |
the declaration of a function from the header file specified |
| 37 |
in the man page SYNOPSIS section. |
| 38 |
(Where required, |
| 39 |
these |
| 40 |
.I feature test macros |
| 41 |
must be defined before including |
| 42 |
.I any |
| 43 |
header files.) |
| 44 |
In such cases, |
| 45 |
the required macro is described in the man page. |
| 46 |
For further information on feature test macros, |
| 47 |
see |
| 48 |
.BR feature_test_macros (7). |
| 49 |
.\" |
| 50 |
.\" There |
| 51 |
.\" are various function groups which can be identified by a letter which |
| 52 |
.\" is appended to the chapter number: |
| 53 |
.\" .IP (3C) |
| 54 |
.\" These functions, |
| 55 |
.\" the functions from chapter 2 and from chapter 3S are |
| 56 |
.\" contained in the C standard library libc, |
| 57 |
.\" which will be used by |
| 58 |
.\" .BR cc (1) |
| 59 |
.\" by default. |
| 60 |
.\" .IP (3S) |
| 61 |
.\" These functions are parts of the |
| 62 |
.\" .BR stdio (3) |
| 63 |
.\" library. They are contained in the standard C library libc. |
| 64 |
.\" .IP (3M) |
| 65 |
.\" These functions are contained in the arithmetic library libm. They are |
| 66 |
.\" used by the |
| 67 |
.\" .BR f77 (1) |
| 68 |
.\" FORTRAN compiler by default, |
| 69 |
.\" but not by the |
| 70 |
.\" .BR cc (1) |
| 71 |
.\" C compiler, |
| 72 |
.\" which needs the option \f[I]\-lm\f[]. |
| 73 |
.\" .IP (3F) |
| 74 |
.\" These functions are part of the FORTRAN library libF77. There are no |
| 75 |
.\" special compiler flags needed to use these functions. |
| 76 |
.\" .IP (3X) |
| 77 |
.\" Various special libraries. The manual pages documenting their functions |
| 78 |
.\" specify the library names. |
| 79 |
.SS Subsections |
| 80 |
Section 3 of this manual is organized into subsections |
| 81 |
that reflect the complex structure of the standard C library |
| 82 |
and its many implementations: |
| 83 |
.IP \[bu] 3 |
| 84 |
3const |
| 85 |
.IP \[bu] |
| 86 |
3head |
| 87 |
.IP \[bu] |
| 88 |
3type |
| 89 |
.P |
| 90 |
This difficult history frequently makes it a poor example to follow |
| 91 |
in design, |
| 92 |
implementation, |
| 93 |
and presentation. |
| 94 |
.P |
| 95 |
Ideally, |
| 96 |
a library for the C language |
| 97 |
is designed such that each header file |
| 98 |
presents the interface to a coherent software module. |
| 99 |
It provides a small number of function declarations |
| 100 |
and exposes only data types and constants that |
| 101 |
are required for use of those functions. |
| 102 |
Together, |
| 103 |
these are termed an API or |
| 104 |
.IR "application program interface" . |
| 105 |
Types and constants to be shared among multiple APIs |
| 106 |
should be placed in header files that declare no functions. |
| 107 |
This organization permits a C library module |
| 108 |
to be documented concisely with one header file per manual page. |
| 109 |
Such an approach |
| 110 |
improves the readability and accessibility of library documentation, |
| 111 |
and thereby the usability of the software. |
| 112 |
.SH STANDARDS |
| 113 |
Certain terms and abbreviations are used to indicate UNIX variants |
| 114 |
and standards to which calls in this section conform. |
| 115 |
See |
| 116 |
.BR standards (7). |
| 117 |
.SH NOTES |
| 118 |
.SS Authors and copyright conditions |
| 119 |
Look at the header of the manual page source |
| 120 |
for the author(s) and copyright conditions. |
| 121 |
Note that these can be different from page to page! |
| 122 |
.SH SEE ALSO |
| 123 |
.BR intro (2), |
| 124 |
.BR errno (3), |
| 125 |
.BR capabilities (7), |
| 126 |
.BR credentials (7), |
| 127 |
.BR environ (7), |
| 128 |
.BR feature_test_macros (7), |
| 129 |
.BR libc (7), |
| 130 |
.BR math_error (7), |
| 131 |
.BR path_resolution (7), |
| 132 |
.BR pthreads (7), |
| 133 |
.BR signal (7), |
| 134 |
.BR standards (7), |
| 135 |
.BR system_data_types (7) |