xref: /openbsd-src/share/man/man3/intro.3 (revision db3296cf5c1dd9058ceecc3a29fe4aaa0bd26000)
1.\"	$OpenBSD: intro.3,v 1.17 2003/07/25 09:25:48 jmc Exp $
2.\"	$NetBSD: intro.3,v 1.5 1995/05/10 22:46:24 jtc Exp $
3.\"
4.\" Copyright (c) 1980, 1991, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"     @(#)intro.3	8.1 (Berkeley) 6/5/93
32.\"
33.Dd June 5, 1993
34.Dt INTRO 3
35.Os
36.Sh NAME
37.Nm intro
38.Nd introduction to the C libraries
39.Sh DESCRIPTION
40The manual pages in section 3 provide an overview of the C library
41functions, their error returns, and other common definitions and concepts.
42Most of these functions are available from the C library,
43.Em libc .
44Other libraries, such as the math library,
45.Em libm ,
46must be indicated at compile time with the
47.Fl l
48option of the compiler.
49.Pp
50The various libraries (followed by the loader flag):
51.Bl -tag -width Ds
52.It libc Pq Fl l Ns Ar c
53Standard C library functions.
54When using the C compiler
55.Xr cc 1 ,
56it is not necessary to supply the loader flag
57.Fl l Ns Ar c
58for these functions.
59There are several
60.Dq libraries
61or groups of functions included inside of libc: the standard
62.Tn I/O
63routines,
64database routines,
65bit operators,
66string operators,
67character tests and character operators,
68DES encryption routines,
69storage allocation,
70time functions,
71signal handling,
72and more.
73.It libcurses Pq Fl l Ns Ar curses
74Terminal independent screen management routines for two-dimensional
75non-bitmap display terminals.
76See
77.Xr curses 3 .
78.It libcompat Pq Fl l Ns Ar compat
79Functions which are obsolete but are available for compatibility with
80.Bx 4.3 .
81In particular, a number of system call interfaces provided in previous
82releases of
83.Bx
84have been included for source code compatibility.
85Use of these routines should, for the most part, be avoided.
86The manual page entry for each compatibility routine
87indicates the proper interface to use.
88.It libkvm Pq Fl l Ns Ar kvm
89Kernel virtual interface library.
90See
91.Xr kvm 3 .
92.It libl Pq Fl l Ns Ar l
93The library for
94.Xr lex 1 .
95.It libm Pq Fl l Ns Ar m
96The math library,
97.Em libm .
98See
99.Xr math 3 .
100.It libpthread Pq Ar -pthread
101.St -p1003.1-01
102threads (see
103.Xr pthreads 3 )
104API and thread scheduler.
105Threaded applications should use
106.Ar -pthread
107not
108.Fl l Ns Ar pthread .
109.It libtermcap Pq Fl l Ns Ar termcap
110The terminal independent operation library package.
111(See
112.Xr termcap 3 . )
113.El
114.Sh FILES
115.Bl -tag -width /usr/lib/libotermcap.a -compact
116.It Pa /usr/lib/libbfd.a
117.It Pa /usr/lib/libc.a
118C library.
119.It Pa /usr/lib/libcompat.a
1204.3 compatibility library.
121.It Pa /usr/lib/libcrypto.a
122.Xr ssl 8
123support library.
124.It Pa /usr/lib/libcurses++.a
125C++
126.Xr curses 3
127library.
128.It Pa /usr/lib/libcurses.a
129.Xr curses 3
130library.
131.It Pa /usr/lib/libdes.a
132.It Pa /usr/lib/libedit.a
133.It Pa /usr/lib/libevent.a
134.It Pa /usr/lib/libfl.a
135.It Pa /usr/lib/libform.a
136.It Pa /usr/lib/libfrtbegin.a
137.It Pa /usr/lib/libg2c.a
138.It Pa /usr/lib/libgssapi.a
139.It Pa /usr/lib/libiberty.a
140.It Pa /usr/lib/libkadm5clnt.a
141.It Pa /usr/lib/libkadm5srv.a
142.It Pa /usr/lib/libkeynote.a
143.El
144.Bl -tag -width 6n -compact
145.It Pa /usr/lib/libkrb5.a
146.Bl -tag -width Ds -compact
147.It Pa /usr/lib/libasn1.a
148.It Pa /usr/lib/libcom_err.a
149.It Pa /usr/lib/libhdb.a
150.It Pa /usr/lib/libkafs.a
151.El
152.El
153.Bl -tag -width /usr/lib/libotermcap.a -compact
154.It Pa /usr/lib/libkvm.a
155.Xr kvm 3
156kernel virtual memory access library.
157.It Pa /usr/lib/libl.a
158.It Pa /usr/lib/libm.a
159.Xr math 3
160library.
161.It Pa /usr/lib/libmenu.a
162.It Pa /usr/lib/libmmalloc.a
163.It Pa /usr/lib/libncurses.a
164.It Pa /usr/lib/libobjc.a
165.It Pa /usr/lib/libocurses.a
166The
167.Xr ocurses 3
168library is compatible with the
169.Em curses
170library provided in 4.3.
171.It Pa /usr/lib/libopcodes.a
172.It Pa /usr/lib/libossaudio.a
173.It Pa /usr/lib/libotermcap.a
1744.3-compatible termcap library.
175For use with
176.Xo
177.Xr ocurses 3
178.Pf ( i.e., Fl l Ns Ar ocurses
179.Fl l Ns Ar otermcap ) .
180.Xc
181.It Pa /usr/lib/libpanel.a
182.Xr panel 3
183library for use with
184.Xo
185.Xr curses 3
186.Pf ( i.e., Fl l Ns Ar panel
187.Fl l Ns Ar curses ) .
188.Xc
189.It Pa /usr/lib/libpcap.a
190.Xr pcap 3
191library.
192.It Pa /usr/lib/libperl.a
193.It Pa /usr/lib/libpthread.a
194.St -p1003.1-01
195threads library (see
196.Xr pthreads 3 ) .
197.It Pa /usr/lib/libreadline.a
198.It Pa /usr/lib/libresolv.a
199The
200.Xr resolver 3
201routines are included in
202.Em libc .
203For legacy applications, this library contains only those functions.
204.It Pa /usr/lib/librpcsvc.a
205Generated by
206.Xr rpcgen 1 ,
207containing stub functions for many common
208.Xr rpc 3
209protocols.
210.It Pa /usr/lib/libsectok.a
211.It Pa /usr/lib/libskey.a
212Support library for the
213.Xr skey 1
214authentication toolkit.
215.It Pa /usr/lib/libssl.a
216.Xr ssl 8
217support library.
218.It Pa /usr/lib/libstdc++.a
219.It Pa /usr/lib/libtermcap.a
220.It Pa /usr/lib/libtermlib.a
221.It Pa /usr/lib/libusbhid.a
222.It Pa /usr/lib/libutil.a
223.It Pa /usr/lib/libwrap.a
224.It Pa /usr/lib/liby.a
225.It Pa /usr/lib/libz.a
226.Pp
227.It Pa /usr/lib/libi386.a
228.El
229.\" Must talk about shared libraries, _p profiled libraries, and how to tell the
230.\" C compiler to use them, and any other issues.
231.Sh SEE ALSO
232.Xr cc 1 ,
233.Xr ld 1 ,
234.Xr ld.so 1 ,
235.Xr nm 1 ,
236.Xr intro 2 ,
237.Xr math 3 ,
238.Xr pthreads 3 ,
239.Xr stdio 3
240.\" .Sh LIST OF FUNCTIONS
241.\" .Bl -column "strncasecmpxxx" "system"
242.\" .Sy Name	Description
243.\" .El
244.Sh HISTORY
245An
246.Nm
247manual appeared in
248.At v7 .
249