]> sourceware.org Git - glibc.git/blame - manual/intro.texi
Update.
[glibc.git] / manual / intro.texi
CommitLineData
28f540f4
RM
1@node Introduction, Error Reporting, Top, Top
2@chapter Introduction
3
4The C language provides no built-in facilities for performing such
5common operations as input/output, memory management, string
6manipulation, and the like. Instead, these facilities are defined
7in a standard @dfn{library}, which you compile and link with your
8programs.
9@cindex library
10
11The GNU C library, described in this document, defines all of the
f65fd747 12library functions that are specified by the @w{ISO C} standard, as well as
28f540f4
RM
13additional features specific to POSIX and other derivatives of the Unix
14operating system, and extensions specific to the GNU system.
15
16The purpose of this manual is to tell you how to use the facilities
17of the GNU library. We have mentioned which features belong to which
f2ea0f5b 18standards to help you identify things that are potentially non-portable
28f540f4
RM
19to other systems. But the emphasis in this manual is not on strict
20portability.
21
22@menu
23* Getting Started:: What this manual is for and how to use it.
24* Standards and Portability:: Standards and sources upon which the GNU
25 C library is based.
26* Using the Library:: Some practical uses for the library.
27* Roadmap to the Manual:: Overview of the remaining chapters in
28 this manual.
29@end menu
30
31@node Getting Started, Standards and Portability, , Introduction
32@section Getting Started
33
34This manual is written with the assumption that you are at least
35somewhat familiar with the C programming language and basic programming
f65fd747
UD
36concepts. Specifically, familiarity with ISO standard C
37(@pxref{ISO C}), rather than ``traditional'' pre-ISO C dialects, is
28f540f4
RM
38assumed.
39
40The GNU C library includes several @dfn{header files}, each of which
41provides definitions and declarations for a group of related facilities;
42this information is used by the C compiler when processing your program.
43For example, the header file @file{stdio.h} declares facilities for
44performing input and output, and the header file @file{string.h}
45declares string processing utilities. The organization of this manual
46generally follows the same division as the header files.
47
48If you are reading this manual for the first time, you should read all
49of the introductory material and skim the remaining chapters. There are
50a @emph{lot} of functions in the GNU C library and it's not realistic to
51expect that you will be able to remember exactly @emph{how} to use each
52and every one of them. It's more important to become generally familiar
53with the kinds of facilities that the library provides, so that when you
54are writing your programs you can recognize @emph{when} to make use of
55library functions, and @emph{where} in this manual you can find more
56specific information about them.
57
58
59@node Standards and Portability, Using the Library, Getting Started, Introduction
60@section Standards and Portability
61@cindex standards
62
63This section discusses the various standards and other sources that the
f65fd747 64GNU C library is based upon. These sources include the @w{ISO C} and
28f540f4
RM
65POSIX standards, and the System V and Berkeley Unix implementations.
66
67The primary focus of this manual is to tell you how to make effective
68use of the GNU library facilities. But if you are concerned about
69making your programs compatible with these standards, or portable to
70operating systems other than GNU, this can affect how you use the
71library. This section gives you an overview of these standards, so that
72you will know what they are when they are mentioned in other parts of
73the manual.
74
75@xref{Library Summary}, for an alphabetical list of the functions and
76other symbols provided by the library. This list also states which
77standards each function or symbol comes from.
78
79@menu
b13927da 80* ISO C:: The international standard for the C
f65fd747
UD
81 programming language.
82* POSIX:: The ISO/IEC 9945 (aka IEEE 1003) standards
83 for operating systems.
28f540f4 84* Berkeley Unix:: BSD and SunOS.
2c6fe0bd 85* SVID:: The System V Interface Description.
b13927da 86* XPG:: The X/Open Portability Guide.
28f540f4
RM
87@end menu
88
f65fd747
UD
89@node ISO C, POSIX, , Standards and Portability
90@subsection ISO C
91@cindex ISO C
28f540f4
RM
92
93The GNU C library is compatible with the C standard adopted by the
94American National Standards Institute (ANSI):
f65fd747 95@cite{American National Standard X3.159-1989---``ANSI C''} and later
6d52618b 96by the International Standardization Organization (ISO):
f65fd747
UD
97@cite{ISO/IEC 9899:1990, ``Programming languages---C''}.
98We here refer to the standard as @w{ISO C} since this is the more
99general standard in respect of ratification.
28f540f4 100The header files and library facilities that make up the GNU library are
f65fd747 101a superset of those specified by the @w{ISO C} standard.@refill
28f540f4
RM
102
103@pindex gcc
f65fd747 104If you are concerned about strict adherence to the @w{ISO C} standard, you
28f540f4 105should use the @samp{-ansi} option when you compile your programs with
f65fd747 106the GNU C compiler. This tells the compiler to define @emph{only} ISO
28f540f4
RM
107standard features from the library header files, unless you explicitly
108ask for additional features. @xref{Feature Test Macros}, for
109information on how to do this.
110
f65fd747
UD
111Being able to restrict the library to include only @w{ISO C} features is
112important because @w{ISO C} puts limitations on what names can be defined
28f540f4
RM
113by the library implementation, and the GNU extensions don't fit these
114limitations. @xref{Reserved Names}, for more information about these
115restrictions.
116
117This manual does not attempt to give you complete details on the
f65fd747 118differences between @w{ISO C} and older dialects. It gives advice on how
28f540f4
RM
119to write programs to work portably under multiple C dialects, but does
120not aim for completeness.
121
b13927da 122
f65fd747 123@node POSIX, Berkeley Unix, ISO C, Standards and Portability
28f540f4
RM
124@subsection POSIX (The Portable Operating System Interface)
125@cindex POSIX
126@cindex POSIX.1
127@cindex IEEE Std 1003.1
b13927da 128@cindex ISO/IEC 9945-1
28f540f4
RM
129@cindex POSIX.2
130@cindex IEEE Std 1003.2
b13927da 131@cindex ISO/IEC 9945-2
28f540f4 132
b13927da 133The GNU library is also compatible with the ISO @dfn{POSIX} family of
28f540f4 134standards, known more formally as the @dfn{Portable Operating System
b13927da
UD
135Interface for Computer Environments} (ISO/IEC 9945). They were also
136published as ANSI/IEEE Std 1003. POSIX is derived mostly from various
137versions of the Unix operating system.
28f540f4
RM
138
139The library facilities specified by the POSIX standards are a superset
f65fd747
UD
140of those required by @w{ISO C}; POSIX specifies additional features for
141@w{ISO C} functions, as well as specifying new additional functions. In
28f540f4
RM
142general, the additional requirements and functionality defined by the
143POSIX standards are aimed at providing lower-level support for a
144particular kind of operating system environment, rather than general
145programming language support which can run in many diverse operating
146system environments.@refill
147
148The GNU C library implements all of the functions specified in
b13927da 149@cite{ISO/IEC 9945-1:1996, the POSIX System Application Program
28f540f4 150Interface}, commonly referred to as POSIX.1. The primary extensions to
f65fd747 151the @w{ISO C} facilities specified by this standard include file system
28f540f4
RM
152interface primitives (@pxref{File System Interface}), device-specific
153terminal control functions (@pxref{Low-Level Terminal Interface}), and
154process control functions (@pxref{Processes}).
155
b13927da 156Some facilities from @cite{ISO/IEC 9945-2:1993, the POSIX Shell and
28f540f4
RM
157Utilities standard} (POSIX.2) are also implemented in the GNU library.
158These include utilities for dealing with regular expressions and other
159pattern matching facilities (@pxref{Pattern Matching}).
160
161@comment Roland sez:
162@comment The GNU C library as it stands conforms to 1003.2 draft 11, which
163@comment specifies:
2c6fe0bd 164@comment
28f540f4
RM
165@comment Several new macros in <limits.h>.
166@comment popen, pclose
167@comment <regex.h> (which is not yet fully implemented--wait on this)
168@comment fnmatch
169@comment getopt
170@comment <glob.h>
171@comment <wordexp.h> (not yet implemented)
172@comment confstr
173
174
175@node Berkeley Unix, SVID, POSIX, Standards and Portability
176@subsection Berkeley Unix
177@cindex BSD Unix
178@cindex 4.@var{n} BSD Unix
179@cindex Berkeley Unix
180@cindex SunOS
181@cindex Unix, Berkeley
182
183The GNU C library defines facilities from some versions of Unix which
184are not formally standardized, specifically from the 4.2 BSD, 4.3 BSD,
185and 4.4 BSD Unix systems (also known as @dfn{Berkeley Unix}) and from
186@dfn{SunOS} (a popular 4.2 BSD derivative that includes some Unix System
f65fd747 187V functionality). These systems support most of the @w{ISO C} and POSIX
28f540f4
RM
188facilities, and 4.4 BSD and newer releases of SunOS in fact support them all.
189
190The BSD facilities include symbolic links (@pxref{Symbolic Links}), the
191@code{select} function (@pxref{Waiting for I/O}), the BSD signal
192functions (@pxref{BSD Signal Handling}), and sockets (@pxref{Sockets}).
193
b13927da 194@node SVID, XPG, Berkeley Unix, Standards and Portability
28f540f4
RM
195@subsection SVID (The System V Interface Description)
196@cindex SVID
197@cindex System V Unix
198@cindex Unix, System V
199
200The @dfn{System V Interface Description} (SVID) is a document describing
201the AT&T Unix System V operating system. It is to some extent a
202superset of the POSIX standard (@pxref{POSIX}).
203
b13927da 204The GNU C library defines most of the facilities required by the SVID
f65fd747 205that are not also required by the @w{ISO C} or POSIX standards, for
28f540f4
RM
206compatibility with System V Unix and other Unix systems (such as
207SunOS) which include these facilities. However, many of the more
208obscure and less generally useful facilities required by the SVID are
209not included. (In fact, Unix System V itself does not provide them all.)
210
b13927da
UD
211The supported facilities from System V include the methods for
212inter-process communication and shared memory, the @code{hsearch} and
213@code{drand48} families of functions, @code{fmtmsg} and several of the
214mathematical functions.
215
216@node XPG, , SVID, Standards and Portability
217@subsection XPG (The X/Open Portability Guide)
218
219The X/Open Portability Guide, published by the X/Open Company, Ltd., is
220a more general standard than POSIX. X/Open owns the Unix copyright and
221the XPG specifies the requirements for systems which are intended to be
222a Unix system.
223
224The GNU C library complies to the X/Open Portability Guide, Issue 4.2,
714a562f 225with all extensions common to XSI (X/Open System Interface)
b13927da
UD
226compliant systems and also all X/Open UNIX extensions.
227
228The additions on top of POSIX are mainly derived from functionality
229available in @w{System V} and BSD systems. Some of the really bad
230mistakes in @w{System V} systems were corrected, though. Since
231fulfilling the XPG standard with the Unix extensions is a
232precondition for getting the Unix brand chances are good that the
233functionality is available on commercial systems.
28f540f4
RM
234
235
236@node Using the Library, Roadmap to the Manual, Standards and Portability, Introduction
237@section Using the Library
238
239This section describes some of the practical issues involved in using
240the GNU C library.
241
242@menu
243* Header Files:: How to include the header files in your
2c6fe0bd 244 programs.
28f540f4
RM
245* Macro Definitions:: Some functions in the library may really
246 be implemented as macros.
247* Reserved Names:: The C standard reserves some names for
248 the library, and some for users.
249* Feature Test Macros:: How to control what names are defined.
250@end menu
251
252@node Header Files, Macro Definitions, , Using the Library
253@subsection Header Files
254@cindex header files
255
256Libraries for use by C programs really consist of two parts: @dfn{header
257files} that define types and macros and declare variables and
258functions; and the actual library or @dfn{archive} that contains the
259definitions of the variables and functions.
260
261(Recall that in C, a @dfn{declaration} merely provides information that
262a function or variable exists and gives its type. For a function
263declaration, information about the types of its arguments might be
264provided as well. The purpose of declarations is to allow the compiler
265to correctly process references to the declared variables and functions.
266A @dfn{definition}, on the other hand, actually allocates storage for a
267variable or says what a function does.)
268@cindex definition (compared to declaration)
269@cindex declaration (compared to definition)
270
271In order to use the facilities in the GNU C library, you should be sure
272that your program source files include the appropriate header files.
273This is so that the compiler has declarations of these facilities
274available and can correctly process references to them. Once your
275program has been compiled, the linker resolves these references to
276the actual definitions provided in the archive file.
277
278Header files are included into a program source file by the
279@samp{#include} preprocessor directive. The C language supports two
280forms of this directive; the first,
281
282@smallexample
283#include "@var{header}"
284@end smallexample
285
286@noindent
287is typically used to include a header file @var{header} that you write
288yourself; this would contain definitions and declarations describing the
289interfaces between the different parts of your particular application.
290By contrast,
291
292@smallexample
293#include <file.h>
294@end smallexample
295
296@noindent
297is typically used to include a header file @file{file.h} that contains
298definitions and declarations for a standard library. This file would
299normally be installed in a standard place by your system administrator.
300You should use this second form for the C library header files.
301
302Typically, @samp{#include} directives are placed at the top of the C
303source file, before any other code. If you begin your source files with
304some comments explaining what the code in the file does (a good idea),
305put the @samp{#include} directives immediately afterwards, following the
306feature test macro definition (@pxref{Feature Test Macros}).
307
308For more information about the use of header files and @samp{#include}
309directives, @pxref{Header Files,,, cpp.info, The GNU C Preprocessor
310Manual}.@refill
311
312The GNU C library provides several header files, each of which contains
313the type and macro definitions and variable and function declarations
314for a group of related facilities. This means that your programs may
315need to include several header files, depending on exactly which
316facilities you are using.
317
318Some library header files include other library header files
319automatically. However, as a matter of programming style, you should
320not rely on this; it is better to explicitly include all the header
321files required for the library facilities you are using. The GNU C
322library header files have been written in such a way that it doesn't
323matter if a header file is accidentally included more than once;
324including a header file a second time has no effect. Likewise, if your
325program needs to include multiple header files, the order in which they
326are included doesn't matter.
327
328@strong{Compatibility Note:} Inclusion of standard header files in any
f65fd747 329order and any number of times works in any @w{ISO C} implementation.
28f540f4
RM
330However, this has traditionally not been the case in many older C
331implementations.
332
333Strictly speaking, you don't @emph{have to} include a header file to use
334a function it declares; you could declare the function explicitly
335yourself, according to the specifications in this manual. But it is
336usually better to include the header file because it may define types
337and macros that are not otherwise available and because it may define
338more efficient macro replacements for some functions. It is also a sure
339way to have the correct declaration.
340
341@node Macro Definitions, Reserved Names, Header Files, Using the Library
342@subsection Macro Definitions of Functions
343@cindex shadowing functions with macros
344@cindex removing macros that shadow functions
345@cindex undefining macros that shadow functions
346
347If we describe something as a function in this manual, it may have a
348macro definition as well. This normally has no effect on how your
349program runs---the macro definition does the same thing as the function
350would. In particular, macro equivalents for library functions evaluate
351arguments exactly once, in the same way that a function call would. The
352main reason for these macro definitions is that sometimes they can
353produce an inline expansion that is considerably faster than an actual
354function call.
355
356Taking the address of a library function works even if it is also
357defined as a macro. This is because, in this context, the name of the
358function isn't followed by the left parenthesis that is syntactically
359necessary to recognize a macro call.
360
361You might occasionally want to avoid using the macro definition of a
362function---perhaps to make your program easier to debug. There are
363two ways you can do this:
364
365@itemize @bullet
2c6fe0bd 366@item
28f540f4
RM
367You can avoid a macro definition in a specific use by enclosing the name
368of the function in parentheses. This works because the name of the
369function doesn't appear in a syntactic context where it is recognizable
370as a macro call.
371
372@item
373You can suppress any macro definition for a whole source file by using
374the @samp{#undef} preprocessor directive, unless otherwise stated
375explicitly in the description of that facility.
376@end itemize
377
378For example, suppose the header file @file{stdlib.h} declares a function
379named @code{abs} with
380
381@smallexample
382extern int abs (int);
383@end smallexample
384
385@noindent
386and also provides a macro definition for @code{abs}. Then, in:
387
388@smallexample
389#include <stdlib.h>
b13927da 390int f (int *i) @{ return abs (++*i); @}
28f540f4
RM
391@end smallexample
392
393@noindent
394the reference to @code{abs} might refer to either a macro or a function.
395On the other hand, in each of the following examples the reference is
396to a function and not a macro.
397
398@smallexample
399#include <stdlib.h>
b13927da 400int g (int *i) @{ return (abs) (++*i); @}
28f540f4
RM
401
402#undef abs
b13927da 403int h (int *i) @{ return abs (++*i); @}
28f540f4
RM
404@end smallexample
405
406Since macro definitions that double for a function behave in
407exactly the same way as the actual function version, there is usually no
408need for any of these methods. In fact, removing macro definitions usually
409just makes your program slower.
410
411
412@node Reserved Names, Feature Test Macros, Macro Definitions, Using the Library
413@subsection Reserved Names
414@cindex reserved names
415@cindex name space
416
417The names of all library types, macros, variables and functions that
f65fd747 418come from the @w{ISO C} standard are reserved unconditionally; your program
28f540f4
RM
419@strong{may not} redefine these names. All other library names are
420reserved if your program explicitly includes the header file that
421defines or declares them. There are several reasons for these
422restrictions:
423
424@itemize @bullet
425@item
426Other people reading your code could get very confused if you were using
427a function named @code{exit} to do something completely different from
428what the standard @code{exit} function does, for example. Preventing
429this situation helps to make your programs easier to understand and
430contributes to modularity and maintainability.
431
432@item
433It avoids the possibility of a user accidentally redefining a library
434function that is called by other library functions. If redefinition
435were allowed, those other functions would not work properly.
436
437@item
438It allows the compiler to do whatever special optimizations it pleases
439on calls to these functions, without the possibility that they may have
440been redefined by the user. Some library facilities, such as those for
441dealing with variadic arguments (@pxref{Variadic Functions})
442and non-local exits (@pxref{Non-Local Exits}), actually require a
443considerable amount of cooperation on the part of the C compiler, and
444implementationally it might be easier for the compiler to treat these as
445built-in parts of the language.
446@end itemize
447
448In addition to the names documented in this manual, reserved names
449include all external identifiers (global functions and variables) that
450begin with an underscore (@samp{_}) and all identifiers regardless of
451use that begin with either two underscores or an underscore followed by
452a capital letter are reserved names. This is so that the library and
453header files can define functions, variables, and macros for internal
454purposes without risk of conflict with names in user programs.
455
456Some additional classes of identifier names are reserved for future
457extensions to the C language or the POSIX.1 environment. While using these
458names for your own purposes right now might not cause a problem, they do
459raise the possibility of conflict with future versions of the C
460or POSIX standards, so you should avoid these names.
461
462@itemize @bullet
2c6fe0bd 463@item
28f540f4
RM
464Names beginning with a capital @samp{E} followed a digit or uppercase
465letter may be used for additional error code names. @xref{Error
466Reporting}.
467
468@item
469Names that begin with either @samp{is} or @samp{to} followed by a
470lowercase letter may be used for additional character testing and
471conversion functions. @xref{Character Handling}.
472
473@item
474Names that begin with @samp{LC_} followed by an uppercase letter may be
475used for additional macros specifying locale attributes.
476@xref{Locales}.
477
478@item
479Names of all existing mathematics functions (@pxref{Mathematics})
480suffixed with @samp{f} or @samp{l} are reserved for corresponding
481functions that operate on @code{float} and @code{long double} arguments,
482respectively.
483
484@item
485Names that begin with @samp{SIG} followed by an uppercase letter are
486reserved for additional signal names. @xref{Standard Signals}.
487
488@item
489Names that begin with @samp{SIG_} followed by an uppercase letter are
490reserved for additional signal actions. @xref{Basic Signal Handling}.
491
492@item
493Names beginning with @samp{str}, @samp{mem}, or @samp{wcs} followed by a
494lowercase letter are reserved for additional string and array functions.
495@xref{String and Array Utilities}.
496
497@item
498Names that end with @samp{_t} are reserved for additional type names.
499@end itemize
500
501In addition, some individual header files reserve names beyond
502those that they actually define. You only need to worry about these
503restrictions if your program includes that particular header file.
504
505@itemize @bullet
506@item
507The header file @file{dirent.h} reserves names prefixed with
508@samp{d_}.
509@pindex dirent.h
510
511@item
512The header file @file{fcntl.h} reserves names prefixed with
513@samp{l_}, @samp{F_}, @samp{O_}, and @samp{S_}.
514@pindex fcntl.h
515
516@item
517The header file @file{grp.h} reserves names prefixed with @samp{gr_}.
518@pindex grp.h
519
520@item
521The header file @file{limits.h} reserves names suffixed with @samp{_MAX}.
522@pindex limits.h
523
524@item
525The header file @file{pwd.h} reserves names prefixed with @samp{pw_}.
526@pindex pwd.h
527
528@item
529The header file @file{signal.h} reserves names prefixed with @samp{sa_}
530and @samp{SA_}.
531@pindex signal.h
532
533@item
534The header file @file{sys/stat.h} reserves names prefixed with @samp{st_}
535and @samp{S_}.
536@pindex sys/stat.h
537
538@item
539The header file @file{sys/times.h} reserves names prefixed with @samp{tms_}.
540@pindex sys/times.h
541
542@item
543The header file @file{termios.h} reserves names prefixed with @samp{c_},
544@samp{V}, @samp{I}, @samp{O}, and @samp{TC}; and names prefixed with
545@samp{B} followed by a digit.
546@pindex termios.h
547@end itemize
548
549@comment Include the section on Creature Nest Macros.
550@comment It is in a separate file so it can be formatted into ../NOTES.
551@include creature.texi
552
553@node Roadmap to the Manual, , Using the Library, Introduction
554@section Roadmap to the Manual
555
556Here is an overview of the contents of the remaining chapters of
557this manual.
558
559@itemize @bullet
2c6fe0bd 560@item
28f540f4
RM
561@ref{Error Reporting}, describes how errors detected by the library
562are reported.
563
2c6fe0bd 564@item
28f540f4
RM
565@ref{Language Features}, contains information about library support for
566standard parts of the C language, including things like the @code{sizeof}
567operator and the symbolic constant @code{NULL}, how to write functions
568accepting variable numbers of arguments, and constants describing the
569ranges and other properties of the numerical types. There is also a simple
570debugging mechanism which allows you to put assertions in your code, and
571have diagnostic messages printed if the tests fail.
572
2c6fe0bd 573@item
28f540f4
RM
574@ref{Memory Allocation}, describes the GNU library's facilities for
575dynamic allocation of storage. If you do not know in advance how much
576storage your program needs, you can allocate it dynamically instead,
577and manipulate it via pointers.
578
2c6fe0bd 579@item
28f540f4
RM
580@ref{Character Handling}, contains information about character
581classification functions (such as @code{isspace}) and functions for
582performing case conversion.
583
2c6fe0bd 584@item
28f540f4
RM
585@ref{String and Array Utilities}, has descriptions of functions for
586manipulating strings (null-terminated character arrays) and general
587byte arrays, including operations such as copying and comparison.
588
589@item
590@ref{I/O Overview}, gives an overall look at the input and output
591facilities in the library, and contains information about basic concepts
592such as file names.
593
594@item
595@ref{I/O on Streams}, describes I/O operations involving streams (or
596@w{@code{FILE *}} objects). These are the normal C library functions
597from @file{stdio.h}.
598
599@item
600@ref{Low-Level I/O}, contains information about I/O operations
601on file descriptors. File descriptors are a lower-level mechanism
602specific to the Unix family of operating systems.
603
604@item
605@ref{File System Interface}, has descriptions of operations on entire
606files, such as functions for deleting and renaming them and for creating
607new directories. This chapter also contains information about how you
608can access the attributes of a file, such as its owner and file protection
609modes.
610
611@item
612@ref{Pipes and FIFOs}, contains information about simple interprocess
613communication mechanisms. Pipes allow communication between two related
614processes (such as between a parent and child), while FIFOs allow
615communication between processes sharing a common file system on the same
616machine.
617
618@item
619@ref{Sockets}, describes a more complicated interprocess communication
620mechanism that allows processes running on different machines to
621communicate over a network. This chapter also contains information about
622Internet host addressing and how to use the system network databases.
623
624@item
625@ref{Low-Level Terminal Interface}, describes how you can change the
626attributes of a terminal device. If you want to disable echo of
627characters typed by the user, for example, read this chapter.
628
2c6fe0bd 629@item
28f540f4
RM
630@ref{Mathematics}, contains information about the math library
631functions. These include things like random-number generators and
632remainder functions on integers as well as the usual trigonometric and
633exponential functions on floating-point numbers.
634
635@item
636@ref{Arithmetic,, Low-Level Arithmetic Functions}, describes functions
637for simple arithmetic, analysis of floating-point values, and reading
638numbers from strings.
639
2c6fe0bd 640@item
28f540f4
RM
641@ref{Searching and Sorting}, contains information about functions
642for searching and sorting arrays. You can use these functions on any
643kind of array by providing an appropriate comparison function.
644
645@item
646@ref{Pattern Matching}, presents functions for matching regular expressions
647and shell file name patterns, and for expanding words as the shell does.
648
649@item
650@ref{Date and Time}, describes functions for measuring both calendar time
651and CPU time, as well as functions for setting alarms and timers.
652
2c6fe0bd 653@item
28f540f4
RM
654@ref{Extended Characters}, contains information about manipulating
655characters and strings using character sets larger than will fit in
2c6fe0bd 656the usual @code{char} data type.
28f540f4 657
2c6fe0bd
UD
658@item
659@ref{Locales}, describes how selecting a particular country
28f540f4
RM
660or language affects the behavior of the library. For example, the locale
661affects collation sequences for strings and how monetary values are
662formatted.
663
664@item
665@ref{Non-Local Exits}, contains descriptions of the @code{setjmp} and
666@code{longjmp} functions. These functions provide a facility for
667@code{goto}-like jumps which can jump from one function to another.
668
669@item
670@ref{Signal Handling}, tells you all about signals---what they are,
671how to establish a handler that is called when a particular kind of
672signal is delivered, and how to prevent signals from arriving during
673critical sections of your program.
674
675@item
676@ref{Process Startup}, tells how your programs can access their
677command-line arguments and environment variables.
678
2c6fe0bd 679@item
28f540f4
RM
680@ref{Processes}, contains information about how to start new processes
681and run programs.
682
683@item
684@ref{Job Control}, describes functions for manipulating process groups
685and the controlling terminal. This material is probably only of
686interest if you are writing a shell or other program which handles job
687control specially.
688
2c6fe0bd
UD
689@item
690@ref{Name Service Switch}, describes the services which are available
691for looking up names in the system databases, how to determine which
692service is used for which database, and how these services are
693implemented so that contributors can design their own services.
694
28f540f4
RM
695@item
696@ref{User Database}, and @ref{Group Database}, tell you how to access
697the system user and group databases.
698
699@item
700@ref{System Information}, describes functions for getting information
701about the hardware and software configuration your program is executing
702under.
703
2c6fe0bd 704@item
28f540f4
RM
705@ref{System Configuration}, tells you how you can get information about
706various operating system limits. Most of these parameters are provided for
707compatibility with POSIX.
708
709@item
710@ref{Library Summary}, gives a summary of all the functions, variables, and
711macros in the library, with complete data types and function prototypes,
712and says what standard or system each is derived from.
713
714@item
715@ref{Maintenance}, explains how to build and install the GNU C library on
716your system, how to report any bugs you might find, and how to add new
717functions or port the library to a new system.
718@end itemize
719
720If you already know the name of the facility you are interested in, you
721can look it up in @ref{Library Summary}. This gives you a summary of
722its syntax and a pointer to where you can find a more detailed
723description. This appendix is particularly useful if you just want to
724verify the order and type of arguments to a function, for example. It
725also tells you what standard or system each function, variable, or macro
726is derived from.
This page took 0.129091 seconds and 5 git commands to generate.