mirror of https://github.com/mkerrisk/man-pages
Import of man-pages 1.70
This commit is contained in:
commit
fea681dafb
|
@ -0,0 +1,59 @@
|
|||
# Do "make screen" first, if you want to protect already installed,
|
||||
# more up-to-date manual pages than the ones included in this package.
|
||||
# Do "make install" to copy the pages to their destination.
|
||||
# Do "make gz" or "make bz2" first if you use compressed source pages.
|
||||
|
||||
MANDIR=$(prefix)/usr/share/man
|
||||
|
||||
GZIP=gzip -9
|
||||
BZIP2=bzip2 -9
|
||||
|
||||
all: screen remove install
|
||||
|
||||
allgz: gz all
|
||||
|
||||
allbz: bz2 all
|
||||
|
||||
screen:
|
||||
-mkdir not_installed
|
||||
for i in man?/*; do \
|
||||
if [ $(MANDIR)/"$$i" -nt "$$i" ]; then \
|
||||
cmp -s $(MANDIR)/"$$i" "$$i" > /dev/null 2>&1; \
|
||||
if [ "$$?" != 0 ]; then mv "$$i" not_installed; fi; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
remove:
|
||||
for i in man?/* man??/*; do \
|
||||
rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".gz $(MANDIR)/"$$i".bz2; \
|
||||
done
|
||||
|
||||
gz:
|
||||
for i in man? man??; do $(GZIP) "$$i"/*; done
|
||||
|
||||
bz2:
|
||||
for i in man? man??; do $(BZIP2) "$$i"/*; done
|
||||
|
||||
# Use with
|
||||
# make HTDIR=/some/dir HTOPTS=whatever html
|
||||
# The sed removes the lines "Content-type: text/html\n\n"
|
||||
html:
|
||||
@if [ x$(HTDIR) = x ]; then echo "You must set HTDIR."; else \
|
||||
for i in man?; do \
|
||||
[ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \
|
||||
find "$$i/" -type f | while read f; do \
|
||||
(cd "$$i"; man2html $(HTOPTS) `basename $$f`) | \
|
||||
sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \
|
||||
done; \
|
||||
done; fi
|
||||
|
||||
README=$(MANDIR)/man1/README
|
||||
install:
|
||||
for i in man? man??; do \
|
||||
install -d -m 755 $(MANDIR)/"$$i"; \
|
||||
install -m 644 "$$i"/* $(MANDIR)/"$$i"; \
|
||||
done; \
|
||||
rm -f $(README) $(README).gz $(README).bz2
|
||||
|
||||
# someone might also want to look at /var/catman/cat2 or so ...
|
||||
# a problem is that the location of cat pages varies a lot
|
|
@ -0,0 +1,25 @@
|
|||
The Institute of Electrical and Electronics Engineers (IEEE) and
|
||||
The Open Group, have given us permission to reprint portions of
|
||||
their documentation.
|
||||
|
||||
In the following statement, the phrase ``this text'' refers to
|
||||
portions of the system documentation.
|
||||
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
in the linux-manpages package, from IEEE Std 1003.1 (TM), 2003 Edition,
|
||||
Standard for Information Technology -- Portable Operating System
|
||||
Interface (POSIX (R)), The Open Group Base Specifications Issue 6,
|
||||
Copyright (C) 2001-2003 by the Institute of Electrical and Electronics
|
||||
Engineers, Inc and The Open Group. In the event of any discrepancy
|
||||
between these versions and the original IEEE and The Open Group
|
||||
Standard, the original IEEE and The Open Group Standard is the referee
|
||||
document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
||||
|
||||
This notice shall appear on any product containing this material.
|
||||
|
||||
Redistribution of this material is permitted so long as this notice and
|
||||
the corresponding notices within each POSIX manual page are retained on
|
||||
any distribution, and the nroff source is included. Modifications to
|
||||
the text are permitted so long as any conflicts with the standard
|
||||
are clearly marked as such in the text.
|
|
@ -0,0 +1,40 @@
|
|||
This package contains the Linux man pages for all chapters
|
||||
except 1, 6 and 8. Some more information is given in the
|
||||
`Announce' file.
|
||||
|
||||
Install by copying to your favourite location.
|
||||
"make install" will just copy them to /usr/share/man/man[1-8].
|
||||
"make" will move the pages from this package that are older than
|
||||
the already installed ones to a subdirectory `not_installed',
|
||||
then remove old versions (compressed or not),
|
||||
compress the pages, and copy them to /usr/share/man/man[1-8].
|
||||
|
||||
|
||||
Note that you may have to remove preformatted pages.
|
||||
|
||||
Note that sometimes these pages are duplicates of pages
|
||||
also distributed in other packages. This has been reported
|
||||
about dlclose.3, dlerror.3, dlopen.3, dlsym.3 (found in ld.so),
|
||||
about resolver.3, resolv.conf.5 (found in bind-utils),
|
||||
and about passwd.5, and mailaddr.7. Be careful not to
|
||||
overwrite more up-to-date versions.
|
||||
Reports on further duplicates are welcome.
|
||||
Formerly present and now removed duplicates:
|
||||
*_module.2, get_kernel_syms.2 (found in modutils-2.1.*),
|
||||
exports.5 (found in nfs-server-2.2*),
|
||||
fstab.5, nfs.5 (found in util-linux-2.12*),
|
||||
lilo.8, lilo.conf.5 (found in lilo-21.6*).
|
||||
|
||||
Note that the pages that come with GNU fileutils are really
|
||||
help texts (indeed, are generated automatically from help texts),
|
||||
and worse than worthless. Without them people would have good
|
||||
detailed man pages, such as those found here in man1.
|
||||
As it is, many distributions install these "man pages",
|
||||
to the detriment of their users.
|
||||
|
||||
Copyrights: These man pages come under various copyrights.
|
||||
For the POSIX pages, see the file POSIX-COPYRIGHT.
|
||||
All other pages are freely distributable when the nroff source is included.
|
||||
|
||||
Send corrections and additions to mtk-manpages@gmx.net
|
||||
(man.7 has some info on the macros to use).
|
|
@ -0,0 +1,109 @@
|
|||
RELEASE
|
||||
After more than nine years and 64 releases,
|
||||
the old Linux man page maintainer announces a last release. . .
|
||||
|
||||
man-pages-1.70.tar.gz - man pages for Linux
|
||||
|
||||
|
||||
NEW MAINTAINER
|
||||
Michael Kerrisk has accepted to take over maintenance. (Thanks!)
|
||||
Send comments and patches to
|
||||
|
||||
mtk-manpages@gmx.net
|
||||
|
||||
|
||||
|
||||
POSIX
|
||||
This release contains a copy of the POSIX 1003.1-2003 man pages.
|
||||
The directories man0p, man1p, man3p contain descriptions of the
|
||||
headers, the utilities, and the functions documented in that standard.
|
||||
For the copyright notice, see the file POSIX-COPYRIGHT.
|
||||
|
||||
In order to use this, put in {/usr/share/misc/}man.conf{ig} or so
|
||||
your favourite order of looking at these pages, for example,
|
||||
MANSECT 1p:1:8:0p:3p:2:3:4:5:6:7:9:tcl:n:l:p:o
|
||||
or set the MANSECT environment variable.
|
||||
|
||||
OTHER PAGES
|
||||
The remaining pages are most of the section 2, 3, 4, 5, 7 man pages
|
||||
for Linux, and in addition section 1 man pages for the fileutils-4.0
|
||||
utilities, and section 5 and 8 man pages for the timezone utilities.
|
||||
|
||||
[The latter were taken from ftp://elsie.nci.nih.gov/pub/tzcode2001a.tar.gz.]
|
||||
[The section 3 man pages for the db routines have been taken from
|
||||
ftp://ftp.terra.net/pub/sleepycat/db.1.86.tar.gz.]
|
||||
[The rpc man pages were taken from the 4.4BSD-Lite CDROM.]
|
||||
|
||||
|
||||
Differences from version 1.69:
|
||||
|
||||
The man pages
|
||||
|
||||
ls.1
|
||||
|
||||
chroot.2 exit_group.2 mmap.2 nanosleep.2 remap_file_pages.2
|
||||
undocumented.2 wait.2
|
||||
|
||||
HUGE_VAL.3 HUGE_VALF.3 HUGE_VALL.3 INFINITY.3 NAN.3
|
||||
dl_iterate_phdr.3 drand48_r.3 endnetgrent.3 erand48_r.3
|
||||
finite.3 finitef.3 finitel.3 fpclassify.3 gethostent.3
|
||||
gethostent_r.3 getnetgrent.3 getnetgrent_r.3 grantpt.3
|
||||
ilogb.3 ilogbf.3 ilogbl.3 innetgr.3 isalpha.3 isinf.3
|
||||
isinff.3 isinfl.3 jrand48_r.3 lcong48_r.3 ldexp.3
|
||||
logb.3 logbf.3 logbl.3 lrand48_r.3 mrand48_r.3 nrand48_r.3
|
||||
openpty.3 ptsname.3 remquo.3 remquof.3 remquol.3 resolver.3
|
||||
scalb.3 scalbf.3 scalbl.3 scalbln.3 scalblnf.3 scalblnl.3
|
||||
scalbn.3 scalbnf.3 scalbnl.3 seed48_r.3 setnetgrent.3
|
||||
significand.3 significandf.3 significandl.3 srand48_r.3
|
||||
termios.3 undocumented.3 unlockpt.3
|
||||
|
||||
resolv.conf.5 utmp.5
|
||||
|
||||
ip.7
|
||||
|
||||
ld-linux.8 ld-linux.so.8
|
||||
|
||||
are new or have been updated. Typographical or grammatical errors
|
||||
have been corrected in several other places.
|
||||
|
||||
Here is a breakdown of what this distribution contains:
|
||||
|
||||
Section 0p = POSIX headers
|
||||
Section 1p = POSIX utilities
|
||||
Section 3p = POSIX functions
|
||||
|
||||
Section 1 = user commands (intro, and pages not maintained by FSF)
|
||||
Section 2 = system calls
|
||||
Section 3 = libc calls
|
||||
Section 4 = devices (e.g., hd, sd)
|
||||
Section 5 = file formats and protocols (e.g., wtmp, /etc/passwd, nfs)
|
||||
Section 6 = games (intro only)
|
||||
Section 7 = conventions, macro packages, etc.
|
||||
Section 8 = system administration (intro only)
|
||||
|
||||
Usually, there are no section 1, 6 and 8 man pages because these
|
||||
should be distributed with the binaries they are written for.
|
||||
Sometimes Section 9 is used for man pages describing parts of the kernel.
|
||||
|
||||
Note that only Section 2 is rather complete, but Section 3 contains
|
||||
several hundred man pages. If you want to write some man pages,
|
||||
please do so and mail them to mtk-manpages@gmx.net.
|
||||
|
||||
|
||||
Copyright information:
|
||||
|
||||
For the POSIX pages permission to distribute was given by IEEE
|
||||
and the Open Group, see POSIX-COPYRIGHT.
|
||||
|
||||
For the remaining pages, please note that these man pages are
|
||||
distributed under a variety of copyright licenses. Although these
|
||||
licenses permit free distribution of the nroff sources contained in
|
||||
this package, commercial distribution may impose other requirements
|
||||
(e.g., acknowledgement of copyright or inclusion of the raw nroff
|
||||
sources with the commercial distribution).
|
||||
If you distribute these man pages commercially, it is your
|
||||
responsibility to figure out your obligations. (For many man pages,
|
||||
these obligations require you to distribute nroff sources with any
|
||||
pre-formatted man pages that you provide.) Each file that contains
|
||||
nroff source for a man page also contains the author(s) name, email
|
||||
address, and copyright notice.
|
|
@ -0,0 +1,16 @@
|
|||
Begin3
|
||||
Title: Section 2, 3, 4, 5 and 7 man pages for Linux
|
||||
Version: 1.70
|
||||
Entered-date: 2004-10-31
|
||||
Description: Linux and POSIX manual pages
|
||||
Keywords: man pages
|
||||
Author: several
|
||||
Maintained-by: Andries Brouwer <aeb@cwi.nl>
|
||||
Michael Kerrisk <mtk-manpages@gmx.net>
|
||||
Primary-site: ftp://ftp.win.tue.nl/pub/linux-local/manpages
|
||||
2281k man-pages-1.70.tar.gz
|
||||
Alternate-site: ftp://ftp.XX.kernel.org/pub/linux/docs/manpages
|
||||
Copying-policy: several; for the POSIX pages, see the file POSIX-COPYRIGHT;
|
||||
the other pages are all freely distributable provided
|
||||
nroff source is provided
|
||||
End
|
|
@ -0,0 +1,116 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<aio.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <aio.h>
|
||||
.SH NAME
|
||||
aio.h \- asynchronous input and output (\fBREALTIME\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <aio.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<aio.h>\fP header shall define the \fBaiocb\fP structure which
|
||||
shall include at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint aio_fildes \fP File descriptor. \fB
|
||||
off_t aio_offset \fP File offset. \fB
|
||||
volatile void *aio_buf \fP Location of buffer. \fB
|
||||
size_t aio_nbytes \fP Length of transfer. \fB
|
||||
int aio_reqprio \fP Request priority offset. \fB
|
||||
struct sigevent aio_sigevent \fP Signal number and value. \fB
|
||||
int aio_lio_opcode\fP Operation to be performed. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
This header shall also include the following constants:
|
||||
.TP 7
|
||||
AIO_ALLDONE
|
||||
A return value indicating that none of the requested operations could
|
||||
be canceled since they are already complete.
|
||||
.TP 7
|
||||
AIO_CANCELED
|
||||
A return value indicating that all requested operations have been
|
||||
canceled.
|
||||
.TP 7
|
||||
AIO_NOTCANCELED
|
||||
.sp
|
||||
A return value indicating that some of the requested operations could
|
||||
not be canceled since they are in progress.
|
||||
.TP 7
|
||||
LIO_NOP
|
||||
A \fIlio_listio\fP() element operation option indicating that no transfer
|
||||
is
|
||||
requested.
|
||||
.TP 7
|
||||
LIO_NOWAIT
|
||||
A \fIlio_listio\fP() synchronization operation indicating that the
|
||||
calling thread
|
||||
is to continue execution while the \fIlio_listio\fP() operation is
|
||||
being performed, and
|
||||
no notification is given when the operation is complete.
|
||||
.TP 7
|
||||
LIO_READ
|
||||
A \fIlio_listio\fP() element operation option requesting a read.
|
||||
.TP 7
|
||||
LIO_WAIT
|
||||
A \fIlio_listio\fP() synchronization operation indicating that the
|
||||
calling thread
|
||||
is to suspend until the \fIlio_listio\fP() operation is complete.
|
||||
.TP 7
|
||||
LIO_WRITE
|
||||
A \fIlio_listio\fP() element operation option requesting a write.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint aio_cancel(int, struct aiocb *);
|
||||
int aio_error(const struct aiocb *);
|
||||
int aio_fsync(int, struct aiocb *);
|
||||
int aio_read(struct aiocb *);
|
||||
ssize_t aio_return(struct aiocb *);
|
||||
int aio_suspend(const struct aiocb *const[], int,
|
||||
const struct timespec *);
|
||||
int aio_write(struct aiocb *);
|
||||
int lio_listio(int, struct aiocb *restrict const[restrict], int,
|
||||
struct sigevent *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<aio.h>\fP header may make visible symbols defined
|
||||
in the headers \fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
|
||||
and \fI<time.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<fcntl.h>\fP , \fI<signal.h>\fP , \fI<sys/types.h>\fP , \fI<time.h>\fP
|
||||
, the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, \fIfsync\fP(), \fIlseek\fP(), \fIread\fP(),
|
||||
\fIwrite\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,58 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<assert.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <assert.h>
|
||||
.SH NAME
|
||||
assert.h \- verify program assertion
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <assert.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<assert.h>\fP header shall define the \fIassert\fP() macro.
|
||||
It refers to
|
||||
the macro NDEBUG which is not defined in the header. If NDEBUG is
|
||||
defined as a macro name before the inclusion of this header, the
|
||||
\fIassert\fP() macro shall be defined simply as:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#define assert(ignore)((void) 0)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Otherwise, the macro behaves as described in \fIassert\fP().
|
||||
.LP
|
||||
The \fIassert\fP() macro shall be redefined according to the current
|
||||
state of NDEBUG
|
||||
each time \fI<assert.h>\fP is included.
|
||||
.LP
|
||||
The \fIassert\fP() macro shall be implemented as a macro, not as a
|
||||
function. If the
|
||||
macro definition is suppressed in order to access an actual function,
|
||||
the behavior is undefined.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIassert\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,210 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<complex.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <complex.h>
|
||||
.SH NAME
|
||||
complex.h \- complex arithmetic
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <complex.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<complex.h>\fP header shall define the following macros:
|
||||
.TP 7
|
||||
complex
|
||||
Expands to \fB_Complex\fP.
|
||||
.TP 7
|
||||
_Complex_I
|
||||
Expands to a constant expression of type \fBconst float _Complex\fP,
|
||||
with the value of the imaginary unit (that is, a number
|
||||
\fIi\fP such that \fIi\fP**2=-1).
|
||||
.TP 7
|
||||
imaginary
|
||||
Expands to \fB_Imaginary\fP.
|
||||
.TP 7
|
||||
_Imaginary_I
|
||||
Expands to a constant expression of type \fBconst float _Imaginary\fP
|
||||
with the value of the imaginary unit.
|
||||
.TP 7
|
||||
I
|
||||
Expands to either _Imaginary_I or _Complex_I. If _Imaginary_I is not
|
||||
defined, I expands to _Complex_I.
|
||||
.sp
|
||||
.LP
|
||||
The macros imaginary and _Imaginary_I shall be defined if and only
|
||||
if the implementation supports imaginary types.
|
||||
.LP
|
||||
An application may undefine and then, perhaps, redefine the complex,
|
||||
imaginary, and I macros.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBdouble cabs(double complex);
|
||||
float cabsf(float complex);
|
||||
long double cabsl(long double complex);
|
||||
double complex cacos(double complex);
|
||||
float complex cacosf(float complex);
|
||||
double complex cacosh(double complex);
|
||||
float complex cacoshf(float complex);
|
||||
long double complex cacoshl(long double complex);
|
||||
long double complex cacosl(long double complex);
|
||||
double carg(double complex);
|
||||
float cargf(float complex);
|
||||
long double cargl(long double complex);
|
||||
double complex casin(double complex);
|
||||
float complex casinf(float complex);
|
||||
double complex casinh(double complex);
|
||||
float complex casinhf(float complex);
|
||||
long double complex casinhl(long double complex);
|
||||
long double complex casinl(long double complex);
|
||||
double complex catan(double complex);
|
||||
float complex catanf(float complex);
|
||||
double complex catanh(double complex);
|
||||
float complex catanhf(float complex);
|
||||
long double complex catanhl(long double complex);
|
||||
long double complex catanl(long double complex);
|
||||
double complex ccos(double complex);
|
||||
float complex ccosf(float complex);
|
||||
double complex ccosh(double complex);
|
||||
float complex ccoshf(float complex);
|
||||
long double complex ccoshl(long double complex);
|
||||
long double complex ccosl(long double complex);
|
||||
double complex cexp(double complex);
|
||||
float complex cexpf(float complex);
|
||||
long double complex cexpl(long double complex);
|
||||
double cimag(double complex);
|
||||
float cimagf(float complex);
|
||||
long double cimagl(long double complex);
|
||||
double complex clog(double complex);
|
||||
float complex clogf(float complex);
|
||||
long double complex clogl(long double complex);
|
||||
double complex conj(double complex);
|
||||
float complex conjf(float complex);
|
||||
long double complex conjl(long double complex);
|
||||
double complex cpow(double complex, double complex);
|
||||
float complex cpowf(float complex, float complex);
|
||||
long double complex cpowl(long double complex, long double complex);
|
||||
double complex cproj(double complex);
|
||||
float complex cprojf(float complex);
|
||||
long double complex cprojl(long double complex);
|
||||
double creal(double complex);
|
||||
float crealf(float complex);
|
||||
long double creall(long double complex);
|
||||
double complex csin(double complex);
|
||||
float complex csinf(float complex);
|
||||
double complex csinh(double complex);
|
||||
float complex csinhf(float complex);
|
||||
long double complex csinhl(long double complex);
|
||||
long double complex csinl(long double complex);
|
||||
double complex csqrt(double complex);
|
||||
float complex csqrtf(float complex);
|
||||
long double complex csqrtl(long double complex);
|
||||
double complex ctan(double complex);
|
||||
float complex ctanf(float complex);
|
||||
double complex ctanh(double complex);
|
||||
float complex ctanhf(float complex);
|
||||
long double complex ctanhl(long double complex);
|
||||
long double complex ctanl(long double complex);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
Values are interpreted as radians, not degrees.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
The choice of \fII\fP instead of \fIi\fP for the imaginary unit concedes
|
||||
to the widespread use of the identifier \fIi\fP for
|
||||
other purposes. The application can use a different identifier, say
|
||||
\fIj\fP, for the imaginary unit by following the inclusion of
|
||||
the \fI<complex.h>\fP header with:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#undef I
|
||||
#define j _Imaginary_I
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
An \fII\fP suffix to designate imaginary constants is not required,
|
||||
as multiplication by \fII\fP provides a sufficiently
|
||||
convenient and more generally useful notation for imaginary terms.
|
||||
The corresponding real type for the imaginary unit is
|
||||
\fBfloat\fP, so that use of \fII\fP for algorithmic or notational
|
||||
convenience will not result in widening types.
|
||||
.LP
|
||||
On systems with imaginary types, the application has the ability to
|
||||
control whether use of the macro I introduces an imaginary
|
||||
type, by explicitly defining I to be _Imaginary_I or _Complex_I. Disallowing
|
||||
imaginary types is useful for some applications
|
||||
intended to run on implementations without support for such types.
|
||||
.LP
|
||||
The macro _Imaginary_I provides a test for whether imaginary types
|
||||
are supported.
|
||||
.LP
|
||||
The \fIcis\fP() function (\fIcos\fP(\fIx\fP) + \fII\fP*\fIsin\fP(\fIx\fP))
|
||||
was considered but rejected because its
|
||||
implementation is easy and straightforward, even though some implementations
|
||||
could compute sine and cosine more efficiently in
|
||||
tandem.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
The following function names and the same names suffixed with \fIf\fP
|
||||
or \fIl\fP are reserved for future use, and may be added
|
||||
to the declarations in the \fI<complex.h>\fP header.
|
||||
.TS C
|
||||
center; lw(26) lw(26) lw(26).
|
||||
T{
|
||||
.br
|
||||
\fIcerf\fP()
|
||||
.br
|
||||
\fIcerfc\fP()
|
||||
.br
|
||||
\fIcexp2\fP()
|
||||
.br
|
||||
\
|
||||
T} T{
|
||||
.br
|
||||
\fIcexpm1\fP()
|
||||
.br
|
||||
\fIclog10\fP()
|
||||
.br
|
||||
\fIclog1p\fP()
|
||||
.br
|
||||
\
|
||||
T} T{
|
||||
.br
|
||||
\fIclog2\fP()
|
||||
.br
|
||||
\fIclgamma\fP()
|
||||
.br
|
||||
\fIctgamma\fP()
|
||||
.br
|
||||
\
|
||||
T}
|
||||
.TE
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcabs\fP(),
|
||||
\fIcacos\fP(), \fIcacosh\fP(), \fIcarg\fP(), \fIcasin\fP(), \fIcasinh\fP(),
|
||||
\fIcatan\fP(), \fIcatanh\fP(), \fIccos\fP(), \fIccosh\fP(), \fIcexp\fP(),
|
||||
\fIcimag\fP(), \fIclog\fP(), \fIconj\fP(), \fIcpow\fP(), \fIcproj\fP(),
|
||||
\fIcreal\fP(), \fIcsin\fP(), \fIcsinh\fP(), \fIcsqrt\fP(), \fIctan\fP(),
|
||||
\fIctanh\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,70 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<cpio.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <cpio.h>
|
||||
.SH NAME
|
||||
cpio.h \- cpio archive values
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <cpio.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Values needed by the \fIc_mode\fP field of the \fIcpio\fP archive
|
||||
format are described as follows:
|
||||
.TS C
|
||||
center; l1 l1 l.
|
||||
\fBName\fP \fBDescription\fP \fBValue (Octal)\fP
|
||||
C_IRUSR Read by owner. 0000400
|
||||
C_IWUSR Write by owner. 0000200
|
||||
C_IXUSR Execute by owner. 0000100
|
||||
C_IRGRP Read by group. 0000040
|
||||
C_IWGRP Write by group. 0000020
|
||||
C_IXGRP Execute by group. 0000010
|
||||
C_IROTH Read by others. 0000004
|
||||
C_IWOTH Write by others. 0000002
|
||||
C_IXOTH Execute by others. 0000001
|
||||
C_ISUID Set user ID. 0004000
|
||||
C_ISGID Set group ID. 0002000
|
||||
C_ISVTX On directories, restricted deletion flag. 0001000
|
||||
C_ISDIR Directory. 0040000
|
||||
C_ISFIFO FIFO. 0010000
|
||||
C_ISREG Regular file. 0100000
|
||||
C_ISBLK Block special. 0060000
|
||||
C_ISCHR Character special. 0020000
|
||||
C_ISCTG Reserved. 0110000
|
||||
C_ISLNK Symbolic link. 0120000
|
||||
C_ISSOCK Socket. 0140000
|
||||
.TE
|
||||
.LP
|
||||
The header shall define the symbolic constant:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBMAGIC "070707"
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIpax\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,89 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<ctype.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <ctype.h>
|
||||
.SH NAME
|
||||
ctype.h \- character types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <ctype.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint isalnum(int);
|
||||
int isalpha(int);
|
||||
|
||||
int isascii(int);
|
||||
|
||||
int isblank(int);
|
||||
int iscntrl(int);
|
||||
int isdigit(int);
|
||||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isprint(int);
|
||||
int ispunct(int);
|
||||
int isspace(int);
|
||||
int isupper(int);
|
||||
int isxdigit(int);
|
||||
|
||||
int toascii(int);
|
||||
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following are defined as macros:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
int _toupper(int);
|
||||
int _tolower(int);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<locale.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIisalnum\fP(), \fIisalpha\fP(), \fIisascii\fP(), \fIiscntrl\fP(),
|
||||
\fIisdigit\fP(), \fIisgraph\fP(), \fIislower\fP(), \fIisprint\fP(),
|
||||
\fIispunct\fP(), \fIisspace\fP(), \fIisupper\fP(), \fIisxdigit\fP(),
|
||||
\fImblen\fP(), \fImbstowcs\fP(), \fImbtowc\fP(), \fIsetlocale\fP(),
|
||||
\fItoascii\fP(), \fItolower\fP(), \fI_tolower\fP(), \fItoupper\fP(),
|
||||
\fI_toupper\fP(), \fIwcstombs\fP(), \fIwctomb\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,125 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<dirent.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <dirent.h>
|
||||
.SH NAME
|
||||
dirent.h \- format of directory entries
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <dirent.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The internal format of directories is unspecified.
|
||||
.LP
|
||||
The \fI<dirent.h>\fP header shall define the following type:
|
||||
.TP 7
|
||||
\fBDIR\fP
|
||||
A type representing a directory stream.
|
||||
.sp
|
||||
.LP
|
||||
It shall also define the structure \fBdirent\fP which shall include
|
||||
the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
ino_t d_ino \fP File serial number. \fB
|
||||
|
||||
char d_name[] \fP Name of entry. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The type \fBino_t\fP shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The character array \fId_name\fP is of unspecified size, but the number
|
||||
of bytes preceding the terminating null byte shall not
|
||||
exceed {NAME_MAX}.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint closedir(DIR *);
|
||||
DIR *opendir(const char *);
|
||||
struct dirent *readdir(DIR *);
|
||||
|
||||
int readdir_r(DIR *restrict, struct dirent *restrict,
|
||||
struct dirent **restrict);
|
||||
|
||||
void rewinddir(DIR *);
|
||||
|
||||
void seekdir(DIR *, long);
|
||||
long telldir(DIR *);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
Information similar to that in the \fI<dirent.h>\fP header is contained
|
||||
in a file \fI<sys/dir.h>\fP in 4.2 BSD and
|
||||
4.3 BSD. The equivalent in these implementations of \fBstruct dirent\fP
|
||||
from this volume of IEEE\ Std\ 1003.1-2001 is
|
||||
\fBstruct direct\fP. The filename was changed because the name \fI<sys/dir.h>\fP
|
||||
was also used in earlier implementations
|
||||
to refer to definitions related to the older access method; this produced
|
||||
name conflicts. The name of the structure was changed
|
||||
because this volume of IEEE\ Std\ 1003.1-2001 does not completely
|
||||
define what is in the structure, so it could be different
|
||||
on some implementations from \fBstruct direct\fP.
|
||||
.LP
|
||||
The name of an array of \fBchar\fP of an unspecified size should not
|
||||
be used as an lvalue. Use of:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsizeof(d_name)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
is incorrect; use:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstrlen(d_name)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
instead.
|
||||
.LP
|
||||
The array of \fBchar\fP \fId_name\fP is not a fixed size. Implementations
|
||||
may need to declare \fBstruct dirent\fP with an
|
||||
array size for \fId_name\fP of 1, but the actual number of characters
|
||||
provided matches (or only slightly exceeds) the length of
|
||||
the filename.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIclosedir\fP(), \fIopendir\fP(), \fIreaddir\fP(), \fIreaddir_r\fP(),
|
||||
\fIrewinddir\fP(), \fIseekdir\fP(), \fItelldir\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,65 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<dlfcn.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <dlfcn.h>
|
||||
.SH NAME
|
||||
dlfcn.h \- dynamic linking
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <dlfcn.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<dlfcn.h>\fP header shall define at least the following macros
|
||||
for use in the construction of a \fIdlopen\fP() \fImode\fP argument:
|
||||
.TP 7
|
||||
RTLD_LAZY
|
||||
Relocations are performed at an implementation-defined time.
|
||||
.TP 7
|
||||
RTLD_NOW
|
||||
Relocations are performed when the object is loaded.
|
||||
.TP 7
|
||||
RTLD_GLOBAL
|
||||
All symbols are available for relocation processing of other modules.
|
||||
.TP 7
|
||||
RTLD_LOCAL
|
||||
All symbols are not made available for relocation processing by other
|
||||
modules.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint dlclose(void *);
|
||||
char *dlerror(void);
|
||||
void *dlopen(const char *, int);
|
||||
void *dlsym(void *restrict, const char *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIdlopen\fP(),
|
||||
\fIdlclose\fP(), \fIdlsym\fP(), \fIdlerror\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,290 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<errno.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <errno.h>
|
||||
.SH NAME
|
||||
errno.h \- system error numbers
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <errno.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Any conflict between the
|
||||
requirements described here and the ISO\ C standard is unintentional.
|
||||
This volume of IEEE\ Std\ 1003.1-2001 defers to
|
||||
the ISO\ C standard.
|
||||
.LP
|
||||
The
|
||||
ISO\ C standard only requires the symbols [EDOM], [EILSEQ], and [ERANGE]
|
||||
to be defined.
|
||||
.LP
|
||||
The \fI<errno.h>\fP header shall provide a declaration for \fIerrno\fP
|
||||
and give positive values for the following
|
||||
symbolic constants. Their values shall be unique except as noted below.
|
||||
.TP 7
|
||||
.B E2BIG
|
||||
Argument list too long.
|
||||
.TP 7
|
||||
.B EACCES
|
||||
Permission denied.
|
||||
.TP 7
|
||||
.B EADDRINUSE
|
||||
Address in use.
|
||||
.TP 7
|
||||
.B EADDRNOTAVAIL
|
||||
Address not available.
|
||||
.TP 7
|
||||
.B EAFNOSUPPORT
|
||||
Address family not supported.
|
||||
.TP 7
|
||||
.B EAGAIN
|
||||
Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
|
||||
.TP 7
|
||||
.B EALREADY
|
||||
Connection already in progress.
|
||||
.TP 7
|
||||
.B EBADF
|
||||
Bad file descriptor.
|
||||
.TP 7
|
||||
.B EBADMSG
|
||||
Bad message.
|
||||
.TP 7
|
||||
.B EBUSY
|
||||
Device or resource busy.
|
||||
.TP 7
|
||||
.B ECANCELED
|
||||
Operation canceled.
|
||||
.TP 7
|
||||
.B ECHILD
|
||||
No child processes.
|
||||
.TP 7
|
||||
.B ECONNABORTED
|
||||
Connection aborted.
|
||||
.TP 7
|
||||
.B ECONNREFUSED
|
||||
Connection refused.
|
||||
.TP 7
|
||||
.B ECONNRESET
|
||||
Connection reset.
|
||||
.TP 7
|
||||
.B EDEADLK
|
||||
Resource deadlock would occur.
|
||||
.TP 7
|
||||
.B EDESTADDRREQ
|
||||
Destination address required.
|
||||
.TP 7
|
||||
.B EDOM
|
||||
Mathematics argument out of domain of function.
|
||||
.TP 7
|
||||
.B EDQUOT
|
||||
Reserved.
|
||||
.TP 7
|
||||
.B EEXIST
|
||||
File exists.
|
||||
.TP 7
|
||||
.B EFAULT
|
||||
Bad address.
|
||||
.TP 7
|
||||
.B EFBIG
|
||||
File too large.
|
||||
.TP 7
|
||||
.B EHOSTUNREACH
|
||||
Host is unreachable.
|
||||
.TP 7
|
||||
.B EIDRM
|
||||
Identifier removed.
|
||||
.TP 7
|
||||
.B EILSEQ
|
||||
Illegal byte sequence.
|
||||
.TP 7
|
||||
.B EINPROGRESS
|
||||
Operation in progress.
|
||||
.TP 7
|
||||
.B EINTR
|
||||
Interrupted function.
|
||||
.TP 7
|
||||
.B EINVAL
|
||||
Invalid argument.
|
||||
.TP 7
|
||||
.B EIO
|
||||
I/O error.
|
||||
.TP 7
|
||||
.B EISCONN
|
||||
Socket is connected.
|
||||
.TP 7
|
||||
.B EISDIR
|
||||
Is a directory.
|
||||
.TP 7
|
||||
.B ELOOP
|
||||
Too many levels of symbolic links.
|
||||
.TP 7
|
||||
.B EMFILE
|
||||
Too many open files.
|
||||
.TP 7
|
||||
.B EMLINK
|
||||
Too many links.
|
||||
.TP 7
|
||||
.B EMSGSIZE
|
||||
Message too large.
|
||||
.TP 7
|
||||
.B EMULTIHOP
|
||||
Reserved.
|
||||
.TP 7
|
||||
.B ENAMETOOLONG
|
||||
Filename too long.
|
||||
.TP 7
|
||||
.B ENETDOWN
|
||||
Network is down.
|
||||
.TP 7
|
||||
.B ENETRESET
|
||||
Connection aborted by network.
|
||||
.TP 7
|
||||
.B ENETUNREACH
|
||||
Network unreachable.
|
||||
.TP 7
|
||||
.B ENFILE
|
||||
Too many files open in system.
|
||||
.TP 7
|
||||
.B ENOBUFS
|
||||
No buffer space available.
|
||||
.TP 7
|
||||
.B ENODATA
|
||||
No message is available on the STREAM head read queue.
|
||||
.TP 7
|
||||
.B ENODEV
|
||||
No such device.
|
||||
.TP 7
|
||||
.B ENOENT
|
||||
No such file or directory.
|
||||
.TP 7
|
||||
.B ENOEXEC
|
||||
Executable file format error.
|
||||
.TP 7
|
||||
.B ENOLCK
|
||||
No locks available.
|
||||
.TP 7
|
||||
.B ENOLINK
|
||||
Reserved.
|
||||
.TP 7
|
||||
.B ENOMEM
|
||||
Not enough space.
|
||||
.TP 7
|
||||
.B ENOMSG
|
||||
No message of the desired type.
|
||||
.TP 7
|
||||
.B ENOPROTOOPT
|
||||
Protocol not available.
|
||||
.TP 7
|
||||
.B ENOSPC
|
||||
No space left on device.
|
||||
.TP 7
|
||||
.B ENOSR
|
||||
No STREAM resources.
|
||||
.TP 7
|
||||
.B ENOSTR
|
||||
Not a STREAM.
|
||||
.TP 7
|
||||
.B ENOSYS
|
||||
Function not supported.
|
||||
.TP 7
|
||||
.B ENOTCONN
|
||||
The socket is not connected.
|
||||
.TP 7
|
||||
.B ENOTDIR
|
||||
Not a directory.
|
||||
.TP 7
|
||||
.B ENOTEMPTY
|
||||
Directory not empty.
|
||||
.TP 7
|
||||
.B ENOTSOCK
|
||||
Not a socket.
|
||||
.TP 7
|
||||
.B ENOTSUP
|
||||
Not supported.
|
||||
.TP 7
|
||||
.B ENOTTY
|
||||
Inappropriate I/O control operation.
|
||||
.TP 7
|
||||
.B ENXIO
|
||||
No such device or address.
|
||||
.TP 7
|
||||
.B EOPNOTSUPP
|
||||
Operation not supported on socket.
|
||||
.TP 7
|
||||
.B EOVERFLOW
|
||||
Value too large to be stored in data type.
|
||||
.TP 7
|
||||
.B EPERM
|
||||
Operation not permitted.
|
||||
.TP 7
|
||||
.B EPIPE
|
||||
Broken pipe.
|
||||
.TP 7
|
||||
.B EPROTO
|
||||
Protocol error.
|
||||
.TP 7
|
||||
.B EPROTONOSUPPORT
|
||||
.sp
|
||||
Protocol not supported.
|
||||
.TP 7
|
||||
.B EPROTOTYPE
|
||||
Protocol wrong type for socket.
|
||||
.TP 7
|
||||
.B ERANGE
|
||||
Result too large.
|
||||
.TP 7
|
||||
.B EROFS
|
||||
Read-only file system.
|
||||
.TP 7
|
||||
.B ESPIPE
|
||||
Invalid seek.
|
||||
.TP 7
|
||||
.B ESRCH
|
||||
No such process.
|
||||
.TP 7
|
||||
.B ESTALE
|
||||
Reserved.
|
||||
.TP 7
|
||||
.B ETIME
|
||||
Stream \fIioctl\fP() timeout.
|
||||
.TP 7
|
||||
.B ETIMEDOUT
|
||||
Connection timed out.
|
||||
.TP 7
|
||||
.B ETXTBSY
|
||||
Text file busy.
|
||||
.TP 7
|
||||
.B EWOULDBLOCK
|
||||
Operation would block (may be the same value as [EAGAIN]).
|
||||
.TP 7
|
||||
.B EXDEV
|
||||
Cross-device link.
|
||||
.sp
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
Additional error numbers may be defined on conforming systems; see
|
||||
the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, Section 2.3,
|
||||
Error
|
||||
Numbers
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,222 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<fcntl.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <fcntl.h>
|
||||
.SH NAME
|
||||
fcntl.h \- file control options
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <fcntl.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<fcntl.h>\fP header shall define the following requests and
|
||||
arguments for use by the functions \fIfcntl\fP() and \fIopen\fP().
|
||||
.LP
|
||||
Values for \fIcmd\fP used by \fIfcntl\fP() (the following values are
|
||||
unique) are as
|
||||
follows:
|
||||
.TP 7
|
||||
F_DUPFD
|
||||
Duplicate file descriptor.
|
||||
.TP 7
|
||||
F_GETFD
|
||||
Get file descriptor flags.
|
||||
.TP 7
|
||||
F_SETFD
|
||||
Set file descriptor flags.
|
||||
.TP 7
|
||||
F_GETFL
|
||||
Get file status flags and file access modes.
|
||||
.TP 7
|
||||
F_SETFL
|
||||
Set file status flags.
|
||||
.TP 7
|
||||
F_GETLK
|
||||
Get record locking information.
|
||||
.TP 7
|
||||
F_SETLK
|
||||
Set record locking information.
|
||||
.TP 7
|
||||
F_SETLKW
|
||||
Set record locking information; wait if blocked.
|
||||
.TP 7
|
||||
F_GETOWN
|
||||
Get process or process group ID to receive SIGURG signals.
|
||||
.TP 7
|
||||
F_SETOWN
|
||||
Set process or process group ID to receive SIGURG signals.
|
||||
.sp
|
||||
.LP
|
||||
File descriptor flags used for \fIfcntl\fP() are as follows:
|
||||
.TP 7
|
||||
FD_CLOEXEC
|
||||
Close the file descriptor upon execution of an \fIexec\fP family function.
|
||||
.sp
|
||||
.LP
|
||||
Values for \fIl_type\fP used for record locking with \fIfcntl\fP()
|
||||
(the following values
|
||||
are unique) are as follows:
|
||||
.TP 7
|
||||
F_RDLCK
|
||||
Shared or read lock.
|
||||
.TP 7
|
||||
F_UNLCK
|
||||
Unlock.
|
||||
.TP 7
|
||||
F_WRLCK
|
||||
Exclusive or write lock.
|
||||
.sp
|
||||
.LP
|
||||
The values used for \fIl_whence\fP, SEEK_SET, SEEK_CUR, and SEEK_END
|
||||
shall be defined as described in \fI<unistd.h>\fP .
|
||||
.LP
|
||||
The following values are file creation flags and are used in the \fIoflag\fP
|
||||
value to \fIopen\fP(). They shall be bitwise-distinct.
|
||||
.TP 7
|
||||
O_CREAT
|
||||
Create file if it does not exist.
|
||||
.TP 7
|
||||
O_EXCL
|
||||
Exclusive use flag.
|
||||
.TP 7
|
||||
O_NOCTTY
|
||||
Do not assign controlling terminal.
|
||||
.TP 7
|
||||
O_TRUNC
|
||||
Truncate flag.
|
||||
.sp
|
||||
.LP
|
||||
File status flags used for \fIopen\fP() and \fIfcntl\fP() are as follows:
|
||||
.TP 7
|
||||
O_APPEND
|
||||
Set append mode.
|
||||
.TP 7
|
||||
O_DSYNC
|
||||
Write according to synchronized I/O data integrity completion.
|
||||
.TP 7
|
||||
O_NONBLOCK
|
||||
Non-blocking mode.
|
||||
.TP 7
|
||||
O_RSYNC
|
||||
Synchronized read I/O operations.
|
||||
.TP 7
|
||||
O_SYNC
|
||||
Write according to synchronized I/O file integrity completion.
|
||||
.sp
|
||||
.LP
|
||||
Mask for use with file access modes is as follows:
|
||||
.TP 7
|
||||
O_ACCMODE
|
||||
Mask for file access modes.
|
||||
.sp
|
||||
.LP
|
||||
File access modes used for \fIopen\fP() and \fIfcntl\fP() are as follows:
|
||||
.TP 7
|
||||
O_RDONLY
|
||||
Open for reading only.
|
||||
.TP 7
|
||||
O_RDWR
|
||||
Open for reading and writing.
|
||||
.TP 7
|
||||
O_WRONLY
|
||||
Open for writing only.
|
||||
.sp
|
||||
.LP
|
||||
The symbolic names for file modes for use as values of \fBmode_t\fP
|
||||
shall be defined as described in \fI<sys/stat.h>\fP .
|
||||
.LP
|
||||
Values for \fIadvice\fP used by \fIposix_fadvise\fP() are as follows:
|
||||
.TP 7
|
||||
POSIX_FADV_NORMAL
|
||||
.sp
|
||||
The application has no advice to give on its behavior with respect
|
||||
to the specified data. It is the default characteristic if no
|
||||
advice is given for an open file.
|
||||
.TP 7
|
||||
POSIX_FADV_SEQUENTIAL
|
||||
.sp
|
||||
The application expects to access the specified data sequentially
|
||||
from lower offsets to higher offsets.
|
||||
.TP 7
|
||||
POSIX_FADV_RANDOM
|
||||
.sp
|
||||
The application expects to access the specified data in a random order.
|
||||
.TP 7
|
||||
POSIX_FADV_WILLNEED
|
||||
.sp
|
||||
The application expects to access the specified data in the near future.
|
||||
.TP 7
|
||||
POSIX_FADV_DONTNEED
|
||||
.sp
|
||||
The application expects that it will not access the specified data
|
||||
in the near future.
|
||||
.TP 7
|
||||
POSIX_FADV_NOREUSE
|
||||
.sp
|
||||
The application expects to access the specified data once and then
|
||||
not reuse it thereafter.
|
||||
.sp
|
||||
.LP
|
||||
The structure \fBflock\fP describes a file lock. It shall include
|
||||
the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBshort l_type \fP Type of lock; F_RDLCK, F_WRLCK, F_UNLCK. \fB
|
||||
short l_whence\fP Flag for starting offset. \fB
|
||||
off_t l_start \fP Relative offset in bytes. \fB
|
||||
off_t l_len \fP Size; if 0 then until EOF. \fB
|
||||
pid_t l_pid \fP Process ID of the process holding the lock; returned with F_GETLK. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBmode_t\fP, \fBoff_t\fP, and \fBpid_t\fP types shall be defined
|
||||
as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint creat(const char *, mode_t);
|
||||
int fcntl(int, int, ...);
|
||||
int open(const char *, int, ...);
|
||||
|
||||
int posix_fadvise(int, off_t, size_t, int);
|
||||
int posix_fallocate(int, off_t, size_t);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<fcntl.h>\fP header may also make visible all
|
||||
symbols from \fI<sys/stat.h>\fP and \fI<unistd.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/stat.h>\fP , \fI<sys/types.h>\fP , \fI<unistd.h>\fP , the
|
||||
System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcreat\fP(),
|
||||
\fIexec\fP, \fIfcntl\fP(), \fIopen\fP(), \fIposix_fadvise\fP(), \fIposix_fallocate\fP(),
|
||||
\fIposix_madvise\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,247 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<fenv.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <fenv.h>
|
||||
.SH NAME
|
||||
fenv.h \- floating-point environment
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <fenv.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<fenv.h>\fP header shall define the following data types through
|
||||
\fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBfenv_t\fP
|
||||
Represents the entire floating-point environment. The floating-point
|
||||
environment refers collectively to any floating-point
|
||||
status flags and control modes supported by the implementation.
|
||||
.TP 7
|
||||
\fBfexcept_t\fP
|
||||
Represents the floating-point status flags collectively, including
|
||||
any status the implementation associates with the flags. A
|
||||
floating-point status flag is a system variable whose value is set
|
||||
(but never cleared) when a floating-point exception is raised,
|
||||
which occurs as a side effect of exceptional floating-point arithmetic
|
||||
to provide auxiliary information. A floating-point control
|
||||
mode is a system variable whose value may be set by the user to affect
|
||||
the subsequent behavior of floating-point arithmetic.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<fenv.h>\fP header shall define the following constants if
|
||||
and only if the implementation supports the
|
||||
floating-point exception by means of the floating-point functions
|
||||
\fIfeclearexcept\fP(), \fIfegetexceptflag\fP(), \fIferaiseexcept\fP(),
|
||||
\fIfesetexceptflag\fP(), and \fIfetestexcept\fP(). Each expands to
|
||||
an integer constant expression with values such that
|
||||
bitwise-inclusive ORs of all combinations of the constants result
|
||||
in distinct values.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FE_DIVBYZERO
|
||||
FE_INEXACT
|
||||
FE_INVALID
|
||||
FE_OVERFLOW
|
||||
FE_UNDERFLOW
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<fenv.h>\fP header shall define the following constant, which
|
||||
is simply the bitwise-inclusive OR of all
|
||||
floating-point exception constants defined above:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FE_ALL_EXCEPT
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<fenv.h>\fP header shall define the following constants if
|
||||
and only if the implementation supports getting and
|
||||
setting the represented rounding direction by means of the \fIfegetround\fP()
|
||||
and \fIfesetround\fP() functions. Each expands to an integer constant
|
||||
expression whose values
|
||||
are distinct non-negative vales.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FE_DOWNWARD
|
||||
FE_TONEAREST
|
||||
FE_TOWARDZERO
|
||||
FE_UPWARD
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<fenv.h>\fP header shall define the following constant, which
|
||||
represents the default floating-point environment
|
||||
(that is, the one installed at program startup) and has type pointer
|
||||
to const-qualified \fBfenv_t\fP. It can be used as an
|
||||
argument to the functions within the \fI<fenv.h>\fP header that manage
|
||||
the floating-point environment.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FE_DFL_ENV
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint feclearexcept(int);
|
||||
int fegetexceptflag(fexcept_t *, int);
|
||||
int feraiseexcept(int);
|
||||
int fesetexceptflag(const fexcept_t *, int);
|
||||
int fetestexcept(int);
|
||||
int fegetround(void);
|
||||
int fesetround(int);
|
||||
int fegetenv(fenv_t *);
|
||||
int feholdexcept(fenv_t *);
|
||||
int fesetenv(const fenv_t *);
|
||||
int feupdateenv(const fenv_t *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The FENV_ACCESS pragma provides a means to inform the implementation
|
||||
when an application might access the floating-point
|
||||
environment to test floating-point status flags or run under non-default
|
||||
floating-point control modes. The pragma shall occur
|
||||
either outside external declarations or preceding all explicit declarations
|
||||
and statements inside a compound statement. When
|
||||
outside external declarations, the pragma takes effect from its occurrence
|
||||
until another FENV_ACCESS pragma is encountered, or
|
||||
until the end of the translation unit. When inside a compound statement,
|
||||
the pragma takes effect from its occurrence until another
|
||||
FENV_ACCESS pragma is encountered (including within a nested compound
|
||||
statement), or until the end of the compound statement; at
|
||||
the end of a compound statement the state for the pragma is restored
|
||||
to its condition just before the compound statement. If this
|
||||
pragma is used in any other context, the behavior is undefined. If
|
||||
part of an application tests floating-point status flags, sets
|
||||
floating-point control modes, or runs under non-default mode settings,
|
||||
but was translated with the state for the FENV_ACCESS pragma
|
||||
off, the behavior is undefined. The default state (on or off) for
|
||||
the pragma is implementation-defined. (When execution passes from
|
||||
a part of the application translated with FENV_ACCESS off to a part
|
||||
translated with FENV_ACCESS on, the state of the floating-point
|
||||
status flags is unspecified and the floating-point control modes have
|
||||
their default settings.)
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
This header is designed to support the floating-point exception status
|
||||
flags and directed-rounding control modes required by the
|
||||
IEC\ 60559:1989 standard, and other similar floating-point state information.
|
||||
Also it is designed to facilitate code
|
||||
portability among all systems.
|
||||
.LP
|
||||
Certain application programming conventions support the intended model
|
||||
of use for the floating-point environment:
|
||||
.IP " *" 3
|
||||
A function call does not alter its caller's floating-point control
|
||||
modes, clear its caller's floating-point status flags, nor
|
||||
depend on the state of its caller's floating-point status flags unless
|
||||
the function is so documented.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
A function call is assumed to require default floating-point control
|
||||
modes, unless its documentation promises otherwise.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
A function call is assumed to have the potential for raising floating-point
|
||||
exceptions, unless its documentation promises
|
||||
otherwise.
|
||||
.LP
|
||||
.LP
|
||||
With these conventions, an application can safely assume default floating-point
|
||||
control modes (or be unaware of them). The
|
||||
responsibilities associated with accessing the floating-point environment
|
||||
fall on the application that does so explicitly.
|
||||
.LP
|
||||
Even though the rounding direction macros may expand to constants
|
||||
corresponding to the values of FLT_ROUNDS, they are not
|
||||
required to do so.
|
||||
.LP
|
||||
For example:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#include <fenv.h>
|
||||
void f(double x)
|
||||
{
|
||||
#pragma STDC FENV_ACCESS ON
|
||||
void g(double);
|
||||
void h(double);
|
||||
/* ... */
|
||||
g(x + 1);
|
||||
h(x + 1);
|
||||
/* ... */
|
||||
}
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
If the function \fIg\fP() might depend on status flags set as a side
|
||||
effect of the first \fIx\fP+1, or if the second
|
||||
\fIx\fP+1 might depend on control modes set as a side effect of the
|
||||
call to function \fIg\fP(), then the application shall
|
||||
contain an appropriately placed invocation as follows:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#pragma STDC FENV_ACCESS ON
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.SH RATIONALE
|
||||
.SS The fexcept_t Type
|
||||
.LP
|
||||
\fBfexcept_t\fP does not have to be an integer type. Its values must
|
||||
be obtained by a call to \fIfegetexceptflag\fP(), and cannot be created
|
||||
by logical operations from the exception
|
||||
macros. An implementation might simply implement \fBfexcept_t\fP as
|
||||
an \fBint\fP and use the representations reflected by the
|
||||
exception macros, but is not required to; other representations might
|
||||
contain extra information about the exceptions.
|
||||
\fBfexcept_t\fP might be a \fBstruct\fP with a member for each exception
|
||||
(that might hold the address of the first or last
|
||||
floating-point instruction that caused that exception). The ISO/IEC\ 9899:1999
|
||||
standard makes no claims about the internals of
|
||||
an \fBfexcept_t\fP, and so the user cannot inspect it.
|
||||
.SS Exception and Rounding Macros
|
||||
.LP
|
||||
Macros corresponding to unsupported modes and rounding directions
|
||||
are not defined by the implementation and must not be defined
|
||||
by the application. An application might use \fB#ifdef\fP to test
|
||||
for this.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfeclearexcept\fP(),
|
||||
\fIfegetenv\fP(), \fIfegetexceptflag\fP(), \fIfegetround\fP(),
|
||||
\fIfeholdexcept\fP(), \fIferaiseexcept\fP(), \fIfesetenv\fP(), \fIfesetexceptflag\fP(),
|
||||
\fIfesetround\fP(),
|
||||
\fIfetestexcept\fP(), \fIfeupdateenv\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,328 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<float.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <float.h>
|
||||
.SH NAME
|
||||
float.h \- floating types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <float.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The characteristics of floating types are defined in terms of a model
|
||||
that describes a representation of floating-point numbers
|
||||
and values that provide information about an implementation's floating-point
|
||||
arithmetic.
|
||||
.LP
|
||||
The following parameters are used to define the model for each floating-point
|
||||
type:
|
||||
.TP 7
|
||||
\fIs\fP
|
||||
Sign (\(+-1).
|
||||
.TP 7
|
||||
\fIb\fP
|
||||
Base or radix of exponent representation (an integer >1).
|
||||
.TP 7
|
||||
\fIe\fP
|
||||
Exponent (an integer between a minimum \fIe\fP_min and a maximum \fIe\fP_max).
|
||||
.TP 7
|
||||
\fIp\fP
|
||||
Precision (the number of base-\fIb\fP digits in the significand).
|
||||
.TP 7
|
||||
\fIf\fP_k
|
||||
Non-negative integers less than \fIb\fP (the significand digits).
|
||||
.sp
|
||||
.LP
|
||||
A floating-point number \fIx\fP is defined by the following model:
|
||||
.LP
|
||||
.LP
|
||||
In addition to normalized floating-point numbers (\fIf\fP_1>0 if \fIx\fP!=0),
|
||||
floating types may be able to contain other
|
||||
kinds of floating-point numbers, such as subnormal floating-point
|
||||
numbers ( \fIx\fP!=0, \fIe\fP= \fIe\fP_min, \fIf\fP_1=0) and
|
||||
unnormalized floating-point numbers ( \fIx\fP!=0, \fIe\fP> \fIe\fP_min,
|
||||
\fIf\fP_1=0), and values that are not floating-point
|
||||
numbers, such as infinities and NaNs. A \fINaN\fP is an encoding signifying
|
||||
Not-a-Number. A \fIquiet NaN\fP propagates through
|
||||
almost every arithmetic operation without raising a floating-point
|
||||
exception; a \fIsignaling NaN\fP generally raises a
|
||||
floating-point exception when occurring as an arithmetic operand.
|
||||
.LP
|
||||
The accuracy of the floating-point operations ( \fB'+'\fP , \fB'-'\fP
|
||||
, \fB'*'\fP , \fB'/'\fP ) and of the library
|
||||
functions in \fI<math.h>\fP and \fI<complex.h>\fP that return floating-point
|
||||
results is implementation-defined. The
|
||||
implementation may state that the accuracy is unknown.
|
||||
.LP
|
||||
All integer values in the \fI<float.h>\fP header, except FLT_ROUNDS,
|
||||
shall be constant expressions suitable for use in
|
||||
\fB#if\fP preprocessing directives; all floating values shall be constant
|
||||
expressions. All except DECIMAL_DIG, FLT_EVAL_METHOD,
|
||||
FLT_RADIX, and FLT_ROUNDS have separate names for all three floating-point
|
||||
types. The floating-point model representation is
|
||||
provided for all values except FLT_EVAL_METHOD and FLT_ROUNDS.
|
||||
.LP
|
||||
The rounding mode for floating-point addition is characterized by
|
||||
the implementation-defined value of FLT_ROUNDS:
|
||||
.TP 7
|
||||
-1
|
||||
Indeterminable.
|
||||
.TP 7
|
||||
\ 0
|
||||
Toward zero.
|
||||
.TP 7
|
||||
\ 1
|
||||
To nearest.
|
||||
.TP 7
|
||||
\ 2
|
||||
Toward positive infinity.
|
||||
.TP 7
|
||||
\ 3
|
||||
Toward negative infinity.
|
||||
.sp
|
||||
.LP
|
||||
All other values for FLT_ROUNDS characterize implementation-defined
|
||||
rounding behavior.
|
||||
.LP
|
||||
The values of operations with floating operands and values subject
|
||||
to the usual arithmetic conversions and of floating constants
|
||||
are evaluated to a format whose range and precision may be greater
|
||||
than required by the type. The use of evaluation formats is
|
||||
characterized by the implementation-defined value of FLT_EVAL_METHOD:
|
||||
.TP 7
|
||||
-1
|
||||
Indeterminable.
|
||||
.TP 7
|
||||
\ 0
|
||||
Evaluate all operations and constants just to the range and precision
|
||||
of the type.
|
||||
.TP 7
|
||||
\ 1
|
||||
Evaluate operations and constants of type \fBfloat\fP and \fBdouble\fP
|
||||
to the range and precision of the \fBdouble\fP type;
|
||||
evaluate \fBlong double\fP operations and constants to the range and
|
||||
precision of the \fBlong double\fP type.
|
||||
.TP 7
|
||||
\ 2
|
||||
Evaluate all operations and constants to the range and precision of
|
||||
the \fBlong double\fP type.
|
||||
.sp
|
||||
.LP
|
||||
All other negative values for FLT_EVAL_METHOD characterize implementation-defined
|
||||
behavior.
|
||||
.LP
|
||||
The values given in the following list shall be defined as constant
|
||||
expressions with implementation-defined values that are
|
||||
greater or equal in magnitude (absolute value) to those shown, with
|
||||
the same sign.
|
||||
.IP " *" 3
|
||||
Radix of exponent representation, \fIb\fP.
|
||||
.TP 7
|
||||
FLT_RADIX
|
||||
.RS
|
||||
2
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Number of base-FLT_RADIX digits in the floating-point significand,
|
||||
\fIp\fP.
|
||||
.TP 7
|
||||
FLT_MANT_DIG
|
||||
.TP 7
|
||||
DBL_MANT_DIG
|
||||
.TP 7
|
||||
LDBL_MANT_DIG
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Number of decimal digits, \fIn\fP, such that any floating-point number
|
||||
in the widest supported floating type with \fIp\fP_max
|
||||
radix \fIb\fP digits can be rounded to a floating-point number with
|
||||
\fIn\fP decimal digits and back again without change to the
|
||||
value.
|
||||
.LP
|
||||
.TP 7
|
||||
DECIMAL_DIG
|
||||
.RS
|
||||
10
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Number of decimal digits, \fIq\fP, such that any floating-point number
|
||||
with \fIq\fP decimal digits can be rounded into a
|
||||
floating-point number with \fIp\fP radix \fIb\fP digits and back again
|
||||
without change to the \fIq\fP decimal digits.
|
||||
.LP
|
||||
.TP 7
|
||||
FLT_DIG
|
||||
.RS
|
||||
6
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_DIG
|
||||
.RS
|
||||
10
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_DIG
|
||||
.RS
|
||||
10
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Minimum negative integer such that FLT_RADIX raised to that power
|
||||
minus 1 is a normalized floating-point number, \fIe\fP_min.
|
||||
.TP 7
|
||||
FLT_MIN_EXP
|
||||
.TP 7
|
||||
DBL_MIN_EXP
|
||||
.TP 7
|
||||
LDBL_MIN_EXP
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Minimum negative integer such that 10 raised to that power is in the
|
||||
range of normalized floating-point numbers.
|
||||
.LP
|
||||
.TP 7
|
||||
FLT_MIN_10_EXP
|
||||
.RS
|
||||
-37
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_MIN_10_EXP
|
||||
.RS
|
||||
-37
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_MIN_10_EXP
|
||||
.RS
|
||||
-37
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum integer such that FLT_RADIX raised to that power minus 1 is
|
||||
a representable finite floating-point number, \fIe\fP_max.
|
||||
.TP 7
|
||||
FLT_MAX_EXP
|
||||
.TP 7
|
||||
DBL_MAX_EXP
|
||||
.TP 7
|
||||
LDBL_MAX_EXP
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum integer such that 10 raised to that power is in the range
|
||||
of representable finite floating-point numbers.
|
||||
.LP
|
||||
.TP 7
|
||||
FLT_MAX_10_EXP
|
||||
.RS
|
||||
+37
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_MAX_10_EXP
|
||||
.RS
|
||||
+37
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_MAX_10_EXP
|
||||
.RS
|
||||
+37
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.LP
|
||||
The values given in the following list shall be defined as constant
|
||||
expressions with implementation-defined values that are
|
||||
greater than or equal to those shown:
|
||||
.IP " *" 3
|
||||
Maximum representable finite floating-point number.
|
||||
.LP
|
||||
.TP 7
|
||||
FLT_MAX
|
||||
.RS
|
||||
1E+37
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_MAX
|
||||
.RS
|
||||
1E+37
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_MAX
|
||||
.RS
|
||||
1E+37
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.LP
|
||||
The values given in the following list shall be defined as constant
|
||||
expressions with implementation-defined (positive) values
|
||||
that are less than or equal to those shown:
|
||||
.IP " *" 3
|
||||
The difference between 1 and the least value greater than 1 that is
|
||||
representable in the given floating-point type, \fIb\fP**1-\fIp\fP.
|
||||
.TP 7
|
||||
FLT_EPSILON
|
||||
.RS
|
||||
1E-5
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_EPSILON
|
||||
.RS
|
||||
1E-9
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_EPSILON
|
||||
.RS
|
||||
1E-9
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Minimum normalized positive floating-point number, \fIb\fP**\fIe\fP_min.
|
||||
.TP 7
|
||||
FLT_MIN
|
||||
.RS
|
||||
1E-37
|
||||
.RE
|
||||
.TP 7
|
||||
DBL_MIN
|
||||
.RS
|
||||
1E-37
|
||||
.RE
|
||||
.TP 7
|
||||
LDBL_MIN
|
||||
.RS
|
||||
1E-37
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<complex.h>\fP , \fI<math.h>\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,129 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<fmtmsg.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <fmtmsg.h>
|
||||
.SH NAME
|
||||
fmtmsg.h \- message display structures
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <fmtmsg.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<fmtmsg.h>\fP header shall define the following macros, which
|
||||
expand to constant integer expressions:
|
||||
.TP 7
|
||||
MM_HARD
|
||||
Source of the condition is hardware.
|
||||
.TP 7
|
||||
MM_SOFT
|
||||
Source of the condition is software.
|
||||
.TP 7
|
||||
MM_FIRM
|
||||
Source of the condition is firmware.
|
||||
.TP 7
|
||||
MM_APPL
|
||||
Condition detected by application.
|
||||
.TP 7
|
||||
MM_UTIL
|
||||
Condition detected by utility.
|
||||
.TP 7
|
||||
MM_OPSYS
|
||||
Condition detected by operating system.
|
||||
.TP 7
|
||||
MM_RECOVER
|
||||
Recoverable error.
|
||||
.TP 7
|
||||
MM_NRECOV
|
||||
Non-recoverable error.
|
||||
.TP 7
|
||||
MM_HALT
|
||||
Error causing application to halt.
|
||||
.TP 7
|
||||
MM_ERROR
|
||||
Application has encountered a non-fatal fault.
|
||||
.TP 7
|
||||
MM_WARNING
|
||||
Application has detected unusual non-error condition.
|
||||
.TP 7
|
||||
MM_INFO
|
||||
Informative message.
|
||||
.TP 7
|
||||
MM_NOSEV
|
||||
No severity level provided for the message.
|
||||
.TP 7
|
||||
MM_PRINT
|
||||
Display message on standard error.
|
||||
.TP 7
|
||||
MM_CONSOLE
|
||||
Display message on system console.
|
||||
.sp
|
||||
.LP
|
||||
The table below indicates the null values and identifiers for \fIfmtmsg\fP()
|
||||
arguments.
|
||||
The \fI<fmtmsg.h>\fP header shall define the macros in the \fBIdentifier\fP
|
||||
column, which expand to constant expressions
|
||||
that expand to expressions of the type indicated in the \fBType\fP
|
||||
column:
|
||||
.TS C
|
||||
center; l l l l.
|
||||
\fBArgument\fP \fBType\fP \fBNull-Value\fP \fBIdentifier\fP
|
||||
\fIlabel\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLLBL
|
||||
\fIseverity\fP \fBint\fP 0 MM_NULLSEV
|
||||
\fIclass\fP \fBlong\fP \fB0L\fP MM_NULLMC
|
||||
\fItext\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLTXT
|
||||
\fIaction\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLACT
|
||||
\fItag\fP \fBchar *\fP (\fBchar\fP*)0 MM_NULLTAG
|
||||
.TE
|
||||
.LP
|
||||
The \fI<fmtmsg.h>\fP header shall also define the following macros
|
||||
for use as return values for \fIfmtmsg\fP():
|
||||
.TP 7
|
||||
MM_OK
|
||||
The function succeeded.
|
||||
.TP 7
|
||||
MM_NOTOK
|
||||
The function failed completely.
|
||||
.TP 7
|
||||
MM_NOMSG
|
||||
The function was unable to generate a message on standard error, but
|
||||
otherwise succeeded.
|
||||
.TP 7
|
||||
MM_NOCON
|
||||
The function was unable to generate a console message, but otherwise
|
||||
succeeded.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint fmtmsg(long, const char *, int,
|
||||
const char *, const char *, const char *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfmtmsg\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,65 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<fnmatch.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <fnmatch.h>
|
||||
.SH NAME
|
||||
fnmatch.h \- filename-matching types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <fnmatch.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<fnmatch.h>\fP header shall define the following constants:
|
||||
.TP 7
|
||||
FNM_NOMATCH
|
||||
The string does not match the specified pattern.
|
||||
.TP 7
|
||||
FNM_PATHNAME
|
||||
Slash in \fIstring\fP only matches slash in \fIpattern\fP.
|
||||
.TP 7
|
||||
FNM_PERIOD
|
||||
Leading period in \fIstring\fP must be exactly matched by period in
|
||||
\fIpattern\fP.
|
||||
.TP 7
|
||||
FNM_NOESCAPE
|
||||
Disable backslash escaping.
|
||||
.TP 7
|
||||
FNM_NOSYS
|
||||
Reserved.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint fnmatch(const char *, const char *, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIfnmatch\fP(),
|
||||
the
|
||||
Shell and Utilities volume of IEEE\ Std\ 1003.1-2001
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,111 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<ftw.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <ftw.h>
|
||||
.SH NAME
|
||||
ftw.h \- file tree traversal
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <ftw.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<ftw.h>\fP header shall define the \fBFTW\fP structure that
|
||||
includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint base
|
||||
int level
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<ftw.h>\fP header shall define macros for use as values of
|
||||
the third argument to the application-supplied function
|
||||
that is passed as the second argument to \fIftw\fP() and \fInftw\fP():
|
||||
.TP 7
|
||||
FTW_F
|
||||
File.
|
||||
.TP 7
|
||||
FTW_D
|
||||
Directory.
|
||||
.TP 7
|
||||
FTW_DNR
|
||||
Directory without read permission.
|
||||
.TP 7
|
||||
FTW_DP
|
||||
Directory with subdirectories visited.
|
||||
.TP 7
|
||||
FTW_NS
|
||||
Unknown type; \fIstat\fP() failed.
|
||||
.TP 7
|
||||
FTW_SL
|
||||
Symbolic link.
|
||||
.TP 7
|
||||
FTW_SLN
|
||||
Symbolic link that names a nonexistent file.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<ftw.h>\fP header shall define macros for use as values of
|
||||
the fourth argument to \fInftw\fP():
|
||||
.TP 7
|
||||
FTW_PHYS
|
||||
Physical walk, does not follow symbolic links. Otherwise, \fInftw\fP()
|
||||
follows links but
|
||||
does not walk down any path that crosses itself.
|
||||
.TP 7
|
||||
FTW_MOUNT
|
||||
The walk does not cross a mount point.
|
||||
.TP 7
|
||||
FTW_DEPTH
|
||||
All subdirectories are visited before the directory itself.
|
||||
.TP 7
|
||||
FTW_CHDIR
|
||||
The walk changes to each directory before reading it.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint ftw(const char *, int (*)(const char *, const struct stat *,
|
||||
int), int);
|
||||
int nftw(const char *, int (*)(const char *, const struct stat *,
|
||||
int, struct FTW*), int, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<ftw.h>\fP header shall define the \fBstat\fP structure and
|
||||
the symbolic names for \fIst_mode\fP and the file
|
||||
type test macros as described in \fI<sys/stat.h>\fP .
|
||||
.LP
|
||||
Inclusion of the \fI<ftw.h>\fP header may also make visible all symbols
|
||||
from \fI<sys/stat.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/stat.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIftw\fP(), \fInftw\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,111 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<glob.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <glob.h>
|
||||
.SH NAME
|
||||
glob.h \- pathname pattern-matching types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <glob.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<glob.h>\fP header shall define the structures and symbolic
|
||||
constants used by the \fIglob\fP() function.
|
||||
.LP
|
||||
The structure type \fBglob_t\fP shall contain at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsize_t gl_pathc\fP Count of paths matched by \fIpattern.\fP \fB
|
||||
char **gl_pathv\fP Pointer to a list of matched pathnames. \fB
|
||||
size_t gl_offs \fP Slots to reserve at the beginning of \fIgl_pathv.\fP \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following constants shall be provided as values for the \fIflags\fP
|
||||
argument:
|
||||
.TP 7
|
||||
GLOB_APPEND
|
||||
Append generated pathnames to those previously obtained.
|
||||
.TP 7
|
||||
GLOB_DOOFFS
|
||||
Specify how many null pointers to add to the beginning of \fIgl_pathv\fP.
|
||||
.TP 7
|
||||
GLOB_ERR
|
||||
Cause \fIglob\fP() to return on error.
|
||||
.TP 7
|
||||
GLOB_MARK
|
||||
Each pathname that is a directory that matches \fIpattern\fP has a
|
||||
slash appended.
|
||||
.TP 7
|
||||
GLOB_NOCHECK
|
||||
If \fIpattern\fP does not match any pathname, then return a list consisting
|
||||
of only \fIpattern\fP.
|
||||
.TP 7
|
||||
GLOB_NOESCAPE
|
||||
Disable backslash escaping.
|
||||
.TP 7
|
||||
GLOB_NOSORT
|
||||
Do not sort the pathnames returned.
|
||||
.sp
|
||||
.LP
|
||||
The following constants shall be defined as error return values:
|
||||
.TP 7
|
||||
GLOB_ABORTED
|
||||
The scan was stopped because GLOB_ERR was set or (*\fIerrfunc\fP)()
|
||||
returned non-zero.
|
||||
.TP 7
|
||||
GLOB_NOMATCH
|
||||
The pattern does not match any existing pathname, and GLOB_NOCHECK
|
||||
was not set in \fIflags\fP.
|
||||
.TP 7
|
||||
GLOB_NOSPACE
|
||||
An attempt to allocate memory failed.
|
||||
.TP 7
|
||||
GLOB_NOSYS
|
||||
Reserved.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint glob(const char *restrict, int, int (*)(const char *, int),
|
||||
glob_t *restrict);
|
||||
void globfree (glob_t *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The implementation may define additional macros or constants using
|
||||
names beginning with GLOB_.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIglob\fP(),
|
||||
the Shell
|
||||
and Utilities volume of IEEE\ Std\ 1003.1-2001
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,74 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<grp.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <grp.h>
|
||||
.SH NAME
|
||||
grp.h \- group structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <grp.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<grp.h>\fP header shall declare the structure \fBgroup\fP which
|
||||
shall include the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *gr_name\fP The name of the group. \fB
|
||||
gid_t gr_gid \fP Numerical group ID. \fB
|
||||
char **gr_mem \fP Pointer to a null-terminated array of character \fB
|
||||
\fP pointers to member names. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBgid_t\fP type shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct group *getgrgid(gid_t);
|
||||
struct group *getgrnam(const char *);
|
||||
|
||||
int getgrgid_r(gid_t, struct group *, char *,
|
||||
size_t, struct group **);
|
||||
int getgrnam_r(const char *, struct group *, char *,
|
||||
size_t , struct group **);
|
||||
|
||||
|
||||
struct group *getgrent(void);
|
||||
void endgrent(void);
|
||||
void setgrent(void);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIendgrent\fP(), \fIgetgrgid\fP(), \fIgetgrnam\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,54 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<iconv.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <iconv.h>
|
||||
.SH NAME
|
||||
iconv.h \- codeset conversion facility
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <iconv.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<iconv.h>\fP header shall define the following type:
|
||||
.TP 7
|
||||
\fBiconv_t\fP
|
||||
Identifies the conversion from one codeset to another.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBiconv_t iconv_open(const char *, const char *);
|
||||
size_t iconv(iconv_t, char **restrict, size_t *restrict,
|
||||
char **restrict, size_t *restrict);
|
||||
int iconv_close(iconv_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIiconv\fP(),
|
||||
\fIiconv_close\fP(), \fIiconv_open\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,69 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<net/if.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <net/if.h>
|
||||
.SH NAME
|
||||
net/if.h \- sockets local interfaces
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <net/if.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<net/if.h>\fP header shall define the \fBif_nameindex\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned if_index \fP Numeric index of the interface. \fB
|
||||
char *if_name \fP Null-terminated name of the interface. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<net/if.h>\fP header shall define the following macro for the
|
||||
length of a buffer containing an interface name
|
||||
(including the terminating NULL character):
|
||||
.TP 7
|
||||
IF_NAMESIZE
|
||||
Interface name length.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned if_nametoindex(const char *);
|
||||
char *if_indextoname(unsigned, char *);
|
||||
struct if_nameindex *if_nameindex(void);
|
||||
void if_freenameindex(struct if_nameindex *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIif_freenameindex\fP(),
|
||||
\fIif_indextoname\fP(), \fIif_nameindex\fP(), \fIif_nametoindex\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,315 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<netinet/in.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <netinet/in.h>
|
||||
.SH NAME
|
||||
netinet/in.h \- Internet address family
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <netinet/in.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following types:
|
||||
.TP 7
|
||||
\fBin_port_t\fP
|
||||
Equivalent to the type \fBuint16_t\fP as defined in \fI<inttypes.h>\fP
|
||||
\&.
|
||||
.TP 7
|
||||
\fBin_addr_t\fP
|
||||
Equivalent to the type \fBuint32_t\fP as defined in \fI<inttypes.h>\fP
|
||||
\&.
|
||||
.sp
|
||||
.LP
|
||||
The \fBsa_family_t\fP type shall be defined as described in \fI<sys/socket.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fBuint8_t\fP and \fBuint32_t\fP type shall be defined as described
|
||||
in \fI<inttypes.h>\fP. Inclusion of the \fI<netinet/in.h>\fP header
|
||||
may also make
|
||||
visible all symbols from \fI<inttypes.h>\fP and \fI<sys/socket.h>\fP.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the \fBin_addr\fP structure
|
||||
that includes at least the following
|
||||
member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBin_addr_t s_addr
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the \fBsockaddr_in\fP
|
||||
structure that includes at least the following
|
||||
members (all in network byte order):
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsa_family_t sin_family \fP AF_INET. \fB
|
||||
in_port_t sin_port \fP Port number. \fB
|
||||
struct in_addr sin_addr \fP IP address. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsockaddr_in\fP structure is used to store addresses for the
|
||||
Internet address family. Values of this type shall be cast
|
||||
by applications to \fBstruct sockaddr\fP for use with socket functions.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the \fBin6_addr\fP structure
|
||||
that contains at least the following
|
||||
member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBuint8_t s6_addr[16]
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
This array is used to contain a 128-bit IPv6 address, stored in network
|
||||
byte order.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the \fBsockaddr_in6\fP
|
||||
structure that includes at least the following
|
||||
members (all in network byte order):
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsa_family_t sin6_family \fP AF_INET6. \fB
|
||||
in_port_t sin6_port \fP Port number. \fB
|
||||
uint32_t sin6_flowinfo \fP IPv6 traffic class and flow information. \fB
|
||||
struct in6_addr sin6_addr \fP IPv6 address. \fB
|
||||
uint32_t sin6_scope_id \fP Set of interfaces for a scope. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsockaddr_in6\fP structure shall be set to zero by an application
|
||||
prior to using it, since implementations are free to
|
||||
have additional, implementation-defined fields in \fBsockaddr_in6\fP.
|
||||
.LP
|
||||
The \fIsin6_scope_id\fP field is a 32-bit integer that identifies
|
||||
a set of interfaces as appropriate for the scope of the
|
||||
address carried in the \fIsin6_addr\fP field. For a link scope \fIsin6_addr\fP,
|
||||
the application shall ensure that
|
||||
\fIsin6_scope_id\fP is a link index. For a site scope \fIsin6_addr\fP,
|
||||
the application shall ensure that \fIsin6_scope_id\fP is
|
||||
a site index. The mapping of \fIsin6_scope_id\fP to an interface or
|
||||
set of interfaces is implementation-defined.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall declare the following external
|
||||
variable:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBconst struct in6_addr in6addr_any
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
This variable is initialized by the system to contain the wildcard
|
||||
IPv6 address. The \fI<netinet/in.h>\fP header also
|
||||
defines the IN6ADDR_ANY_INIT macro. This macro must be constant at
|
||||
compile time and can be used to initialize a variable of type
|
||||
\fBstruct in6_addr\fP to the IPv6 wildcard address.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall declare the following external
|
||||
variable:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBconst struct in6_addr in6addr_loopback
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
This variable is initialized by the system to contain the loopback
|
||||
IPv6 address. The \fI<netinet/in.h>\fP header also
|
||||
defines the IN6ADDR_LOOPBACK_INIT macro. This macro must be constant
|
||||
at compile time and can be used to initialize a variable of
|
||||
type \fBstruct in6_addr\fP to the IPv6 loopback address.
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the \fBipv6_mreq\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct in6_addr ipv6mr_multiaddr \fP IPv6 multicast address. \fB
|
||||
unsigned ipv6mr_interface \fP Interface index. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macros
|
||||
for use as values of the \fIlevel\fP argument of \fIgetsockopt\fP()
|
||||
and \fIsetsockopt\fP():
|
||||
.TP 7
|
||||
IPPROTO_IP
|
||||
Internet protocol.
|
||||
.TP 7
|
||||
IPPROTO_IPV6
|
||||
Internet Protocol Version 6.
|
||||
.TP 7
|
||||
IPPROTO_ICMP
|
||||
Control message protocol.
|
||||
.TP 7
|
||||
IPPROTO_RAW
|
||||
Raw IP Packets Protocol.
|
||||
.TP 7
|
||||
IPPROTO_TCP
|
||||
Transmission control protocol.
|
||||
.TP 7
|
||||
IPPROTO_UDP
|
||||
User datagram protocol.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macros
|
||||
for use as destination addresses for \fIconnect\fP(), \fIsendmsg\fP(),
|
||||
and \fIsendto\fP():
|
||||
.TP 7
|
||||
INADDR_ANY
|
||||
IPv4 local host address.
|
||||
.TP 7
|
||||
INADDR_BROADCAST
|
||||
IPv4 broadcast address.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macro to
|
||||
help applications declare buffers of the proper size
|
||||
to store IPv4 addresses in string form:
|
||||
.TP 7
|
||||
INET_ADDRSTRLEN
|
||||
16. Length of the string form for IP.
|
||||
.sp
|
||||
.LP
|
||||
The \fIhtonl\fP(), \fIhtons\fP(), \fIntohl\fP(), and \fIntohs\fP()
|
||||
functions shall be
|
||||
available as defined in \fI<arpa/inet.h>\fP . Inclusion of the
|
||||
\fI<netinet/in.h>\fP header may also make visible all symbols from
|
||||
\fI<arpa/inet.h>\fP .
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macro to
|
||||
help applications declare buffers of the proper
|
||||
size to store IPv6 addresses in string form:
|
||||
.TP 7
|
||||
INET6_ADDRSTRLEN
|
||||
46. Length of the string form for IPv6.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macros,
|
||||
with distinct integer values, for use in the
|
||||
\fIoption_name\fP argument in the \fIgetsockopt\fP() or \fIsetsockopt\fP()
|
||||
functions at protocol level IPPROTO_IPV6:
|
||||
.TP 7
|
||||
IPV6_JOIN_GROUP
|
||||
Join a multicast group.
|
||||
.TP 7
|
||||
IPV6_LEAVE_GROUP
|
||||
Quit a multicast group.
|
||||
.TP 7
|
||||
IPV6_MULTICAST_HOPS
|
||||
.sp
|
||||
Multicast hop limit.
|
||||
.TP 7
|
||||
IPV6_MULTICAST_IF
|
||||
Interface to use for outgoing multicast packets.
|
||||
.TP 7
|
||||
IPV6_MULTICAST_LOOP
|
||||
.sp
|
||||
Multicast packets are delivered back to the local application.
|
||||
.TP 7
|
||||
IPV6_UNICAST_HOPS
|
||||
Unicast hop limit.
|
||||
.TP 7
|
||||
IPV6_V6ONLY
|
||||
Restrict AF_INET6 socket to IPv6 communications only.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<netinet/in.h>\fP header shall define the following macros
|
||||
that test for special IPv6 addresses. Each macro is of
|
||||
type \fBint\fP and takes a single argument of type \fBconst struct
|
||||
in6_addr *\fP:
|
||||
.TP 7
|
||||
IN6_IS_ADDR_UNSPECIFIED
|
||||
.sp
|
||||
Unspecified address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_LOOPBACK
|
||||
.sp
|
||||
Loopback address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MULTICAST
|
||||
.sp
|
||||
Multicast address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_LINKLOCAL
|
||||
.sp
|
||||
Unicast link-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_SITELOCAL
|
||||
.sp
|
||||
Unicast site-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_V4MAPPED
|
||||
.sp
|
||||
IPv4 mapped address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_V4COMPAT
|
||||
.sp
|
||||
IPv4-compatible address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MC_NODELOCAL
|
||||
.sp
|
||||
Multicast node-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MC_LINKLOCAL
|
||||
.sp
|
||||
Multicast link-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MC_SITELOCAL
|
||||
.sp
|
||||
Multicast site-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MC_ORGLOCAL
|
||||
.sp
|
||||
Multicast organization-local address.
|
||||
.TP 7
|
||||
IN6_IS_ADDR_MC_GLOBAL
|
||||
.sp
|
||||
Multicast global address.
|
||||
.sp
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fIHost and Network Byte Orders\fP , \fI<arpa/inet.h>\fP , \fI<inttypes.h>\fP
|
||||
, \fI<sys/socket.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIconnect\fP(), \fIgetsockopt\fP(), \fIhtonl\fP(), \fIhtons\fP(),
|
||||
\fIntohl\fP(), \fIntohs\fP(), \fIsendmsg\fP(), \fIsendto\fP(), \fIsetsockopt\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,79 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<arpa/inet.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <arpa/inet.h>
|
||||
.SH NAME
|
||||
arpa/inet.h \- definitions for internet operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <arpa/inet.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fBin_port_t\fP and \fBin_addr_t\fP types shall be defined as
|
||||
described in \fI<netinet/in.h>\fP .
|
||||
.LP
|
||||
The \fBin_addr\fP structure shall be defined as described in \fI<netinet/in.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The INET_ADDRSTRLEN \ and INET6_ADDRSTRLEN macros
|
||||
shall be defined as described in \fI<netinet/in.h>\fP .
|
||||
.LP
|
||||
The following shall either be declared as functions, defined as macros,
|
||||
or both. If functions are declared, function prototypes
|
||||
shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBuint32_t htonl(uint32_t);
|
||||
uint16_t htons(uint16_t);
|
||||
uint32_t ntohl(uint32_t);
|
||||
uint16_t ntohs(uint16_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBuint32_t\fP and \fBuint16_t\fP types shall be defined as described
|
||||
in \fI<inttypes.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBin_addr_t inet_addr(const char *);
|
||||
char *inet_ntoa(struct in_addr);
|
||||
const char *inet_ntop(int, const void *restrict, char *restrict,
|
||||
socklen_t);
|
||||
int inet_pton(int, const char *restrict, void *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<arpa/inet.h>\fP header may also make visible
|
||||
all symbols from \fI<netinet/in.h>\fP and \fI<inttypes.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<netinet/in.h>\fP , \fI<inttypes.h>\fP , the System Interfaces
|
||||
volume of IEEE\ Std\ 1003.1-2001, \fIhtonl\fP(), \fIinet_addr\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,163 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<inttypes.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <inttypes.h>
|
||||
.SH NAME
|
||||
inttypes.h \- fixed size integer types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <inttypes.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<inttypes.h>\fP header shall include the \fI<stdint.h>\fP
|
||||
header.
|
||||
.LP
|
||||
The \fI<inttypes.h>\fP header shall include a definition of at least
|
||||
the following type:
|
||||
.TP 7
|
||||
\fBimaxdiv_t\fP
|
||||
Structure type that is the type of the value returned by the \fIimaxdiv\fP()
|
||||
function.
|
||||
.sp
|
||||
.LP
|
||||
The following macros shall be defined. Each expands to a character
|
||||
string literal containing a conversion specifier, possibly
|
||||
modified by a length modifier, suitable for use within the \fIformat\fP
|
||||
argument of a formatted input/output function when
|
||||
converting the corresponding integer type. These macros have the general
|
||||
form of PRI (character string literals for the \fIfprintf\fP() and
|
||||
\fIfwprintf\fP() family of
|
||||
functions) or SCN (character string literals for the \fIfscanf\fP()
|
||||
and \fIfwscanf\fP() family of functions), followed by the conversion
|
||||
specifier, followed by a name
|
||||
corresponding to a similar type name in \fI<stdint.h>\fP. In these
|
||||
names, \fIN\fP
|
||||
represents the width of the type as described in \fI<stdint.h>\fP.
|
||||
For example,
|
||||
\fIPRIdFAST32\fP can be used in a format string to print the value
|
||||
of an integer of type \fBint_fast32_t\fP.
|
||||
.LP
|
||||
The \fIfprintf\fP() macros for signed integers are:
|
||||
.TS C
|
||||
center; l2 l2 l2 l2 l.
|
||||
PRId\fIN\fP PRIdLEAST\fIN\fP PRIdFAST\fIN\fP PRIdMAX PRIdPTR
|
||||
PRIi\fIN\fP PRIiLEAST\fIN\fP PRIiFAST\fIN\fP PRIiMAX PRIiPTR
|
||||
.TE
|
||||
.LP
|
||||
The \fIfprintf\fP() macros for unsigned integers are:
|
||||
.TS C
|
||||
center; l2 l2 l2 l2 l.
|
||||
PRIo\fIN\fP PRIoLEAST\fIN\fP PRIoFAST\fIN\fP PRIoMAX PRIoPTR
|
||||
PRIu\fIN\fP PRIuLEAST\fIN\fP PRIuFAST\fIN\fP PRIuMAX PRIuPTR
|
||||
PRIx\fIN\fP PRIxLEAST\fIN\fP PRIxFAST\fIN\fP PRIxMAX PRIxPTR
|
||||
PRIX\fIN\fP PRIXLEAST\fIN\fP PRIXFAST\fIN\fP PRIXMAX PRIXPTR
|
||||
.TE
|
||||
.LP
|
||||
The \fIfscanf\fP() macros for signed integers are:
|
||||
.TS C
|
||||
center; l2 l2 l2 l2 l.
|
||||
SCNd\fIN\fP SCNdLEAST\fIN\fP SCNdFAST\fIN\fP SCNdMAX SCNdPTR
|
||||
SCNi\fIN\fP SCNiLEAST\fIN\fP SCNiFAST\fIN\fP SCNiMAX SCNiPTR
|
||||
.TE
|
||||
.LP
|
||||
The \fIfscanf\fP() macros for unsigned integers are:
|
||||
.TS C
|
||||
center; l2 l2 l2 l2 l.
|
||||
SCNo\fIN\fP SCNoLEAST\fIN\fP SCNoFAST\fIN\fP SCNoMAX SCNoPTR
|
||||
SCNu\fIN\fP SCNuLEAST\fIN\fP SCNuFAST\fIN\fP SCNuMAX SCNuPTR
|
||||
SCNx\fIN\fP SCNxLEAST\fIN\fP SCNxFAST\fIN\fP SCNxMAX SCNxPTR
|
||||
.TE
|
||||
.LP
|
||||
For each type that the implementation provides in \fI<stdint.h>\fP,
|
||||
the
|
||||
corresponding \fIfprintf\fP() and \fIfwprintf\fP() macros shall be
|
||||
defined and the corresponding \fIfscanf\fP() and \fIfwscanf\fP() macros
|
||||
shall be defined
|
||||
unless the implementation does not have a suitable modifier for the
|
||||
type.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBintmax_t imaxabs(intmax_t);
|
||||
imaxdiv_t imaxdiv(intmax_t, intmax_t);
|
||||
intmax_t strtoimax(const char *restrict, char **restrict, int);
|
||||
uintmax_t strtoumax(const char *restrict, char **restrict, int);
|
||||
intmax_t wcstoimax(const wchar_t *restrict, wchar_t **restrict, int);
|
||||
uintmax_t wcstoumax(const wchar_t *restrict, wchar_t **restrict, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.SH EXAMPLES
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#include <inttypes.h>
|
||||
#include <wchar.h>
|
||||
int main(void)
|
||||
{
|
||||
uintmax_t i = UINTMAX_MAX; // This type always exists.
|
||||
wprintf(L"The largest integer value is %020"
|
||||
PRIxMAX "\\n", i);
|
||||
return 0;
|
||||
}
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The purpose of \fI<inttypes.h>\fP is to provide a set of integer types
|
||||
whose definitions are consistent across machines
|
||||
and independent of operating systems and other implementation idiosyncrasies.
|
||||
It defines, via \fBtypedef\fP, integer types of
|
||||
various sizes. Implementations are free to \fBtypedef\fP them as ISO\ C
|
||||
standard integer types or extensions that they
|
||||
support. Consistent use of this header will greatly increase the portability
|
||||
of applications across platforms.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
The ISO/IEC\ 9899:1990 standard specified that the language should
|
||||
support four signed and unsigned integer data types-
|
||||
\fBchar\fP, \fBshort\fP, \fBint\fP, and \fBlong\fP- but placed very
|
||||
little requirement on their size other than that \fBint\fP
|
||||
and \fBshort\fP be at least 16 bits and \fBlong\fP be at least as
|
||||
long as \fBint\fP and not smaller than 32 bits. For 16-bit
|
||||
systems, most implementations assigned 8, 16, 16, and 32 bits to \fBchar\fP,
|
||||
\fBshort\fP, \fBint\fP, and \fBlong\fP,
|
||||
respectively. For 32-bit systems, the common practice has been to
|
||||
assign 8, 16, 32, and 32 bits to these types. This difference in
|
||||
\fBint\fP size can create some problems for users who migrate from
|
||||
one system to another which assigns different sizes to integer
|
||||
types, because the ISO\ C standard integer promotion rule can produce
|
||||
silent changes unexpectedly. The need for defining an
|
||||
extended integer type increased with the introduction of 64-bit systems.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
Macro names beginning with PRI or SCN followed by any lowercase letter
|
||||
or \fB'X'\fP may be added to the macros defined in the
|
||||
\fI<inttypes.h>\fP header.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIimaxdiv\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_ipc.h.0p
|
|
@ -0,0 +1,71 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<iso646.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <iso646.h>
|
||||
.SH NAME
|
||||
iso646.h \- alternative spellings
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <iso646.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<iso646.h>\fP header shall define the following eleven macros
|
||||
(on the left) that expand to the corresponding
|
||||
tokens (on the right):
|
||||
.TP 7
|
||||
and
|
||||
\fB&&\fP
|
||||
.TP 7
|
||||
and_eq
|
||||
\fB&=\fP
|
||||
.TP 7
|
||||
bitand
|
||||
\fB&\fP
|
||||
.TP 7
|
||||
bitor
|
||||
\fB|\fP
|
||||
.TP 7
|
||||
compl
|
||||
\fB~\fP
|
||||
.TP 7
|
||||
not
|
||||
\fB!\fP
|
||||
.TP 7
|
||||
not_eq
|
||||
\fB!=\fP
|
||||
.TP 7
|
||||
or
|
||||
\fB||\fP
|
||||
.TP 7
|
||||
or_eq
|
||||
\fB|=\fP
|
||||
.TP 7
|
||||
xor
|
||||
\fB^\fP
|
||||
.TP 7
|
||||
xor_eq
|
||||
\fB^=\fP
|
||||
.sp
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
None.
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,360 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<langinfo.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <langinfo.h>
|
||||
.SH NAME
|
||||
langinfo.h \- language information constants
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <langinfo.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<langinfo.h>\fP header contains the constants used to identify
|
||||
items of \fIlanginfo\fP data (see \fInl_langinfo\fP()). The type of
|
||||
the constant, \fBnl_item\fP, shall be defined as described
|
||||
in \fI<nl_types.h>\fP .
|
||||
.LP
|
||||
The following constants shall be defined. The entries under \fBCategory\fP
|
||||
indicate in which \fIsetlocale\fP() category each item is defined.
|
||||
.TS C
|
||||
center; l1 l1 lw(40).
|
||||
\fBConstant\fP \fBCategory\fP T{
|
||||
.na
|
||||
\fBMeaning\fP
|
||||
.ad
|
||||
T}
|
||||
CODESET \fILC_CTYPE\fP T{
|
||||
.na
|
||||
Codeset name.
|
||||
.ad
|
||||
T}
|
||||
D_T_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
String for formatting date and time.
|
||||
.ad
|
||||
T}
|
||||
D_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
Date format string.
|
||||
.ad
|
||||
T}
|
||||
T_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
Time format string.
|
||||
.ad
|
||||
T}
|
||||
T_FMT_AMPM \fILC_TIME\fP T{
|
||||
.na
|
||||
a.m. or p.m. time format string.
|
||||
.ad
|
||||
T}
|
||||
AM_STR \fILC_TIME\fP T{
|
||||
.na
|
||||
Ante-meridiem affix.
|
||||
.ad
|
||||
T}
|
||||
PM_STR \fILC_TIME\fP T{
|
||||
.na
|
||||
Post-meridiem affix.
|
||||
.ad
|
||||
T}
|
||||
DAY_1 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the first day of the week (for example, Sunday).
|
||||
.ad
|
||||
T}
|
||||
DAY_2 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the second day of the week (for example, Monday).
|
||||
.ad
|
||||
T}
|
||||
DAY_3 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the third day of the week (for example, Tuesday).
|
||||
.ad
|
||||
T}
|
||||
DAY_4 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the fourth day of the week
|
||||
.ad
|
||||
T}
|
||||
\fI\ \fP T{
|
||||
.na
|
||||
(for example, Wednesday).
|
||||
.ad
|
||||
T}
|
||||
DAY_5 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the fifth day of the week (for example, Thursday).
|
||||
.ad
|
||||
T}
|
||||
DAY_6 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the sixth day of the week (for example, Friday).
|
||||
.ad
|
||||
T}
|
||||
DAY_7 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the seventh day of the week
|
||||
.ad
|
||||
T}
|
||||
\fI\ \fP T{
|
||||
.na
|
||||
(for example, Saturday).
|
||||
.ad
|
||||
T}
|
||||
ABDAY_1 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the first day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_2 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the second day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_3 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the third day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_4 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the fourth day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_5 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the fifth day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_6 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the sixth day of the week.
|
||||
.ad
|
||||
T}
|
||||
ABDAY_7 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the seventh day of the week.
|
||||
.ad
|
||||
T}
|
||||
MON_1 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the first month of the year.
|
||||
.ad
|
||||
T}
|
||||
MON_2 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the second month.
|
||||
.ad
|
||||
T}
|
||||
MON_3 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the third month.
|
||||
.ad
|
||||
T}
|
||||
MON_4 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the fourth month.
|
||||
.ad
|
||||
T}
|
||||
MON_5 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the fifth month.
|
||||
.ad
|
||||
T}
|
||||
MON_6 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the sixth month.
|
||||
.ad
|
||||
T}
|
||||
MON_7 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the seventh month.
|
||||
.ad
|
||||
T}
|
||||
MON_8 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the eighth month.
|
||||
.ad
|
||||
T}
|
||||
MON_9 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the ninth month.
|
||||
.ad
|
||||
T}
|
||||
MON_10 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the tenth month.
|
||||
.ad
|
||||
T}
|
||||
MON_11 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the eleventh month.
|
||||
.ad
|
||||
T}
|
||||
MON_12 \fILC_TIME\fP T{
|
||||
.na
|
||||
Name of the twelfth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_1 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the first month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_2 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the second month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_3 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the third month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_4 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the fourth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_5 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the fifth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_6 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the sixth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_7 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the seventh month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_8 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the eighth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_9 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the ninth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_10 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the tenth month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_11 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the eleventh month.
|
||||
.ad
|
||||
T}
|
||||
ABMON_12 \fILC_TIME\fP T{
|
||||
.na
|
||||
Abbreviated name of the twelfth month.
|
||||
.ad
|
||||
T}
|
||||
ERA \fILC_TIME\fP T{
|
||||
.na
|
||||
Era description segments.
|
||||
.ad
|
||||
T}
|
||||
ERA_D_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
Era date format string.
|
||||
.ad
|
||||
T}
|
||||
ERA_D_T_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
Era date and time format string.
|
||||
.ad
|
||||
T}
|
||||
ERA_T_FMT \fILC_TIME\fP T{
|
||||
.na
|
||||
Era time format string.
|
||||
.ad
|
||||
T}
|
||||
ALT_DIGITS \fILC_TIME\fP T{
|
||||
.na
|
||||
Alternative symbols for digits.
|
||||
.ad
|
||||
T}
|
||||
RADIXCHAR \fILC_NUMERIC\fP T{
|
||||
.na
|
||||
Radix character.
|
||||
.ad
|
||||
T}
|
||||
THOUSEP \fILC_NUMERIC\fP T{
|
||||
.na
|
||||
Separator for thousands.
|
||||
.ad
|
||||
T}
|
||||
YESEXPR \fILC_MESSAGES\fP T{
|
||||
.na
|
||||
Affirmative response expression.
|
||||
.ad
|
||||
T}
|
||||
NOEXPR \fILC_MESSAGES\fP T{
|
||||
.na
|
||||
Negative response expression.
|
||||
.ad
|
||||
T}
|
||||
CRNCYSTR \fILC_MONETARY\fP T{
|
||||
.na
|
||||
Local currency symbol, preceded by \fB'-'\fP if the symbol should appear before the value, \fB'+'\fP if the symbol should appear after the value, or \fB'.'\fP if the symbol should replace the radix character. If the local currency symbol is the empty string, implementations may return the empty string ( \fB""\fP ).
|
||||
.ad
|
||||
T}
|
||||
.TE
|
||||
.LP
|
||||
If the locale's values for \fBp_cs_precedes\fP and \fBn_cs_precedes\fP
|
||||
do not match, the value of \fInl_langinfo\fP(CRNCYSTR)
|
||||
is unspecified.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *nl_langinfo(nl_item);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<langinfo.h>\fP header may also make visible all
|
||||
symbols from \fI<nl_types.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
Wherever possible, users are advised to use functions compatible with
|
||||
those in the ISO\ C standard to access items of
|
||||
\fIlanginfo\fP data. In particular, the \fIstrftime\fP() function
|
||||
should be used to
|
||||
access date and time information defined in category \fILC_TIME .\fP
|
||||
The \fIlocaleconv\fP() function should be used to access information
|
||||
corresponding to RADIXCHAR,
|
||||
THOUSEP, and CRNCYSTR.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fInl_langinfo\fP(),
|
||||
\fIlocaleconv\fP(), \fIstrfmon\fP(), \fIstrftime\fP(), \fILocale\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,46 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<libgen.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <libgen.h>
|
||||
.SH NAME
|
||||
libgen.h \- definitions for pattern matching functions
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <libgen.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *basename(char *);
|
||||
char *dirname(char *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIbasename\fP(),
|
||||
\fIdirname\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,117 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<locale.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <locale.h>
|
||||
.SH NAME
|
||||
locale.h \- category macros
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <locale.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Any conflict between the
|
||||
requirements described here and the ISO\ C standard is unintentional.
|
||||
This volume of IEEE\ Std\ 1003.1-2001 defers to
|
||||
the ISO\ C standard.
|
||||
.LP
|
||||
The \fI<locale.h>\fP header shall provide a definition for \fBlconv\fP
|
||||
structure, which shall include at least the
|
||||
following members. (See the definitions of \fILC_MONETARY\fP in \fILC_MONETARY\fP
|
||||
and
|
||||
\fILC_NUMERIC\fP .)
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *currency_symbol
|
||||
char *decimal_point
|
||||
char frac_digits
|
||||
char *grouping
|
||||
char *int_curr_symbol
|
||||
char int_frac_digits
|
||||
char int_n_cs_precedes
|
||||
char int_n_sep_by_space
|
||||
char int_n_sign_posn
|
||||
char int_p_cs_precedes
|
||||
char int_p_sep_by_space
|
||||
char int_p_sign_posn
|
||||
char *mon_decimal_point
|
||||
char *mon_grouping
|
||||
char *mon_thousands_sep
|
||||
char *negative_sign
|
||||
char n_cs_precedes
|
||||
char n_sep_by_space
|
||||
char n_sign_posn
|
||||
char *positive_sign
|
||||
char p_cs_precedes
|
||||
char p_sep_by_space
|
||||
char p_sign_posn
|
||||
char *thousands_sep
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<locale.h>\fP header shall define NULL (as defined in \fI<stddef.h>\fP
|
||||
) and at
|
||||
least the following as macros:
|
||||
.LP
|
||||
.sp
|
||||
\fILC_ALL\fP
|
||||
.br
|
||||
\fILC_COLLATE\fP
|
||||
.br
|
||||
\fILC_CTYPE\fP
|
||||
.br
|
||||
.sp
|
||||
\fILC_MESSAGES\fP
|
||||
.br
|
||||
.sp
|
||||
\fILC_MONETARY\fP
|
||||
.br
|
||||
\fILC_NUMERIC\fP
|
||||
.br
|
||||
\fILC_TIME\fP
|
||||
.br
|
||||
.LP
|
||||
which shall expand to distinct integer constant expressions, for use
|
||||
as the first argument to the \fIsetlocale\fP() function.
|
||||
.LP
|
||||
Additional macro definitions, beginning with the characters \fILC_\fP
|
||||
and an uppercase letter, may also be given here.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct lconv *localeconv (void);
|
||||
char *setlocale(int, const char *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIlocaleconv\fP(),
|
||||
\fIsetlocale\fP(), \fIEnvironment Variables\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,487 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<math.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <math.h>
|
||||
.SH NAME
|
||||
math.h \- mathematical declarations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <math.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<math.h>\fP header shall include definitions for at least the
|
||||
following types:
|
||||
.TP 7
|
||||
\fBfloat_t\fP
|
||||
A real-floating type at least as wide as \fBfloat\fP.
|
||||
.TP 7
|
||||
\fBdouble_t\fP
|
||||
A real-floating type at least as wide as \fBdouble\fP, and at least
|
||||
as wide as \fBfloat_t\fP.
|
||||
.sp
|
||||
.LP
|
||||
If FLT_EVAL_METHOD equals 0, \fBfloat_t\fP and \fBdouble_t\fP shall
|
||||
be \fBfloat\fP and \fBdouble\fP, respectively; if
|
||||
FLT_EVAL_METHOD equals 1, they shall both be \fBdouble\fP; if FLT_EVAL_METHOD
|
||||
equals 2, they shall both be \fBlong double\fP; for
|
||||
other values of FLT_EVAL_METHOD, they are otherwise implementation-defined.
|
||||
.LP
|
||||
The \fI<math.h>\fP header shall define the following macros, where
|
||||
real-floating indicates that the argument shall be an
|
||||
expression of real-floating type:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint fpclassify(real-floating x);
|
||||
int isfinite(real-floating x);
|
||||
int isinf(real-floating x);
|
||||
int isnan(real-floating x);
|
||||
int isnormal(real-floating x);
|
||||
int signbit(real-floating x);
|
||||
int isgreater(real-floating x, real-floating y);
|
||||
int isgreaterequal(real-floating x, real-floating y);
|
||||
int isless(real-floating x, real-floating y);
|
||||
int islessequal(real-floating x, real-floating y);
|
||||
int islessgreater(real-floating x, real-floating y);
|
||||
int isunordered(real-floating x, real-floating y);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<math.h>\fP header shall provide for the following constants.
|
||||
The values are of type \fBdouble\fP and are
|
||||
accurate within the precision of the \fBdouble\fP type.
|
||||
.TP 7
|
||||
M_E
|
||||
Value of \fIe\fP
|
||||
.TP 7
|
||||
M_LOG2E
|
||||
Value of log_2\fIe\fP
|
||||
.TP 7
|
||||
M_LOG10E
|
||||
Value of log_10\fIe\fP
|
||||
.TP 7
|
||||
M_LN2
|
||||
Value of log_e2
|
||||
.TP 7
|
||||
M_LN10
|
||||
Value of log_e10
|
||||
.TP 7
|
||||
M_PI
|
||||
Value of pi
|
||||
.TP 7
|
||||
M_PI_2
|
||||
Value of pi/2
|
||||
.TP 7
|
||||
M_PI_4
|
||||
Value of pi/4
|
||||
.TP 7
|
||||
M_1_PI
|
||||
Value of 1/pi
|
||||
.TP 7
|
||||
M_2_PI
|
||||
Value of 2/pi
|
||||
.TP 7
|
||||
M_2_SQRTPI
|
||||
Value of 2/ sqrt pi
|
||||
.TP 7
|
||||
M_SQRT2
|
||||
Value of sqrt 2
|
||||
.TP 7
|
||||
M_SQRT1_2
|
||||
Value of 1/sqrt 2
|
||||
.sp
|
||||
.LP
|
||||
The header shall define the following symbolic constants:
|
||||
.TP 7
|
||||
MAXFLOAT
|
||||
Value of maximum non-infinite single-precision floating-point number.
|
||||
.TP 7
|
||||
HUGE_VAL
|
||||
A positive \fBdouble\fP expression, not necessarily representable
|
||||
as a \fBfloat\fP. Used as an error value returned by the
|
||||
mathematics library. HUGE_VAL evaluates to +infinity on systems supporting
|
||||
IEEE\ Std\ 754-1985.
|
||||
.TP 7
|
||||
HUGE_VALF
|
||||
A positive \fBfloat\fP constant expression. Used as an error value
|
||||
returned by the mathematics library. HUGE_VALF evaluates to
|
||||
+infinity on systems supporting IEEE\ Std\ 754-1985.
|
||||
.TP 7
|
||||
HUGE_VALL
|
||||
A positive \fBlong double\fP constant expression. Used as an error
|
||||
value returned by the mathematics library. HUGE_VALL
|
||||
evaluates to +infinity on systems supporting IEEE\ Std\ 754-1985.
|
||||
.TP 7
|
||||
INFINITY
|
||||
A constant expression of type \fBfloat\fP representing positive or
|
||||
unsigned infinity, if available; else a positive constant
|
||||
of type \fBfloat\fP that overflows at translation time.
|
||||
.TP 7
|
||||
NAN
|
||||
A constant expression of type \fBfloat\fP representing a quiet NaN.
|
||||
This symbolic constant is only defined if the
|
||||
implementation supports quiet NaNs for the \fBfloat\fP type.
|
||||
.sp
|
||||
.LP
|
||||
The following macros shall be defined for number classification. They
|
||||
represent the mutually-exclusive kinds of floating-point
|
||||
values. They expand to integer constant expressions with distinct
|
||||
values. Additional implementation-defined floating-point
|
||||
classifications, with macro definitions beginning with FP_ and an
|
||||
uppercase letter, may also be specified by the
|
||||
implementation.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FP_INFINITE
|
||||
FP_NAN
|
||||
FP_NORMAL
|
||||
FP_SUBNORMAL
|
||||
FP_ZERO
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following optional macros indicate whether the \fIfma\fP() family
|
||||
of functions are fast
|
||||
compared with direct code:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FP_FAST_FMA
|
||||
FP_FAST_FMAF
|
||||
FP_FAST_FMAL
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The FP_FAST_FMA macro shall be defined to indicate that the \fIfma\fP()
|
||||
function generally
|
||||
executes about as fast as, or faster than, a multiply and an add of
|
||||
\fBdouble\fP operands. The other macros have the equivalent
|
||||
meaning for the \fBfloat\fP and \fBlong double\fP versions.
|
||||
.LP
|
||||
The following macros shall expand to integer constant expressions
|
||||
whose values are returned by \fIilogb\fP( \fIx\fP) if
|
||||
\fIx\fP is zero or NaN, respectively. The value of FP_ILOGB0 shall
|
||||
be either {INT_MIN} or - {INT_MAX}. The value of FP_ILOGBNAN
|
||||
shall be either {INT_MAX} or {INT_MIN}.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
FP_ILOGB0
|
||||
FP_ILOGBNAN
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following macros shall expand to the integer constants 1 and 2,
|
||||
respectively;
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
MATH_ERRNO
|
||||
MATH_ERREXCEPT
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following macro shall expand to an expression that has type \fBint\fP
|
||||
and the value MATH_ERRNO, MATH_ERREXCEPT, or the
|
||||
bitwise-inclusive OR of both:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
math_errhandling
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The value of math_errhandling is constant for the duration of the
|
||||
program. It is unspecified whether math_errhandling is a macro
|
||||
or an identifier with external linkage. If a macro definition is suppressed
|
||||
or a program defines an identifier with the name
|
||||
math_errhandling , the behavior is undefined. If the expression (math_errhandling
|
||||
& MATH_ERREXCEPT) can be non-zero, the
|
||||
implementation shall define the macros FE_DIVBYZERO, FE_INVALID, and
|
||||
FE_OVERFLOW in \fI<fenv.h>\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBdouble acos(double);
|
||||
float acosf(float);
|
||||
double acosh(double);
|
||||
float acoshf(float);
|
||||
long double acoshl(long double);
|
||||
long double acosl(long double);
|
||||
double asin(double);
|
||||
float asinf(float);
|
||||
double asinh(double);
|
||||
float asinhf(float);
|
||||
long double asinhl(long double);
|
||||
long double asinl(long double);
|
||||
double atan(double);
|
||||
double atan2(double, double);
|
||||
float atan2f(float, float);
|
||||
long double atan2l(long double, long double);
|
||||
float atanf(float);
|
||||
double atanh(double);
|
||||
float atanhf(float);
|
||||
long double atanhl(long double);
|
||||
long double atanl(long double);
|
||||
double cbrt(double);
|
||||
float cbrtf(float);
|
||||
long double cbrtl(long double);
|
||||
double ceil(double);
|
||||
float ceilf(float);
|
||||
long double ceill(long double);
|
||||
double copysign(double, double);
|
||||
float copysignf(float, float);
|
||||
long double copysignl(long double, long double);
|
||||
double cos(double);
|
||||
float cosf(float);
|
||||
double cosh(double);
|
||||
float coshf(float);
|
||||
long double coshl(long double);
|
||||
long double cosl(long double);
|
||||
double erf(double);
|
||||
double erfc(double);
|
||||
float erfcf(float);
|
||||
long double erfcl(long double);
|
||||
float erff(float);
|
||||
long double erfl(long double);
|
||||
double exp(double);
|
||||
double exp2(double);
|
||||
float exp2f(float);
|
||||
long double exp2l(long double);
|
||||
float expf(float);
|
||||
long double expl(long double);
|
||||
double expm1(double);
|
||||
float expm1f(float);
|
||||
long double expm1l(long double);
|
||||
double fabs(double);
|
||||
float fabsf(float);
|
||||
long double fabsl(long double);
|
||||
double fdim(double, double);
|
||||
float fdimf(float, float);
|
||||
long double fdiml(long double, long double);
|
||||
double floor(double);
|
||||
float floorf(float);
|
||||
long double floorl(long double);
|
||||
double fma(double, double, double);
|
||||
float fmaf(float, float, float);
|
||||
long double fmal(long double, long double, long double);
|
||||
double fmax(double, double);
|
||||
float fmaxf(float, float);
|
||||
long double fmaxl(long double, long double);
|
||||
double fmin(double, double);
|
||||
float fminf(float, float);
|
||||
long double fminl(long double, long double);
|
||||
double fmod(double, double);
|
||||
float fmodf(float, float);
|
||||
long double fmodl(long double, long double);
|
||||
double frexp(double, int *);
|
||||
float frexpf(float value, int *);
|
||||
long double frexpl(long double value, int *);
|
||||
double hypot(double, double);
|
||||
float hypotf(float, float);
|
||||
long double hypotl(long double, long double);
|
||||
int ilogb(double);
|
||||
int ilogbf(float);
|
||||
int ilogbl(long double);
|
||||
|
||||
double j0(double);
|
||||
double j1(double);
|
||||
double jn(int, double);
|
||||
|
||||
double ldexp(double, int);
|
||||
float ldexpf(float, int);
|
||||
long double ldexpl(long double, int);
|
||||
double lgamma(double);
|
||||
float lgammaf(float);
|
||||
long double lgammal(long double);
|
||||
long long llrint(double);
|
||||
long long llrintf(float);
|
||||
long long llrintl(long double);
|
||||
long long llround(double);
|
||||
long long llroundf(float);
|
||||
long long llroundl(long double);
|
||||
double log(double);
|
||||
double log10(double);
|
||||
float log10f(float);
|
||||
long double log10l(long double);
|
||||
double log1p(double);
|
||||
float log1pf(float);
|
||||
long double log1pl(long double);
|
||||
double log2(double);
|
||||
float log2f(float);
|
||||
long double log2l(long double);
|
||||
double logb(double);
|
||||
float logbf(float);
|
||||
long double logbl(long double);
|
||||
float logf(float);
|
||||
long double logl(long double);
|
||||
long lrint(double);
|
||||
long lrintf(float);
|
||||
long lrintl(long double);
|
||||
long lround(double);
|
||||
long lroundf(float);
|
||||
long lroundl(long double);
|
||||
double modf(double, double *);
|
||||
float modff(float, float *);
|
||||
long double modfl(long double, long double *);
|
||||
double nan(const char *);
|
||||
float nanf(const char *);
|
||||
long double nanl(const char *);
|
||||
double nearbyint(double);
|
||||
float nearbyintf(float);
|
||||
long double nearbyintl(long double);
|
||||
double nextafter(double, double);
|
||||
float nextafterf(float, float);
|
||||
long double nextafterl(long double, long double);
|
||||
double nexttoward(double, long double);
|
||||
float nexttowardf(float, long double);
|
||||
long double nexttowardl(long double, long double);
|
||||
double pow(double, double);
|
||||
float powf(float, float);
|
||||
long double powl(long double, long double);
|
||||
double remainder(double, double);
|
||||
float remainderf(float, float);
|
||||
long double remainderl(long double, long double);
|
||||
double remquo(double, double, int *);
|
||||
float remquof(float, float, int *);
|
||||
long double remquol(long double, long double, int *);
|
||||
double rint(double);
|
||||
float rintf(float);
|
||||
long double rintl(long double);
|
||||
double round(double);
|
||||
float roundf(float);
|
||||
long double roundl(long double);
|
||||
|
||||
double scalb(double, double);
|
||||
|
||||
double scalbln(double, long);
|
||||
float scalblnf(float, long);
|
||||
long double scalblnl(long double, long);
|
||||
double scalbn(double, int);
|
||||
float scalbnf(float, int);
|
||||
long double scalbnl(long double, int);
|
||||
double sin(double);
|
||||
float sinf(float);
|
||||
double sinh(double);
|
||||
float sinhf(float);
|
||||
long double sinhl(long double);
|
||||
long double sinl(long double);
|
||||
double sqrt(double);
|
||||
float sqrtf(float);
|
||||
long double sqrtl(long double);
|
||||
double tan(double);
|
||||
float tanf(float);
|
||||
double tanh(double);
|
||||
float tanhf(float);
|
||||
long double tanhl(long double);
|
||||
long double tanl(long double);
|
||||
double tgamma(double);
|
||||
float tgammaf(float);
|
||||
long double tgammal(long double);
|
||||
double trunc(double);
|
||||
float truncf(float);
|
||||
long double truncl(long double);
|
||||
|
||||
double y0(double);
|
||||
double y1(double);
|
||||
double yn(int, double);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following external variable shall be defined:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
extern int signgam;
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The behavior of each of the functions defined in \fI<math.h>\fP is
|
||||
specified in the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001 for all representable values of its input arguments,
|
||||
except where stated otherwise. Each function
|
||||
shall execute as if it were a single operation without generating
|
||||
any externally visible exceptional conditions.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The FP_CONTRACT pragma can be used to allow (if the state is on) or
|
||||
disallow (if the state is off) the implementation to
|
||||
contract expressions. Each pragma can occur either outside external
|
||||
declarations or preceding all explicit declarations and
|
||||
statements inside a compound statement. When outside external declarations,
|
||||
the pragma takes effect from its occurrence until
|
||||
another FP_CONTRACT pragma is encountered, or until the end of the
|
||||
translation unit. When inside a compound statement, the pragma
|
||||
takes effect from its occurrence until another FP_CONTRACT pragma
|
||||
is encountered (including within a nested compound statement), or
|
||||
until the end of the compound statement; at the end of a compound
|
||||
statement the state for the pragma is restored to its condition
|
||||
just before the compound statement. If this pragma is used in any
|
||||
other context, the behavior is undefined. The default state (on
|
||||
or off) for the pragma is implementation-defined.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
Before the ISO/IEC\ 9899:1999 standard, the math library was defined
|
||||
only for the floating type \fBdouble\fP. All the names
|
||||
formed by appending \fB'f'\fP or \fB'l'\fP to a name in \fI<math.h>\fP
|
||||
were reserved to allow for the definition of
|
||||
\fBfloat\fP and \fBlong double\fP libraries; and the ISO/IEC\ 9899:1999
|
||||
standard provides for all three versions of math
|
||||
functions.
|
||||
.LP
|
||||
The functions \fIecvt\fP(), \fIfcvt\fP(), and \fIgcvt\fP() have been
|
||||
dropped from the ISO\ C standard since their capability is available
|
||||
through \fIsprintf\fP(). These are provided on XSI-conformant systems
|
||||
supporting the
|
||||
Legacy Option Group.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<stddef.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIacos\fP(), \fIacosh\fP(),
|
||||
\fIasin\fP(), \fIatan\fP(), \fIatan2\fP(), \fIcbrt\fP(), \fIceil\fP(),
|
||||
\fIcos\fP(), \fIcosh\fP(), \fIerf\fP(), \fIexp\fP(), \fIexpm1\fP(),
|
||||
\fIfabs\fP(), \fIfloor\fP(), \fIfmod\fP(), \fIfrexp\fP(), \fIhypot\fP(),
|
||||
\fIilogb\fP(), \fIisnan\fP(), \fIj0\fP(), \fIldexp\fP(), \fIlgamma\fP(),
|
||||
\fIlog\fP(), \fIlog10\fP(), \fIlog1p\fP(), \fIlogb\fP(), \fImodf\fP(),
|
||||
\fInextafter\fP(), \fIpow\fP(), \fIremainder\fP(), \fIrint\fP(), \fIscalb\fP(),
|
||||
\fIsin\fP(), \fIsinh\fP(), \fIsqrt\fP(), \fItan\fP(), \fItanh\fP(),
|
||||
\fIy0\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_mman.h.0p
|
|
@ -0,0 +1,53 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<monetary.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <monetary.h>
|
||||
.SH NAME
|
||||
monetary.h \- monetary types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <monetary.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<monetary.h>\fP header shall define the following types:
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
As described in \fI<stddef.h>\fP .
|
||||
.TP 7
|
||||
\fBssize_t\fP
|
||||
As described in \fI<sys/types.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBssize_t strfmon(char *restrict, size_t, const char *restrict, ...);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIstrfmon\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,88 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<mqueue.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <mqueue.h>
|
||||
.SH NAME
|
||||
mqueue.h \- message queues (\fBREALTIME\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <mqueue.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<mqueue.h>\fP header shall define the \fBmqd_t\fP type, which
|
||||
is used for message queue descriptors. This is not
|
||||
an array type.
|
||||
.LP
|
||||
The \fI<mqueue.h>\fP header shall define the \fBsigevent\fP structure
|
||||
(as described in \fI<signal.h>\fP ) and the \fBmq_attr\fP structure,
|
||||
which is used in getting and setting the attributes
|
||||
of a message queue. Attributes are initially set when the message
|
||||
queue is created. An \fBmq_attr\fP structure shall have at least
|
||||
the following fields:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBlong mq_flags \fP Message queue flags. \fB
|
||||
long mq_maxmsg \fP Maximum number of messages. \fB
|
||||
long mq_msgsize \fP Maximum message size. \fB
|
||||
long mq_curmsgs \fP Number of messages currently queued. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint mq_close(mqd_t);
|
||||
int mq_getattr(mqd_t, struct mq_attr *);
|
||||
int mq_notify(mqd_t, const struct sigevent *);
|
||||
mqd_t mq_open(const char *, int, ...);
|
||||
ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
|
||||
int mq_send(mqd_t, const char *, size_t, unsigned );
|
||||
int mq_setattr(mqd_t, const struct mq_attr *restrict,
|
||||
struct mq_attr *restrict);
|
||||
|
||||
ssize_t mq_timedreceive(mqd_t, char *restrict, size_t,
|
||||
unsigned *restrict, const struct timespec *restrict);
|
||||
int mq_timedsend(mqd_t, const char *, size_t, unsigned ,
|
||||
const struct timespec *);
|
||||
|
||||
int mq_unlink(const char *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<mqueue.h>\fP header may make visible symbols
|
||||
defined in the headers \fI<fcntl.h>\fP, \fI<signal.h>\fP, \fI<sys/types.h>\fP,
|
||||
and \fI<time.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<fcntl.h>\fP , \fI<signal.h>\fP , \fI<sys/types.h>\fP , \fI<time.h>\fP
|
||||
, the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, \fImq_close\fP(), \fImq_getattr\fP(), \fImq_notify\fP(),
|
||||
\fImq_open\fP(), \fImq_receive\fP(), \fImq_send\fP(), \fImq_setattr\fP(),
|
||||
\fImq_timedreceive\fP(), \fImq_timedsend\fP(), \fImq_unlink\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_msg.h.0p
|
|
@ -0,0 +1,84 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<ndbm.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <ndbm.h>
|
||||
.SH NAME
|
||||
ndbm.h \- definitions for ndbm database operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <ndbm.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<ndbm.h>\fP header shall define the \fBdatum\fP type as a structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid *dptr \fP A pointer to the application's data. \fB
|
||||
size_t dsize\fP The size of the object pointed to by \fIdptr.\fP \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsize_t\fP type shall be defined as described in \fI<stddef.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fI<ndbm.h>\fP header shall define the \fBDBM\fP type.
|
||||
.LP
|
||||
The following constants shall be defined as possible values for the
|
||||
\fIstore_mode\fP argument to \fIdbm_store\fP():
|
||||
.TP 7
|
||||
DBM_INSERT
|
||||
Insertion of new entries only.
|
||||
.TP 7
|
||||
DBM_REPLACE
|
||||
Allow replacing existing entries.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint dbm_clearerr(DBM *);
|
||||
void dbm_close(DBM *);
|
||||
int dbm_delete(DBM *, datum);
|
||||
int dbm_error(DBM *);
|
||||
datum dbm_fetch(DBM *, datum);
|
||||
datum dbm_firstkey(DBM *);
|
||||
datum dbm_nextkey(DBM *);
|
||||
DBM *dbm_open(const char *, int, mode_t);
|
||||
int dbm_store(DBM *, datum, datum, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBmode_t\fP type shall be defined through \fBtypedef\fP as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<stddef.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIdbm_clearerr\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,298 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<netdb.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <netdb.h>
|
||||
.SH NAME
|
||||
netdb.h \- definitions for network database operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <netdb.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header may define the \fBin_port_t\fP type and
|
||||
the \fBin_addr_t\fP type as described in \fI<netinet/in.h>\fP .
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the \fBhostent\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *h_name \fP Official name of the host. \fB
|
||||
char **h_aliases \fP A pointer to an array of pointers to \fB
|
||||
\fP alternative host names, terminated by a \fB
|
||||
\fP null pointer. \fB
|
||||
int h_addrtype \fP Address type. \fB
|
||||
int h_length \fP The length, in bytes, of the address. \fB
|
||||
char **h_addr_list \fP A pointer to an array of pointers to network \fB
|
||||
\fP addresses (in network byte order) for the host, \fB
|
||||
\fP terminated by a null pointer. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the \fBnetent\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *n_name \fP Official, fully-qualified (including the \fB
|
||||
\fP domain) name of the host. \fB
|
||||
char **n_aliases \fP A pointer to an array of pointers to \fB
|
||||
\fP alternative network names, terminated by a \fB
|
||||
\fP null pointer. \fB
|
||||
int n_addrtype \fP The address type of the network. \fB
|
||||
uint32_t n_net \fP The network number, in host byte order. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBuint32_t\fP type shall be defined as described in \fI<inttypes.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the \fBprotoent\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *p_name \fP Official name of the protocol. \fB
|
||||
char **p_aliases \fP A pointer to an array of pointers to \fB
|
||||
\fP alternative protocol names, terminated by \fB
|
||||
\fP a null pointer. \fB
|
||||
int p_proto \fP The protocol number. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the \fBservent\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *s_name \fP Official name of the service. \fB
|
||||
char **s_aliases \fP A pointer to an array of pointers to \fB
|
||||
\fP alternative service names, terminated by \fB
|
||||
\fP a null pointer. \fB
|
||||
int s_port \fP The port number at which the service \fB
|
||||
\fP resides, in network byte order. \fB
|
||||
char *s_proto \fP The name of the protocol to use when \fB
|
||||
\fP contacting the service. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the IPPORT_RESERVED macro
|
||||
with the value of the highest reserved Internet port
|
||||
number.
|
||||
.LP
|
||||
When the \fI<netdb.h>\fP header is included, \fIh_errno\fP shall be
|
||||
available as a modifiable lvalue of type \fBint\fP. It
|
||||
is unspecified whether \fIh_errno\fP is a macro or an identifier declared
|
||||
with external linkage.
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the following macros for use
|
||||
as error values for \fIgethostbyaddr\fP() and \fIgethostbyname\fP():
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
HOST_NOT_FOUND
|
||||
NO_DATA
|
||||
NO_RECOVERY
|
||||
TRY_AGAIN
|
||||
.fi
|
||||
.RE
|
||||
.SS Address Information Structure
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the \fBaddrinfo\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint ai_flags \fP Input flags. \fB
|
||||
int ai_family \fP Address family of socket. \fB
|
||||
int ai_socktype \fP Socket type. \fB
|
||||
int ai_protocol \fP Protocol of socket. \fB
|
||||
socklen_t ai_addrlen \fP Length of socket address. \fB
|
||||
struct sockaddr *ai_addr \fP Socket address of socket. \fB
|
||||
char *ai_canonname \fP Canonical name of service location. \fB
|
||||
struct addrinfo *ai_next \fP Pointer to next in list. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the following macros that
|
||||
evaluate to bitwise-distinct integer constants for use
|
||||
in the \fIflags\fP field of the \fBaddrinfo\fP structure:
|
||||
.TP 7
|
||||
AI_PASSIVE
|
||||
Socket address is intended for \fIbind\fP().
|
||||
.TP 7
|
||||
AI_CANONNAME
|
||||
.sp
|
||||
Request for canonical name.
|
||||
.TP 7
|
||||
AI_NUMERICHOST
|
||||
.sp
|
||||
Return numeric host address as name.
|
||||
.TP 7
|
||||
AI_NUMERICSERV
|
||||
.sp
|
||||
Inhibit service name resolution.
|
||||
.TP 7
|
||||
AI_V4MAPPED
|
||||
If no IPv6 addresses are found, query for IPv4 addresses and return
|
||||
them to the caller as IPv4-mapped IPv6 addresses.
|
||||
.TP 7
|
||||
AI_ALL
|
||||
Query for both IPv4 and IPv6 addresses.
|
||||
.TP 7
|
||||
AI_ADDRCONFIG
|
||||
.sp
|
||||
Query for IPv4 addresses only when an IPv4 address is configured;
|
||||
query for IPv6 addresses only when an IPv6 address is
|
||||
configured.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the following macros that
|
||||
evaluate to bitwise-distinct integer constants for use
|
||||
in the \fIflags\fP argument to \fIgetnameinfo\fP():
|
||||
.TP 7
|
||||
NI_NOFQDN
|
||||
Only the nodename portion of the FQDN is returned for local hosts.
|
||||
.TP 7
|
||||
NI_NUMERICHOST
|
||||
.sp
|
||||
The numeric form of the node's address is returned instead of its
|
||||
name.
|
||||
.TP 7
|
||||
NI_NAMEREQD
|
||||
Return an error if the node's name cannot be located in the database.
|
||||
.TP 7
|
||||
NI_NUMERICSERV
|
||||
.sp
|
||||
The numeric form of the service address is returned instead of its
|
||||
name.
|
||||
.TP 7
|
||||
NI_NUMERICSCOPE
|
||||
.sp
|
||||
For IPv6 addresses, the numeric form of the scope identifier is returned
|
||||
instead of its name.
|
||||
.TP 7
|
||||
NI_DGRAM
|
||||
Indicates that the service is a datagram service (SOCK_DGRAM).
|
||||
.sp
|
||||
.SS Address Information Errors
|
||||
.LP
|
||||
The \fI<netdb.h>\fP header shall define the following macros for use
|
||||
as error values for \fIgetaddrinfo\fP() and \fIgetnameinfo\fP():
|
||||
.TP 7
|
||||
EAI_AGAIN
|
||||
The name could not be resolved at this time. Future attempts may succeed.
|
||||
.TP 7
|
||||
EAI_BADFLAGS
|
||||
The flags had an invalid value.
|
||||
.TP 7
|
||||
EAI_FAIL
|
||||
A non-recoverable error occurred.
|
||||
.TP 7
|
||||
EAI_FAMILY
|
||||
The address family was not recognized or the address length was invalid
|
||||
for the specified family.
|
||||
.TP 7
|
||||
EAI_MEMORY
|
||||
There was a memory allocation failure.
|
||||
.TP 7
|
||||
EAI_NONAME
|
||||
The name does not resolve for the supplied parameters.
|
||||
.LP
|
||||
NI_NAMEREQD is set and the host's name cannot be located, or both
|
||||
\fInodename\fP and \fIservname\fP were null.
|
||||
.TP 7
|
||||
EAI_SERVICE
|
||||
The service passed was not recognized for the specified socket type.
|
||||
.TP 7
|
||||
EAI_SOCKTYPE
|
||||
The intended socket type was not recognized.
|
||||
.TP 7
|
||||
EAI_SYSTEM
|
||||
A system error occurred. The error code can be found in \fIerrno\fP.
|
||||
.TP 7
|
||||
EAI_OVERFLOW
|
||||
.sp
|
||||
An argument buffer overflowed.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid endhostent(void);
|
||||
void endnetent(void);
|
||||
void endprotoent(void);
|
||||
void endservent(void);
|
||||
void freeaddrinfo(struct addrinfo *);
|
||||
const char *gai_strerror(int);
|
||||
int getaddrinfo(const char *restrict, const char *restrict,
|
||||
const struct addrinfo *restrict,
|
||||
struct addrinfo **restrict);
|
||||
struct hostent *gethostbyaddr(const void *, socklen_t, int);
|
||||
struct hostent *gethostbyname(const char *);
|
||||
struct hostent *gethostent(void);
|
||||
int getnameinfo(const struct sockaddr *restrict, socklen_t,
|
||||
char *restrict, socklen_t, char *restrict,
|
||||
socklen_t, int);
|
||||
struct netent *getnetbyaddr(uint32_t, int);
|
||||
struct netent *getnetbyname(const char *);
|
||||
struct netent *getnetent(void);
|
||||
struct protoent *getprotobyname(const char *);
|
||||
struct protoent *getprotobynumber(int);
|
||||
struct protoent *getprotoent(void);
|
||||
struct servent *getservbyname(const char *, const char *);
|
||||
struct servent *getservbyport(int, const char *);
|
||||
struct servent *getservent(void);
|
||||
void sethostent(int);
|
||||
void setnetent(int);
|
||||
void setprotoent(int);
|
||||
void setservent(int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The type \fBsocklen_t\fP shall be defined through \fBtypedef\fP as
|
||||
described in \fI<sys/socket.h>\fP.
|
||||
.LP
|
||||
Inclusion of the \fI<netdb.h>\fP header may also make visible all
|
||||
symbols from \fI<netinet/in.h>\fP, \fI<sys/socket.h>\fP, and \fI<inttypes.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<netinet/in.h>\fP , \fI<inttypes.h>\fP , \fI<sys/socket.h>\fP ,
|
||||
the System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIbind\fP(),
|
||||
\fIendhostent\fP(), \fIendnetent\fP(), \fIendprotoent\fP(), \fIendservent\fP(),
|
||||
\fIgetaddrinfo\fP(), \fIgetnameinfo\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,82 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<nl_types.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <nl_types.h>
|
||||
.SH NAME
|
||||
nl_types.h \- data types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <nl_types.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<nl_types.h>\fP header shall contain definitions of at least
|
||||
the following types:
|
||||
.TP 7
|
||||
\fBnl_catd\fP
|
||||
Used by the message catalog functions \fIcatopen\fP(), \fIcatgets\fP(),
|
||||
and \fIcatclose\fP() to identify a
|
||||
catalog descriptor.
|
||||
.TP 7
|
||||
\fBnl_item\fP
|
||||
Used by \fInl_langinfo\fP() to identify items of \fIlanginfo\fP data.
|
||||
Values of
|
||||
objects of type \fBnl_item\fP are defined in \fI<langinfo.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
The \fI<nl_types.h>\fP header shall contain definitions of at least
|
||||
the following constants:
|
||||
.TP 7
|
||||
NL_SETD
|
||||
Used by \fIgencat\fP when no $\fIset\fP directive is specified in
|
||||
a message text source file; see the Internationalization
|
||||
Guide. This constant can be passed as the value of \fIset_id\fP on
|
||||
subsequent calls to \fIcatgets\fP() (that is, to retrieve messages
|
||||
from the default message set). The value of NL_SETD
|
||||
is implementation-defined.
|
||||
.TP 7
|
||||
NL_CAT_LOCALE
|
||||
Value that must be passed as the \fIoflag\fP argument to \fIcatopen\fP()
|
||||
to ensure
|
||||
that message catalog selection depends on the \fILC_MESSAGES\fP locale
|
||||
category, rather than directly on the \fILANG\fP
|
||||
environment variable.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint catclose(nl_catd);
|
||||
char *catgets(nl_catd, int, int, const char *);
|
||||
nl_catd catopen(const char *, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<langinfo.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIcatclose\fP(), \fIcatgets\fP(), \fIcatopen\fP(), \fInl_langinfo\fP(),
|
||||
the Shell and
|
||||
Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgencat\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,110 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<poll.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <poll.h>
|
||||
.SH NAME
|
||||
poll.h \- definitions for the poll() function
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <poll.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<poll.h>\fP header shall define the \fBpollfd\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint fd \fP The following descriptor being polled. \fB
|
||||
short events \fP The input event flags (see below). \fB
|
||||
short revents \fP The output event flags (see below). \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<poll.h>\fP header shall define the following type through
|
||||
\fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBnfds_t\fP
|
||||
An unsigned integer type used for the number of file descriptors.
|
||||
.sp
|
||||
.LP
|
||||
The implementation shall support one or more programming environments
|
||||
in which the width of \fBnfds_t\fP is no greater than the
|
||||
width of type \fBlong\fP. The names of these programming environments
|
||||
can be obtained using the \fIconfstr\fP() function or the \fIgetconf\fP
|
||||
utility.
|
||||
.LP
|
||||
The following symbolic constants shall be defined, zero or more of
|
||||
which may be OR'ed together to form the \fIevents\fP or
|
||||
\fIrevents\fP members in the \fBpollfd\fP structure:
|
||||
.TP 7
|
||||
POLLIN
|
||||
Data other than high-priority data may be read without blocking.
|
||||
.TP 7
|
||||
POLLRDNORM
|
||||
Normal data may be read without blocking.
|
||||
.TP 7
|
||||
POLLRDBAND
|
||||
Priority data may be read without blocking.
|
||||
.TP 7
|
||||
POLLPRI
|
||||
High priority data may be read without blocking.
|
||||
.TP 7
|
||||
POLLOUT
|
||||
Normal data may be written without blocking.
|
||||
.TP 7
|
||||
POLLWRNORM
|
||||
Equivalent to POLLOUT.
|
||||
.TP 7
|
||||
POLLWRBAND
|
||||
Priority data may be written.
|
||||
.TP 7
|
||||
POLLERR
|
||||
An error has occurred ( \fIrevents\fP only).
|
||||
.TP 7
|
||||
POLLHUP
|
||||
Device has been disconnected ( \fIrevents\fP only).
|
||||
.TP 7
|
||||
POLLNVAL
|
||||
Invalid \fIfd\fP member ( \fIrevents\fP only).
|
||||
.sp
|
||||
.LP
|
||||
The significance and semantics of normal, priority, and high-priority
|
||||
data are file and device-specific.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint poll(struct pollfd[], nfds_t, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIconfstr\fP(),
|
||||
\fIpoll\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIgetconf\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,385 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<pthread.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <pthread.h>
|
||||
.SH NAME
|
||||
pthread.h \- threads
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <pthread.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<pthread.h>\fP header shall define the following symbols:
|
||||
.LP
|
||||
.sp
|
||||
.sp
|
||||
PTHREAD_BARRIER_SERIAL_THREAD
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_CANCEL_ASYNCHRONOUS
|
||||
.br
|
||||
PTHREAD_CANCEL_ENABLE
|
||||
.br
|
||||
PTHREAD_CANCEL_DEFERRED
|
||||
.br
|
||||
PTHREAD_CANCEL_DISABLE
|
||||
.br
|
||||
PTHREAD_CANCELED
|
||||
.br
|
||||
PTHREAD_COND_INITIALIZER
|
||||
.br
|
||||
PTHREAD_CREATE_DETACHED
|
||||
.br
|
||||
PTHREAD_CREATE_JOINABLE
|
||||
.br
|
||||
PTHREAD_EXPLICIT_SCHED
|
||||
.br
|
||||
PTHREAD_INHERIT_SCHED
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_MUTEX_DEFAULT
|
||||
.br
|
||||
PTHREAD_MUTEX_ERRORCHECK
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_MUTEX_INITIALIZER
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_MUTEX_NORMAL
|
||||
.br
|
||||
PTHREAD_MUTEX_RECURSIVE
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_ONCE_INIT
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_PRIO_INHERIT
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
PTHREAD_PRIO_NONE
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
PTHREAD_PRIO_PROTECT
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_PROCESS_SHARED
|
||||
.br
|
||||
PTHREAD_PROCESS_PRIVATE
|
||||
.br
|
||||
.sp
|
||||
PTHREAD_SCOPE_PROCESS
|
||||
.br
|
||||
PTHREAD_SCOPE_SYSTEM
|
||||
.br
|
||||
.sp
|
||||
.LP
|
||||
The following types shall be defined as described in \fI<sys/types.h>\fP
|
||||
:
|
||||
.LP
|
||||
.sp
|
||||
\fBpthread_attr_t\fP
|
||||
.br
|
||||
.sp
|
||||
\fBpthread_barrier_t\fP
|
||||
.br
|
||||
\fBpthread_barrierattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
\fBpthread_cond_t\fP
|
||||
.br
|
||||
\fBpthread_condattr_t\fP
|
||||
.br
|
||||
\fBpthread_key_t\fP
|
||||
.br
|
||||
\fBpthread_mutex_t\fP
|
||||
.br
|
||||
\fBpthread_mutexattr_t\fP
|
||||
.br
|
||||
\fBpthread_once_t\fP
|
||||
.br
|
||||
\fBpthread_rwlock_t\fP
|
||||
.br
|
||||
\fBpthread_rwlockattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
\fBpthread_spinlock_t\fP
|
||||
.br
|
||||
.sp
|
||||
\fBpthread_t\fP
|
||||
.br
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint pthread_atfork(void (*)(void), void (*)(void),
|
||||
void(*)(void));
|
||||
int pthread_attr_destroy(pthread_attr_t *);
|
||||
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
|
||||
|
||||
int pthread_attr_getguardsize(const pthread_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
|
||||
|
||||
int pthread_attr_getinheritsched(const pthread_attr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
int pthread_attr_getschedparam(const pthread_attr_t *restrict,
|
||||
struct sched_param *restrict);
|
||||
|
||||
int pthread_attr_getschedpolicy(const pthread_attr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int pthread_attr_getscope(const pthread_attr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int pthread_attr_getstack(const pthread_attr_t *restrict,
|
||||
void **restrict, size_t *restrict);
|
||||
|
||||
|
||||
int pthread_attr_getstackaddr(const pthread_attr_t *restrict,
|
||||
void **restrict);
|
||||
|
||||
|
||||
int pthread_attr_getstacksize(const pthread_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
|
||||
int pthread_attr_init(pthread_attr_t *);
|
||||
int pthread_attr_setdetachstate(pthread_attr_t *, int);
|
||||
|
||||
int pthread_attr_setguardsize(pthread_attr_t *, size_t);
|
||||
|
||||
|
||||
int pthread_attr_setinheritsched(pthread_attr_t *, int);
|
||||
|
||||
int pthread_attr_setschedparam(pthread_attr_t *restrict,
|
||||
const struct sched_param *restrict);
|
||||
|
||||
int pthread_attr_setschedpolicy(pthread_attr_t *, int);
|
||||
int pthread_attr_setscope(pthread_attr_t *, int);
|
||||
|
||||
|
||||
int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
|
||||
|
||||
|
||||
int pthread_attr_setstackaddr(pthread_attr_t *, void *);
|
||||
|
||||
|
||||
int pthread_attr_setstacksize(pthread_attr_t *, size_t);
|
||||
|
||||
|
||||
int pthread_barrier_destroy(pthread_barrier_t *);
|
||||
int pthread_barrier_init(pthread_barrier_t *restrict,
|
||||
const pthread_barrierattr_t *restrict, unsigned);
|
||||
int pthread_barrier_wait(pthread_barrier_t *);
|
||||
int pthread_barrierattr_destroy(pthread_barrierattr_t *);
|
||||
|
||||
|
||||
int pthread_barrierattr_getpshared(
|
||||
const pthread_barrierattr_t *restrict, int *restrict);
|
||||
|
||||
|
||||
int pthread_barrierattr_init(pthread_barrierattr_t *);
|
||||
|
||||
|
||||
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
|
||||
|
||||
int pthread_cancel(pthread_t);
|
||||
void pthread_cleanup_push(void (*)(void *), void *);
|
||||
void pthread_cleanup_pop(int);
|
||||
int pthread_cond_broadcast(pthread_cond_t *);
|
||||
int pthread_cond_destroy(pthread_cond_t *);
|
||||
int pthread_cond_init(pthread_cond_t *restrict,
|
||||
const pthread_condattr_t *restrict);
|
||||
int pthread_cond_signal(pthread_cond_t *);
|
||||
int pthread_cond_timedwait(pthread_cond_t *restrict,
|
||||
pthread_mutex_t *restrict, const struct timespec *restrict);
|
||||
int pthread_cond_wait(pthread_cond_t *restrict,
|
||||
pthread_mutex_t *restrict);
|
||||
int pthread_condattr_destroy(pthread_condattr_t *);
|
||||
|
||||
int pthread_condattr_getclock(const pthread_condattr_t *restrict,
|
||||
clockid_t *restrict);
|
||||
|
||||
|
||||
int pthread_condattr_getpshared(const pthread_condattr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
int pthread_condattr_init(pthread_condattr_t *);
|
||||
|
||||
int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
|
||||
|
||||
|
||||
int pthread_condattr_setpshared(pthread_condattr_t *, int);
|
||||
|
||||
int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
|
||||
void *(*)(void *), void *restrict);
|
||||
int pthread_detach(pthread_t);
|
||||
int pthread_equal(pthread_t, pthread_t);
|
||||
void pthread_exit(void *);
|
||||
|
||||
int pthread_getconcurrency(void);
|
||||
|
||||
|
||||
int pthread_getcpuclockid(pthread_t, clockid_t *);
|
||||
|
||||
|
||||
int pthread_getschedparam(pthread_t, int *restrict,
|
||||
struct sched_param *restrict);
|
||||
|
||||
void *pthread_getspecific(pthread_key_t);
|
||||
int pthread_join(pthread_t, void **);
|
||||
int pthread_key_create(pthread_key_t *, void (*)(void *));
|
||||
int pthread_key_delete(pthread_key_t);
|
||||
int pthread_mutex_destroy(pthread_mutex_t *);
|
||||
|
||||
int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
int pthread_mutex_init(pthread_mutex_t *restrict,
|
||||
const pthread_mutexattr_t *restrict);
|
||||
int pthread_mutex_lock(pthread_mutex_t *);
|
||||
|
||||
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict, int,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int pthread_mutex_timedlock(pthread_mutex_t *,
|
||||
const struct timespec *);
|
||||
|
||||
int pthread_mutex_trylock(pthread_mutex_t *);
|
||||
int pthread_mutex_unlock(pthread_mutex_t *);
|
||||
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
|
||||
|
||||
int pthread_mutexattr_getprioceiling(
|
||||
const pthread_mutexattr_t *restrict, int *restrict);
|
||||
|
||||
|
||||
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
int pthread_mutexattr_init(pthread_mutexattr_t *);
|
||||
|
||||
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
|
||||
|
||||
|
||||
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
|
||||
|
||||
|
||||
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
|
||||
|
||||
|
||||
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
|
||||
|
||||
int pthread_once(pthread_once_t *, void (*)(void));
|
||||
int pthread_rwlock_destroy(pthread_rwlock_t *);
|
||||
int pthread_rwlock_init(pthread_rwlock_t *restrict,
|
||||
const pthread_rwlockattr_t *restrict);
|
||||
int pthread_rwlock_rdlock(pthread_rwlock_t *);
|
||||
|
||||
int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict,
|
||||
const struct timespec *restrict);
|
||||
int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict,
|
||||
const struct timespec *restrict);
|
||||
|
||||
int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
|
||||
int pthread_rwlock_trywrlock(pthread_rwlock_t *);
|
||||
int pthread_rwlock_unlock(pthread_rwlock_t *);
|
||||
int pthread_rwlock_wrlock(pthread_rwlock_t *);
|
||||
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
|
||||
|
||||
int pthread_rwlockattr_getpshared(
|
||||
const pthread_rwlockattr_t *restrict, int *restrict);
|
||||
|
||||
int pthread_rwlockattr_init(pthread_rwlockattr_t *);
|
||||
|
||||
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
|
||||
|
||||
pthread_t
|
||||
pthread_self(void);
|
||||
int pthread_setcancelstate(int, int *);
|
||||
int pthread_setcanceltype(int, int *);
|
||||
|
||||
int pthread_setconcurrency(int);
|
||||
|
||||
|
||||
int pthread_setschedparam(pthread_t, int,
|
||||
const struct sched_param *);
|
||||
|
||||
|
||||
int pthread_setschedprio(pthread_t, int);
|
||||
|
||||
int pthread_setspecific(pthread_key_t, const void *);
|
||||
|
||||
int pthread_spin_destroy(pthread_spinlock_t *);
|
||||
int pthread_spin_init(pthread_spinlock_t *, int);
|
||||
int pthread_spin_lock(pthread_spinlock_t *);
|
||||
int pthread_spin_trylock(pthread_spinlock_t *);
|
||||
int pthread_spin_unlock(pthread_spinlock_t *);
|
||||
|
||||
void pthread_testcancel(void);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<pthread.h>\fP header shall make symbols defined
|
||||
in the headers \fI<sched.h>\fP and \fI<time.h>\fP visible.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sched.h>\fP , \fI<sys/types.h>\fP , \fI<time.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIpthread_attr_getguardsize\fP(),
|
||||
\fIpthread_attr_init\fP(), \fIpthread_attr_setscope\fP(), \fIpthread_barrier_destroy\fP(),
|
||||
\fIpthread_barrier_init\fP(), \fIpthread_barrier_wait\fP(), \fIpthread_barrierattr_destroy\fP(),
|
||||
\fIpthread_barrierattr_getpshared\fP(), \fIpthread_barrierattr_init\fP(),
|
||||
\fIpthread_barrierattr_setpshared\fP(), \fIpthread_cancel\fP(), \fIpthread_cleanup_pop\fP(),
|
||||
\fIpthread_cond_init\fP(), \fIpthread_cond_signal\fP(), \fIpthread_cond_wait\fP(),
|
||||
\fIpthread_condattr_getclock\fP(), \fIpthread_condattr_init\fP(),
|
||||
\fIpthread_condattr_setclock\fP(), \fIpthread_create\fP(), \fIpthread_detach\fP(),
|
||||
\fIpthread_equal\fP(), \fIpthread_exit\fP(),
|
||||
\fIpthread_getconcurrency\fP(), \fIpthread_getcpuclockid\fP(), \fIpthread_getschedparam\fP(),
|
||||
\fIpthread_join\fP(), \fIpthread_key_create\fP(), \fIpthread_key_delete\fP(),
|
||||
\fIpthread_mutex_init\fP(), \fIpthread_mutex_lock\fP(), \fIpthread_mutex_setprioceiling\fP(),
|
||||
\fIpthread_mutex_timedlock\fP(), \fIpthread_mutexattr_init\fP(), \fIpthread_mutexattr_gettype\fP(),
|
||||
\fIpthread_mutexattr_setprotocol\fP(), \fIpthread_once\fP(), \fIpthread_rwlock_destroy\fP(),
|
||||
\fIpthread_rwlock_init\fP(), \fIpthread_rwlock_rdlock\fP(), \fIpthread_rwlock_timedrdlock\fP(),
|
||||
\fIpthread_rwlock_timedwrlock\fP(), \fIpthread_rwlock_tryrdlock\fP(),
|
||||
\fIpthread_rwlock_trywrlock\fP(), \fIpthread_rwlock_unlock\fP(), \fIpthread_rwlock_wrlock\fP(),
|
||||
\fIpthread_rwlockattr_destroy\fP(), \fIpthread_rwlockattr_getpshared\fP(),
|
||||
\fIpthread_rwlockattr_init\fP(), \fIpthread_rwlockattr_setpshared\fP(),
|
||||
\fIpthread_self\fP(), \fIpthread_setcancelstate\fP(), \fIpthread_setspecific\fP(),
|
||||
\fIpthread_spin_destroy\fP(), \fIpthread_spin_init\fP(), \fIpthread_spin_lock\fP(),
|
||||
\fIpthread_spin_trylock\fP(), \fIpthread_spin_unlock\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,76 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<pwd.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <pwd.h>
|
||||
.SH NAME
|
||||
pwd.h \- password structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <pwd.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<pwd.h>\fP header shall provide a definition for \fBstruct
|
||||
passwd\fP, which shall include at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *pw_name \fP User's login name. \fB
|
||||
uid_t pw_uid \fP Numerical user ID. \fB
|
||||
gid_t pw_gid \fP Numerical group ID. \fB
|
||||
char *pw_dir \fP Initial working directory. \fB
|
||||
char *pw_shell \fP Program to use as shell. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBgid_t\fP and \fBuid_t\fP types shall be defined as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct passwd *getpwnam(const char *);
|
||||
struct passwd *getpwuid(uid_t);
|
||||
|
||||
int getpwnam_r(const char *, struct passwd *, char *,
|
||||
size_t, struct passwd **);
|
||||
int getpwuid_r(uid_t, struct passwd *, char *,
|
||||
size_t, struct passwd **);
|
||||
|
||||
|
||||
void endpwent(void);
|
||||
struct passwd *getpwent(void);
|
||||
void setpwent(void);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIendpwent\fP(), \fIgetpwnam\fP(), \fIgetpwuid\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,164 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<regex.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <regex.h>
|
||||
.SH NAME
|
||||
regex.h \- regular expression matching types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <regex.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<regex.h>\fP header shall define the structures and symbolic
|
||||
constants used by the \fIregcomp\fP(), \fIregexec\fP(), \fIregerror\fP(),
|
||||
and \fIregfree\fP() functions.
|
||||
.LP
|
||||
The structure type \fBregex_t\fP shall contain at least the following
|
||||
member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsize_t re_nsub \fP Number of parenthesized subexpressions. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The type \fBsize_t\fP shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The type \fBregoff_t\fP shall be defined as a signed integer type
|
||||
that can hold the largest value that can be stored in either
|
||||
a type \fBoff_t\fP or type \fBssize_t\fP. The structure type \fBregmatch_t\fP
|
||||
shall contain at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBregoff_t rm_so \fP Byte offset from start of string \fB
|
||||
\fP to start of substring. \fB
|
||||
regoff_t rm_eo \fP Byte offset from start of string of the \fB
|
||||
\fP first character after the end of substring. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Values for the \fIcflags\fP parameter to the \fIregcomp\fP() function
|
||||
are as
|
||||
follows:
|
||||
.TP 7
|
||||
REG_EXTENDED
|
||||
Use Extended Regular Expressions.
|
||||
.TP 7
|
||||
REG_ICASE
|
||||
Ignore case in match.
|
||||
.TP 7
|
||||
REG_NOSUB
|
||||
Report only success or fail in \fIregexec\fP().
|
||||
.TP 7
|
||||
REG_NEWLINE
|
||||
Change the handling of <newline>.
|
||||
.sp
|
||||
.LP
|
||||
Values for the \fIeflags\fP parameter to the \fIregexec\fP() function
|
||||
are as
|
||||
follows:
|
||||
.TP 7
|
||||
REG_NOTBOL
|
||||
The circumflex character ( \fB'^'\fP ), when taken as a special character,
|
||||
does not match the beginning of
|
||||
\fIstring\fP.
|
||||
.TP 7
|
||||
REG_NOTEOL
|
||||
The dollar sign ( \fB'$'\fP ), when taken as a special character,
|
||||
does not match the end of \fIstring\fP.
|
||||
.sp
|
||||
.LP
|
||||
The following constants shall be defined as error return values:
|
||||
.TP 7
|
||||
REG_NOMATCH
|
||||
\fIregexec\fP() failed to match.
|
||||
.TP 7
|
||||
REG_BADPAT
|
||||
Invalid regular expression.
|
||||
.TP 7
|
||||
REG_ECOLLATE
|
||||
Invalid collating element referenced.
|
||||
.TP 7
|
||||
REG_ECTYPE
|
||||
Invalid character class type referenced.
|
||||
.TP 7
|
||||
REG_EESCAPE
|
||||
Trailing \fB'\\'\fP in pattern.
|
||||
.TP 7
|
||||
REG_ESUBREG
|
||||
Number in \\\fIdigit\fP invalid or in error.
|
||||
.TP 7
|
||||
REG_EBRACK
|
||||
\fB"[]"\fP imbalance.
|
||||
.TP 7
|
||||
REG_EPAREN
|
||||
\fB"\\(\\)"\fP or \fB"()"\fP imbalance.
|
||||
.TP 7
|
||||
REG_EBRACE
|
||||
\fB"\\{\\}"\fP imbalance.
|
||||
.TP 7
|
||||
REG_BADBR
|
||||
Content of \fB"\\{\\}"\fP invalid: not a number, number too large,
|
||||
more than two numbers, first larger than second.
|
||||
.TP 7
|
||||
REG_ERANGE
|
||||
Invalid endpoint in range expression.
|
||||
.TP 7
|
||||
REG_ESPACE
|
||||
Out of memory.
|
||||
.TP 7
|
||||
REG_BADRPT
|
||||
\fB'?'\fP , \fB'*'\fP , or \fB'+'\fP not preceded by valid regular
|
||||
expression.
|
||||
.TP 7
|
||||
REG_ENOSYS
|
||||
Reserved.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint regcomp(regex_t *restrict, const char *restrict, int);
|
||||
size_t regerror(int, const regex_t *restrict, char *restrict, size_t);
|
||||
int regexec(const regex_t *restrict, const char *restrict, size_t,
|
||||
regmatch_t[restrict], int);
|
||||
void regfree(regex_t *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The implementation may define additional macros or constants using
|
||||
names beginning with REG_.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIregcomp\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_resource.h.0p
|
|
@ -0,0 +1,118 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sched.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sched.h>
|
||||
.SH NAME
|
||||
sched.h \- execution scheduling (\fBREALTIME\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sched.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sched.h>\fP header shall define the \fBsched_param\fP structure,
|
||||
which contains the scheduling parameters
|
||||
required for implementation of each supported scheduling policy. This
|
||||
structure shall contain at least the following member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sched_priority \fP Process execution scheduling priority. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
In addition, if _POSIX_SPORADIC_SERVER or _POSIX_THREAD_SPORADIC_SERVER
|
||||
is defined, the \fBsched_param\fP structure defined in
|
||||
\fI<sched.h>\fP shall contain the following members in addition to
|
||||
those specified above:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sched_ss_low_priority\fP Low scheduling priority for \fB
|
||||
\fP sporadic server. \fB
|
||||
struct timespec sched_ss_repl_period \fP Replenishment period for \fB
|
||||
\fP sporadic server. \fB
|
||||
struct timespec sched_ss_init_budget \fP Initial budget for sporadic server. \fB
|
||||
int sched_ss_max_repl \fP Maximum pending replenishments for \fB
|
||||
\fP sporadic server. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Each process is controlled by an associated scheduling policy and
|
||||
priority. Associated with each policy is a priority range.
|
||||
Each policy definition specifies the minimum priority range for that
|
||||
policy. The priority ranges for each policy may overlap the
|
||||
priority ranges of other policies.
|
||||
.LP
|
||||
Four scheduling policies are defined; others may be defined by the
|
||||
implementation. The four standard policies are indicated by
|
||||
the values of the following symbolic constants:
|
||||
.TP 7
|
||||
SCHED_FIFO
|
||||
First in-first out (FIFO) scheduling policy.
|
||||
.TP 7
|
||||
SCHED_RR
|
||||
Round robin scheduling policy.
|
||||
.TP 7
|
||||
SCHED_SPORADIC
|
||||
Sporadic server scheduling policy.
|
||||
.TP 7
|
||||
SCHED_OTHER
|
||||
Another scheduling policy.
|
||||
.sp
|
||||
.LP
|
||||
The values of these constants are distinct.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
int sched_get_priority_max(int);
|
||||
int sched_get_priority_min(int);
|
||||
|
||||
int sched_getparam(pid_t, struct sched_param *);
|
||||
int sched_getscheduler(pid_t);
|
||||
|
||||
int sched_rr_get_interval(pid_t, struct timespec *);
|
||||
|
||||
int sched_setparam(pid_t, const struct sched_param *);
|
||||
int sched_setscheduler(pid_t, int, const struct sched_param *);
|
||||
|
||||
int sched_yield(void);
|
||||
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<sched.h>\fP header may make visible all symbols
|
||||
from the \fI<time.h>\fP header.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<time.h>\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,90 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<search.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <search.h>
|
||||
.SH NAME
|
||||
search.h \- search tables
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <search.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<search.h>\fP header shall define the \fBENTRY\fP type for
|
||||
structure \fBentry\fP which shall include the
|
||||
following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *key
|
||||
void *data
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
and shall define \fBACTION\fP and \fBVISIT\fP as enumeration data
|
||||
types through type definitions as follows:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBenum { FIND, ENTER } ACTION;
|
||||
enum { preorder, postorder, endorder, leaf } VISIT;
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsize_t\fP type shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint hcreate(size_t);
|
||||
void hdestroy(void);
|
||||
ENTRY *hsearch(ENTRY, ACTION);
|
||||
void insque(void *, void *);
|
||||
void *lfind(const void *, const void *, size_t *,
|
||||
size_t, int (*)(const void *, const void *));
|
||||
void *lsearch(const void *, void *, size_t *,
|
||||
size_t, int (*)(const void *, const void *));
|
||||
void remque(void *);
|
||||
void *tdelete(const void *restrict, void **restrict,
|
||||
int(*)(const void *, const void *));
|
||||
void *tfind(const void *, void *const *,
|
||||
int(*)(const void *, const void *));
|
||||
void *tsearch(const void *, void **,
|
||||
int(*)(const void *, const void *));
|
||||
void twalk(const void *,
|
||||
void (*)(const void *, VISIT, int ));
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIhcreate\fP(), \fIinsque\fP(), \fIlsearch\fP(), \fIremque\fP(),
|
||||
\fItsearch\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_select.h.0p
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_sem.h.0p
|
|
@ -0,0 +1,67 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<semaphore.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <semaphore.h>
|
||||
.SH NAME
|
||||
semaphore.h \- semaphores (\fBREALTIME\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <semaphore.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<semaphore.h>\fP header shall define the \fBsem_t\fP type,
|
||||
used in performing semaphore operations. The semaphore
|
||||
may be implemented using a file descriptor, in which case applications
|
||||
are able to open up at least a total of {OPEN_MAX} files and
|
||||
semaphores. The symbol SEM_FAILED shall be defined (see \fIsem_open\fP()).
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sem_close(sem_t *);
|
||||
int sem_destroy(sem_t *);
|
||||
int sem_getvalue(sem_t *restrict, int *restrict);
|
||||
int sem_init(sem_t *, int, unsigned);
|
||||
sem_t *sem_open(const char *, int, ...);
|
||||
int sem_post(sem_t *);
|
||||
|
||||
int sem_timedwait(sem_t *restrict, const struct timespec *restrict);
|
||||
|
||||
int sem_trywait(sem_t *);
|
||||
int sem_unlink(const char *);
|
||||
int sem_wait(sem_t *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<semaphore.h>\fP header may make visible symbols
|
||||
defined in the headers \fI<fcntl.h>\fP and \fI<sys/types.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<fcntl.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIsem_destroy\fP(),
|
||||
\fIsem_getvalue\fP(), \fIsem_init\fP(), \fIsem_open\fP(), \fIsem_post\fP(),
|
||||
\fIsem_timedwait\fP(), \fIsem_trywait\fP(), \fIsem_unlink\fP(), \fIsem_wait\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,78 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<setjmp.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <setjmp.h>
|
||||
.SH NAME
|
||||
setjmp.h \- stack environment declarations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <setjmp.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<setjmp.h>\fP header shall define the array types \fBjmp_buf\fP
|
||||
and \fBsigjmp_buf\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid longjmp(jmp_buf, int);
|
||||
|
||||
void siglongjmp(sigjmp_buf, int);
|
||||
|
||||
|
||||
void _longjmp(jmp_buf, int);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following may be declared as a function, or defined as a macro,
|
||||
or both. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint setjmp(jmp_buf);
|
||||
|
||||
int sigsetjmp(sigjmp_buf, int);
|
||||
|
||||
|
||||
int _setjmp(jmp_buf);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIlongjmp\fP(),
|
||||
\fI_longjmp\fP(), \fIsetjmp\fP(), \fIsiglongjmp\fP(), \fIsigsetjmp\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_shm.h.0p
|
|
@ -0,0 +1,788 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<signal.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <signal.h>
|
||||
.SH NAME
|
||||
signal.h \- signals
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <signal.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<signal.h>\fP header shall define the following symbolic constants,
|
||||
each of which expands to a distinct constant
|
||||
expression of the type:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid (*)(int)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
whose value matches no declarable function.
|
||||
.TP 7
|
||||
SIG_DFL
|
||||
Request for default signal handling.
|
||||
.TP 7
|
||||
SIG_ERR
|
||||
Return value from \fIsignal\fP() in case of error.
|
||||
.TP 7
|
||||
SIG_HOLD
|
||||
Request that signal be held.
|
||||
.TP 7
|
||||
SIG_IGN
|
||||
Request that signal be ignored.
|
||||
.sp
|
||||
.LP
|
||||
The following data types shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBsig_atomic_t\fP
|
||||
Possibly volatile-qualified integer type of an object that can be
|
||||
accessed as an atomic entity, even in the presence of
|
||||
asynchronous interrupts.
|
||||
.TP 7
|
||||
\fBsigset_t\fP
|
||||
Integer or structure type of an object used to represent sets of signals.
|
||||
.TP 7
|
||||
\fBpid_t\fP
|
||||
As
|
||||
described in \fI<sys/types.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
The \fI<signal.h>\fP header shall define the \fBsigevent\fP structure,
|
||||
which has at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sigev_notify \fP Notification type. \fB
|
||||
int sigev_signo \fP Signal number. \fB
|
||||
union sigval sigev_value \fP Signal value. \fB
|
||||
void(*)(union sigval) sigev_notify_function \fP Notification function. \fB
|
||||
(pthread_attr_t *) sigev_notify_attributes\fP Notification attributes. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following values of \fIsigev_notify\fP shall be defined:
|
||||
.TP 7
|
||||
SIGEV_NONE
|
||||
No asynchronous notification is delivered when the event of interest
|
||||
occurs.
|
||||
.TP 7
|
||||
SIGEV_SIGNAL
|
||||
A queued signal, with an application-defined value, is generated when
|
||||
the event of interest occurs.
|
||||
.TP 7
|
||||
SIGEV_THREAD
|
||||
A notification function is called to perform notification.
|
||||
.sp
|
||||
.LP
|
||||
The \fBsigval\fP union shall be defined as:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sival_int \fP Integer signal value. \fB
|
||||
void *sival_ptr \fP Pointer signal value. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
This header shall also declare the macros SIGRTMIN and SIGRTMAX, which
|
||||
evaluate to integer expressions, and specify a range of
|
||||
signal numbers that are reserved for application use and for which
|
||||
the realtime signal behavior specified in this volume of
|
||||
IEEE\ Std\ 1003.1-2001 is supported. The signal numbers in this range
|
||||
do not overlap any of the signals specified in the
|
||||
following table.
|
||||
.LP
|
||||
The range SIGRTMIN through SIGRTMAX inclusive shall include at least
|
||||
{RTSIG_MAX} signal numbers.
|
||||
.LP
|
||||
It is implementation-defined whether realtime signal behavior is supported
|
||||
for other signals.
|
||||
.LP
|
||||
This header also declares the constants that are used to refer to
|
||||
the signals that occur in the system. Signals defined here
|
||||
begin with the letters SIG. Each of the signals have distinct positive
|
||||
integer values. The value 0 is reserved for use as the null
|
||||
signal (see \fIkill\fP()). Additional implementation-defined signals
|
||||
may occur in the
|
||||
system.
|
||||
.LP
|
||||
The
|
||||
ISO\ C standard only requires the signal names SIGABRT, SIGFPE, SIGILL,
|
||||
SIGINT, SIGSEGV, and SIGTERM to be defined.
|
||||
.LP
|
||||
The following signals shall be supported on all implementations (default
|
||||
actions are explained below the table):
|
||||
.TS C
|
||||
center; l1 l1 lw(40).
|
||||
\fBSignal\fP \fBDefault Action\fP T{
|
||||
.na
|
||||
\fBDescription\fP
|
||||
.ad
|
||||
T}
|
||||
SIGABRT A T{
|
||||
.na
|
||||
Process abort signal.
|
||||
.ad
|
||||
T}
|
||||
SIGALRM T T{
|
||||
.na
|
||||
Alarm clock.
|
||||
.ad
|
||||
T}
|
||||
SIGBUS A T{
|
||||
.na
|
||||
Access to an undefined portion of a memory object.
|
||||
.ad
|
||||
T}
|
||||
SIGCHLD I T{
|
||||
.na
|
||||
Child process terminated, stopped,
|
||||
.ad
|
||||
T}
|
||||
\ \ T{
|
||||
.na
|
||||
or continued.
|
||||
.ad
|
||||
T}
|
||||
SIGCONT C T{
|
||||
.na
|
||||
Continue executing, if stopped.
|
||||
.ad
|
||||
T}
|
||||
SIGFPE A T{
|
||||
.na
|
||||
Erroneous arithmetic operation.
|
||||
.ad
|
||||
T}
|
||||
SIGHUP T T{
|
||||
.na
|
||||
Hangup.
|
||||
.ad
|
||||
T}
|
||||
SIGILL A T{
|
||||
.na
|
||||
Illegal instruction.
|
||||
.ad
|
||||
T}
|
||||
SIGINT T T{
|
||||
.na
|
||||
Terminal interrupt signal.
|
||||
.ad
|
||||
T}
|
||||
SIGKILL T T{
|
||||
.na
|
||||
Kill (cannot be caught or ignored).
|
||||
.ad
|
||||
T}
|
||||
SIGPIPE T T{
|
||||
.na
|
||||
Write on a pipe with no one to read it.
|
||||
.ad
|
||||
T}
|
||||
SIGQUIT A T{
|
||||
.na
|
||||
Terminal quit signal.
|
||||
.ad
|
||||
T}
|
||||
SIGSEGV A T{
|
||||
.na
|
||||
Invalid memory reference.
|
||||
.ad
|
||||
T}
|
||||
SIGSTOP S T{
|
||||
.na
|
||||
Stop executing (cannot be caught or ignored).
|
||||
.ad
|
||||
T}
|
||||
SIGTERM T T{
|
||||
.na
|
||||
Termination signal.
|
||||
.ad
|
||||
T}
|
||||
SIGTSTP S T{
|
||||
.na
|
||||
Terminal stop signal.
|
||||
.ad
|
||||
T}
|
||||
SIGTTIN S T{
|
||||
.na
|
||||
Background process attempting read.
|
||||
.ad
|
||||
T}
|
||||
SIGTTOU S T{
|
||||
.na
|
||||
Background process attempting write.
|
||||
.ad
|
||||
T}
|
||||
SIGUSR1 T T{
|
||||
.na
|
||||
User-defined signal 1.
|
||||
.ad
|
||||
T}
|
||||
SIGUSR2 T T{
|
||||
.na
|
||||
User-defined signal 2.
|
||||
.ad
|
||||
T}
|
||||
SIGPOLL T T{
|
||||
.na
|
||||
Pollable event.
|
||||
.ad
|
||||
T}
|
||||
SIGPROF T T{
|
||||
.na
|
||||
Profiling timer expired.
|
||||
.ad
|
||||
T}
|
||||
SIGSYS A T{
|
||||
.na
|
||||
Bad system call.
|
||||
.ad
|
||||
T}
|
||||
SIGTRAP A T{
|
||||
.na
|
||||
Trace/breakpoint trap.
|
||||
.ad
|
||||
T}
|
||||
SIGURG I T{
|
||||
.na
|
||||
High bandwidth data is available at a socket.
|
||||
.ad
|
||||
T}
|
||||
SIGVTALRM T T{
|
||||
.na
|
||||
Virtual timer expired.
|
||||
.ad
|
||||
T}
|
||||
SIGXCPU A T{
|
||||
.na
|
||||
CPU time limit exceeded.
|
||||
.ad
|
||||
T}
|
||||
SIGXFSZ A T{
|
||||
.na
|
||||
File size limit exceeded.
|
||||
.ad
|
||||
T}
|
||||
.TE
|
||||
.LP
|
||||
The default actions are as follows:
|
||||
.TP 7
|
||||
T
|
||||
Abnormal termination of the process. The process is terminated with
|
||||
all the consequences of \fI_exit\fP() except that the status made
|
||||
available to \fIwait\fP() and \fIwaitpid\fP() indicates abnormal
|
||||
termination by the specified signal.
|
||||
.TP 7
|
||||
A
|
||||
Abnormal termination of the process.
|
||||
.br
|
||||
Additionally, implementation-defined abnormal termination actions,
|
||||
such as creation of a \fBcore\fP file, may occur.
|
||||
.TP 7
|
||||
I
|
||||
Ignore the signal.
|
||||
.TP 7
|
||||
S
|
||||
Stop the process.
|
||||
.TP 7
|
||||
C
|
||||
Continue the process, if it is stopped; otherwise, ignore the signal.
|
||||
.sp
|
||||
.sp
|
||||
.LP
|
||||
The
|
||||
header shall provide a declaration of \fBstruct sigaction\fP, including
|
||||
at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid (*sa_handler)(int) \fP Pointer to a signal-catching function or one of the macros \fB
|
||||
\fP SIG_IGN or SIG_DFL. \fB
|
||||
sigset_t sa_mask \fP Set of signals to be blocked during execution of the signal \fB
|
||||
\fP handling function. \fB
|
||||
int sa_flags \fP Special flags. \fB
|
||||
void (*sa_sigaction)(int, siginfo_t *, void *)
|
||||
\fP Pointer to a signal-catching function. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The storage occupied by \fIsa_handler\fP and \fIsa_sigaction\fP may
|
||||
overlap, and a conforming application shall not use both
|
||||
simultaneously.
|
||||
.LP
|
||||
The following shall be declared as constants:
|
||||
.TP 7
|
||||
SA_NOCLDSTOP
|
||||
Do
|
||||
not generate SIGCHLD when children stop
|
||||
.br
|
||||
or
|
||||
stopped children continue.
|
||||
.TP 7
|
||||
SIG_BLOCK
|
||||
The resulting set is the union of the current set and the signal set
|
||||
pointed to by the argument \fIset\fP.
|
||||
.TP 7
|
||||
SIG_UNBLOCK
|
||||
The resulting set is the intersection of the current set and the complement
|
||||
of the signal set pointed to by the argument
|
||||
\fIset\fP.
|
||||
.TP 7
|
||||
SIG_SETMASK
|
||||
The resulting set is the signal set pointed to by the argument \fIset\fP.
|
||||
.TP 7
|
||||
SA_ONSTACK
|
||||
Causes signal delivery to occur on an alternate stack.
|
||||
.TP 7
|
||||
SA_RESETHAND
|
||||
Causes signal dispositions to be set to SIG_DFL on entry to signal
|
||||
handlers.
|
||||
.TP 7
|
||||
SA_RESTART
|
||||
Causes certain functions to become restartable.
|
||||
.TP 7
|
||||
SA_SIGINFO
|
||||
Causes extra information to be passed to signal handlers at the time
|
||||
of receipt of a signal.
|
||||
.TP 7
|
||||
SA_NOCLDWAIT
|
||||
Causes implementations not to create zombie processes on child death.
|
||||
.TP 7
|
||||
SA_NODEFER
|
||||
Causes signal not to be automatically blocked on entry to signal handler.
|
||||
.TP 7
|
||||
SS_ONSTACK
|
||||
Process is executing on an alternate signal stack.
|
||||
.TP 7
|
||||
SS_DISABLE
|
||||
Alternate signal stack is disabled.
|
||||
.TP 7
|
||||
MINSIGSTKSZ
|
||||
Minimum stack size for a signal handler.
|
||||
.TP 7
|
||||
SIGSTKSZ
|
||||
Default size in bytes for the alternate signal stack.
|
||||
.sp
|
||||
.LP
|
||||
The \fBucontext_t\fP structure shall be defined through \fBtypedef\fP
|
||||
as described in \fI<ucontext.h>\fP.
|
||||
.LP
|
||||
The \fBmcontext_t\fP type shall be defined through \fBtypedef\fP as
|
||||
described in \fI<ucontext.h>\fP.
|
||||
.LP
|
||||
The \fI<signal.h>\fP header shall define the \fBstack_t\fP type as
|
||||
a structure that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid *ss_sp \fP Stack base or pointer. \fB
|
||||
size_t ss_size \fP Stack size. \fB
|
||||
int ss_flags \fP Flags. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<signal.h>\fP header shall define the \fBsigstack\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint ss_onstack \fP Non-zero when signal stack is in use. \fB
|
||||
void *ss_sp \fP Signal stack pointer. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The
|
||||
\fI<signal.h>\fP header shall define the \fBsiginfo_t\fP type as a
|
||||
structure that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
int si_signo \fP Signal number. \fB
|
||||
|
||||
|
||||
int si_errno \fP If non-zero, an \fIerrno\fP value associated with \fB
|
||||
\fP this signal, as defined in \fB<errno.h>.\fP \fB
|
||||
|
||||
|
||||
int si_code \fP Signal code. \fB
|
||||
|
||||
|
||||
pid_t si_pid \fP Sending process ID. \fB
|
||||
uid_t si_uid \fP Real user ID of sending process. \fB
|
||||
void *si_addr \fP Address of faulting instruction. \fB
|
||||
int si_status\fP Exit value or signal. \fB
|
||||
long si_band \fP Band event for SIGPOLL. \fB
|
||||
|
||||
|
||||
union sigval si_value \fP Signal value. \fB
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The macros specified in the \fBCode\fP column of the following table
|
||||
are defined for use as values of \fIsi_code\fP that are
|
||||
\ signal-specific or non-signal-specific reasons why the signal
|
||||
was generated.
|
||||
.TS C
|
||||
center; l l lw(40).
|
||||
\fBSignal\fP \fBCode\fP T{
|
||||
.na
|
||||
\fBReason\fP
|
||||
.ad
|
||||
T}
|
||||
SIGILL ILL_ILLOPC T{
|
||||
.na
|
||||
Illegal opcode.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_ILLOPN T{
|
||||
.na
|
||||
Illegal operand.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_ILLADR T{
|
||||
.na
|
||||
Illegal addressing mode.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_ILLTRP T{
|
||||
.na
|
||||
Illegal trap.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_PRVOPC T{
|
||||
.na
|
||||
Privileged opcode.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_PRVREG T{
|
||||
.na
|
||||
Privileged register.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_COPROC T{
|
||||
.na
|
||||
Coprocessor error.
|
||||
.ad
|
||||
T}
|
||||
\ ILL_BADSTK T{
|
||||
.na
|
||||
Internal stack error.
|
||||
.ad
|
||||
T}
|
||||
SIGFPE FPE_INTDIV T{
|
||||
.na
|
||||
Integer divide by zero.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_INTOVF T{
|
||||
.na
|
||||
Integer overflow.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTDIV T{
|
||||
.na
|
||||
Floating-point divide by zero.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTOVF T{
|
||||
.na
|
||||
Floating-point overflow.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTUND T{
|
||||
.na
|
||||
Floating-point underflow.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTRES T{
|
||||
.na
|
||||
Floating-point inexact result.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTINV T{
|
||||
.na
|
||||
Invalid floating-point operation.
|
||||
.ad
|
||||
T}
|
||||
\ FPE_FLTSUB T{
|
||||
.na
|
||||
Subscript out of range.
|
||||
.ad
|
||||
T}
|
||||
SIGSEGV SEGV_MAPERR T{
|
||||
.na
|
||||
Address not mapped to object.
|
||||
.ad
|
||||
T}
|
||||
\ SEGV_ACCERR T{
|
||||
.na
|
||||
Invalid permissions for mapped object.
|
||||
.ad
|
||||
T}
|
||||
SIGBUS BUS_ADRALN T{
|
||||
.na
|
||||
Invalid address alignment.
|
||||
.ad
|
||||
T}
|
||||
\ BUS_ADRERR T{
|
||||
.na
|
||||
Nonexistent physical address.
|
||||
.ad
|
||||
T}
|
||||
\ BUS_OBJERR T{
|
||||
.na
|
||||
Object-specific hardware error.
|
||||
.ad
|
||||
T}
|
||||
SIGTRAP TRAP_BRKPT T{
|
||||
.na
|
||||
Process breakpoint.
|
||||
.ad
|
||||
T}
|
||||
\ TRAP_TRACE T{
|
||||
.na
|
||||
Process trace trap.
|
||||
.ad
|
||||
T}
|
||||
SIGCHLD CLD_EXITED T{
|
||||
.na
|
||||
Child has exited.
|
||||
.ad
|
||||
T}
|
||||
\ CLD_KILLED T{
|
||||
.na
|
||||
Child has terminated abnormally and did not create a \fBcore\fP file.
|
||||
.ad
|
||||
T}
|
||||
\ CLD_DUMPED T{
|
||||
.na
|
||||
Child has terminated abnormally and created a \fBcore\fP file.
|
||||
.ad
|
||||
T}
|
||||
\ CLD_TRAPPED T{
|
||||
.na
|
||||
Traced child has trapped.
|
||||
.ad
|
||||
T}
|
||||
\ CLD_STOPPED T{
|
||||
.na
|
||||
Child has stopped.
|
||||
.ad
|
||||
T}
|
||||
\ CLD_CONTINUED T{
|
||||
.na
|
||||
Stopped child has continued.
|
||||
.ad
|
||||
T}
|
||||
SIGPOLL POLL_IN T{
|
||||
.na
|
||||
Data input available.
|
||||
.ad
|
||||
T}
|
||||
\ POLL_OUT T{
|
||||
.na
|
||||
Output buffers available.
|
||||
.ad
|
||||
T}
|
||||
\ POLL_MSG T{
|
||||
.na
|
||||
Input message available.
|
||||
.ad
|
||||
T}
|
||||
\ POLL_ERR T{
|
||||
.na
|
||||
I/O error.
|
||||
.ad
|
||||
T}
|
||||
\ POLL_PRI T{
|
||||
.na
|
||||
High priority input available.
|
||||
.ad
|
||||
T}
|
||||
\ POLL_HUP T{
|
||||
.na
|
||||
Device disconnected.
|
||||
.ad
|
||||
T}
|
||||
Any SI_USER T{
|
||||
.na
|
||||
Signal sent by \fIkill\fP().
|
||||
.ad
|
||||
T}
|
||||
\ SI_QUEUE T{
|
||||
.na
|
||||
Signal sent by the \fIsigqueue\fP().
|
||||
.ad
|
||||
T}
|
||||
\ SI_TIMER T{
|
||||
.na
|
||||
Signal generated by expiration of a timer set by \fItimer_settime\fP().
|
||||
.ad
|
||||
T}
|
||||
\ SI_ASYNCIO T{
|
||||
.na
|
||||
Signal generated by completion of an asynchronous I/O request.
|
||||
.ad
|
||||
T}
|
||||
\ SI_MESGQ T{
|
||||
.na
|
||||
Signal generated by arrival of a message on an empty message queue.
|
||||
.ad
|
||||
T}
|
||||
.TE
|
||||
.LP
|
||||
Implementations may support additional \fIsi_code\fP values not included
|
||||
in this list, may generate values included in this list
|
||||
under circumstances other than those described in this list, and may
|
||||
contain extensions or limitations that prevent some values
|
||||
from being generated. Implementations do not generate a different
|
||||
value from the ones described in this list for circumstances
|
||||
described in this list.
|
||||
.LP
|
||||
In addition, the following signal-specific information shall be available:
|
||||
.TS C
|
||||
center; l1 l1 l.
|
||||
\fBSignal\fP \fBMember\fP \fBValue\fP
|
||||
SIGILL \fBvoid * \fIsi_addr\fP\fP Address of faulting instruction.
|
||||
SIGFPE \fB\ \fP \
|
||||
SIGSEGV \fBvoid * \fIsi_addr\fP\fP Address of faulting memory reference.
|
||||
SIGBUS \fB\ \fP \
|
||||
SIGCHLD \fBpid_t \fIsi_pid\fP\fP Child process ID.
|
||||
\ \fBint \fIsi_status\fP\fP Exit value or signal.
|
||||
\ \fBuid_t \fIsi_uid\fP\fP Real user ID of the process that sent the signal.
|
||||
SIGPOLL \fBlong \fIsi_band\fP\fP Band event for POLL_IN, POLL_OUT, or POLL_MSG.
|
||||
.TE
|
||||
.LP
|
||||
For some implementations, the value of \fIsi_addr\fP may be inaccurate.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
void (*bsd_signal(int, void (*)(int)))(int);
|
||||
|
||||
|
||||
int kill(pid_t, int);
|
||||
|
||||
|
||||
int killpg(pid_t, int);
|
||||
|
||||
|
||||
int pthread_kill(pthread_t, int);
|
||||
int pthread_sigmask(int, const sigset_t *, sigset_t *);
|
||||
|
||||
int raise(int);
|
||||
|
||||
int sigaction(int, const struct sigaction *restrict,
|
||||
struct sigaction *restrict);
|
||||
int sigaddset(sigset_t *, int);
|
||||
|
||||
|
||||
int sigaltstack(const stack_t *restrict, stack_t *restrict);
|
||||
|
||||
|
||||
int sigdelset(sigset_t *, int);
|
||||
int sigemptyset(sigset_t *);
|
||||
int sigfillset(sigset_t *);
|
||||
|
||||
|
||||
int sighold(int);
|
||||
int sigignore(int);
|
||||
int siginterrupt(int, int);
|
||||
|
||||
|
||||
int sigismember(const sigset_t *, int);
|
||||
|
||||
void (*signal(int, void (*)(int)))(int);
|
||||
|
||||
int sigpause(int);
|
||||
|
||||
|
||||
int sigpending(sigset_t *);
|
||||
int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
|
||||
|
||||
|
||||
int sigqueue(pid_t, int, const union sigval);
|
||||
|
||||
|
||||
int sigrelse(int);
|
||||
void (*sigset(int, void (*)(int)))(int);
|
||||
|
||||
|
||||
int sigsuspend(const sigset_t *);
|
||||
|
||||
|
||||
int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict,
|
||||
const struct timespec *restrict);
|
||||
|
||||
|
||||
int sigwait(const sigset_t *restrict, int *restrict);
|
||||
|
||||
|
||||
int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<signal.h>\fP header may make visible all symbols
|
||||
from the \fI<time.h>\fP header.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<errno.h>\fP , \fI<stropts.h>\fP , \fI<sys/types.h>\fP , \fI<time.h>\fP
|
||||
, \fI<ucontext.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIalarm\fP(), \fIbsd_signal\fP(), \fIioctl\fP(), \fIkill\fP(), \fIkillpg\fP(),
|
||||
\fIraise\fP(), \fIsigaction\fP(), \fIsigaddset\fP(), \fIsigaltstack\fP(),
|
||||
\fIsigdelset\fP(), \fIsigemptyset\fP(), \fIsigfillset\fP(), \fIsiginterrupt\fP(),
|
||||
\fIsigismember\fP(), \fIsignal\fP(), \fIsigpending\fP(), \fIsigprocmask\fP(),
|
||||
\fIsigqueue\fP(), \fIsigsuspend\fP(), \fIsigwaitinfo\fP(), \fIwait\fP(),
|
||||
\fIwaitid\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_socket.h.0p
|
|
@ -0,0 +1,128 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<spawn.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <spawn.h>
|
||||
.SH NAME
|
||||
spawn.h \- spawn (\fBADVANCED REALTIME\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <spawn.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<spawn.h>\fP header shall define the \fBposix_spawnattr_t\fP
|
||||
and \fBposix_spawn_file_actions_t\fP types used in
|
||||
performing spawn operations.
|
||||
.LP
|
||||
The \fI<spawn.h>\fP header shall define the flags that may be set
|
||||
in a \fBposix_spawnattr_t\fP object using the \fIposix_spawnattr_setflags\fP()
|
||||
function:
|
||||
.LP
|
||||
.sp
|
||||
POSIX_SPAWN_RESETIDS
|
||||
.br
|
||||
POSIX_SPAWN_SETPGROUP
|
||||
.br
|
||||
.sp
|
||||
POSIX_SPAWN_SETSCHEDPARAM
|
||||
.br
|
||||
POSIX_SPAWN_SETSCHEDULER
|
||||
.br
|
||||
.sp
|
||||
POSIX_SPAWN_SETSIGDEF
|
||||
.br
|
||||
POSIX_SPAWN_SETSIGMASK
|
||||
.br
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint posix_spawn(pid_t *restrict, const char *restrict,
|
||||
const posix_spawn_file_actions_t *,
|
||||
const posix_spawnattr_t *restrict, char *const [restrict],
|
||||
char *const [restrict]);
|
||||
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *,
|
||||
int);
|
||||
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *,
|
||||
int, int);
|
||||
int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict,
|
||||
int, const char *restrict, int, mode_t);
|
||||
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
|
||||
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
|
||||
int posix_spawnattr_destroy(posix_spawnattr_t *);
|
||||
int posix_spawnattr_getsigdefault(const posix_spawnattr_t *restrict,
|
||||
sigset_t *restrict);
|
||||
int posix_spawnattr_getflags(const posix_spawnattr_t *restrict,
|
||||
short *restrict);
|
||||
int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict,
|
||||
pid_t *restrict);
|
||||
|
||||
int posix_spawnattr_getschedparam(const posix_spawnattr_t *restrict,
|
||||
struct sched_param *restrict);
|
||||
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict,
|
||||
sigset_t *restrict);
|
||||
int posix_spawnattr_init(posix_spawnattr_t *);
|
||||
int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict,
|
||||
const sigset_t *restrict);
|
||||
int posix_spawnattr_setflags(posix_spawnattr_t *, short);
|
||||
int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t);
|
||||
.sp
|
||||
|
||||
|
||||
int posix_spawnattr_setschedparam(posix_spawnattr_t *restrict,
|
||||
const struct sched_param *restrict);
|
||||
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int);
|
||||
|
||||
int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict,
|
||||
const sigset_t *restrict);
|
||||
int posix_spawnp(pid_t *restrict, const char *restrict,
|
||||
const posix_spawn_file_actions_t *,
|
||||
const posix_spawnattr_t *restrict,
|
||||
char *const [restrict], char *const [restrict]);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<spawn.h>\fP header may make visible symbols defined
|
||||
in the \fI<sched.h>\fP, \fI<signal.h>\fP, and \fI<sys/types.h>\fP
|
||||
headers.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sched.h>\fP , \fI<semaphore.h>\fP , \fI<signal.h>\fP , \fI<sys/types.h>\fP
|
||||
, the System Interfaces
|
||||
volume of IEEE\ Std\ 1003.1-2001, \fIposix_spawnattr_destroy\fP(),
|
||||
\fIposix_spawnattr_getsigdefault\fP(), \fIposix_spawnattr_getflags\fP(),
|
||||
\fIposix_spawnattr_getpgroup\fP(), \fIposix_spawnattr_getschedparam\fP(),
|
||||
\fIposix_spawnattr_getschedpolicy\fP(), \fIposix_spawnattr_getsigmask\fP(),
|
||||
\fIposix_spawnattr_init\fP(), \fIposix_spawnattr_setsigdefault\fP(),
|
||||
\fIposix_spawnattr_setflags\fP(), \fIposix_spawnattr_setpgroup\fP(),
|
||||
\fIposix_spawnattr_setschedparam\fP(), \fIposix_spawnattr_setschedpolicy\fP(),
|
||||
\fIposix_spawnattr_setsigmask\fP(), \fIposix_spawn\fP(), \fIposix_spawn_file_actions_addclose\fP(),
|
||||
\fIposix_spawn_file_actions_adddup2\fP(), \fIposix_spawn_file_actions_addopen\fP(),
|
||||
\fIposix_spawn_file_actions_destroy\fP(), \fIposix_spawn_file_actions_init\fP(),
|
||||
\fIposix_spawnp\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_stat.h.0p
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_statvfs.h.0p
|
|
@ -0,0 +1,161 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stdarg.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stdarg.h>
|
||||
.SH NAME
|
||||
stdarg.h \- handle variable argument list
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stdarg.h>
|
||||
.br
|
||||
.sp
|
||||
void va_start(va_list\fP \fIap\fP\fB,\fP \fIargN\fP\fB);
|
||||
.br
|
||||
void va_copy(va_list\fP \fIdest\fP\fB, va_list\fP \fIsrc\fP\fB);
|
||||
.br
|
||||
type va_arg(va_list\fP \fIap\fP\fB,\fP \fItype\fP\fB);
|
||||
.br
|
||||
void va_end(va_list\fP \fIap\fP\fB);
|
||||
.br
|
||||
\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<stdarg.h>\fP header shall contain a set of macros which allows
|
||||
portable functions that accept variable argument
|
||||
lists to be written. Functions that have variable argument lists (such
|
||||
as \fIprintf\fP())
|
||||
but do not use these macros are inherently non-portable, as different
|
||||
systems use different argument-passing conventions.
|
||||
.LP
|
||||
The type \fBva_list\fP shall be defined for variables used to traverse
|
||||
the list.
|
||||
.LP
|
||||
The \fIva_start\fP() macro is invoked to initialize \fIap\fP to the
|
||||
beginning of the list before any calls to
|
||||
\fIva_arg\fP().
|
||||
.LP
|
||||
The \fIva_copy\fP() macro initializes \fIdest\fP as a copy of \fIsrc\fP,
|
||||
as if the \fIva_start\fP() macro had been applied
|
||||
to \fIdest\fP followed by the same sequence of uses of the \fIva_arg\fP()
|
||||
macro as had previously been used to reach the present
|
||||
state of \fIsrc\fP. Neither the \fIva_copy\fP() nor \fIva_start\fP()
|
||||
macro shall be invoked to reinitialize \fIdest\fP without
|
||||
an intervening invocation of the \fIva_end\fP() macro for the same
|
||||
\fIdest\fP.
|
||||
.LP
|
||||
The object \fIap\fP may be passed as an argument to another function;
|
||||
if that function invokes the \fIva_arg\fP() macro with
|
||||
parameter \fIap\fP, the value of \fIap\fP in the calling function
|
||||
is unspecified and shall be passed to the \fIva_end\fP() macro
|
||||
prior to any further reference to \fIap\fP. The parameter \fIargN\fP
|
||||
is the identifier of the rightmost parameter in the variable
|
||||
parameter list in the function definition (the one just before the
|
||||
\&...). If the parameter \fIargN\fP is declared with the
|
||||
\fBregister\fP storage class, with a function type or array type,
|
||||
or with a type that is not compatible with the type that results
|
||||
after application of the default argument promotions, the behavior
|
||||
is undefined.
|
||||
.LP
|
||||
The \fIva_arg\fP() macro shall return the next argument in the list
|
||||
pointed to by \fIap\fP. Each invocation of \fIva_arg\fP()
|
||||
modifies \fIap\fP so that the values of successive arguments are returned
|
||||
in turn. The \fItype\fP parameter shall be a type name
|
||||
specified such that the type of a pointer to an object that has the
|
||||
specified type can be obtained simply by postfixing a
|
||||
\fB'*'\fP to type. If there is no actual next argument, or if \fItype\fP
|
||||
is not compatible with the type of the actual next
|
||||
argument (as promoted according to the default argument promotions),
|
||||
the behavior is undefined, except for the following cases:
|
||||
.IP " *" 3
|
||||
One type is a signed integer type, the other type is the corresponding
|
||||
unsigned integer type, and the value is representable in
|
||||
both types.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
One type is a pointer to \fBvoid\fP and the other is a pointer to
|
||||
a character type.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Both types are pointers.
|
||||
.LP
|
||||
.LP
|
||||
Different types can be mixed, but it is up to the routine to know
|
||||
what type of argument is expected.
|
||||
.LP
|
||||
The \fIva_end\fP() macro is used to clean up; it invalidates \fIap\fP
|
||||
for use (unless \fIva_start\fP() or \fIva_copy\fP() is
|
||||
invoked again).
|
||||
.LP
|
||||
Each invocation of the \fIva_start\fP() and \fIva_copy\fP() macros
|
||||
shall be matched by a corresponding invocation of the
|
||||
\fIva_end\fP() macro in the same function.
|
||||
.LP
|
||||
Multiple traversals, each bracketed by \fIva_start\fP() ... \fIva_end\fP(),
|
||||
are possible.
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
This example is a possible implementation of \fIexecl\fP():
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#include <stdarg.h>
|
||||
.sp
|
||||
|
||||
#define MAXARGS 31
|
||||
|
||||
.sp
|
||||
|
||||
/*
|
||||
* execl is called by
|
||||
* execl(file, arg1, arg2, ..., (char *)(0));
|
||||
*/
|
||||
int execl(const char *file, const char *args, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *array[MAXARGS +1];
|
||||
int argno = 0;
|
||||
.sp
|
||||
|
||||
va_start(ap, args);
|
||||
while (args != 0 && argno < MAXARGS)
|
||||
{
|
||||
array[argno++] = args;
|
||||
args = va_arg(ap, const char *);
|
||||
}
|
||||
array[argno] = (char *) 0;
|
||||
va_end(ap);
|
||||
return execv(file, array);
|
||||
}
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
It is up to the calling routine to communicate to the called routine
|
||||
how many arguments there are, since it is not always
|
||||
possible for the called routine to determine this in any other way.
|
||||
For example, \fIexecl\fP() is passed a null pointer to signal the
|
||||
end of the list. The \fIprintf\fP() function can tell how many arguments
|
||||
are there by the \fIformat\fP argument.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIexec\fP,
|
||||
\fIprintf\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,54 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stdbool.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stdbool.h>
|
||||
.SH NAME
|
||||
stdbool.h \- boolean type and values
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stdbool.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<stdbool.h>\fP header shall define the following macros:
|
||||
.TP 7
|
||||
bool
|
||||
Expands to \fB_Bool\fP.
|
||||
.TP 7
|
||||
true
|
||||
Expands to the integer constant 1.
|
||||
.TP 7
|
||||
false
|
||||
Expands to the integer constant 0.
|
||||
.TP 7
|
||||
__bool_true_false_are_defined
|
||||
.sp
|
||||
Expands to the integer constant 1.
|
||||
.sp
|
||||
.LP
|
||||
An application may undefine and then possibly redefine the macros
|
||||
bool, true, and false.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
The ability to undefine and redefine the macros bool, true, and false
|
||||
is an obsolescent feature and may be withdrawn in a future
|
||||
version.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
None.
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,72 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stddef.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stddef.h>
|
||||
.SH NAME
|
||||
stddef.h \- standard type definitions
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stddef.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<stddef.h>\fP header shall define the following macros:
|
||||
.TP 7
|
||||
NULL
|
||||
Null pointer constant.
|
||||
.TP 7
|
||||
offsetof(\fItype\fP, \fImember-designator\fP)
|
||||
.sp
|
||||
Integer constant expression of type \fBsize_t\fP, the value of which
|
||||
is the offset in bytes to the structure member
|
||||
(\fImember-designator\fP), from the beginning of its structure (\fItype\fP).
|
||||
.sp
|
||||
.LP
|
||||
The \fI<stddef.h>\fP header shall define the following types:
|
||||
.TP 7
|
||||
\fBptrdiff_t\fP
|
||||
Signed integer type of the result of subtracting two pointers.
|
||||
.TP 7
|
||||
\fBwchar_t\fP
|
||||
Integer type whose range of values can represent distinct wide-character
|
||||
codes for all members of the largest character set
|
||||
specified among the locales supported by the compilation environment:
|
||||
the null character has the code value 0 and each member of
|
||||
the portable character set has a code value equal to its value when
|
||||
used as the lone character in an integer character
|
||||
constant.
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
Unsigned integer type of the result of the \fIsizeof\fP operator.
|
||||
.sp
|
||||
.LP
|
||||
The implementation shall support one or more programming environments
|
||||
in which the widths of \fBptrdiff_t\fP, \fBsize_t\fP,
|
||||
and \fBwchar_t\fP are no greater than the width of type \fBlong\fP.
|
||||
The names of these programming environments can be obtained
|
||||
using the \fIconfstr\fP() function or the \fIgetconf\fP utility.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<wchar.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIconfstr\fP(), the
|
||||
Shell and
|
||||
Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgetconf\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,578 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stdint.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stdint.h>
|
||||
.SH NAME
|
||||
stdint.h \- integer types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stdint.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<stdint.h>\fP header shall declare sets of integer types having
|
||||
specified widths, and shall define corresponding
|
||||
sets of macros. It shall also define macros that specify limits of
|
||||
integer types corresponding to types defined in other standard
|
||||
headers.
|
||||
.TP 7
|
||||
\fBNote:\fP
|
||||
The "width" of an integer type is the number of bits used to store
|
||||
its value in a pure binary system; the actual type may use
|
||||
more bits than that (for example, a 28-bit type could be stored in
|
||||
32 bits of actual storage). An \fIN\fP-bit signed type has
|
||||
values in the range -2**\fIN\fP-1 or 1-2**\fIN\fP-1 to
|
||||
2**\fIN\fP-1-1, while an \fIN\fP-bit unsigned type has values in the
|
||||
range 0 to
|
||||
2**\fIN\fP-1.
|
||||
.sp
|
||||
.LP
|
||||
Types are defined in the following categories:
|
||||
.IP " *" 3
|
||||
Integer types having certain exact widths
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Integer types having at least certain specified widths
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Fastest integer types having at least certain specified widths
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Integer types wide enough to hold pointers to objects
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Integer types having greatest width
|
||||
.LP
|
||||
.LP
|
||||
(Some of these types may denote the same type.)
|
||||
.LP
|
||||
Corresponding macros specify limits of the declared types and construct
|
||||
suitable constants.
|
||||
.LP
|
||||
For each type described herein that the implementation provides, the
|
||||
\fI<stdint.h>\fP header shall declare that
|
||||
\fBtypedef\fP name and define the associated macros. Conversely, for
|
||||
each type described herein that the implementation does not
|
||||
provide, the \fI<stdint.h>\fP header shall not declare that \fBtypedef\fP
|
||||
name, nor shall it define the associated macros.
|
||||
An implementation shall provide those types described as required,
|
||||
but need not provide any of the others (described as
|
||||
optional).
|
||||
.SS Integer Types
|
||||
.LP
|
||||
When \fBtypedef\fP names differing only in the absence or presence
|
||||
of the initial \fIu\fP are defined, they shall denote
|
||||
corresponding signed and unsigned types as described in the ISO/IEC\ 9899:1999
|
||||
standard, Section 6.2.5; an implementation
|
||||
providing one of these corresponding types shall also provide the
|
||||
other.
|
||||
.LP
|
||||
In the following descriptions, the symbol \fIN\fP represents an unsigned
|
||||
decimal integer with no leading zeros (for example, 8
|
||||
or 24, but not 04 or 048).
|
||||
.IP " *" 3
|
||||
Exact-width integer types
|
||||
.LP
|
||||
The \fBtypedef\fP name \fBint\fP \fIN\fP \fB_t\fP designates a signed
|
||||
integer type with width \fIN\fP, no padding bits, and
|
||||
a two's-complement representation. Thus, \fBint8_t\fP denotes a signed
|
||||
integer type with a width of exactly 8 bits.
|
||||
.LP
|
||||
The \fBtypedef\fP name \fBuint\fP \fIN\fP \fB_t\fP designates an unsigned
|
||||
integer type with width \fIN\fP. Thus,
|
||||
\fBuint24_t\fP denotes an unsigned integer type with a width of exactly
|
||||
24 bits.
|
||||
.LP
|
||||
The
|
||||
following types are required:
|
||||
.LP
|
||||
.sp
|
||||
\fBint8_t\fP
|
||||
.br
|
||||
\fBint16_t\fP
|
||||
.br
|
||||
\fBint32_t\fP
|
||||
.br
|
||||
\fBuint8_t\fP
|
||||
.br
|
||||
\fBuint16_t\fP
|
||||
.br
|
||||
\fBuint32_t\fP
|
||||
.br
|
||||
.LP
|
||||
If an implementation provides integer types with width 64 that meet
|
||||
these requirements, then the following types are required:
|
||||
\fBint64_t\fP \fBuint64_t\fP
|
||||
.LP
|
||||
In
|
||||
particular, this will be the case if any of the following are true:
|
||||
.RS
|
||||
.IP " *" 3
|
||||
The implementation supports the _POSIX_V6_ILP32_OFFBIG programming
|
||||
environment and the application is being built in the
|
||||
_POSIX_V6_ILP32_OFFBIG programming environment (see the Shell and
|
||||
Utilities volume of IEEE\ Std\ 1003.1-2001, \fIc99\fP, Programming
|
||||
Environments).
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The implementation supports the _POSIX_V6_LP64_OFF64 programming environment
|
||||
and the application is being built in the
|
||||
_POSIX_V6_LP64_OFF64 programming environment.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The implementation supports the _POSIX_V6_LPBIG_OFFBIG programming
|
||||
environment and the application is being built in the
|
||||
_POSIX_V6_LPBIG_OFFBIG programming environment.
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
All other types of this form are optional.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Minimum-width integer types
|
||||
.LP
|
||||
The \fBtypedef\fP name \fBint_least\fP \fIN\fP \fB_t\fP designates
|
||||
a signed integer type with a width of at least \fIN\fP,
|
||||
such that no signed integer type with lesser size has at least the
|
||||
specified width. Thus, \fBint_least32_t\fP denotes a signed
|
||||
integer type with a width of at least 32 bits.
|
||||
.LP
|
||||
The \fBtypedef\fP name \fBuint_least\fP \fIN\fP \fB_t\fP designates
|
||||
an unsigned integer type with a width of at least
|
||||
\fIN\fP, such that no unsigned integer type with lesser size has at
|
||||
least the specified width. Thus, \fBuint_least16_t\fP denotes
|
||||
an unsigned integer type with a width of at least 16 bits.
|
||||
.LP
|
||||
The following types are required: \fBint_least8_t\fP \fBint_least16_t\fP
|
||||
\fBint_least32_t\fP \fBint_least64_t\fP
|
||||
\fBuint_least8_t\fP \fBuint_least16_t\fP \fBuint_least32_t\fP \fBuint_least64_t\fP
|
||||
.LP
|
||||
All other types of this form are optional.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Fastest minimum-width integer types
|
||||
.LP
|
||||
Each of the following types designates an integer type that is usually
|
||||
fastest to operate with among all integer types that have
|
||||
at least the specified width.
|
||||
.LP
|
||||
The designated type is not guaranteed to be fastest for all purposes;
|
||||
if the implementation has no clear grounds for choosing
|
||||
one type over another, it will simply pick some integer type satisfying
|
||||
the signedness and width requirements.
|
||||
.LP
|
||||
The \fBtypedef\fP name \fBint_fast\fP \fIN\fP \fB_t\fP designates
|
||||
the fastest signed integer type with a width of at least
|
||||
\fIN\fP. The \fBtypedef\fP name \fBuint_fast\fP \fIN\fP \fB_t\fP designates
|
||||
the fastest unsigned integer type with a width of
|
||||
at least \fIN\fP.
|
||||
.LP
|
||||
The following types are required: \fBint_fast8_t\fP \fBint_fast16_t\fP
|
||||
\fBint_fast32_t\fP \fBint_fast64_t\fP
|
||||
\fBuint_fast8_t\fP \fBuint_fast16_t\fP \fBuint_fast32_t\fP \fBuint_fast64_t\fP
|
||||
.LP
|
||||
All other types of this form are optional.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Integer types capable of holding object pointers
|
||||
.LP
|
||||
The following type designates a signed integer type with the property
|
||||
that any valid pointer to \fBvoid\fP can be converted to
|
||||
this type, then converted back to a pointer to \fBvoid\fP, and the
|
||||
result will compare equal to the original pointer:
|
||||
\fBintptr_t\fP
|
||||
.LP
|
||||
The following type designates an unsigned integer type with the property
|
||||
that any valid pointer to \fBvoid\fP can be converted
|
||||
to this type, then converted back to a pointer to \fBvoid\fP, and
|
||||
the result will compare equal to the original pointer:
|
||||
\fBuintptr_t\fP
|
||||
.LP
|
||||
On XSI-conformant systems, the \fBintptr_t\fP and \fBuintptr_t\fP
|
||||
types are required; \ otherwise, they are optional.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Greatest-width integer types
|
||||
.LP
|
||||
The following type designates a signed integer type capable of representing
|
||||
any value of any signed integer type:
|
||||
\fBintmax_t\fP
|
||||
.LP
|
||||
The following type designates an unsigned integer type capable of
|
||||
representing any value of any unsigned integer type:
|
||||
\fBuintmax_t\fP
|
||||
.LP
|
||||
These types are required.
|
||||
.LP
|
||||
.TP 7
|
||||
\fBNote:\fP
|
||||
Applications can test for optional types by using the corresponding
|
||||
limit macro from Limits of
|
||||
Specified-Width Integer Types .
|
||||
.sp
|
||||
.SS Limits of Specified-Width Integer Types
|
||||
.LP
|
||||
The following macros specify the minimum and maximum limits of the
|
||||
types declared in the \fI<stdint.h>\fP header. Each
|
||||
macro name corresponds to a similar type name in Integer Types .
|
||||
.LP
|
||||
Each instance of any defined macro shall be replaced by a constant
|
||||
expression suitable for use in \fB#if\fP preprocessing
|
||||
directives, and this expression shall have the same type as would
|
||||
an expression that is an object of the corresponding type
|
||||
converted according to the integer promotions. Its implementation-defined
|
||||
value shall be equal to or greater in magnitude (absolute
|
||||
value) than the corresponding value given below, with the same sign,
|
||||
except where stated to be exactly the given value.
|
||||
.IP " *" 3
|
||||
Limits of exact-width integer types
|
||||
.RS
|
||||
.IP " *" 3
|
||||
Minimum values of exact-width signed integer types:
|
||||
.TP 7
|
||||
{INT\fIN\fP_MIN}
|
||||
.RS
|
||||
Exactly -(2 **N-1)
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of exact-width signed integer types:
|
||||
.TP 7
|
||||
{INT\fIN\fP_MAX}
|
||||
.RS
|
||||
Exactly 2**N-1 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of exact-width unsigned integer types:
|
||||
.TP 7
|
||||
{UINT\fIN\fP_MAX}
|
||||
.RS
|
||||
Exactly 2 **N -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of minimum-width integer types
|
||||
.RS
|
||||
.IP " *" 3
|
||||
Minimum values of minimum-width signed integer types:
|
||||
.TP 7
|
||||
{INT_LEAST\fIN\fP_MIN}
|
||||
.RS
|
||||
-(2 ** N-1 -1)
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of minimum-width signed integer types:
|
||||
.TP 7
|
||||
{INT_LEAST\fIN\fP_MAX}
|
||||
.RS
|
||||
2 ** N-1 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of minimum-width unsigned integer types:
|
||||
.TP 7
|
||||
{UINT_LEAST\fIN\fP_MAX}
|
||||
.RS
|
||||
2 ** N -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of fastest minimum-width integer types
|
||||
.RS
|
||||
.IP " *" 3
|
||||
Minimum values of fastest minimum-width signed integer types:
|
||||
.TP 7
|
||||
{INT_FAST\fIN\fP_MIN}
|
||||
.RS
|
||||
-(2 ** N-1 -1)
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of fastest minimum-width signed integer types:
|
||||
.TP 7
|
||||
{INT_FAST\fIN\fP_MAX}
|
||||
.RS
|
||||
2 ** N-1 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum values of fastest minimum-width unsigned integer types:
|
||||
.TP 7
|
||||
{UINT_FAST\fIN\fP_MAX}
|
||||
.RS
|
||||
2 ** N -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of integer types capable of holding object pointers
|
||||
.RS
|
||||
.IP " *" 3
|
||||
Minimum value of pointer-holding signed integer type:
|
||||
.TP 7
|
||||
{INTPTR_MIN}
|
||||
.RS
|
||||
-(2 ** 15 -1)
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum value of pointer-holding signed integer type:
|
||||
.TP 7
|
||||
{INTPTR_MAX}
|
||||
.RS
|
||||
2 ** 15 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum value of pointer-holding unsigned integer type:
|
||||
.TP 7
|
||||
{UINTPTR_MAX}
|
||||
.RS
|
||||
2 ** 16 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of greatest-width integer types
|
||||
.RS
|
||||
.IP " *" 3
|
||||
Minimum value of greatest-width signed integer type:
|
||||
.TP 7
|
||||
{INTMAX_MIN}
|
||||
.RS
|
||||
-(2 ** 63 -1)
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum value of greatest-width signed integer type:
|
||||
.TP 7
|
||||
{INTMAX_MAX}
|
||||
.RS
|
||||
2 ** 63 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Maximum value of greatest-width unsigned integer type:
|
||||
.TP 7
|
||||
{UINTMAX_MAX}
|
||||
.RS
|
||||
2 ** 64 -1
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.RE
|
||||
.LP
|
||||
.SS Limits of Other Integer Types
|
||||
.LP
|
||||
The following macros specify the minimum and maximum limits of integer
|
||||
types corresponding to types defined in other standard
|
||||
headers.
|
||||
.LP
|
||||
Each instance of these macros shall be replaced by a constant expression
|
||||
suitable for use in \fB#if\fP preprocessing
|
||||
directives, and this expression shall have the same type as would
|
||||
an expression that is an object of the corresponding type
|
||||
converted according to the integer promotions. Its implementation-defined
|
||||
value shall be equal to or greater in magnitude (absolute
|
||||
value) than the corresponding value given below, with the same sign.
|
||||
.IP " *" 3
|
||||
Limits of \fBptrdiff_t\fP:
|
||||
.TP 7
|
||||
{PTRDIFF_MIN}
|
||||
.RS
|
||||
-65535
|
||||
.RE
|
||||
.TP 7
|
||||
{PTRDIFF_MAX}
|
||||
.RS
|
||||
+65535
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of \fBsig_atomic_t\fP:
|
||||
.TP 7
|
||||
{SIG_ATOMIC_MIN}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.TP 7
|
||||
{SIG_ATOMIC_MAX}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limit of \fBsize_t\fP:
|
||||
.TP 7
|
||||
{SIZE_MAX}
|
||||
.RS
|
||||
65535
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of \fBwchar_t\fP:
|
||||
.TP 7
|
||||
{WCHAR_MIN}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.TP 7
|
||||
{WCHAR_MAX}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Limits of \fBwint_t\fP:
|
||||
.TP 7
|
||||
{WINT_MIN}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.TP 7
|
||||
{WINT_MAX}
|
||||
.RS
|
||||
See below.
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
.LP
|
||||
If \fBsig_atomic_t\fP (see the \fI<signal.h>\fP header) is defined
|
||||
as a signed
|
||||
integer type, the value of {SIG_ATOMIC_MIN} shall be no greater than
|
||||
-127 and the value of {SIG_ATOMIC_MAX} shall be no less than
|
||||
127; otherwise, \fBsig_atomic_t\fP shall be defined as an unsigned
|
||||
integer type, and the value of {SIG_ATOMIC_MIN} shall be 0 and
|
||||
the value of {SIG_ATOMIC_MAX} shall be no less than 255.
|
||||
.LP
|
||||
If \fBwchar_t\fP (see the \fI<stddef.h>\fP header) is defined as a
|
||||
signed
|
||||
integer type, the value of {WCHAR_MIN} shall be no greater than -127
|
||||
and the value of {WCHAR_MAX} shall be no less than 127;
|
||||
otherwise, \fBwchar_t\fP shall be defined as an unsigned integer type,
|
||||
and the value of {WCHAR_MIN} shall be 0 and the value of
|
||||
{WCHAR_MAX} shall be no less than 255.
|
||||
.LP
|
||||
If \fBwint_t\fP (see the \fI<wchar.h>\fP header) is defined as a signed
|
||||
integer
|
||||
type, the value of {WINT_MIN} shall be no greater than -32767 and
|
||||
the value of {WINT_MAX} shall be no less than 32767; otherwise,
|
||||
\fBwint_t\fP shall be defined as an unsigned integer type, and the
|
||||
value of {WINT_MIN} shall be 0 and the value of {WINT_MAX}
|
||||
shall be no less than 65535.
|
||||
.SS Macros for Integer Constant Expressions
|
||||
.LP
|
||||
The following macros expand to integer constant expressions suitable
|
||||
for initializing objects that have integer types
|
||||
corresponding to types defined in the \fI<stdint.h>\fP header. Each
|
||||
macro name corresponds to a similar type name listed
|
||||
under \fIMinimum-width integer types\fP and \fIGreatest-width integer
|
||||
types\fP.
|
||||
.LP
|
||||
Each invocation of one of these macros shall expand to an integer
|
||||
constant expression suitable for use in \fB#if\fP
|
||||
preprocessing directives. The type of the expression shall have the
|
||||
same type as would an expression that is an object of the
|
||||
corresponding type converted according to the integer promotions.
|
||||
The value of the expression shall be that of the argument.
|
||||
.LP
|
||||
The argument in any instance of these macros shall be a decimal, octal,
|
||||
or hexadecimal constant with a value that does not
|
||||
exceed the limits for the corresponding type.
|
||||
.IP " *" 3
|
||||
Macros for minimum-width integer constant expressions
|
||||
.LP
|
||||
The macro \fIINTN_C\fP( \fIvalue\fP) shall expand to an integer constant
|
||||
expression corresponding to the type \fBint_least\fP
|
||||
\fIN\fP \fB_t\fP. The macro \fIUINTN_C\fP( \fIvalue\fP) shall expand
|
||||
to an integer constant expression corresponding to the
|
||||
type \fBuint_least\fP \fIN\fP \fB_t\fP. For example, if \fBuint_least64_t\fP
|
||||
is a name for the type \fBunsigned long long\fP,
|
||||
then \fIUINT64_C\fP(0x123) might expand to the integer constant 0x123ULL.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Macros for greatest-width integer constant expressions
|
||||
.LP
|
||||
The following macro expands to an integer constant expression having
|
||||
the value specified by its argument and the type
|
||||
\fBintmax_t\fP: INTMAX_C(\fIvalue\fP)
|
||||
.LP
|
||||
The following macro expands to an integer constant expression having
|
||||
the value specified by its argument and the type
|
||||
\fBuintmax_t\fP: UINTMAX_C(\fIvalue\fP)
|
||||
.LP
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
The \fI<stdint.h>\fP header is a subset of the \fI<inttypes.h>\fP
|
||||
header
|
||||
more suitable for use in freestanding environments, which might not
|
||||
support the formatted I/O functions. In some environments, if
|
||||
the formatted conversion support is not wanted, using this header
|
||||
instead of the \fI<inttypes.h>\fP header avoids defining such a large
|
||||
number of macros.
|
||||
.LP
|
||||
As a consequence of adding \fBint8_t\fP, the following are true:
|
||||
.IP " *" 3
|
||||
A byte is exactly 8 bits.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
{CHAR_BIT} has the value 8, {SCHAR_MAX} has the value 127, {SCHAR_MIN}
|
||||
has the value -127 or -128, and {UCHAR_MAX} has the value
|
||||
255.
|
||||
.LP
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
\fBtypedef\fP names beginning with \fBint\fP or \fBuint\fP and ending
|
||||
with _t may be added to the types defined in the
|
||||
\fI<stdint.h>\fP header. Macro names beginning with INT or UINT and
|
||||
ending with _MAX, _MIN, or _C may be added to the macros
|
||||
defined in the \fI<stdint.h>\fP header.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<inttypes.h>\fP , \fI<signal.h>\fP , \fI<stddef.h>\fP , \fI<wchar.h>\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,251 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stdio.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stdio.h>
|
||||
.SH NAME
|
||||
stdio.h \- standard buffered input/output
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stdio.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<stdio.h>\fP header shall define the following macros as positive
|
||||
integer constant expressions:
|
||||
.TP 7
|
||||
BUFSIZ
|
||||
Size of \fI<stdio.h>\fP buffers.
|
||||
.TP 7
|
||||
_IOFBF
|
||||
Input/output fully buffered.
|
||||
.TP 7
|
||||
_IOLBF
|
||||
Input/output line buffered.
|
||||
.TP 7
|
||||
_IONBF
|
||||
Input/output unbuffered.
|
||||
.TP 7
|
||||
L_ctermid
|
||||
Maximum size of character array to hold \fIctermid\fP() output.
|
||||
.TP 7
|
||||
L_tmpnam
|
||||
Maximum size of character array to hold \fItmpnam\fP() output.
|
||||
.TP 7
|
||||
SEEK_CUR
|
||||
Seek relative to current position.
|
||||
.TP 7
|
||||
SEEK_END
|
||||
Seek relative to end-of-file.
|
||||
.TP 7
|
||||
SEEK_SET
|
||||
Seek relative to start-of-file.
|
||||
.sp
|
||||
.LP
|
||||
The following macros shall be defined as positive integer constant
|
||||
expressions which denote implementation limits:
|
||||
.TP 7
|
||||
{FILENAME_MAX}
|
||||
Maximum size in bytes of the longest filename string that the implementation
|
||||
guarantees can be opened.
|
||||
.TP 7
|
||||
{FOPEN_MAX}
|
||||
Number of streams which the implementation guarantees can be open
|
||||
simultaneously. The value is at least eight.
|
||||
.TP 7
|
||||
{TMP_MAX}
|
||||
Minimum number of unique filenames generated by \fItmpnam\fP(). Maximum
|
||||
number of times
|
||||
an application can call \fItmpnam\fP() reliably. The value of {TMP_MAX}
|
||||
is at least 25.
|
||||
\ On XSI-conformant systems, the value of {TMP_MAX} is at least 10000.
|
||||
.sp
|
||||
.LP
|
||||
The following macro name shall be defined as a negative integer constant
|
||||
expression:
|
||||
.TP 7
|
||||
EOF
|
||||
End-of-file return value.
|
||||
.sp
|
||||
.LP
|
||||
The following macro name shall be defined as a null pointer constant:
|
||||
.TP 7
|
||||
NULL
|
||||
Null pointer.
|
||||
.sp
|
||||
.LP
|
||||
The following macro name shall be defined as a string constant:
|
||||
.TP 7
|
||||
P_tmpdir
|
||||
Default directory prefix for \fItempnam\fP().
|
||||
.sp
|
||||
.LP
|
||||
The following shall be defined as expressions of type "pointer to
|
||||
\fBFILE\fP" that point to the \fBFILE\fP objects
|
||||
associated, respectively, with the standard error, input, and output
|
||||
streams:
|
||||
.TP 7
|
||||
\fIstderr\fP
|
||||
Standard error output stream.
|
||||
.TP 7
|
||||
\fIstdin\fP
|
||||
Standard input stream.
|
||||
.TP 7
|
||||
\fIstdout\fP
|
||||
Standard output stream.
|
||||
.sp
|
||||
.LP
|
||||
The following data types shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBFILE\fP
|
||||
A structure containing information about a file.
|
||||
.TP 7
|
||||
\fBfpos_t\fP
|
||||
A non-array type containing all information needed to specify uniquely
|
||||
every position within a file.
|
||||
.TP 7
|
||||
\fBva_list\fP
|
||||
As described in \fI<stdarg.h>\fP .
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
As described in \fI<stddef.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid clearerr(FILE *);
|
||||
|
||||
char *ctermid(char *);
|
||||
|
||||
int fclose(FILE *);
|
||||
|
||||
FILE *fdopen(int, const char *);
|
||||
|
||||
int feof(FILE *);
|
||||
int ferror(FILE *);
|
||||
int fflush(FILE *);
|
||||
int fgetc(FILE *);
|
||||
int fgetpos(FILE *restrict, fpos_t *restrict);
|
||||
char *fgets(char *restrict, int, FILE *restrict);
|
||||
|
||||
int fileno(FILE *);
|
||||
|
||||
|
||||
void flockfile(FILE *);
|
||||
|
||||
FILE *fopen(const char *restrict, const char *restrict);
|
||||
int fprintf(FILE *restrict, const char *restrict, ...);
|
||||
int fputc(int, FILE *);
|
||||
int fputs(const char *restrict, FILE *restrict);
|
||||
size_t fread(void *restrict, size_t, size_t, FILE *restrict);
|
||||
FILE *freopen(const char *restrict, const char *restrict,
|
||||
FILE *restrict);
|
||||
int fscanf(FILE *restrict, const char *restrict, ...);
|
||||
int fseek(FILE *, long, int);
|
||||
|
||||
int fseeko(FILE *, off_t, int);
|
||||
|
||||
int fsetpos(FILE *, const fpos_t *);
|
||||
long ftell(FILE *);
|
||||
|
||||
off_t ftello(FILE *);
|
||||
|
||||
|
||||
int ftrylockfile(FILE *);
|
||||
void funlockfile(FILE *);
|
||||
|
||||
size_t fwrite(const void *restrict, size_t, size_t, FILE *restrict);
|
||||
int getc(FILE *);
|
||||
int getchar(void);
|
||||
|
||||
int getc_unlocked(FILE *);
|
||||
int getchar_unlocked(void);
|
||||
|
||||
char *gets(char *);
|
||||
|
||||
int pclose(FILE *);
|
||||
|
||||
void perror(const char *);
|
||||
|
||||
FILE *popen(const char *, const char *);
|
||||
|
||||
int printf(const char *restrict, ...);
|
||||
int putc(int, FILE *);
|
||||
int putchar(int);
|
||||
|
||||
int putc_unlocked(int, FILE *);
|
||||
int putchar_unlocked(int);
|
||||
|
||||
int puts(const char *);
|
||||
int remove(const char *);
|
||||
int rename(const char *, const char *);
|
||||
void rewind(FILE *);
|
||||
int scanf(const char *restrict, ...);
|
||||
void setbuf(FILE *restrict, char *restrict);
|
||||
int setvbuf(FILE *restrict, char *restrict, int, size_t);
|
||||
int snprintf(char *restrict, size_t, const char *restrict, ...);
|
||||
int sprintf(char *restrict, const char *restrict, ...);
|
||||
int sscanf(const char *restrict, const char *restrict, int ...);
|
||||
|
||||
char *tempnam(const char *, const char *);
|
||||
|
||||
FILE *tmpfile(void);
|
||||
char *tmpnam(char *);
|
||||
int ungetc(int, FILE *);
|
||||
int vfprintf(FILE *restrict, const char *restrict, va_list);
|
||||
int vfscanf(FILE *restrict, const char *restrict, va_list);
|
||||
int vprintf(const char *restrict, va_list);
|
||||
int vscanf(const char *restrict, va_list);
|
||||
int vsnprintf(char *restrict, size_t, const char *restrict, va_list;
|
||||
int vsprintf(char *restrict, const char *restrict, va_list);
|
||||
int vsscanf(const char *restrict, const char *restrict, va_list arg);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<stdio.h>\fP header may also make visible all
|
||||
symbols from \fI<stddef.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<stdarg.h>\fP , \fI<stddef.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIclearerr\fP(), \fIctermid\fP(),
|
||||
\fIfclose\fP(), \fIfdopen\fP(), \fIfgetc\fP(), \fIfgetpos\fP(), \fIferror\fP(),
|
||||
\fIfeof\fP(), \fIfflush\fP(), \fIfgets\fP(), \fIfileno\fP(), \fIflockfile\fP(),
|
||||
\fIfopen\fP(), \fIfputc\fP(), \fIfputs\fP(), \fIfread\fP(), \fIfreopen\fP(),
|
||||
\fIfseek\fP(), \fIfsetpos\fP(), \fIftell\fP(), \fIfwrite\fP(), \fIgetc\fP(),
|
||||
\fIgetc_unlocked\fP(), \fIgetwchar\fP(), \fIgetchar\fP(), \fIgetopt\fP(),
|
||||
\fIgets\fP(), \fIpclose\fP(), \fIperror\fP(), \fIpopen\fP(), \fIprintf\fP(),
|
||||
\fIputc\fP(), \fIputchar\fP(), \fIputs\fP(), \fIputwchar\fP(), \fIremove\fP(),
|
||||
\fIrename\fP(), \fIrewind\fP(), \fIscanf\fP(), \fIsetbuf\fP(), \fIsetvbuf\fP(),
|
||||
\fIsscanf\fP(), \fIstdin\fP, \fIsystem\fP(), \fItempnam\fP(), \fItmpfile\fP(),
|
||||
\fItmpnam\fP(), \fIungetc\fP(), \fIvfscanf\fP(), \fIvscanf\fP(), \fIvprintf\fP(),
|
||||
\fIvsscanf\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,237 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stdlib.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stdlib.h>
|
||||
.SH NAME
|
||||
stdlib.h \- standard library definitions
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stdlib.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<stdlib.h>\fP header shall define the following macros:
|
||||
.TP 7
|
||||
EXIT_FAILURE
|
||||
Unsuccessful termination for \fIexit\fP(); evaluates to a non-zero
|
||||
value.
|
||||
.TP 7
|
||||
EXIT_SUCCESS
|
||||
Successful termination for \fIexit\fP(); evaluates to 0.
|
||||
.TP 7
|
||||
NULL
|
||||
Null pointer.
|
||||
.TP 7
|
||||
{RAND_MAX}
|
||||
Maximum value returned by \fIrand\fP(); at least 32767.
|
||||
.TP 7
|
||||
{MB_CUR_MAX}
|
||||
Integer expression whose value is the maximum number of bytes in a
|
||||
character specified by the current locale.
|
||||
.sp
|
||||
.LP
|
||||
The following data types shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBdiv_t\fP
|
||||
Structure type returned by the \fIdiv\fP() function.
|
||||
.TP 7
|
||||
\fBldiv_t\fP
|
||||
Structure type returned by the \fIldiv\fP() function.
|
||||
.TP 7
|
||||
\fBlldiv_t\fP
|
||||
Structure type returned by the \fIlldiv\fP() function.
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
As described in \fI<stddef.h>\fP .
|
||||
.TP 7
|
||||
\fBwchar_t\fP
|
||||
As described in \fI<stddef.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
In addition, the following symbolic names and macros shall be defined
|
||||
as in \fI<sys/wait.h>\fP , for use in decoding the return value from
|
||||
\fIsystem\fP():
|
||||
.LP
|
||||
.sp
|
||||
.sp
|
||||
WNOHANG
|
||||
.br
|
||||
WUNTRACED
|
||||
.br
|
||||
WEXITSTATUS
|
||||
.br
|
||||
WIFEXITED
|
||||
.br
|
||||
WIFSIGNALED
|
||||
.br
|
||||
WIFSTOPPED
|
||||
.br
|
||||
WSTOPSIG
|
||||
.br
|
||||
WTERMSIG
|
||||
.br
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid _Exit(int);
|
||||
|
||||
long a64l(const char *);
|
||||
|
||||
void abort(void);
|
||||
int abs(int);
|
||||
int atexit(void (*)(void));
|
||||
double atof(const char *);
|
||||
int atoi(const char *);
|
||||
long atol(const char *);
|
||||
long long atoll(const char *);
|
||||
void *bsearch(const void *, const void *, size_t, size_t,
|
||||
int (*)(const void *, const void *));
|
||||
void *calloc(size_t, size_t);
|
||||
div_t div(int, int);
|
||||
|
||||
double drand48(void);
|
||||
char *ecvt(double, int, int *restrict, int *restrict); (\fP\fBLEGACY\fP \fB)
|
||||
double erand48(unsigned short[3]);
|
||||
|
||||
void exit(int);
|
||||
|
||||
char *fcvt(double, int, int *restrict, int *restrict); (\fP\fBLEGACY\fP \fB)
|
||||
|
||||
void free(void *);
|
||||
|
||||
char *gcvt(double, int, char *); (\fP\fBLEGACY\fP \fB)
|
||||
|
||||
char *getenv(const char *);
|
||||
|
||||
int getsubopt(char **, char *const *, char **);
|
||||
int grantpt(int);
|
||||
char *initstate(unsigned, char *, size_t);
|
||||
long jrand48(unsigned short[3]);
|
||||
char *l64a(long);
|
||||
|
||||
long labs(long);
|
||||
|
||||
void lcong48(unsigned short[7]);
|
||||
|
||||
ldiv_t ldiv(long, long);
|
||||
long long llabs(long long);
|
||||
lldiv_t lldiv(long long, long long);
|
||||
|
||||
long lrand48(void);
|
||||
|
||||
void *malloc(size_t);
|
||||
int mblen(const char *, size_t);
|
||||
size_t mbstowcs(wchar_t *restrict, const char *restrict, size_t);
|
||||
int mbtowc(wchar_t *restrict, const char *restrict, size_t);
|
||||
|
||||
char *mktemp(char *); (\fP\fBLEGACY\fP \fB)
|
||||
int mkstemp(char *);
|
||||
long mrand48(void);
|
||||
long nrand48(unsigned short[3]);
|
||||
|
||||
|
||||
int posix_memalign(void **, size_t, size_t);
|
||||
|
||||
|
||||
int posix_openpt(int);
|
||||
char *ptsname(int);
|
||||
int putenv(char *);
|
||||
|
||||
void qsort(void *, size_t, size_t, int (*)(const void *,
|
||||
const void *));
|
||||
int rand(void);
|
||||
|
||||
int rand_r(unsigned *);
|
||||
|
||||
|
||||
long random(void);
|
||||
|
||||
void *realloc(void *, size_t);
|
||||
|
||||
char *realpath(const char *restrict, char *restrict);
|
||||
unsigned short seed48(unsigned short[3]);
|
||||
|
||||
|
||||
int setenv(const char *, const char *, int);
|
||||
|
||||
|
||||
void setkey(const char *);
|
||||
char *setstate(const char *);
|
||||
|
||||
void srand(unsigned);
|
||||
|
||||
void srand48(long);
|
||||
void srandom(unsigned);
|
||||
|
||||
double strtod(const char *restrict, char **restrict);
|
||||
float strtof(const char *restrict, char **restrict);
|
||||
long strtol(const char *restrict, char **restrict, int);
|
||||
long double strtold(const char *restrict, char **restrict);
|
||||
long long strtoll(const char *restrict, char **restrict, int);
|
||||
unsigned long strtoul(const char *restrict, char **restrict, int);
|
||||
unsigned long long
|
||||
strtoull(const char *restrict, char **restrict, int);
|
||||
int system(const char *);
|
||||
|
||||
int unlockpt(int);
|
||||
|
||||
|
||||
int unsetenv(const char *);
|
||||
|
||||
size_t wcstombs(char *restrict, const wchar_t *restrict, size_t);
|
||||
int wctomb(char *, wchar_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<stdlib.h>\fP header may also make visible all
|
||||
symbols from \fI<stddef.h>\fP, \fI<limits.h>\fP, \fI<math.h>\fP, and
|
||||
\fI<sys/wait.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<limits.h>\fP , \fI<math.h>\fP , \fI<stddef.h>\fP , \fI<sys/types.h>\fP
|
||||
, \fI<sys/wait.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fI_Exit\fP(), \fIa64l\fP(), \fIabort\fP(), \fIabs\fP(), \fIatexit\fP(),
|
||||
\fIatof\fP(), \fIatoi\fP(), \fIatol\fP(), \fIatoll\fP(), \fIbsearch\fP(),
|
||||
\fIcalloc\fP(), \fIdiv\fP(), \fIdrand48\fP(), \fIerand48\fP(), \fIexit\fP(),
|
||||
\fIfree\fP(), \fIgetenv\fP(), \fIgetsubopt\fP(), \fIgrantpt\fP(),
|
||||
\fIinitstate\fP(), \fIjrand48\fP(), \fIl64a\fP(), \fIlabs\fP(), \fIlcong48\fP(),
|
||||
\fIldiv\fP(), \fIllabs\fP(), \fIlldiv\fP(), \fIlrand48\fP(), \fImalloc\fP(),
|
||||
\fImblen\fP(), \fImbstowcs\fP(), \fImbtowc\fP(), \fImkstemp\fP(),
|
||||
\fImrand48\fP(), \fInrand48\fP(), \fIposix_memalign\fP(), \fIptsname\fP(),
|
||||
\fIputenv\fP(), \fIqsort\fP(), \fIrand\fP(), \fIrealloc\fP(), \fIrealpath\fP(),
|
||||
\fIsetstate\fP(), \fIsrand\fP(), \fIsrand48\fP(), \fIsrandom\fP(),
|
||||
\fIstrtod\fP(), \fIstrtof\fP(), \fIstrtol\fP(), \fIstrtold\fP(), \fIstrtoll\fP(),
|
||||
\fIstrtoul\fP(), \fIstrtoull\fP(), \fIunlockpt\fP(), \fIwcstombs\fP(),
|
||||
\fIwctomb\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,102 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<string.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <string.h>
|
||||
.SH NAME
|
||||
string.h \- string operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <string.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<string.h>\fP header shall define the following:
|
||||
.TP 7
|
||||
NULL
|
||||
Null pointer constant.
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
As described in \fI<stddef.h>\fP .
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
void *memccpy(void *restrict, const void *restrict, int, size_t);
|
||||
|
||||
void *memchr(const void *, int, size_t);
|
||||
int memcmp(const void *, const void *, size_t);
|
||||
void *memcpy(void *restrict, const void *restrict, size_t);
|
||||
void *memmove(void *, const void *, size_t);
|
||||
void *memset(void *, int, size_t);
|
||||
char *strcat(char *restrict, const char *restrict);
|
||||
char *strchr(const char *, int);
|
||||
int strcmp(const char *, const char *);
|
||||
int strcoll(const char *, const char *);
|
||||
char *strcpy(char *restrict, const char *restrict);
|
||||
size_t strcspn(const char *, const char *);
|
||||
|
||||
char *strdup(const char *);
|
||||
|
||||
char *strerror(int);
|
||||
|
||||
int *strerror_r(int, char *, size_t);
|
||||
|
||||
size_t strlen(const char *);
|
||||
char *strncat(char *restrict, const char *restrict, size_t);
|
||||
int strncmp(const char *, const char *, size_t);
|
||||
char *strncpy(char *restrict, const char *restrict, size_t);
|
||||
char *strpbrk(const char *, const char *);
|
||||
char *strrchr(const char *, int);
|
||||
size_t strspn(const char *, const char *);
|
||||
char *strstr(const char *, const char *);
|
||||
char *strtok(char *restrict, const char *restrict);
|
||||
|
||||
char *strtok_r(char *, const char *, char **);
|
||||
|
||||
size_t strxfrm(char *restrict, const char *restrict, size_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<string.h>\fP header may also make visible all
|
||||
symbols from \fI<stddef.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<stddef.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fImemccpy\fP(), \fImemchr\fP(),
|
||||
\fImemcmp\fP(), \fImemcpy\fP(), \fImemmove\fP(), \fImemset\fP(), \fIstrcat\fP(),
|
||||
\fIstrchr\fP(), \fIstrcmp\fP(), \fIstrcoll\fP(), \fIstrcpy\fP(), \fIstrcspn\fP(),
|
||||
\fIstrdup\fP(), \fIstrerror\fP(), \fIstrlen\fP(), \fIstrncat\fP(),
|
||||
\fIstrncmp\fP(), \fIstrncpy\fP(), \fIstrpbrk\fP(), \fIstrrchr\fP(),
|
||||
\fIstrspn\fP(), \fIstrstr\fP(), \fIstrtok\fP(), \fIstrxfrm\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,55 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<strings.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <strings.h>
|
||||
.SH NAME
|
||||
strings.h \- string operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <strings.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint bcmp(const void *, const void *, size_t); (\fP\fBLEGACY\fP \fB)
|
||||
void bcopy(const void *, void *, size_t); (\fP\fBLEGACY\fP \fB)
|
||||
void bzero(void *, size_t); (\fP\fBLEGACY\fP \fB)
|
||||
int ffs(int);
|
||||
char *index(const char *, int); (\fP\fBLEGACY\fP \fB)
|
||||
char *rindex(const char *, int); (\fP\fBLEGACY\fP \fB)
|
||||
int strcasecmp(const char *, const char *);
|
||||
int strncasecmp(const char *, const char *, size_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsize_t\fP type shall be defined through \fBtypedef\fP as described
|
||||
in \fI<stddef.h>\fP .
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<stddef.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIffs\fP(), \fIstrcasecmp\fP(), \fIstrncasecmp\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,399 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<stropts.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <stropts.h>
|
||||
.SH NAME
|
||||
stropts.h \- STREAMS interface (\fBSTREAMS\fP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <stropts.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBbandinfo\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned char bi_pri \fP Priority band. \fB
|
||||
int bi_flag \fP Flushing type. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstrpeek\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct strbuf ctlbuf \fP The control portion of the message. \fB
|
||||
struct strbuf databuf \fP The data portion of the message. \fB
|
||||
t_uscalar_t flags \fP RS_HIPRI or 0. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstrbuf\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint maxlen \fP Maximum buffer length. \fB
|
||||
int len \fP Length of data. \fB
|
||||
char *buf \fP Pointer to buffer. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstrfdinsert\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct strbuf ctlbuf \fP The control portion of the message. \fB
|
||||
struct strbuf databuf \fP The data portion of the message. \fB
|
||||
t_uscalar_t flags \fP RS_HIPRI or 0. \fB
|
||||
int fildes \fP File descriptor of the other STREAM. \fB
|
||||
int offset \fP Relative location of the stored value. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstrioctl\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint ic_cmd \fP \fIioctl\fP() command. \fB
|
||||
int ic_timout \fP Timeout for response. \fB
|
||||
int ic_len \fP Length of data. \fB
|
||||
char *ic_dp \fP Pointer to buffer. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstrrecvfd\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint fda \fP Received file descriptor. \fB
|
||||
uid_t uid \fP UID of sender. \fB
|
||||
gid_t gid \fP GID of sender. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBuid_t\fP and \fBgid_t\fP types shall be defined through \fBtypedef\fP
|
||||
as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBt_scalar_t\fP and
|
||||
\fBt_uscalar_t\fP types, respectively, as signed and
|
||||
unsigned opaque types of equal length of at least 32 bits.
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstr_list\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint sl_nmods \fP Number of STREAMS module names. \fB
|
||||
struct str_mlist *sl_modlist \fP STREAMS module names. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header shall define the \fBstr_mlist\fP structure
|
||||
that includes at least the following member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar l_name[FMNAMESZ+1] \fP A STREAMS module name. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
At least the following macros shall be defined for use as the \fIrequest\fP
|
||||
argument to \fIioctl\fP():
|
||||
.TP 7
|
||||
I_PUSH
|
||||
Push a STREAMS module.
|
||||
.TP 7
|
||||
I_POP
|
||||
Pop a STREAMS module.
|
||||
.TP 7
|
||||
I_LOOK
|
||||
Get the top module name.
|
||||
.TP 7
|
||||
I_FLUSH
|
||||
Flush a STREAM.
|
||||
.TP 7
|
||||
I_FLUSHBAND
|
||||
Flush one band of a STREAM.
|
||||
.TP 7
|
||||
I_SETSIG
|
||||
Ask for notification signals.
|
||||
.TP 7
|
||||
I_GETSIG
|
||||
Retrieve current notification signals.
|
||||
.TP 7
|
||||
I_FIND
|
||||
Look for a STREAMS module.
|
||||
.TP 7
|
||||
I_PEEK
|
||||
Peek at the top message on a STREAM.
|
||||
.TP 7
|
||||
I_SRDOPT
|
||||
Set the read mode.
|
||||
.TP 7
|
||||
I_GRDOPT
|
||||
Get the read mode.
|
||||
.TP 7
|
||||
I_NREAD
|
||||
Size the top message.
|
||||
.TP 7
|
||||
I_FDINSERT
|
||||
Send implementation-defined information about another STREAM.
|
||||
.TP 7
|
||||
I_STR
|
||||
Send a STREAMS \fIioctl\fP().
|
||||
.TP 7
|
||||
I_SWROPT
|
||||
Set the write mode.
|
||||
.TP 7
|
||||
I_GWROPT
|
||||
Get the write mode.
|
||||
.TP 7
|
||||
I_SENDFD
|
||||
Pass a file descriptor through a STREAMS pipe.
|
||||
.TP 7
|
||||
I_RECVFD
|
||||
Get a file descriptor sent via I_SENDFD.
|
||||
.TP 7
|
||||
I_LIST
|
||||
Get all the module names on a STREAM.
|
||||
.TP 7
|
||||
I_ATMARK
|
||||
Is the top message "marked''?
|
||||
.TP 7
|
||||
I_CKBAND
|
||||
See if any messages exist in a band.
|
||||
.TP 7
|
||||
I_GETBAND
|
||||
Get the band of the top message on a STREAM.
|
||||
.TP 7
|
||||
I_CANPUT
|
||||
Is a band writable?
|
||||
.TP 7
|
||||
I_SETCLTIME
|
||||
Set close time delay.
|
||||
.TP 7
|
||||
I_GETCLTIME
|
||||
Get close time delay.
|
||||
.TP 7
|
||||
I_LINK
|
||||
Connect two STREAMs.
|
||||
.TP 7
|
||||
I_UNLINK
|
||||
Disconnect two STREAMs.
|
||||
.TP 7
|
||||
I_PLINK
|
||||
Persistently connect two STREAMs.
|
||||
.TP 7
|
||||
I_PUNLINK
|
||||
Dismantle a persistent STREAMS link.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_LOOK:
|
||||
.TP 7
|
||||
FMNAMESZ
|
||||
The minimum size in bytes of the buffer referred to by the \fIarg\fP
|
||||
argument.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_FLUSH:
|
||||
.TP 7
|
||||
FLUSHR
|
||||
Flush read queues.
|
||||
.TP 7
|
||||
FLUSHW
|
||||
Flush write queues.
|
||||
.TP 7
|
||||
FLUSHRW
|
||||
Flush read and write queues.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_SETSIG:
|
||||
.TP 7
|
||||
S_RDNORM
|
||||
A normal (priority band set to 0) message has arrived at the head
|
||||
of a STREAM head read queue.
|
||||
.TP 7
|
||||
S_RDBAND
|
||||
A message with a non-zero priority band has arrived at the head of
|
||||
a STREAM head read queue.
|
||||
.TP 7
|
||||
S_INPUT
|
||||
A message, other than a high-priority message, has arrived at the
|
||||
head of a STREAM head read queue.
|
||||
.TP 7
|
||||
S_HIPRI
|
||||
A high-priority message is present on a STREAM head read queue.
|
||||
.TP 7
|
||||
S_OUTPUT
|
||||
The write queue for normal data (priority band 0) just below the STREAM
|
||||
head is no longer full. This notifies the process that
|
||||
there is room on the queue for sending (or writing) normal data downstream.
|
||||
.TP 7
|
||||
S_WRNORM
|
||||
Equivalent to S_OUTPUT.
|
||||
.TP 7
|
||||
S_WRBAND
|
||||
The write queue for a non-zero priority band just below the STREAM
|
||||
head is no longer full.
|
||||
.TP 7
|
||||
S_MSG
|
||||
A STREAMS signal message that contains the SIGPOLL signal reaches
|
||||
the front of the STREAM head read queue.
|
||||
.TP 7
|
||||
S_ERROR
|
||||
Notification of an error condition reaches the STREAM head.
|
||||
.TP 7
|
||||
S_HANGUP
|
||||
Notification of a hangup reaches the STREAM head.
|
||||
.TP 7
|
||||
S_BANDURG
|
||||
When used in conjunction with S_RDBAND, SIGURG is generated instead
|
||||
of SIGPOLL when a priority message reaches the front of the
|
||||
STREAM head read queue.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_PEEK:
|
||||
.TP 7
|
||||
RS_HIPRI
|
||||
Only look for high-priority messages.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_SRDOPT:
|
||||
.TP 7
|
||||
RNORM
|
||||
Byte-STREAM mode, the default.
|
||||
.TP 7
|
||||
RMSGD
|
||||
Message-discard mode.
|
||||
.TP 7
|
||||
RMSGN
|
||||
Message-non-discard mode.
|
||||
.TP 7
|
||||
RPROTNORM
|
||||
Fail \fIread\fP() with [EBADMSG] if a message containing a control
|
||||
part is at the front
|
||||
of the STREAM head read queue.
|
||||
.TP 7
|
||||
RPROTDAT
|
||||
Deliver the control part of a message as data when a process issues
|
||||
a \fIread\fP().
|
||||
.TP 7
|
||||
RPROTDIS
|
||||
Discard the control part of a message, delivering any data part, when
|
||||
a process issues a \fIread\fP().
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_SWOPT:
|
||||
.TP 7
|
||||
SNDZERO
|
||||
Send a zero-length message downstream when a \fIwrite\fP() of 0 bytes
|
||||
occurs.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_ATMARK:
|
||||
.TP 7
|
||||
ANYMARK
|
||||
Check if the message is marked.
|
||||
.TP 7
|
||||
LASTMARK
|
||||
Check if the message is the last one marked on the queue.
|
||||
.sp
|
||||
.LP
|
||||
At least the following macros shall be defined for use with I_UNLINK:
|
||||
.TP 7
|
||||
MUXID_ALL
|
||||
Unlink all STREAMs linked to the STREAM associated with \fIfildes\fP.
|
||||
.sp
|
||||
.LP
|
||||
The following macros shall be defined for \fIgetmsg\fP(), \fIgetpmsg\fP(),
|
||||
\fIputmsg\fP(), and \fIputpmsg\fP():
|
||||
.TP 7
|
||||
MSG_ANY
|
||||
Receive any message.
|
||||
.TP 7
|
||||
MSG_BAND
|
||||
Receive message from specified band.
|
||||
.TP 7
|
||||
MSG_HIPRI
|
||||
Send/receive high-priority message.
|
||||
.TP 7
|
||||
MORECTL
|
||||
More control information is left in message.
|
||||
.TP 7
|
||||
MOREDATA
|
||||
More data is left in message.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<stropts.h>\fP header may make visible all of the symbols from
|
||||
\fI<unistd.h>\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint isastream(int);
|
||||
int getmsg(int, struct strbuf *restrict, struct strbuf *restrict,
|
||||
int *restrict);
|
||||
int getpmsg(int, struct strbuf *restrict, struct strbuf *restrict,
|
||||
int *restrict, int *restrict);
|
||||
int ioctl(int, int, ... );
|
||||
int putmsg(int, const struct strbuf *, const struct strbuf *, int);
|
||||
int putpmsg(int, const struct strbuf *, const struct strbuf *, int,
|
||||
int);
|
||||
int fattach(int, const char *);
|
||||
int fdetach(const char *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , \fI<unistd.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIclose\fP(), \fIfcntl\fP(),
|
||||
\fIgetmsg\fP(), \fIioctl\fP(), \fIopen\fP(), \fIpipe\fP(), \fIread\fP(),
|
||||
\fIpoll\fP(), \fIputmsg\fP(), \fIsignal\fP(), \fIwrite\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,100 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/ipc.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/ipc.h>
|
||||
.SH NAME
|
||||
sys/ipc.h \- XSI interprocess communication access structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/ipc.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/ipc.h>\fP header is used by three mechanisms for XSI interprocess
|
||||
communication (IPC): messages, semaphores,
|
||||
and shared memory. All use a common structure type, \fBipc_perm\fP,
|
||||
to pass information used in determining permission to perform
|
||||
an IPC operation.
|
||||
.LP
|
||||
The \fBipc_perm\fP structure shall contain the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBuid_t uid \fP Owner's user ID. \fB
|
||||
gid_t gid \fP Owner's group ID. \fB
|
||||
uid_t cuid \fP Creator's user ID. \fB
|
||||
gid_t cgid \fP Creator's group ID. \fB
|
||||
mode_t mode \fP Read/write permission. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBuid_t\fP, \fBgid_t\fP, \fBmode_t\fP, and \fBkey_t\fP types
|
||||
shall be defined as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
Definitions shall be provided for the following constants:
|
||||
.LP
|
||||
Mode bits:
|
||||
.TP 7
|
||||
IPC_CREAT
|
||||
Create entry if key does not exist.
|
||||
.TP 7
|
||||
IPC_EXCL
|
||||
Fail if key exists.
|
||||
.TP 7
|
||||
IPC_NOWAIT
|
||||
Error if request must wait.
|
||||
.sp
|
||||
.LP
|
||||
Keys:
|
||||
.TP 7
|
||||
IPC_PRIVATE
|
||||
Private key.
|
||||
.sp
|
||||
.LP
|
||||
Control commands:
|
||||
.TP 7
|
||||
IPC_RMID
|
||||
Remove identifier.
|
||||
.TP 7
|
||||
IPC_SET
|
||||
Set options.
|
||||
.TP 7
|
||||
IPC_STAT
|
||||
Get options.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBkey_t ftok(const char *, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fIftok\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,229 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/mman.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/mman.h>
|
||||
.SH NAME
|
||||
sys/mman.h \- memory management declarations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/mman.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/mman.h>\fP header shall be supported if the implementation
|
||||
supports at least one of the following
|
||||
options:
|
||||
.IP " *" 3
|
||||
The Memory Mapped Files option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Shared Memory Objects option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Process Memory Locking option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Memory Protection option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Typed Memory Objects option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Synchronized Input and Output option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Advisory Information option
|
||||
.LP
|
||||
.IP " *" 3
|
||||
The Typed Memory Objects option
|
||||
.LP
|
||||
.LP
|
||||
If one or more of the Advisory Information, Memory Mapped Files, or
|
||||
Shared Memory Objects options are supported, the following
|
||||
protection options shall be defined:
|
||||
.TP 7
|
||||
PROT_READ
|
||||
Page can be read.
|
||||
.TP 7
|
||||
PROT_WRITE
|
||||
Page can be written.
|
||||
.TP 7
|
||||
PROT_EXEC
|
||||
Page can be executed.
|
||||
.TP 7
|
||||
PROT_NONE
|
||||
Page cannot be accessed.
|
||||
.sp
|
||||
.LP
|
||||
The following \fIflag\fP options shall be defined:
|
||||
.TP 7
|
||||
MAP_SHARED
|
||||
Share changes.
|
||||
.TP 7
|
||||
MAP_PRIVATE
|
||||
Changes are private.
|
||||
.TP 7
|
||||
MAP_FIXED
|
||||
Interpret \fIaddr\fP exactly.
|
||||
.sp
|
||||
.LP
|
||||
The following flags shall be defined for \fImsync\fP():
|
||||
.TP 7
|
||||
MS_ASYNC
|
||||
Perform asynchronous writes.
|
||||
.TP 7
|
||||
MS_SYNC
|
||||
Perform synchronous writes.
|
||||
.TP 7
|
||||
MS_INVALIDATE
|
||||
Invalidate mappings.
|
||||
.sp
|
||||
.LP
|
||||
The following symbolic constants shall be defined for the \fImlockall\fP()
|
||||
function:
|
||||
.TP 7
|
||||
MCL_CURRENT
|
||||
Lock currently mapped pages.
|
||||
.TP 7
|
||||
MCL_FUTURE
|
||||
Lock pages that become mapped.
|
||||
.sp
|
||||
.LP
|
||||
The symbolic constant MAP_FAILED shall be defined to indicate a failure
|
||||
from the \fImmap\fP() function.
|
||||
.LP
|
||||
If the Advisory Information and either the Memory Mapped Files or
|
||||
Shared Memory Objects options are supported, values for
|
||||
\fIadvice\fP used by \fIposix_madvise\fP() shall be defined as follows:
|
||||
.TP 7
|
||||
POSIX_MADV_NORMAL
|
||||
.sp
|
||||
The application has no advice to give on its behavior with respect
|
||||
to the specified range. It is the default characteristic if no
|
||||
advice is given for a range of memory.
|
||||
.TP 7
|
||||
POSIX_MADV_SEQUENTIAL
|
||||
.sp
|
||||
The application expects to access the specified range sequentially
|
||||
from lower addresses to higher addresses.
|
||||
.TP 7
|
||||
POSIX_MADV_RANDOM
|
||||
.sp
|
||||
The application expects to access the specified range in a random
|
||||
order.
|
||||
.TP 7
|
||||
POSIX_MADV_WILLNEED
|
||||
.sp
|
||||
The application expects to access the specified range in the near
|
||||
future.
|
||||
.TP 7
|
||||
POSIX_MADV_DONTNEED
|
||||
.sp
|
||||
The application expects that it will not access the specified range
|
||||
in the near future.
|
||||
.sp
|
||||
.LP
|
||||
The following flags shall be defined for \fIposix_typed_mem_open\fP():
|
||||
.TP 7
|
||||
POSIX_TYPED_MEM_ALLOCATE
|
||||
.sp
|
||||
Allocate on \fImmap\fP().
|
||||
.TP 7
|
||||
POSIX_TYPED_MEM_ALLOCATE_CONTIG
|
||||
.sp
|
||||
Allocate contiguously on \fImmap\fP().
|
||||
.TP 7
|
||||
POSIX_TYPED_MEM_MAP_ALLOCATABLE
|
||||
.sp
|
||||
Map on \fImmap\fP(), without affecting allocatability.
|
||||
.sp
|
||||
.LP
|
||||
The \fBmode_t\fP, \fBoff_t\fP, and \fBsize_t\fP types shall be defined
|
||||
as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The \fI<sys/mman.h>\fP header shall define the structure \fBposix_typed_mem_info\fP,
|
||||
which includes at least the
|
||||
following member:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsize_t posix_tmi_length \fP Maximum length which may be allocated \fB
|
||||
\fP from a typed memory object. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
int mlock(const void *, size_t);
|
||||
|
||||
|
||||
int mlockall(int);
|
||||
|
||||
|
||||
void *mmap(void *, size_t, int, int, int, off_t);
|
||||
|
||||
|
||||
int mprotect(void *, size_t, int);
|
||||
|
||||
|
||||
int msync(void *, size_t, int);
|
||||
|
||||
|
||||
int munlock(const void *, size_t);
|
||||
|
||||
|
||||
int munlockall(void);
|
||||
|
||||
|
||||
int munmap(void *, size_t);
|
||||
|
||||
|
||||
int posix_madvise(void *, size_t, int);
|
||||
|
||||
|
||||
int posix_mem_offset(const void *restrict, size_t, off_t *restrict,
|
||||
size_t *restrict, int *restrict);
|
||||
int posix_typed_mem_get_info(int, struct posix_typed_mem_info *);
|
||||
int posix_typed_mem_open(const char *, int, int);
|
||||
|
||||
|
||||
int shm_open(const char *, int, mode_t);
|
||||
int shm_unlink(const char *);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fImlock\fP(), \fImlockall\fP(), \fImmap\fP(),
|
||||
\fImprotect\fP(), \fImsync\fP(), \fImunlock\fP(), \fImunlockall\fP(),
|
||||
\fImunmap\fP(), \fIposix_mem_offset\fP(),
|
||||
\fIposix_typed_mem_get_info\fP(), \fIposix_typed_mem_open\fP(), \fIshm_open\fP(),
|
||||
\fIshm_unlink\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,96 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/msg.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/msg.h>
|
||||
.SH NAME
|
||||
sys/msg.h \- XSI message queue structures
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/msg.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/msg.h>\fP header shall define the following data types
|
||||
through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBmsgqnum_t\fP
|
||||
Used for the number of messages in the message queue.
|
||||
.TP 7
|
||||
\fBmsglen_t\fP
|
||||
Used for the number of bytes allowed in a message queue.
|
||||
.sp
|
||||
.LP
|
||||
These types shall be unsigned integer types that are able to store
|
||||
values at least as large as a type \fBunsigned short\fP.
|
||||
.LP
|
||||
The \fI<sys/msg.h>\fP header shall define the following constant as
|
||||
a message operation flag:
|
||||
.TP 7
|
||||
MSG_NOERROR
|
||||
No error if big message.
|
||||
.sp
|
||||
.LP
|
||||
The \fBmsqid_ds\fP structure shall contain the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct ipc_perm msg_perm \fP Operation permission structure. \fB
|
||||
msgqnum_t msg_qnum \fP Number of messages currently on queue. \fB
|
||||
msglen_t msg_qbytes\fP Maximum number of bytes allowed on queue. \fB
|
||||
pid_t msg_lspid \fP Process ID of last \fImsgsnd\fP
|
||||
(). \fB
|
||||
pid_t msg_lrpid \fP Process ID of last \fImsgrcv\fP
|
||||
(). \fB
|
||||
time_t msg_stime \fP Time of last \fImsgsnd\fP
|
||||
(). \fB
|
||||
time_t msg_rtime \fP Time of last \fImsgrcv\fP
|
||||
(). \fB
|
||||
time_t msg_ctime \fP Time of last change. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, \fBsize_t\fP, and \fBssize_t\fP
|
||||
types shall be defined as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint msgctl(int, int, struct msqid_ds *);
|
||||
int msgget(key_t, int);
|
||||
ssize_t msgrcv(int, void *, size_t, long, int);
|
||||
int msgsnd(int, const void *, size_t, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
|
||||
when
|
||||
this header is included.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/ipc.h>\fP , \fI<sys/types.h>\fP , \fImsgctl\fP(), \fImsgget\fP(),
|
||||
\fImsgrcv\fP(), \fImsgsnd\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,158 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/resource.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/resource.h>
|
||||
.SH NAME
|
||||
sys/resource.h \- definitions for XSI resource operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/resource.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/resource.h>\fP header shall define the following symbolic
|
||||
constants as possible values of the \fIwhich\fP
|
||||
argument of \fIgetpriority\fP() and \fIsetpriority\fP():
|
||||
.TP 7
|
||||
PRIO_PROCESS
|
||||
Identifies the \fIwho\fP argument as a process ID.
|
||||
.TP 7
|
||||
PRIO_PGRP
|
||||
Identifies the \fIwho\fP argument as a process group ID.
|
||||
.TP 7
|
||||
PRIO_USER
|
||||
Identifies the \fIwho\fP argument as a user ID.
|
||||
.sp
|
||||
.LP
|
||||
The following type shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBrlim_t\fP
|
||||
Unsigned integer type used for limit values.
|
||||
.sp
|
||||
.LP
|
||||
The following symbolic constants shall be defined:
|
||||
.TP 7
|
||||
RLIM_INFINITY
|
||||
A value of \fBrlim_t\fP indicating no limit.
|
||||
.TP 7
|
||||
RLIM_SAVED_MAX
|
||||
A value of type \fBrlim_t\fP indicating an unrepresentable saved hard
|
||||
limit.
|
||||
.TP 7
|
||||
RLIM_SAVED_CUR
|
||||
A value of type \fBrlim_t\fP indicating an unrepresentable saved soft
|
||||
limit.
|
||||
.sp
|
||||
.LP
|
||||
On implementations where all resource limits are representable in
|
||||
an object of type \fBrlim_t\fP, RLIM_SAVED_MAX and
|
||||
RLIM_SAVED_CUR need not be distinct from RLIM_INFINITY.
|
||||
.LP
|
||||
The following symbolic constants shall be defined as possible values
|
||||
of the \fIwho\fP parameter of \fIgetrusage\fP():
|
||||
.TP 7
|
||||
RUSAGE_SELF
|
||||
Returns information about the current process.
|
||||
.TP 7
|
||||
RUSAGE_CHILDREN
|
||||
Returns information about children of the current process.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/resource.h>\fP header shall define the \fBrlimit\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBrlim_t rlim_cur \fP The current (soft) limit. \fB
|
||||
rlim_t rlim_max \fP The hard limit. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<sys/resource.h>\fP header shall define the \fBrusage\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct timeval ru_utime \fP User time used. \fB
|
||||
struct timeval ru_stime \fP System time used. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBtimeval\fP structure shall be defined as described in \fI<sys/time.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following symbolic constants shall be defined as possible values
|
||||
for the \fIresource\fP argument of \fIgetrlimit\fP() and \fIsetrlimit\fP():
|
||||
.TP 7
|
||||
RLIMIT_CORE
|
||||
Limit on size of \fBcore\fP file.
|
||||
.TP 7
|
||||
RLIMIT_CPU
|
||||
Limit on CPU time per process.
|
||||
.TP 7
|
||||
RLIMIT_DATA
|
||||
Limit on data segment size.
|
||||
.TP 7
|
||||
RLIMIT_FSIZE
|
||||
Limit on file size.
|
||||
.TP 7
|
||||
RLIMIT_NOFILE
|
||||
Limit on number of open files.
|
||||
.TP 7
|
||||
RLIMIT_STACK
|
||||
Limit on stack size.
|
||||
.TP 7
|
||||
RLIMIT_AS
|
||||
Limit on address space size.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint getpriority(int, id_t);
|
||||
int getrlimit(int, struct rlimit *);
|
||||
int getrusage(int, struct rusage *);
|
||||
int setpriority(int, id_t, int);
|
||||
int setrlimit(int, const struct rlimit *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBid_t\fP type shall be defined through \fBtypedef\fP as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
Inclusion of the \fI<sys/resource.h>\fP header may also make visible
|
||||
all symbols from \fI<sys/time.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/time.h>\fP , \fI<sys/types.h>\fP , the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, \fIgetpriority\fP(), \fIgetrusage\fP(),
|
||||
\fIgetrlimit\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,115 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/select.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/select.h>
|
||||
.SH NAME
|
||||
sys/select.h \- select types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/select.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/select.h>\fP header shall define the \fBtimeval\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtime_t tv_sec \fP Seconds. \fB
|
||||
suseconds_t tv_usec \fP Microseconds. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBtime_t\fP and \fBsuseconds_t\fP types shall be defined as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The \fBsigset_t\fP type shall be defined as described in \fI<signal.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fBtimespec\fP structure shall be defined as described in \fI<time.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fI<sys/select.h>\fP header shall define the \fBfd_set\fP type
|
||||
as a structure.
|
||||
.LP
|
||||
Each of the following may be declared as a function, or defined as
|
||||
a macro, or both:
|
||||
.TP 7
|
||||
\fBvoid\fP \fIFD_CLR\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
|
||||
.sp
|
||||
Clears the bit for the file descriptor \fIfd\fP in the file descriptor
|
||||
set \fIfdset\fP.
|
||||
.TP 7
|
||||
\fBint\fP \fIFD_ISSET\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
|
||||
.sp
|
||||
Returns a non-zero value if the bit for the file descriptor \fIfd\fP
|
||||
is set in the file descriptor set by \fIfdset\fP, and 0
|
||||
otherwise.
|
||||
.TP 7
|
||||
\fBvoid\fP \fIFD_SET\fP(\fBint\fP \fIfd\fP, \fBfd_set *\fP\fIfdset\fP)
|
||||
.sp
|
||||
Sets the bit for the file descriptor \fIfd\fP in the file descriptor
|
||||
set \fIfdset\fP.
|
||||
.TP 7
|
||||
\fBvoid\fP \fIFD_ZERO\fP(\fBfd_set *\fP\fIfdset\fP)
|
||||
.sp
|
||||
Initializes the file descriptor set \fIfdset\fP to have zero bits
|
||||
for all file descriptors.
|
||||
.sp
|
||||
.LP
|
||||
If implemented as macros, these may evaluate their arguments more
|
||||
than once, so applications should ensure that the arguments
|
||||
they supply are never expressions with side effects.
|
||||
.LP
|
||||
The following shall be defined as a macro:
|
||||
.TP 7
|
||||
FD_SETSIZE
|
||||
.sp
|
||||
Maximum number of file descriptors in an \fBfd_set\fP structure.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
const struct timespec *restrict, const sigset_t *restrict);
|
||||
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
struct timeval *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<sys/select.h>\fP header may make visible all
|
||||
symbols from the headers \fI<signal.h>\fP, \fI<sys/time.h>\fP,
|
||||
and \fI<time.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<signal.h>\fP , \fI<sys/time.h>\fP ,
|
||||
\fI<sys/types.h>\fP , \fI<time.h>\fP , the
|
||||
System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIpselect\fP(),
|
||||
\fIselect\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,131 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/sem.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/sem.h>
|
||||
.SH NAME
|
||||
sys/sem.h \- XSI semaphore facility
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/sem.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/sem.h>\fP header shall define the following constants
|
||||
and structures.
|
||||
.LP
|
||||
Semaphore operation flags:
|
||||
.TP 7
|
||||
SEM_UNDO
|
||||
Set up adjust on exit entry.
|
||||
.sp
|
||||
.LP
|
||||
Command definitions for the \fIsemctl\fP() function shall be provided
|
||||
as follows:
|
||||
.TP 7
|
||||
GETNCNT
|
||||
Get \fIsemncnt\fP.
|
||||
.TP 7
|
||||
GETPID
|
||||
Get \fIsempid\fP.
|
||||
.TP 7
|
||||
GETVAL
|
||||
Get \fIsemval\fP.
|
||||
.TP 7
|
||||
GETALL
|
||||
Get all cases of \fIsemval\fP.
|
||||
.TP 7
|
||||
GETZCNT
|
||||
Get \fIsemzcnt\fP.
|
||||
.TP 7
|
||||
SETVAL
|
||||
Set \fIsemval\fP.
|
||||
.TP 7
|
||||
SETALL
|
||||
Set all cases of \fIsemval\fP.
|
||||
.sp
|
||||
.LP
|
||||
The \fBsemid_ds\fP structure shall contain the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct ipc_perm sem_perm \fP Operation permission structure. \fB
|
||||
unsigned short sem_nsems\fP Number of semaphores in set. \fB
|
||||
time_t sem_otime\fP Last \fIsemop\fP
|
||||
() time. \fB
|
||||
time_t sem_ctime\fP Last time changed by \fIsemctl\fP
|
||||
(). \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, and \fBsize_t\fP types
|
||||
shall be defined as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
A semaphore shall be represented by an anonymous structure containing
|
||||
the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned short semval \fP Semaphore value. \fB
|
||||
pid_t sempid \fP Process ID of last operation. \fB
|
||||
unsigned short semncnt \fP Number of processes waiting for \fIsemval\fP \fB
|
||||
\fP to become greater than current value. \fB
|
||||
unsigned short semzcnt \fP Number of processes waiting for \fIsemval\fP \fB
|
||||
\fP to become 0. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsembuf\fP structure shall contain the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned short sem_num \fP Semaphore number. \fB
|
||||
short sem_op \fP Semaphore operation. \fB
|
||||
short sem_flg \fP Operation flags. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint semctl(int, int, int, ...);
|
||||
int semget(key_t, int, int);
|
||||
int semop(int, struct sembuf *, size_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
|
||||
when
|
||||
this header is included.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/ipc.h>\fP , \fI<sys/types.h>\fP , \fIsemctl\fP(), \fIsemget\fP(),
|
||||
\fIsemop\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,99 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/shm.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/shm.h>
|
||||
.SH NAME
|
||||
sys/shm.h \- XSI shared memory facility
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/shm.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/shm.h>\fP header shall define the following symbolic constants:
|
||||
.TP 7
|
||||
SHM_RDONLY
|
||||
Attach read-only (else read-write).
|
||||
.TP 7
|
||||
SHM_RND
|
||||
Round attach address to SHMLBA.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/shm.h>\fP header shall define the following symbolic value:
|
||||
.TP 7
|
||||
SHMLBA
|
||||
Segment low boundary address multiple.
|
||||
.sp
|
||||
.LP
|
||||
The following data types shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBshmatt_t\fP
|
||||
Unsigned integer used for the number of current attaches that must
|
||||
be able to store values at least as large as a type
|
||||
\fBunsigned short\fP.
|
||||
.sp
|
||||
.LP
|
||||
The \fBshmid_ds\fP structure shall contain the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct ipc_perm shm_perm \fP Operation permission structure. \fB
|
||||
size_t shm_segsz \fP Size of segment in bytes. \fB
|
||||
pid_t shm_lpid \fP Process ID of last shared memory operation. \fB
|
||||
pid_t shm_cpid \fP Process ID of creator. \fB
|
||||
shmatt_t shm_nattch\fP Number of current attaches. \fB
|
||||
time_t shm_atime \fP Time of last \fIshmat\fP
|
||||
(). \fB
|
||||
time_t shm_dtime \fP Time of last \fIshmdt\fP
|
||||
(). \fB
|
||||
time_t shm_ctime \fP Time of last change by \fIshmctl\fP
|
||||
(). \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBpid_t\fP, \fBtime_t\fP, \fBkey_t\fP, and \fBsize_t\fP types
|
||||
shall be defined as described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid *shmat(int, const void *, int);
|
||||
int shmctl(int, int, struct shmid_ds *);
|
||||
int shmdt(const void *);
|
||||
int shmget(key_t, size_t, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
In addition, all of the symbols from \fI<sys/ipc.h>\fP shall be defined
|
||||
when
|
||||
this header is included.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/ipc.h>\fP , \fI<sys/types.h>\fP , the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, \fIshmat\fP(), \fIshmctl\fP(), \fIshmdt\fP(),
|
||||
\fIshmget\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,446 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/socket.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/socket.h>
|
||||
.SH NAME
|
||||
sys/socket.h \- main sockets header
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/socket.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the type \fBsocklen_t\fP,
|
||||
which is an integer type of width of at least 32
|
||||
bits; see APPLICATION USAGE.
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the unsigned integer
|
||||
type \fBsa_family_t\fP.
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the \fBsockaddr\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsa_family_t sa_family \fP Address family. \fB
|
||||
char sa_data[] \fP Socket address (variable-length data). \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsockaddr\fP structure is used to define a socket address which
|
||||
is used in the \fIbind\fP(), \fIconnect\fP(), \fIgetpeername\fP(),
|
||||
\fIgetsockname\fP(),
|
||||
\fIrecvfrom\fP(), and \fIsendto\fP()
|
||||
functions.
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the \fBsockaddr_storage\fP
|
||||
structure. This structure shall be:
|
||||
.IP " *" 3
|
||||
Large enough to accommodate all supported protocol-specific address
|
||||
structures
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Aligned at an appropriate boundary so that pointers to it can be cast
|
||||
as pointers to protocol-specific address structures and
|
||||
used to access the fields of those structures without alignment problems
|
||||
.LP
|
||||
.LP
|
||||
The \fBsockaddr_storage\fP structure shall contain at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsa_family_t ss_family
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
When a \fBsockaddr_storage\fP structure is cast as a \fBsockaddr\fP
|
||||
structure, the \fIss_family\fP field of the
|
||||
\fBsockaddr_storage\fP structure shall map onto the \fIsa_family\fP
|
||||
field of the \fBsockaddr\fP structure. When a
|
||||
\fBsockaddr_storage\fP structure is cast as a protocol-specific address
|
||||
structure, the \fIss_family\fP field shall map onto a
|
||||
field of that structure that is of type \fBsa_family_t\fP and that
|
||||
identifies the protocol's address family.
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the \fBmsghdr\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid *msg_name \fP Optional address. \fB
|
||||
socklen_t msg_namelen \fP Size of address. \fB
|
||||
struct iovec *msg_iov \fP Scatter/gather array. \fB
|
||||
int msg_iovlen \fP Members in \fImsg_iov\fP. \fB
|
||||
void *msg_control \fP Ancillary data; see below. \fB
|
||||
socklen_t msg_controllen \fP Ancillary data buffer \fIlen\fP. \fB
|
||||
int msg_flags \fP Flags on received message. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBmsghdr\fP structure is used to minimize the number of directly
|
||||
supplied parameters to the \fIrecvmsg\fP() and \fIsendmsg\fP() functions.
|
||||
This
|
||||
structure is used as a \fIvalue\fP- \fIresult\fP parameter in the
|
||||
\fIrecvmsg\fP()
|
||||
function and \fIvalue\fP only for the \fIsendmsg\fP() function.
|
||||
.LP
|
||||
The \fBiovec\fP structure shall be defined as described in \fI<sys/uio.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the \fBcmsghdr\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsocklen_t cmsg_len \fP Data byte count, including the \fBcmsghdr\fP. \fB
|
||||
int cmsg_level \fP Originating protocol. \fB
|
||||
int cmsg_type \fP Protocol-specific type. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBcmsghdr\fP structure is used for storage of ancillary data
|
||||
object information.
|
||||
.LP
|
||||
Ancillary data consists of a sequence of pairs, each consisting of
|
||||
a \fBcmsghdr\fP structure followed by a data array. The data
|
||||
array contains the ancillary data message, and the \fBcmsghdr\fP structure
|
||||
contains descriptive information that allows an
|
||||
application to correctly parse the data.
|
||||
.LP
|
||||
The values for \fIcmsg_level\fP shall be legal values for the \fIlevel\fP
|
||||
argument to the \fIgetsockopt\fP() and \fIsetsockopt\fP()
|
||||
functions. The system documentation shall specify the \fIcmsg_type\fP
|
||||
definitions for the supported protocols.
|
||||
.LP
|
||||
Ancillary data is also possible at the socket level. The \fI<sys/socket.h>\fP
|
||||
header defines the following macro for use
|
||||
as the \fIcmsg_type\fP value when \fIcmsg_level\fP is SOL_SOCKET:
|
||||
.TP 7
|
||||
SCM_RIGHTS
|
||||
Indicates that the data array contains the access rights to be sent
|
||||
or received.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header defines the following macros to gain
|
||||
access to the data arrays in the ancillary data
|
||||
associated with a message header:
|
||||
.TP 7
|
||||
CMSG_DATA(\fIcmsg\fP)
|
||||
.sp
|
||||
If the argument is a pointer to a \fBcmsghdr\fP structure, this macro
|
||||
shall return an unsigned character pointer to the data array
|
||||
associated with the \fBcmsghdr\fP structure.
|
||||
.TP 7
|
||||
CMSG_NXTHDR(\fImhdr,cmsg\fP)
|
||||
.sp
|
||||
If the first argument is a pointer to a \fBmsghdr\fP structure and
|
||||
the second argument is a pointer to a \fBcmsghdr\fP structure
|
||||
in the ancillary data pointed to by the \fImsg_control\fP field of
|
||||
that \fBmsghdr\fP structure, this macro shall return a pointer
|
||||
to the next \fBcmsghdr\fP structure, or a null pointer if this structure
|
||||
is the last \fBcmsghdr\fP in the ancillary data.
|
||||
.TP 7
|
||||
CMSG_FIRSTHDR(\fImhdr\fP)
|
||||
.sp
|
||||
If the argument is a pointer to a \fBmsghdr\fP structure, this macro
|
||||
shall return a pointer to the first \fBcmsghdr\fP structure
|
||||
in the ancillary data associated with this \fBmsghdr\fP structure,
|
||||
or a null pointer if there is no ancillary data associated with
|
||||
the \fBmsghdr\fP structure.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the \fBlinger\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint l_onoff \fP Indicates whether linger option is enabled. \fB
|
||||
int l_linger \fP Linger time, in seconds. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macros,
|
||||
with distinct integer values:
|
||||
.TP 7
|
||||
SOCK_DGRAM
|
||||
Datagram socket.
|
||||
.TP 7
|
||||
SOCK_RAW
|
||||
Raw Protocol Interface.
|
||||
.TP 7
|
||||
SOCK_SEQPACKET
|
||||
Sequenced-packet socket.
|
||||
.TP 7
|
||||
SOCK_STREAM
|
||||
Byte-stream socket.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macro for
|
||||
use as the \fIlevel\fP argument of \fIsetsockopt\fP() and \fIgetsockopt\fP().
|
||||
.TP 7
|
||||
SOL_SOCKET
|
||||
Options to be accessed at socket level, not protocol level.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macros,
|
||||
with distinct integer values, for use as the
|
||||
\fIoption_name\fP argument in \fIgetsockopt\fP() or \fIsetsockopt\fP()
|
||||
calls:
|
||||
.TP 7
|
||||
SO_ACCEPTCONN
|
||||
Socket is accepting connections.
|
||||
.TP 7
|
||||
SO_BROADCAST
|
||||
Transmission of broadcast messages is supported.
|
||||
.TP 7
|
||||
SO_DEBUG
|
||||
Debugging information is being recorded.
|
||||
.TP 7
|
||||
SO_DONTROUTE
|
||||
Bypass normal routing.
|
||||
.TP 7
|
||||
SO_ERROR
|
||||
Socket error status.
|
||||
.TP 7
|
||||
SO_KEEPALIVE
|
||||
Connections are kept alive with periodic messages.
|
||||
.TP 7
|
||||
SO_LINGER
|
||||
Socket lingers on close.
|
||||
.TP 7
|
||||
SO_OOBINLINE
|
||||
Out-of-band data is transmitted in line.
|
||||
.TP 7
|
||||
SO_RCVBUF
|
||||
Receive buffer size.
|
||||
.TP 7
|
||||
SO_RCVLOWAT
|
||||
Receive ``low water mark''.
|
||||
.TP 7
|
||||
SO_RCVTIMEO
|
||||
Receive timeout.
|
||||
.TP 7
|
||||
SO_REUSEADDR
|
||||
Reuse of local addresses is supported.
|
||||
.TP 7
|
||||
SO_SNDBUF
|
||||
Send buffer size.
|
||||
.TP 7
|
||||
SO_SNDLOWAT
|
||||
Send ``low water mark''.
|
||||
.TP 7
|
||||
SO_SNDTIMEO
|
||||
Send timeout.
|
||||
.TP 7
|
||||
SO_TYPE
|
||||
Socket type.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macro as
|
||||
the maximum \fIbacklog\fP queue length which may be
|
||||
specified by the \fIbacklog\fP field of the \fIlisten\fP() function:
|
||||
.TP 7
|
||||
SOMAXCONN
|
||||
The maximum \fIbacklog\fP queue length.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macros,
|
||||
with distinct integer values, for use as the valid
|
||||
values for the \fImsg_flags\fP field in the \fBmsghdr\fP structure,
|
||||
or the \fIflags\fP parameter in \fIrecvfrom\fP(), \fIrecvmsg\fP(),
|
||||
\fIsendmsg\fP(), or \fIsendto\fP() calls:
|
||||
.TP 7
|
||||
MSG_CTRUNC
|
||||
Control data truncated.
|
||||
.TP 7
|
||||
MSG_DONTROUTE
|
||||
Send without using routing tables.
|
||||
.TP 7
|
||||
MSG_EOR
|
||||
Terminates a record (if supported by the protocol).
|
||||
.TP 7
|
||||
MSG_OOB
|
||||
Out-of-band data.
|
||||
.TP 7
|
||||
MSG_PEEK
|
||||
Leave received data in queue.
|
||||
.TP 7
|
||||
MSG_TRUNC
|
||||
Normal data truncated.
|
||||
.TP 7
|
||||
MSG_WAITALL
|
||||
Attempt to fill the read buffer.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macros,
|
||||
with distinct integer values:
|
||||
.TP 7
|
||||
AF_INET
|
||||
Internet domain sockets for use with IPv4 addresses.
|
||||
.TP 7
|
||||
AF_INET6
|
||||
Internet domain sockets for use with IPv6 addresses.
|
||||
.TP 7
|
||||
AF_UNIX
|
||||
UNIX domain sockets.
|
||||
.TP 7
|
||||
AF_UNSPEC
|
||||
Unspecified.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/socket.h>\fP header shall define the following macros,
|
||||
with distinct integer values:
|
||||
.TP 7
|
||||
SHUT_RD
|
||||
Disables further receive operations.
|
||||
.TP 7
|
||||
SHUT_RDWR
|
||||
Disables further send and receive operations.
|
||||
.TP 7
|
||||
SHUT_WR
|
||||
Disables further send operations.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint accept(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int bind(int, const struct sockaddr *, socklen_t);
|
||||
int connect(int, const struct sockaddr *, socklen_t);
|
||||
int getpeername(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int getsockname(int, struct sockaddr *restrict, socklen_t *restrict);
|
||||
int getsockopt(int, int, int, void *restrict, socklen_t *restrict);
|
||||
int listen(int, int);
|
||||
ssize_t recv(int, void *, size_t, int);
|
||||
ssize_t recvfrom(int, void *restrict, size_t, int,
|
||||
struct sockaddr *restrict, socklen_t *restrict);
|
||||
ssize_t recvmsg(int, struct msghdr *, int);
|
||||
ssize_t send(int, const void *, size_t, int);
|
||||
ssize_t sendmsg(int, const struct msghdr *, int);
|
||||
ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
|
||||
socklen_t);
|
||||
int setsockopt(int, int, int, const void *, socklen_t);
|
||||
int shutdown(int, int);
|
||||
int socket(int, int, int);
|
||||
int sockatmark(int);
|
||||
int socketpair(int, int, int, int[2]);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of \fI<sys/socket.h>\fP may also make visible all symbols
|
||||
from \fI<sys/uio.h>\fP.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
To forestall portability problems, it is recommended that applications
|
||||
not use values larger than 2**31
|
||||
-1 for the \fBsocklen_t\fP type.
|
||||
.LP
|
||||
The \fBsockaddr_storage\fP structure solves the problem of declaring
|
||||
storage for automatic variables which is both large enough
|
||||
and aligned enough for storing the socket address data structure of
|
||||
any family. For example, code with a file descriptor and
|
||||
without the context of the address family can pass a pointer to a
|
||||
variable of this type, where a pointer to a socket address
|
||||
structure is expected in calls such as \fIgetpeername\fP(), and determine
|
||||
the
|
||||
address family by accessing the received content after the call.
|
||||
.LP
|
||||
The example below illustrates a data structure which aligns on a 64-bit
|
||||
boundary. An implementation-defined field
|
||||
\fI_ss_align\fP following \fI_ss_pad1\fP is used to force a 64-bit
|
||||
alignment which covers proper alignment good enough for needs
|
||||
of at least \fBsockaddr_in6\fP (IPv6) and \fBsockaddr_in\fP (IPv4)
|
||||
address data structures. The size of padding field
|
||||
\fI_ss_pad1\fP depends on the chosen alignment boundary. The size
|
||||
of padding field \fI_ss_pad2\fP depends on the value of overall
|
||||
size chosen for the total size of the structure. This size and alignment
|
||||
are represented in the above example by
|
||||
implementation-defined (not required) constants _SS_MAXSIZE (chosen
|
||||
value 128) and _SS_ALIGNMENT (with chosen value 8). Constants
|
||||
_SS_PAD1SIZE (derived value 6) and _SS_PAD2SIZE (derived value 112)
|
||||
are also for illustration and not required. The
|
||||
implementation-defined definitions and structure field names above
|
||||
start with an underscore to denote implementation private name
|
||||
space. Portable code is not expected to access or reference those
|
||||
fields or constants.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB/*
|
||||
* Desired design of maximum size and alignment.
|
||||
*/
|
||||
#define _SS_MAXSIZE 128
|
||||
/* Implementation-defined maximum size. */
|
||||
#define _SS_ALIGNSIZE (sizeof(int64_t))
|
||||
/* Implementation-defined desired alignment. */
|
||||
.sp
|
||||
|
||||
/*
|
||||
* Definitions used for sockaddr_storage structure paddings design.
|
||||
*/
|
||||
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(sa_family_t))
|
||||
#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(sa_family_t)+ \\
|
||||
_SS_PAD1SIZE + _SS_ALIGNSIZE))
|
||||
struct sockaddr_storage {
|
||||
sa_family_t ss_family; /* Address family. */
|
||||
/*
|
||||
* Following fields are implementation-defined.
|
||||
*/
|
||||
char _ss_pad1[_SS_PAD1SIZE];
|
||||
/* 6-byte pad; this is to make implementation-defined
|
||||
pad up to alignment field that follows explicit in
|
||||
the data structure. */
|
||||
int64_t _ss_align; /* Field to force desired structure
|
||||
storage alignment. */
|
||||
char _ss_pad2[_SS_PAD2SIZE];
|
||||
/* 112-byte pad to achieve desired size,
|
||||
_SS_MAXSIZE value minus size of ss_family
|
||||
__ss_pad1, __ss_align fields is 112. */
|
||||
};
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/uio.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fIaccept\fP(), \fIbind\fP(), \fIconnect\fP(),
|
||||
\fIgetpeername\fP(), \fIgetsockname\fP(),
|
||||
\fIgetsockopt\fP(), \fIlisten\fP(), \fIrecv\fP(), \fIrecvfrom\fP(),
|
||||
\fIrecvmsg\fP(), \fIsend\fP(), \fIsendmsg\fP(), \fIsendto\fP(), \fIsetsockopt\fP(),
|
||||
\fIshutdown\fP(), \fIsocket\fP(), \fIsocketpair\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,355 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/stat.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/stat.h>
|
||||
.SH NAME
|
||||
sys/stat.h \- data returned by the stat() function
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/stat.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/stat.h>\fP header shall define the structure of the data
|
||||
returned by the functions \fIfstat\fP(), \fIlstat\fP(), and \fIstat\fP().
|
||||
.LP
|
||||
The \fBstat\fP structure shall contain at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBdev_t st_dev \fP Device ID of device containing file. \fB
|
||||
ino_t st_ino \fP File serial number. \fB
|
||||
mode_t st_mode \fP Mode of file (see below). \fB
|
||||
nlink_t st_nlink \fP Number of hard links to the file. \fB
|
||||
uid_t st_uid \fP User ID of file. \fB
|
||||
gid_t st_gid \fP Group ID of file. \fB
|
||||
|
||||
dev_t st_rdev \fP Device ID (if file is character or block special). \fB
|
||||
|
||||
off_t st_size \fP For regular files, the file size in bytes. \fB
|
||||
\fP For symbolic links, the length in bytes of the \fB
|
||||
\fP pathname contained in the symbolic link. \fB
|
||||
|
||||
\fP For a shared memory object, the length in bytes. \fB
|
||||
|
||||
|
||||
\fP For a typed memory object, the length in bytes. \fB
|
||||
|
||||
\fP For other file types, the use of this field is \fB
|
||||
\fP unspecified. \fB
|
||||
time_t st_atime \fP Time of last access. \fB
|
||||
time_t st_mtime \fP Time of last data modification. \fB
|
||||
time_t st_ctime \fP Time of last status change. \fB
|
||||
|
||||
blksize_t st_blksize\fP A file system-specific preferred I/O block size for \fB
|
||||
\fP this object. In some file system types, this may \fB
|
||||
\fP vary from file to file. \fB
|
||||
blkcnt_t st_blocks \fP Number of blocks allocated for this object. \fB
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fIst_ino\fP and \fIst_dev\fP fields taken together uniquely identify
|
||||
the file within the system. The \fBblkcnt_t\fP,
|
||||
\fBblksize_t\fP, \fBdev_t\fP, \fBino_t\fP, \fBmode_t\fP, \fBnlink_t\fP,
|
||||
\fBuid_t\fP, \fBgid_t\fP, \fBoff_t\fP, and
|
||||
\fBtime_t\fP types shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&. Times
|
||||
shall be given in seconds since the Epoch.
|
||||
.LP
|
||||
Unless otherwise specified, the structure members \fIst_mode\fP, \fIst_ino\fP,
|
||||
\fIst_dev\fP, \fIst_uid\fP, \fIst_gid\fP,
|
||||
\fIst_atime\fP, \fIst_ctime\fP, and \fIst_mtime\fP shall have meaningful
|
||||
values for all file types defined in
|
||||
IEEE\ Std\ 1003.1-2001.
|
||||
.LP
|
||||
For symbolic links, the \fIst_mode\fP member shall contain meaningful
|
||||
information, which can be used with the file type macros
|
||||
described below, that take a \fImode\fP argument. The \fIst_size\fP
|
||||
member shall contain the length, in bytes, of the pathname
|
||||
contained in the symbolic link. File mode bits and the contents of
|
||||
the remaining members of the \fBstat\fP structure are
|
||||
unspecified. The value returned in the \fIst_size\fP field shall be
|
||||
the length of the contents of the symbolic link, and shall not
|
||||
count a trailing null if one is present.
|
||||
.LP
|
||||
The following symbolic names for the values of type \fBmode_t\fP shall
|
||||
also be defined.
|
||||
.LP
|
||||
File type:
|
||||
.TP 7
|
||||
S_IFMT
|
||||
Type of file.
|
||||
.TP 7
|
||||
S_IFBLK
|
||||
.RS
|
||||
Block special.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFCHR
|
||||
.RS
|
||||
Character special.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFIFO
|
||||
.RS
|
||||
FIFO special.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFREG
|
||||
.RS
|
||||
Regular.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFDIR
|
||||
.RS
|
||||
Directory.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFLNK
|
||||
.RS
|
||||
Symbolic link.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IFSOCK
|
||||
.RS
|
||||
Socket.
|
||||
.RE
|
||||
.sp
|
||||
.sp
|
||||
.LP
|
||||
File mode bits:
|
||||
.TP 7
|
||||
S_IRWXU
|
||||
Read, write, execute/search by owner.
|
||||
.TP 7
|
||||
S_IRUSR
|
||||
.RS
|
||||
Read permission, owner.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IWUSR
|
||||
.RS
|
||||
Write permission, owner.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IXUSR
|
||||
.RS
|
||||
Execute/search permission, owner.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
S_IRWXG
|
||||
Read, write, execute/search by group.
|
||||
.TP 7
|
||||
S_IRGRP
|
||||
.RS
|
||||
Read permission, group.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IWGRP
|
||||
.RS
|
||||
Write permission, group.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IXGRP
|
||||
.RS
|
||||
Execute/search permission, group.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
S_IRWXO
|
||||
Read, write, execute/search by others.
|
||||
.TP 7
|
||||
S_IROTH
|
||||
.RS
|
||||
Read permission, others.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IWOTH
|
||||
.RS
|
||||
Write permission, others.
|
||||
.RE
|
||||
.TP 7
|
||||
S_IXOTH
|
||||
.RS
|
||||
Execute/search permission, others.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
S_ISUID
|
||||
Set-user-ID on execution.
|
||||
.TP 7
|
||||
S_ISGID
|
||||
Set-group-ID on execution.
|
||||
.TP 7
|
||||
S_ISVTX
|
||||
On directories, restricted deletion flag.
|
||||
.sp
|
||||
.LP
|
||||
The bits defined by S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
|
||||
S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, \ and
|
||||
S_ISVTX \ shall be unique.
|
||||
.LP
|
||||
S_IRWXU is the bitwise-inclusive OR of S_IRUSR, S_IWUSR, and S_IXUSR.
|
||||
.LP
|
||||
S_IRWXG is the bitwise-inclusive OR of S_IRGRP, S_IWGRP, and S_IXGRP.
|
||||
.LP
|
||||
S_IRWXO is the bitwise-inclusive OR of S_IROTH, S_IWOTH, and S_IXOTH.
|
||||
.LP
|
||||
Implementations may OR other implementation-defined bits into S_IRWXU,
|
||||
S_IRWXG, and S_IRWXO, but they shall not overlap any of
|
||||
the other bits defined in this volume of IEEE\ Std\ 1003.1-2001. The
|
||||
\fIfile permission bits\fP are defined to be those
|
||||
corresponding to the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and
|
||||
S_IRWXO.
|
||||
.LP
|
||||
The following macros shall be provided to test whether a file is of
|
||||
the specified type. The value \fIm\fP supplied to the
|
||||
macros is the value of \fIst_mode\fP from a \fBstat\fP structure.
|
||||
The macro shall evaluate to a non-zero value if the test is
|
||||
true; 0 if the test is false.
|
||||
.TP 7
|
||||
S_ISBLK(\fIm\fP)
|
||||
Test for a block special file.
|
||||
.TP 7
|
||||
S_ISCHR(\fIm\fP)
|
||||
Test for a character special file.
|
||||
.TP 7
|
||||
S_ISDIR(\fIm\fP)
|
||||
Test for a directory.
|
||||
.TP 7
|
||||
S_ISFIFO(\fIm\fP)
|
||||
Test for a pipe or FIFO special file.
|
||||
.TP 7
|
||||
S_ISREG(\fIm\fP)
|
||||
Test for a regular file.
|
||||
.TP 7
|
||||
S_ISLNK(\fIm\fP)
|
||||
Test for a symbolic link.
|
||||
.TP 7
|
||||
S_ISSOCK(\fIm\fP)
|
||||
Test for a socket.
|
||||
.sp
|
||||
.LP
|
||||
The implementation may implement message queues, semaphores, or shared
|
||||
memory objects as distinct file types. The following
|
||||
macros shall be provided to test whether a file is of the specified
|
||||
type. The value of the \fIbuf\fP argument supplied to the
|
||||
macros is a pointer to a \fBstat\fP structure. The macro shall evaluate
|
||||
to a non-zero value if the specified object is implemented
|
||||
as a distinct file type and the specified file type is contained in
|
||||
the \fBstat\fP structure referenced by \fIbuf\fP. Otherwise,
|
||||
the macro shall evaluate to zero.
|
||||
.TP 7
|
||||
S_TYPEISMQ(\fIbuf\fP)
|
||||
Test for a message queue.
|
||||
.TP 7
|
||||
S_TYPEISSEM(\fIbuf\fP)
|
||||
Test for a semaphore.
|
||||
.TP 7
|
||||
S_TYPEISSHM(\fIbuf\fP)
|
||||
Test for a shared memory object.
|
||||
.sp
|
||||
.LP
|
||||
The implementation may implement typed memory objects as distinct
|
||||
file types, and the following macro shall test whether a
|
||||
file is of the specified type. The value of the \fIbuf\fP argument
|
||||
supplied to the macros is a pointer to a \fBstat\fP structure.
|
||||
The macro shall evaluate to a non-zero value if the specified object
|
||||
is implemented as a distinct file type and the specified file
|
||||
type is contained in the \fBstat\fP structure referenced by \fIbuf\fP.
|
||||
Otherwise, the macro shall evaluate to zero.
|
||||
.TP 7
|
||||
S_TYPEISTMO(\fIbuf\fP)
|
||||
Test macro for a typed memory object.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint chmod(const char *, mode_t);
|
||||
int fchmod(int, mode_t);
|
||||
int fstat(int, struct stat *);
|
||||
int lstat(const char *restrict, struct stat *restrict);
|
||||
int mkdir(const char *, mode_t);
|
||||
int mkfifo(const char *, mode_t);
|
||||
|
||||
int mknod(const char *, mode_t, dev_t);
|
||||
|
||||
int stat(const char *restrict, struct stat *restrict);
|
||||
mode_t umask(mode_t);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
Use of the macros is recommended for determining the type of a file.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
A conforming C-language application must include \fI<sys/stat.h>\fP
|
||||
for functions that have arguments or return values of
|
||||
type \fBmode_t\fP, so that symbolic values for that type can be used.
|
||||
An alternative would be to require that these constants are
|
||||
also defined by including \fI<sys/types.h>\fP.
|
||||
.LP
|
||||
The S_ISUID and S_ISGID bits may be cleared on any write, not just
|
||||
on \fIopen\fP(), as
|
||||
some historical implementations do.
|
||||
.LP
|
||||
System calls that update the time entry fields in the \fBstat\fP structure
|
||||
must be documented by the implementors.
|
||||
POSIX-conforming systems should not update the time entry fields for
|
||||
functions listed in the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001 unless the standard requires that they do,
|
||||
except in the case of documented extensions to the
|
||||
standard.
|
||||
.LP
|
||||
Note that \fIst_dev\fP must be unique within a Local Area Network
|
||||
(LAN) in a ``system'' made up of multiple computers' file
|
||||
systems connected by a LAN.
|
||||
.LP
|
||||
Networked implementations of a POSIX-conforming system must guarantee
|
||||
that all files visible within the file tree (including
|
||||
parts of the tree that may be remotely mounted from other machines
|
||||
on the network) on each individual processor are uniquely
|
||||
identified by the combination of the \fIst_ino\fP and \fIst_dev\fP
|
||||
fields.
|
||||
.LP
|
||||
The unit for the \fIst_blocks\fP member of the \fBstat\fP structure
|
||||
is not defined within IEEE\ Std\ 1003.1-2001. In
|
||||
some implementations it is 512 bytes. It may differ on a file system
|
||||
basis. There is no correlation between values of the
|
||||
\fIst_blocks\fP and \fIst_blksize\fP, and the \fIf_bsize\fP (from
|
||||
\fI<sys/statvfs.h>\fP) structure members.
|
||||
.LP
|
||||
Traditionally, some implementations defined the multiplier for \fIst_blocks\fP
|
||||
in
|
||||
\fI<sys/param.h>\fP as the symbol DEV_BSIZE.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
No new S_IFMT symbolic names for the file type values of \fBmode_t\fP
|
||||
will be defined by IEEE\ Std\ 1003.1-2001; if new
|
||||
file types are required, they will only be testable through \fIS_ISxx\fP()
|
||||
or \fIS_TYPEISxxx\fP() macros instead.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/statvfs.h>\fP , \fI<sys/types.h>\fP , the System Interfaces
|
||||
volume of IEEE\ Std\ 1003.1-2001, \fIchmod\fP(), \fIfchmod\fP(), \fIfstat\fP(),
|
||||
\fIlstat\fP(), \fImkdir\fP(), \fImkfifo\fP(), \fImknod\fP(), \fIstat\fP(),
|
||||
\fIumask\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,83 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/statvfs.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/statvfs.h>
|
||||
.SH NAME
|
||||
sys/statvfs.h \- VFS File System information structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/statvfs.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/statvfs.h>\fP header shall define the \fBstatvfs\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBunsigned long f_bsize \fP File system block size. \fB
|
||||
unsigned long f_frsize \fP Fundamental file system block size. \fB
|
||||
fsblkcnt_t f_blocks \fP Total number of blocks on file system in units of \fIf_frsize.\fP \fB
|
||||
fsblkcnt_t f_bfree \fP Total number of free blocks. \fB
|
||||
fsblkcnt_t f_bavail \fP Number of free blocks available to \fB
|
||||
\fP non-privileged process. \fB
|
||||
fsfilcnt_t f_files \fP Total number of file serial numbers. \fB
|
||||
fsfilcnt_t f_ffree \fP Total number of free file serial numbers. \fB
|
||||
fsfilcnt_t f_favail \fP Number of file serial numbers available to \fB
|
||||
\fP non-privileged process. \fB
|
||||
unsigned long f_fsid \fP File system ID. \fB
|
||||
unsigned long f_flag \fP Bit mask of \fIf_flag\fP values. \fB
|
||||
unsigned long f_namemax \fP Maximum filename length. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBfsblkcnt_t\fP and \fBfsfilcnt_t\fP types shall be defined as
|
||||
described in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The following flags for the \fIf_flag\fP member shall be defined:
|
||||
.TP 7
|
||||
ST_RDONLY
|
||||
Read-only file system.
|
||||
.TP 7
|
||||
ST_NOSUID
|
||||
Does not support the semantics of the ST_ISUID and ST_ISGID file mode
|
||||
bits.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint statvfs(const char *restrict, struct statvfs *restrict);
|
||||
int fstatvfs(int, struct statvfs *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fIfstatvfs\fP(), \fIstatvfs\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,103 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/time.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/time.h>
|
||||
.SH NAME
|
||||
sys/time.h \- time types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/time.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/time.h>\fP header shall define the \fBtimeval\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtime_t tv_sec \fP Seconds. \fB
|
||||
suseconds_t tv_usec \fP Microseconds. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<sys/time.h>\fP header shall define the \fBitimerval\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct timeval it_interval\fP Timer interval. \fB
|
||||
struct timeval it_value \fP Current value. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBtime_t\fP and \fBsuseconds_t\fP types shall be defined as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The \fBfd_set\fP type shall be defined as described in \fI<sys/select.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fI<sys/time.h>\fP header shall define the following values for
|
||||
the \fIwhich\fP argument of \fIgetitimer\fP() and \fIsetitimer\fP():
|
||||
.TP 7
|
||||
ITIMER_REAL
|
||||
Decrements in real time.
|
||||
.TP 7
|
||||
ITIMER_VIRTUAL
|
||||
Decrements in process virtual time.
|
||||
.TP 7
|
||||
ITIMER_PROF
|
||||
Decrements both in process virtual time and when the system is running
|
||||
on behalf of the process.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be defined as described in \fI<sys/select.h>\fP
|
||||
: \fIFD_CLR\fP() \fIFD_ISSET\fP() \fIFD_SET\fP() \fIFD_ZERO\fP() FD_SETSIZE
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint getitimer(int, struct itimerval *);
|
||||
int gettimeofday(struct timeval *restrict, void *restrict);
|
||||
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
|
||||
struct timeval *restrict);
|
||||
int setitimer(int, const struct itimerval *restrict,
|
||||
struct itimerval *restrict);
|
||||
int utimes(const char *, const struct timeval [2]); (\fP\fBLEGACY\fP \fB)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<sys/time.h>\fP header may make visible all symbols
|
||||
from the \fI<sys/select.h>\fP header.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/select.h>\fP , \fI<sys/types.h>\fP , the System Interfaces
|
||||
volume of IEEE\ Std\ 1003.1-2001, \fIgetitimer\fP(), \fIgettimeofday\fP(),
|
||||
\fIselect\fP(), \fIsetitimer\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,61 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/timeb.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/timeb.h>
|
||||
.SH NAME
|
||||
sys/timeb.h \- additional definitions for date and time
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/timeb.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/timeb.h>\fP header shall define the \fBtimeb\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtime_t time \fP The seconds portion of the current time. \fB
|
||||
unsigned short millitm \fP The milliseconds portion of the current time. \fB
|
||||
short timezone\fP The local timezone in minutes west of Greenwich. \fB
|
||||
short dstflag \fP TRUE if Daylight Savings Time is in effect. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBtime_t\fP type shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint ftime(struct timeb *); (\fP\fBLEGACY\fP \fB)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , \fI<time.h>\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,63 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/times.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/times.h>
|
||||
.SH NAME
|
||||
sys/times.h \- file access and modification times structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/times.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/times.h>\fP header shall define the structure \fBtms\fP,
|
||||
which is returned by \fItimes\fP() and includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBclock_t tms_utime \fP User CPU time. \fB
|
||||
clock_t tms_stime \fP System CPU time. \fB
|
||||
clock_t tms_cutime\fP User CPU time of terminated child processes. \fB
|
||||
clock_t tms_cstime\fP System CPU time of terminated child processes. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBclock_t\fP type shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBclock_t times(struct tms *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fItimes\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,291 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/types.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/types.h>
|
||||
.SH NAME
|
||||
sys/types.h \- data types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/types.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/types.h>\fP header shall include definitions for at least
|
||||
the following types:
|
||||
.TP 7
|
||||
\fBblkcnt_t\fP
|
||||
Used for file block counts.
|
||||
.TP 7
|
||||
\fBblksize_t\fP
|
||||
Used for block sizes.
|
||||
.TP 7
|
||||
\fBclock_t\fP
|
||||
Used for system times in clock ticks or CLOCKS_PER_SEC; see \fI<time.h>\fP
|
||||
\&.
|
||||
.TP 7
|
||||
\fBclockid_t\fP
|
||||
Used for clock ID type in the clock and timer functions.
|
||||
.TP 7
|
||||
\fBdev_t\fP
|
||||
Used for device IDs.
|
||||
.TP 7
|
||||
\fBfsblkcnt_t\fP
|
||||
Used for file system block counts.
|
||||
.TP 7
|
||||
\fBfsfilcnt_t\fP
|
||||
Used for file system file counts.
|
||||
.TP 7
|
||||
\fBgid_t\fP
|
||||
Used for group IDs.
|
||||
.TP 7
|
||||
\fBid_t\fP
|
||||
Used as a general identifier; can be used to contain at least a \fBpid_t\fP,
|
||||
\fBuid_t\fP, or \fBgid_t\fP.
|
||||
.TP 7
|
||||
\fBino_t\fP
|
||||
Used for file serial numbers.
|
||||
.TP 7
|
||||
\fBkey_t\fP
|
||||
Used for XSI interprocess communication.
|
||||
.TP 7
|
||||
\fBmode_t\fP
|
||||
Used for some file attributes.
|
||||
.TP 7
|
||||
\fBnlink_t\fP
|
||||
Used for link counts.
|
||||
.TP 7
|
||||
\fBoff_t\fP
|
||||
Used for file sizes.
|
||||
.TP 7
|
||||
\fBpid_t\fP
|
||||
Used for process IDs and process group IDs.
|
||||
.TP 7
|
||||
\fBpthread_attr_t\fP
|
||||
Used to identify a thread attribute object.
|
||||
.TP 7
|
||||
\fBpthread_barrier_t\fP
|
||||
Used to identify a barrier.
|
||||
.TP 7
|
||||
\fBpthread_barrierattr_t\fP
|
||||
Used to define a barrier attributes object.
|
||||
.TP 7
|
||||
\fBpthread_cond_t\fP
|
||||
Used for condition variables.
|
||||
.TP 7
|
||||
\fBpthread_condattr_t\fP
|
||||
Used to identify a condition attribute object.
|
||||
.TP 7
|
||||
\fBpthread_key_t\fP
|
||||
Used for thread-specific data keys.
|
||||
.TP 7
|
||||
\fBpthread_mutex_t\fP
|
||||
Used for mutexes.
|
||||
.TP 7
|
||||
\fBpthread_mutexattr_t\fP
|
||||
Used to identify a mutex attribute object.
|
||||
.TP 7
|
||||
\fBpthread_once_t\fP
|
||||
Used for dynamic package initialization.
|
||||
.TP 7
|
||||
\fBpthread_rwlock_t\fP
|
||||
Used for read-write locks.
|
||||
.TP 7
|
||||
\fBpthread_rwlockattr_t\fP
|
||||
Used for read-write lock attributes.
|
||||
.TP 7
|
||||
\fBpthread_spinlock_t\fP
|
||||
Used to identify a spin lock.
|
||||
.TP 7
|
||||
\fBpthread_t\fP
|
||||
Used to identify a thread.
|
||||
.TP 7
|
||||
\fBsize_t\fP
|
||||
Used for sizes of objects.
|
||||
.TP 7
|
||||
\fBssize_t\fP
|
||||
Used for a count of bytes or an error indication.
|
||||
.TP 7
|
||||
\fBsuseconds_t\fP
|
||||
Used for time in microseconds.
|
||||
.TP 7
|
||||
\fBtime_t\fP
|
||||
Used for time in seconds.
|
||||
.TP 7
|
||||
\fBtimer_t\fP
|
||||
Used for timer ID returned by \fItimer_create\fP().
|
||||
.TP 7
|
||||
\fBtrace_attr_t\fP
|
||||
Used to identify a trace stream attributes object.
|
||||
.TP 7
|
||||
\fBtrace_event_id_t\fP
|
||||
Used to identify a trace event type.
|
||||
.TP 7
|
||||
\fBtrace_event_set_t\fP
|
||||
Used to identify a trace event type set.
|
||||
.TP 7
|
||||
\fBtrace_id_t\fP
|
||||
Used to identify a trace stream.
|
||||
.TP 7
|
||||
\fBuid_t\fP
|
||||
Used for user IDs.
|
||||
.TP 7
|
||||
\fBuseconds_t\fP
|
||||
Used for time in microseconds.
|
||||
.sp
|
||||
.LP
|
||||
All of the types shall be defined as arithmetic types of an appropriate
|
||||
length, with the following exceptions:
|
||||
.LP
|
||||
.sp
|
||||
.sp
|
||||
\fBkey_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_attr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_barrier_t\fP
|
||||
.br
|
||||
\fBpthread_barrierattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_cond_t\fP
|
||||
.br
|
||||
\fBpthread_condattr_t\fP
|
||||
.br
|
||||
\fBpthread_key_t\fP
|
||||
.br
|
||||
\fBpthread_mutex_t\fP
|
||||
.br
|
||||
\fBpthread_mutexattr_t\fP
|
||||
.br
|
||||
\fBpthread_once_t\fP
|
||||
.br
|
||||
\fBpthread_rwlock_t\fP
|
||||
.br
|
||||
\fBpthread_rwlockattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_spinlock_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBtrace_attr_t\fP
|
||||
.br
|
||||
\fBtrace_event_id_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBtrace_event_set_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBtrace_id_t\fP
|
||||
.br
|
||||
.sp
|
||||
.LP
|
||||
Additionally:
|
||||
.IP " *" 3
|
||||
\fBmode_t\fP shall be an integer type.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBnlink_t\fP, \fBuid_t\fP, \fBgid_t\fP, and \fBid_t\fP shall be integer
|
||||
types.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBblkcnt_t\fP and \fBoff_t\fP shall be signed integer types.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBfsblkcnt_t\fP, \fBfsfilcnt_t\fP, \ and
|
||||
\fBino_t\fP shall be defined as unsigned integer types.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBsize_t\fP shall be an unsigned integer type.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBblksize_t\fP, \fBpid_t\fP, and \fBssize_t\fP shall be signed integer
|
||||
types.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
\fBtime_t\fP and \fBclock_t\fP shall be integer or real-floating types.
|
||||
.LP
|
||||
.LP
|
||||
The type \fBssize_t\fP shall be capable of storing values at least
|
||||
in the range [-1,\ {SSIZE_MAX}]. \ The type
|
||||
\fBuseconds_t\fP shall be an unsigned integer type capable of storing
|
||||
values at least in the range [0,\ 1000000]. The type
|
||||
\fBsuseconds_t\fP shall be a signed integer type capable of storing
|
||||
values at least in the range [-1,\ 1000000].
|
||||
.LP
|
||||
The implementation shall support one or more programming environments
|
||||
in which the widths of \fBblksize_t\fP, \fBpid_t\fP,
|
||||
\fBsize_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, and \fBuseconds_t\fP
|
||||
are no greater than the width of type \fBlong\fP. The
|
||||
names of these programming environments can be obtained using the
|
||||
\fIconfstr\fP()
|
||||
function or the \fIgetconf\fP utility.
|
||||
.LP
|
||||
There are no defined comparison or assignment operators for the following
|
||||
types:
|
||||
.LP
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_attr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_barrier_t\fP
|
||||
.br
|
||||
\fBpthread_barrierattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_cond_t\fP
|
||||
.br
|
||||
\fBpthread_condattr_t\fP
|
||||
.br
|
||||
\fBpthread_mutex_t\fP
|
||||
.br
|
||||
\fBpthread_mutexattr_t\fP
|
||||
.br
|
||||
\fBpthread_rwlock_t\fP
|
||||
.br
|
||||
\fBpthread_rwlockattr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBpthread_spinlock_t\fP
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
\fBtrace_attr_t\fP
|
||||
.br
|
||||
.sp
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<time.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIconfstr\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIgetconf\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,71 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/uio.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/uio.h>
|
||||
.SH NAME
|
||||
sys/uio.h \- definitions for vector I/O operations
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/uio.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/uio.h>\fP header shall define the \fBiovec\fP structure
|
||||
that includes at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid *iov_base \fP Base address of a memory region for input or output. \fB
|
||||
size_t iov_len \fP The size of the memory pointed to by \fIiov_base.\fP \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<sys/uio.h>\fP header uses the \fBiovec\fP structure for scatter/gather
|
||||
I/O.
|
||||
.LP
|
||||
The \fBssize_t\fP and \fBsize_t\fP types shall be defined as described
|
||||
in \fI<sys/types.h>\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBssize_t readv(int, const struct iovec *, int);
|
||||
ssize_t writev(int, const struct iovec *, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The implementation can put a limit on the number of scatter/gather
|
||||
elements which can be processed in one call. The symbol
|
||||
{IOV_MAX} defined in \fI<limits.h>\fP should always be used to learn
|
||||
about the
|
||||
limits instead of assuming a fixed value.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
Traditionally, the maximum number of scatter/gather elements the system
|
||||
can process in one call were described by the symbolic
|
||||
value {UIO_MAXIOV}. In IEEE\ Std\ 1003.1-2001 this value is replaced
|
||||
by the constant {IOV_MAX} which can be found in \fI<limits.h>\fP.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<limits.h>\fP , \fI<sys/types.h>\fP , the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, \fIread\fP(), \fIwrite\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,62 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/un.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/un.h>
|
||||
.SH NAME
|
||||
sys/un.h \- definitions for UNIX domain sockets
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/un.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/un.h>\fP header shall define the \fBsockaddr_un\fP structure
|
||||
that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBsa_family_t sun_family \fP Address family. \fB
|
||||
char sun_path[] \fP Socket pathname. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fBsockaddr_un\fP structure is used to store addresses for UNIX
|
||||
domain sockets. Values of this type shall be cast by
|
||||
applications to \fBstruct sockaddr\fP for use with socket functions.
|
||||
.LP
|
||||
The \fBsa_family_t\fP type shall be defined as described in \fI<sys/socket.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The size of \fIsun_path\fP has intentionally been left undefined.
|
||||
This is because different implementations use different
|
||||
sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD uses a
|
||||
size of 104. Since most implementations originate from BSD
|
||||
versions, the size is typically in the range 92 to 108.
|
||||
.LP
|
||||
Applications should not assume a particular length for \fIsun_path\fP
|
||||
or assume that it can hold {_POSIX_PATH_MAX} characters
|
||||
(255).
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/socket.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fIbind\fP(), \fIsocket\fP(), \fIsocketpair\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,64 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/utsname.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/utsname.h>
|
||||
.SH NAME
|
||||
sys/utsname.h \- system name structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/utsname.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/utsname.h>\fP header shall define the structure \fButsname\fP
|
||||
which shall include at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar sysname[] \fP Name of this implementation of the operating system. \fB
|
||||
char nodename[]\fP Name of this node within an implementation-defined \fB
|
||||
\fP communications network. \fB
|
||||
char release[] \fP Current release level of this implementation. \fB
|
||||
char version[] \fP Current version level of this release. \fB
|
||||
char machine[] \fP Name of the hardware type on which the system is running. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The character arrays are of unspecified size, but the data stored
|
||||
in them shall be terminated by a null byte.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint uname(struct utsname *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIuname\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,122 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<sys/wait.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <sys/wait.h>
|
||||
.SH NAME
|
||||
sys/wait.h \- declarations for waiting
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <sys/wait.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<sys/wait.h>\fP header shall define the following symbolic
|
||||
constants for use with \fIwaitpid\fP():
|
||||
.TP 7
|
||||
WNOHANG
|
||||
Do not hang if no status is available; return immediately.
|
||||
.TP 7
|
||||
WUNTRACED
|
||||
Report status of stopped child process.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<sys/wait.h>\fP header shall define the following macros for
|
||||
analysis of process status values:
|
||||
.TP 7
|
||||
WEXITSTATUS
|
||||
Return exit status.
|
||||
.TP 7
|
||||
WIFCONTINUED
|
||||
True if child has been continued.
|
||||
.TP 7
|
||||
WIFEXITED
|
||||
True if child exited normally.
|
||||
.TP 7
|
||||
WIFSIGNALED
|
||||
True if child exited due to uncaught signal.
|
||||
.TP 7
|
||||
WIFSTOPPED
|
||||
True if child is currently stopped.
|
||||
.TP 7
|
||||
WSTOPSIG
|
||||
Return signal number that caused process to stop.
|
||||
.TP 7
|
||||
WTERMSIG
|
||||
Return signal number that caused process to terminate.
|
||||
.sp
|
||||
.LP
|
||||
The following symbolic constants shall be defined as possible values
|
||||
for the \fIoptions\fP argument to \fIwaitid\fP():
|
||||
.TP 7
|
||||
WEXITED
|
||||
Wait for processes that have exited.
|
||||
.TP 7
|
||||
WSTOPPED
|
||||
Status is returned for any child that has stopped upon receipt of
|
||||
a signal.
|
||||
.TP 7
|
||||
WCONTINUED
|
||||
Status is returned for any child that was stopped and has been continued.
|
||||
.TP 7
|
||||
WNOHANG
|
||||
Return immediately if there are no children to wait for.
|
||||
.TP 7
|
||||
WNOWAIT
|
||||
Keep the process whose status is returned in \fIinfop\fP in a waitable
|
||||
state.
|
||||
.sp
|
||||
.LP
|
||||
The type \fBidtype_t\fP shall be defined as an enumeration type whose
|
||||
possible values shall include at least the following:
|
||||
P_ALL P_PID P_PGID
|
||||
.LP
|
||||
The \fBid_t\fP and \fBpid_t\fP types shall be defined as described
|
||||
in \fI<sys/types.h>\fP .
|
||||
.LP
|
||||
The \fBsiginfo_t\fP type shall be defined as described in \fI<signal.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The \fBrusage\fP structure shall be defined as described in \fI<sys/resource.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
Inclusion of the \fI<sys/wait.h>\fP header may also make visible all
|
||||
symbols from \fI<signal.h>\fP and \fI<sys/resource.h>\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBpid_t wait(int *);
|
||||
|
||||
int waitid(idtype_t, id_t, siginfo_t *, int);
|
||||
|
||||
pid_t waitpid(pid_t, int *, int);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<signal.h>\fP , \fI<sys/resource.h>\fP , \fI<sys/types.h>\fP ,
|
||||
the System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIwait\fP(),
|
||||
\fIwaitid\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,159 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<syslog.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <syslog.h>
|
||||
.SH NAME
|
||||
syslog.h \- definitions for system error logging
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <syslog.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<syslog.h>\fP header shall define the following symbolic constants,
|
||||
zero or more of which may be OR'ed together to
|
||||
form the \fIlogopt\fP option of \fIopenlog\fP():
|
||||
.TP 7
|
||||
LOG_PID
|
||||
Log the process ID with each message.
|
||||
.TP 7
|
||||
LOG_CONS
|
||||
Log to the system console on error.
|
||||
.TP 7
|
||||
LOG_NDELAY
|
||||
Connect to syslog daemon immediately.
|
||||
.TP 7
|
||||
LOG_ODELAY
|
||||
Delay open until \fIsyslog\fP() is called.
|
||||
.TP 7
|
||||
LOG_NOWAIT
|
||||
Do not wait for child processes.
|
||||
.sp
|
||||
.LP
|
||||
The following symbolic constants shall be defined as possible values
|
||||
of the \fIfacility\fP argument to \fIopenlog\fP():
|
||||
.TP 7
|
||||
LOG_KERN
|
||||
Reserved for message generated by the system.
|
||||
.TP 7
|
||||
LOG_USER
|
||||
Message generated by a process.
|
||||
.TP 7
|
||||
LOG_MAIL
|
||||
Reserved for message generated by mail system.
|
||||
.TP 7
|
||||
LOG_NEWS
|
||||
Reserved for message generated by news system.
|
||||
.TP 7
|
||||
LOG_UUCP
|
||||
Reserved for message generated by UUCP system.
|
||||
.TP 7
|
||||
LOG_DAEMON
|
||||
Reserved for message generated by system daemon.
|
||||
.TP 7
|
||||
LOG_AUTH
|
||||
Reserved for message generated by authorization daemon.
|
||||
.TP 7
|
||||
LOG_CRON
|
||||
Reserved for message generated by clock daemon.
|
||||
.TP 7
|
||||
LOG_LPR
|
||||
Reserved for message generated by printer system.
|
||||
.TP 7
|
||||
LOG_LOCAL0
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL1
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL2
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL3
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL4
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL5
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL6
|
||||
Reserved for local use.
|
||||
.TP 7
|
||||
LOG_LOCAL7
|
||||
Reserved for local use.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as macros for constructing the \fImaskpri\fP
|
||||
argument to \fIsetlogmask\fP(). The following macros expand to an
|
||||
expression of type \fBint\fP when the
|
||||
argument \fIpri\fP is an expression of type \fBint\fP:
|
||||
.TP 7
|
||||
LOG_MASK(\fIpri\fP)
|
||||
A mask for priority \fIpri\fP.
|
||||
.sp
|
||||
.LP
|
||||
The following constants shall be defined as possible values for the
|
||||
\fIpriority\fP argument of \fIsyslog\fP():
|
||||
.TP 7
|
||||
LOG_EMERG
|
||||
A panic condition was reported to all processes.
|
||||
.TP 7
|
||||
LOG_ALERT
|
||||
A condition that should be corrected immediately.
|
||||
.TP 7
|
||||
LOG_CRIT
|
||||
A critical condition.
|
||||
.TP 7
|
||||
LOG_ERR
|
||||
An error message.
|
||||
.TP 7
|
||||
LOG_WARNING
|
||||
A warning message.
|
||||
.TP 7
|
||||
LOG_NOTICE
|
||||
A condition requiring special handling.
|
||||
.TP 7
|
||||
LOG_INFO
|
||||
A general information message.
|
||||
.TP 7
|
||||
LOG_DEBUG
|
||||
A message useful for debugging programs.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBvoid closelog(void);
|
||||
void openlog(const char *, int, int);
|
||||
int setlogmask(int);
|
||||
void syslog(int, const char *, ...);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcloselog\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,79 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<tar.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <tar.h>
|
||||
.SH NAME
|
||||
tar.h \- extended tar definitions
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <tar.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<tar.h>\fP header shall define header block definitions as
|
||||
follows.
|
||||
.LP
|
||||
General definitions:
|
||||
.TS C
|
||||
center; l2 l2 l.
|
||||
\fBName\fP \fBDescription\fP \fBValue\fP
|
||||
TMAGIC "ustar" ustar plus null byte.
|
||||
TMAGLEN 6 Length of the above.
|
||||
TVERSION "00" 00 without a null byte.
|
||||
TVERSLEN 2 Length of the above.
|
||||
.TE
|
||||
.LP
|
||||
\fITypeflag\fP field definitions:
|
||||
.TS C
|
||||
center; l l l.
|
||||
\fBName\fP \fBDescription\fP \fBValue\fP
|
||||
REGTYPE '0' Regular file.
|
||||
AREGTYPE '\\0' Regular file.
|
||||
LNKTYPE '1' Link.
|
||||
SYMTYPE '2' Symbolic link.
|
||||
CHRTYPE '3' Character special.
|
||||
BLKTYPE '4' Block special.
|
||||
DIRTYPE '5' Directory.
|
||||
FIFOTYPE '6' FIFO special.
|
||||
CONTTYPE '7' Reserved.
|
||||
.TE
|
||||
.LP
|
||||
\fIMode\fP field bit definitions (octal):
|
||||
.TS C
|
||||
center; l1 l1 l.
|
||||
\fBName\fP \fBDescription\fP \fBValue\fP
|
||||
TSUID 04000 Set UID on execution.
|
||||
TSGID 02000 Set GID on execution.
|
||||
TSVTX 01000 On directories, restricted deletion flag.\ \ \
|
||||
TUREAD 00400 Read by owner.
|
||||
TUWRITE 00200 Write by owner special.
|
||||
TUEXEC 00100 Execute/search by owner.
|
||||
TGREAD 00040 Read by group.
|
||||
TGWRITE 00020 Write by group.
|
||||
TGEXEC 00010 Execute/search by group.
|
||||
TOREAD 00004 Read by other.
|
||||
TOWRITE 00002 Write by other.
|
||||
TOEXEC 00001 Execute/search by other.
|
||||
.TE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The Shell and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIpax\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,47 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<netinet/tcp.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <netinet/tcp.h>
|
||||
.SH NAME
|
||||
netinet/tcp.h \- definitions for the Internet Transmission Control
|
||||
Protocol (TCP)
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <netinet/tcp.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<netinet/tcp.h>\fP header shall define the following macro
|
||||
for use as a socket option at the IPPROTO_TCP
|
||||
level:
|
||||
.TP 7
|
||||
TCP_NODELAY
|
||||
Avoid coalescing of small segments.
|
||||
.sp
|
||||
.LP
|
||||
The macro shall be defined in the header. The implementation need
|
||||
not allow the value of the option to be set via \fIsetsockopt\fP()
|
||||
or retrieved via \fIgetsockopt\fP().
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/socket.h>\fP , the System Interfaces volume of
|
||||
IEEE\ Std\ 1003.1-2001, \fIgetsockopt\fP(), \fIsetsockopt\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,492 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<termios.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <termios.h>
|
||||
.SH NAME
|
||||
termios.h \- define values for termios
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <termios.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<termios.h>\fP header contains the definitions used by the
|
||||
terminal I/O interfaces (see \fIGeneral Terminal Interface\fP for
|
||||
the structures and names defined).
|
||||
.SS The termios Structure
|
||||
.LP
|
||||
The following data types shall be defined through \fBtypedef\fP:
|
||||
.TP 7
|
||||
\fBcc_t\fP
|
||||
Used for terminal special characters.
|
||||
.TP 7
|
||||
\fBspeed_t\fP
|
||||
Used for terminal baud rates.
|
||||
.TP 7
|
||||
\fBtcflag_t\fP
|
||||
Used for terminal modes.
|
||||
.sp
|
||||
.LP
|
||||
The above types shall be all unsigned integer types.
|
||||
.LP
|
||||
The implementation shall support one or more programming environments
|
||||
in which the widths of \fBcc_t\fP, \fBspeed_t\fP, and
|
||||
\fBtcflag_t\fP are no greater than the width of type \fBlong\fP. The
|
||||
names of these programming environments can be obtained
|
||||
using the \fIconfstr\fP() function or the \fIgetconf\fP utility.
|
||||
.LP
|
||||
The \fBtermios\fP structure shall be defined, and shall include at
|
||||
least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtcflag_t c_iflag \fP Input modes. \fB
|
||||
tcflag_t c_oflag \fP Output modes. \fB
|
||||
tcflag_t c_cflag \fP Control modes. \fB
|
||||
tcflag_t c_lflag \fP Local modes. \fB
|
||||
cc_t c_cc[NCCS] \fP Control characters. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
A definition shall be provided for:
|
||||
.TP 7
|
||||
NCCS
|
||||
Size of the array \fIc_cc\fP for control characters.
|
||||
.sp
|
||||
.LP
|
||||
The following subscript names for the array \fIc_cc\fP shall be defined:
|
||||
.TS C
|
||||
center;c s l.
|
||||
\fBSubscript Usage\fP \
|
||||
.T&
|
||||
l l l.
|
||||
\fBCanonical Mode\fP \fBNon-Canonical Mode\fP \fBDescription\fP
|
||||
VEOF \ EOF character.
|
||||
VEOL \ EOL character.
|
||||
VERASE \ ERASE character.
|
||||
VINTR VINTR INTR character.
|
||||
VKILL \ KILL character.
|
||||
\ VMIN MIN value.
|
||||
VQUIT VQUIT QUIT character.
|
||||
VSTART VSTART START character.
|
||||
VSTOP VSTOP STOP character.
|
||||
VSUSP VSUSP SUSP character.
|
||||
\ VTIME TIME value.
|
||||
.TE
|
||||
.LP
|
||||
The subscript values shall be unique, except that the VMIN and VTIME
|
||||
subscripts may have the same values as the VEOF and VEOL
|
||||
subscripts, respectively.
|
||||
.LP
|
||||
The following flags shall be provided.
|
||||
.SS Input Modes
|
||||
.LP
|
||||
The \fIc_iflag\fP field describes the basic terminal input control:
|
||||
.TP 7
|
||||
BRKINT
|
||||
Signal interrupt on break.
|
||||
.TP 7
|
||||
ICRNL
|
||||
Map CR to NL on input.
|
||||
.TP 7
|
||||
IGNBRK
|
||||
Ignore break condition.
|
||||
.TP 7
|
||||
IGNCR
|
||||
Ignore CR.
|
||||
.TP 7
|
||||
IGNPAR
|
||||
Ignore characters with parity errors.
|
||||
.TP 7
|
||||
INLCR
|
||||
Map NL to CR on input.
|
||||
.TP 7
|
||||
INPCK
|
||||
Enable input parity check.
|
||||
.TP 7
|
||||
ISTRIP
|
||||
Strip character.
|
||||
.TP 7
|
||||
IXANY
|
||||
Enable any character to restart output.
|
||||
.TP 7
|
||||
IXOFF
|
||||
Enable start/stop input control.
|
||||
.TP 7
|
||||
IXON
|
||||
Enable start/stop output control.
|
||||
.TP 7
|
||||
PARMRK
|
||||
Mark parity errors.
|
||||
.sp
|
||||
.SS Output Modes
|
||||
.LP
|
||||
The \fIc_oflag\fP field specifies the system treatment of output:
|
||||
.TP 7
|
||||
OPOST
|
||||
Post-process output.
|
||||
.TP 7
|
||||
ONLCR
|
||||
Map NL to CR-NL on output.
|
||||
.TP 7
|
||||
OCRNL
|
||||
Map CR to NL on output.
|
||||
.TP 7
|
||||
ONOCR
|
||||
No CR output at column 0.
|
||||
.TP 7
|
||||
ONLRET
|
||||
NL performs CR function.
|
||||
.TP 7
|
||||
OFILL
|
||||
Use fill characters for delay.
|
||||
.TP 7
|
||||
NLDLY
|
||||
Select newline delays:
|
||||
.TP 7
|
||||
NL0
|
||||
.RS
|
||||
Newline type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
NL1
|
||||
.RS
|
||||
Newline type 1.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
CRDLY
|
||||
Select carriage-return delays:
|
||||
.TP 7
|
||||
CR0
|
||||
.RS
|
||||
Carriage-return delay type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
CR1
|
||||
.RS
|
||||
Carriage-return delay type 1.
|
||||
.RE
|
||||
.TP 7
|
||||
CR2
|
||||
.RS
|
||||
Carriage-return delay type 2.
|
||||
.RE
|
||||
.TP 7
|
||||
CR3
|
||||
.RS
|
||||
Carriage-return delay type 3.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
TABDLY
|
||||
Select horizontal-tab delays:
|
||||
.TP 7
|
||||
TAB0
|
||||
.RS
|
||||
Horizontal-tab delay type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
TAB1
|
||||
.RS
|
||||
Horizontal-tab delay type 1.
|
||||
.RE
|
||||
.TP 7
|
||||
TAB2
|
||||
.RS
|
||||
Horizontal-tab delay type 2.
|
||||
.RE
|
||||
.TP 7
|
||||
TAB3
|
||||
.RS
|
||||
Expand tabs to spaces.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
BSDLY
|
||||
Select backspace delays:
|
||||
.TP 7
|
||||
BS0
|
||||
.RS
|
||||
Backspace-delay type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
BS1
|
||||
.RS
|
||||
Backspace-delay type 1.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
VTDLY
|
||||
Select vertical-tab delays:
|
||||
.TP 7
|
||||
VT0
|
||||
.RS
|
||||
Vertical-tab delay type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
VT1
|
||||
.RS
|
||||
Vertical-tab delay type 1.
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
FFDLY
|
||||
Select form-feed delays:
|
||||
.TP 7
|
||||
FF0
|
||||
.RS
|
||||
Form-feed delay type 0.
|
||||
.RE
|
||||
.TP 7
|
||||
FF1
|
||||
.RS
|
||||
Form-feed delay type 1.
|
||||
.RE
|
||||
.sp
|
||||
.sp
|
||||
.SS Baud Rate Selection
|
||||
.LP
|
||||
The input and output baud rates are stored in the \fBtermios\fP structure.
|
||||
These are the valid values for objects of type
|
||||
\fBspeed_t\fP. The following values shall be defined, but not all
|
||||
baud rates need be supported by the underlying hardware.
|
||||
.TP 7
|
||||
B0
|
||||
Hang up
|
||||
.TP 7
|
||||
B50
|
||||
50 baud
|
||||
.TP 7
|
||||
B75
|
||||
75 baud
|
||||
.TP 7
|
||||
B110
|
||||
110 baud
|
||||
.TP 7
|
||||
B134
|
||||
134.5 baud
|
||||
.TP 7
|
||||
B150
|
||||
150 baud
|
||||
.TP 7
|
||||
B200
|
||||
200 baud
|
||||
.TP 7
|
||||
B300
|
||||
300 baud
|
||||
.TP 7
|
||||
B600
|
||||
600 baud
|
||||
.TP 7
|
||||
B1200
|
||||
1200 baud
|
||||
.TP 7
|
||||
B1800
|
||||
1800 baud
|
||||
.TP 7
|
||||
B2400
|
||||
2400 baud
|
||||
.TP 7
|
||||
B4800
|
||||
4800 baud
|
||||
.TP 7
|
||||
B9600
|
||||
9600 baud
|
||||
.TP 7
|
||||
B19200
|
||||
19200 baud
|
||||
.TP 7
|
||||
B38400
|
||||
38400 baud
|
||||
.sp
|
||||
.SS Control Modes
|
||||
.LP
|
||||
The \fIc_cflag\fP field describes the hardware control of the terminal;
|
||||
not all values specified are required to be supported
|
||||
by the underlying hardware:
|
||||
.TP 7
|
||||
CSIZE
|
||||
Character size:
|
||||
.TP 7
|
||||
CS5
|
||||
.RS
|
||||
5 bits
|
||||
.RE
|
||||
.TP 7
|
||||
CS6
|
||||
.RS
|
||||
6 bits
|
||||
.RE
|
||||
.TP 7
|
||||
CS7
|
||||
.RS
|
||||
7 bits
|
||||
.RE
|
||||
.TP 7
|
||||
CS8
|
||||
.RS
|
||||
8 bits
|
||||
.RE
|
||||
.sp
|
||||
.TP 7
|
||||
CSTOPB
|
||||
Send two stop bits, else one.
|
||||
.TP 7
|
||||
CREAD
|
||||
Enable receiver.
|
||||
.TP 7
|
||||
PARENB
|
||||
Parity enable.
|
||||
.TP 7
|
||||
PARODD
|
||||
Odd parity, else even.
|
||||
.TP 7
|
||||
HUPCL
|
||||
Hang up on last close.
|
||||
.TP 7
|
||||
CLOCAL
|
||||
Ignore modem status lines.
|
||||
.sp
|
||||
.LP
|
||||
The implementation shall support the functionality associated with
|
||||
the symbols CS7, CS8, CSTOPB, PARODD, and PARENB.
|
||||
.SS Local Modes
|
||||
.LP
|
||||
The \fIc_lflag\fP field of the argument structure is used to control
|
||||
various terminal functions:
|
||||
.TP 7
|
||||
ECHO
|
||||
Enable echo.
|
||||
.TP 7
|
||||
ECHOE
|
||||
Echo erase character as error-correcting backspace.
|
||||
.TP 7
|
||||
ECHOK
|
||||
Echo KILL.
|
||||
.TP 7
|
||||
ECHONL
|
||||
Echo NL.
|
||||
.TP 7
|
||||
ICANON
|
||||
Canonical input (erase and kill processing).
|
||||
.TP 7
|
||||
IEXTEN
|
||||
Enable extended input character processing.
|
||||
.TP 7
|
||||
ISIG
|
||||
Enable signals.
|
||||
.TP 7
|
||||
NOFLSH
|
||||
Disable flush after interrupt or quit.
|
||||
.TP 7
|
||||
TOSTOP
|
||||
Send SIGTTOU for background output.
|
||||
.sp
|
||||
.SS Attribute Selection
|
||||
.LP
|
||||
The following symbolic constants for use with \fItcsetattr\fP() are
|
||||
defined:
|
||||
.TP 7
|
||||
TCSANOW
|
||||
Change attributes immediately.
|
||||
.TP 7
|
||||
TCSADRAIN
|
||||
Change attributes when output has drained.
|
||||
.TP 7
|
||||
TCSAFLUSH
|
||||
Change attributes when output has drained; also flush pending input.
|
||||
.sp
|
||||
.SS Line Control
|
||||
.LP
|
||||
The following symbolic constants for use with \fItcflush\fP() shall
|
||||
be defined:
|
||||
.TP 7
|
||||
TCIFLUSH
|
||||
Flush pending input.
|
||||
.TP 7
|
||||
TCIOFLUSH
|
||||
Flush both pending input and untransmitted output.
|
||||
.TP 7
|
||||
TCOFLUSH
|
||||
Flush untransmitted output.
|
||||
.sp
|
||||
.LP
|
||||
The following symbolic constants for use with \fItcflow\fP() shall
|
||||
be defined:
|
||||
.TP 7
|
||||
TCIOFF
|
||||
Transmit a STOP character, intended to suspend input data.
|
||||
.TP 7
|
||||
TCION
|
||||
Transmit a START character, intended to restart input data.
|
||||
.TP 7
|
||||
TCOOFF
|
||||
Suspend output.
|
||||
.TP 7
|
||||
TCOON
|
||||
Restart output.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBspeed_t cfgetispeed(const struct termios *);
|
||||
speed_t cfgetospeed(const struct termios *);
|
||||
int cfsetispeed(struct termios *, speed_t);
|
||||
int cfsetospeed(struct termios *, speed_t);
|
||||
int tcdrain(int);
|
||||
int tcflow(int, int);
|
||||
int tcflush(int, int);
|
||||
int tcgetattr(int, struct termios *);
|
||||
|
||||
pid_t tcgetsid(int);
|
||||
|
||||
int tcsendbreak(int, int);
|
||||
int tcsetattr(int, int, const struct termios *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The following names are reserved for XSI-conformant systems to use
|
||||
as an extension to the above; therefore strictly conforming
|
||||
applications shall not use them:
|
||||
.TS C
|
||||
center; l l l.
|
||||
CBAUD EXTB VDSUSP
|
||||
DEFECHO FLUSHO VLNEXT
|
||||
ECHOCTL LOBLK VREPRINT
|
||||
ECHOKE PENDIN VSTATUS
|
||||
ECHOPRT SWTCH VWERASE
|
||||
EXTA VDISCARD \
|
||||
.TE
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIcfgetispeed\fP(),
|
||||
\fIcfgetospeed\fP(), \fIcfsetispeed\fP(), \fIcfsetospeed\fP(), \fIconfstr\fP(),
|
||||
\fItcdrain\fP(), \fItcflow\fP(), \fItcflush\fP(), \fItcgetattr\fP(),
|
||||
\fItcgetsid\fP(), \fItcsendbreak\fP(), \fItcsetattr\fP(), the Shell
|
||||
and Utilities volume of IEEE\ Std\ 1003.1-2001, \fIgetconf\fP, \fIGeneral
|
||||
Terminal Interface\fP
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,345 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<tgmath.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <tgmath.h>
|
||||
.SH NAME
|
||||
tgmath.h \- type-generic macros
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <tgmath.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<tgmath.h>\fP header shall include the headers \fI<math.h>\fP
|
||||
and \fI<complex.h>\fP and shall define several type-generic macros.
|
||||
.LP
|
||||
Of the functions contained within the \fI<math.h>\fP and \fI<complex.h>\fP
|
||||
headers without an \fIf\fP ( \fBfloat\fP) or \fIl\fP ( \fBlong
|
||||
double\fP) suffix, several have one or more parameters whose corresponding
|
||||
real type is \fBdouble\fP. For each such function,
|
||||
except \fImodf\fP(), there shall be a corresponding type-generic macro.
|
||||
The parameters whose
|
||||
corresponding real type is \fBdouble\fP in the function synopsis are
|
||||
generic parameters. Use of the macro invokes a function whose
|
||||
corresponding real type and type domain are determined by the arguments
|
||||
for the generic parameters.
|
||||
.LP
|
||||
Use of the macro invokes a function whose generic parameters have
|
||||
the corresponding real type determined as follows:
|
||||
.IP " *" 3
|
||||
First, if any argument for generic parameters has type \fBlong double\fP,
|
||||
the type determined is \fBlong double\fP.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Otherwise, if any argument for generic parameters has type \fBdouble\fP
|
||||
or is of integer type, the type determined is
|
||||
\fBdouble\fP.
|
||||
.LP
|
||||
.IP " *" 3
|
||||
Otherwise, the type determined is \fBfloat\fP.
|
||||
.LP
|
||||
.LP
|
||||
For each unsuffixed function in the \fI<math.h>\fP header for which
|
||||
there is a
|
||||
function in the \fI<complex.h>\fP header with the same name except
|
||||
for a \fIc\fP
|
||||
prefix, the corresponding type-generic macro (for both functions)
|
||||
has the same name as the function in the \fI<math.h>\fP header. The
|
||||
corresponding type-generic macro for \fIfabs\fP() and \fIcabs\fP()
|
||||
is \fIfabs\fP().
|
||||
.TS C
|
||||
center; l l l.
|
||||
\fB<math.h>\fP \fB<complex.h>\fP \fBType-Generic\fP
|
||||
\fBFunction\fP \fBFunction\fP \fBMacro\fP
|
||||
\fIacos\fP() \fIcacos\fP() \fIacos\fP()
|
||||
\fIasin\fP() \fIcasin\fP() \fIasin\fP()
|
||||
\fIatan\fP() \fIcatan\fP() \fIatan\fP()
|
||||
\fIacosh\fP() \fIcacosh\fP() \fIacosh\fP()
|
||||
\fIasinh\fP() \fIcasinh\fP() \fIasinh\fP()
|
||||
\fIatanh\fP() \fIcatanh\fP() \fIatanh\fP()
|
||||
\fIcos\fP() \fIccos\fP() \fIcos\fP()
|
||||
\fIsin\fP() \fIcsin\fP() \fIsin\fP()
|
||||
\fItan\fP() \fIctan\fP() \fItan\fP()
|
||||
\fIcosh\fP() \fIccosh\fP() \fIcosh\fP()
|
||||
\fIsinh\fP() \fIcsinh\fP() \fIsinh\fP()
|
||||
\fItanh\fP() \fIctanh\fP() \fItanh\fP()
|
||||
\fIexp\fP() \fIcexp\fP() \fIexp\fP()
|
||||
\fIlog\fP() \fIclog\fP() \fIlog\fP()
|
||||
\fIpow\fP() \fIcpow\fP() \fIpow\fP()
|
||||
\fIsqrt\fP() \fIcsqrt\fP() \fIsqrt\fP()
|
||||
\fIfabs\fP() \fIcabs\fP() \fIfabs\fP()
|
||||
.TE
|
||||
.LP
|
||||
If at least one argument for a generic parameter is complex, then
|
||||
use of the macro invokes a complex function; otherwise, use of
|
||||
the macro invokes a real function.
|
||||
.LP
|
||||
For each unsuffixed function in the \fI<math.h>\fP header without
|
||||
a
|
||||
\fIc\fP-prefixed counterpart in the \fI<complex.h>\fP header, the
|
||||
corresponding
|
||||
type-generic macro has the same name as the function. These type-generic
|
||||
macros are:
|
||||
.TS C
|
||||
center; lw(19) lw(19) lw(19) lw(19).
|
||||
T{
|
||||
.br
|
||||
\fIatan2\fP()
|
||||
.br
|
||||
\fIcbrt\fP()
|
||||
.br
|
||||
\fIceil\fP()
|
||||
.br
|
||||
\fIcopysign\fP()
|
||||
.br
|
||||
\fIerf\fP()
|
||||
.br
|
||||
\fIerfc\fP()
|
||||
.br
|
||||
\fIexp2\fP()
|
||||
.br
|
||||
\fIexpm1\fP()
|
||||
.br
|
||||
\fIfdim\fP()
|
||||
.br
|
||||
\fIfloor\fP()
|
||||
.br
|
||||
\
|
||||
T} T{
|
||||
.br
|
||||
\fIfma\fP()
|
||||
.br
|
||||
\fIfmax\fP()
|
||||
.br
|
||||
\fIfmin\fP()
|
||||
.br
|
||||
\fIfmod\fP()
|
||||
.br
|
||||
\fIfrexp\fP()
|
||||
.br
|
||||
\fIhypot\fP()
|
||||
.br
|
||||
\fIilogb\fP()
|
||||
.br
|
||||
\fIldexp\fP()
|
||||
.br
|
||||
\fIlgamma\fP()
|
||||
.br
|
||||
\fIllrint\fP()
|
||||
.br
|
||||
\
|
||||
T} T{
|
||||
.br
|
||||
\fIllround\fP()
|
||||
.br
|
||||
\fIlog10\fP()
|
||||
.br
|
||||
\fIlog1p\fP()
|
||||
.br
|
||||
\fIlog2\fP()
|
||||
.br
|
||||
\fIlogb\fP()
|
||||
.br
|
||||
\fIlrint\fP()
|
||||
.br
|
||||
\fIlround\fP()
|
||||
.br
|
||||
\fInearbyint\fP()
|
||||
.br
|
||||
\fInextafter\fP()
|
||||
.br
|
||||
\fInexttoward\fP()
|
||||
.br
|
||||
\
|
||||
T} T{
|
||||
.br
|
||||
\fIremainder\fP()
|
||||
.br
|
||||
\fIremquo\fP()
|
||||
.br
|
||||
\fIrint\fP()
|
||||
.br
|
||||
\fIround\fP()
|
||||
.br
|
||||
\fIscalbn\fP()
|
||||
.br
|
||||
\fIscalbln\fP()
|
||||
.br
|
||||
\fItgamma\fP()
|
||||
.br
|
||||
\fItrunc\fP()
|
||||
.br
|
||||
\
|
||||
T}
|
||||
.TE
|
||||
.LP
|
||||
If all arguments for generic parameters are real, then use of the
|
||||
macro invokes a real function; otherwise, use of the macro
|
||||
results in undefined behavior.
|
||||
.LP
|
||||
For each unsuffixed function in the \fI<complex.h>\fP header that
|
||||
is not a
|
||||
\fIc\fP-prefixed counterpart to a function in the \fI<math.h>\fP header,
|
||||
the
|
||||
corresponding type-generic macro has the same name as the function.
|
||||
These type-generic macros are:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fIcarg\fP()
|
||||
\fIcimag\fP()
|
||||
\fIconj\fP()
|
||||
\fIcproj\fP()
|
||||
\fIcreal\fP()
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Use of the macro with any real or complex argument invokes a complex
|
||||
function.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
With the declarations:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#include <tgmath.h>
|
||||
int n;
|
||||
float f;
|
||||
double d;
|
||||
long double ld;
|
||||
float complex fc;
|
||||
double complex dc;
|
||||
long double complex ldc;
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
functions invoked by use of type-generic macros are shown in the following
|
||||
table:
|
||||
.TS C
|
||||
center; l2 l.
|
||||
\fBMacro\fP \fBUse Invokes\fP
|
||||
\fIexp\fP(\fIn\fP) \fIexp\fP(\fIn\fP), the function
|
||||
\fIacosh\fP(\fIf\fP) \fIacoshf\fP(\fIf\fP)
|
||||
\fIsin\fP(\fId\fP) \fIsin\fP(\fId\fP), the function
|
||||
\fIatan\fP(\fIld\fP) \fIatanl\fP(\fIld\fP)
|
||||
\fIlog\fP(\fIfc\fP) \fIclogf\fP(\fIfc\fP)
|
||||
\fIsqrt\fP(\fIdc\fP) \fIcsqrt\fP(\fIdc\fP)
|
||||
\fIpow\fP(\fIldc,f\fP) \fIcpowl\fP(\fIldc, f\fP)
|
||||
\fIremainder\fP(\fIn,n\fP) \fIremainder\fP(\fIn, n\fP), the function
|
||||
\fInextafter\fP(\fId,f\fP) \fInextafter\fP(\fId, f\fP), the function
|
||||
\fInexttoward\fP(\fIf,ld\fP) \fInexttowardf\fP(\fIf, ld\fP)
|
||||
\fIcopysign\fP(\fIn,ld\fP) \fIcopysignl\fP(\fIn, ld\fP)
|
||||
\fIceil\fP(\fIfc\fP) Undefined behavior
|
||||
\fIrint\fP(\fIdc\fP) Undefined behavior
|
||||
\fIfmax\fP(\fIldc,ld\fP) Undefined behavior
|
||||
\fIcarg\fP(\fIn\fP) \fIcarg\fP(\fIn\fP), the function
|
||||
\fIcproj\fP(\fIf\fP) \fIcprojf\fP(\fIf\fP)
|
||||
\fIcreal\fP(\fId\fP) \fIcreal\fP(\fId\fP), the function
|
||||
\fIcimag\fP(\fIld\fP) \fIcimagl\fP(\fIld\fP)
|
||||
\fIcabs\fP(\fIfc\fP) \fIcabsf\fP(\fIfc\fP)
|
||||
\fIcarg\fP(\fIdc\fP) \fIcarg\fP(\fIdc\fP), the function
|
||||
\fIcproj\fP(\fIldc\fP) \fIcprojl\fP(\fIldc\fP)
|
||||
.TE
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
Type-generic macros allow calling a function whose type is determined
|
||||
by the argument type, as is the case for C operators such
|
||||
as \fB'+'\fP and \fB'*'\fP . For example, with a type-generic \fIcos\fP()
|
||||
macro, the
|
||||
expression \fIcos\fP(( \fBfloat\fP) \fIx\fP) will have type \fBfloat\fP.
|
||||
This feature enables writing more portably efficient
|
||||
code and alleviates need for awkward casting and suffixing in the
|
||||
process of porting or adjusting precision. Generic math functions
|
||||
are a widely appreciated feature of Fortran.
|
||||
.LP
|
||||
The only arguments that affect the type resolution are the arguments
|
||||
corresponding to the parameters that have type
|
||||
\fBdouble\fP in the synopsis. Hence the type of a type-generic call
|
||||
to \fInexttoward\fP(), whose second parameter is \fBlong double\fP
|
||||
in the synopsis, is determined
|
||||
solely by the type of the first argument.
|
||||
.LP
|
||||
The term "type-generic" was chosen over the proposed alternatives
|
||||
of intrinsic and overloading. The term is more specific than
|
||||
intrinsic, which already is widely used with a more general meaning,
|
||||
and reflects a closer match to Fortran's generic functions
|
||||
than to C++ overloading.
|
||||
.LP
|
||||
The macros are placed in their own header in order not to silently
|
||||
break old programs that include the \fI<math.h>\fP header; for example,
|
||||
with:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBprintf ("%e", sin(x))
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fImodf\fP( \fBdouble\fP, \fBdouble *\fP) is excluded because no way
|
||||
was seen to make it safe without complicating the type
|
||||
resolution.
|
||||
.LP
|
||||
The implementation might, as an extension, endow appropriate ones
|
||||
of the macros that IEEE\ Std\ 1003.1-2001 specifies
|
||||
only for real arguments with the ability to invoke the complex functions.
|
||||
.LP
|
||||
IEEE\ Std\ 1003.1-2001 does not prescribe any particular implementation
|
||||
mechanism for generic macros. It could be
|
||||
implemented simply with built-in macros. The generic macro for \fIsqrt\fP(),
|
||||
for example,
|
||||
could be implemented with:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB#undef sqrt
|
||||
#define sqrt(x) __BUILTIN_GENERIC_sqrt(x)
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Generic macros are designed for a useful level of consistency with
|
||||
C++ overloaded math functions.
|
||||
.LP
|
||||
The great majority of existing C programs are expected to be unaffected
|
||||
when the \fI<tgmath.h>\fP header is included
|
||||
instead of the \fI<math.h>\fP or \fI<complex.h>\fP headers. Generic
|
||||
macros are similar to the ISO/IEC\ 9899:1999
|
||||
standard library masking macros, though the semantic types of return
|
||||
values differ.
|
||||
.LP
|
||||
The ability to overload on integer as well as floating types would
|
||||
have been useful for some functions; for example, \fIcopysign\fP().
|
||||
Overloading with different numbers of arguments would have allowed
|
||||
reusing
|
||||
names; for example, \fIremainder\fP() for \fIremquo\fP(). However,
|
||||
these facilities would have complicated the specification; and their
|
||||
natural consistent use, such as for a floating \fIabs\fP() or a two-argument
|
||||
\fIatan\fP(), would have introduced further inconsistencies with the
|
||||
ISO/IEC\ 9899:1999 standard
|
||||
for insufficient benefit.
|
||||
.LP
|
||||
The ISO\ C standard in no way limits the implementation's options
|
||||
for efficiency, including inlining library functions.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<math.h>\fP , \fI<complex.h>\fP , the System Interfaces
|
||||
volume of IEEE\ Std\ 1003.1-2001, \fIcabs\fP(), \fIfabs\fP(), \fImodf\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1,244 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<time.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <time.h>
|
||||
.SH NAME
|
||||
time.h \- time types
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <time.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
Some of the functionality described on this reference page extends
|
||||
the ISO\ C standard. Applications shall define
|
||||
the appropriate feature test macro (see the System Interfaces volume
|
||||
of IEEE\ Std\ 1003.1-2001, Section 2.2, The Compilation Environment)
|
||||
to enable the visibility of these symbols in this
|
||||
header.
|
||||
.LP
|
||||
The \fI<time.h>\fP header shall declare the structure \fBtm\fP, which
|
||||
shall include at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint tm_sec \fP Seconds [0,60]. \fB
|
||||
int tm_min \fP Minutes [0,59]. \fB
|
||||
int tm_hour \fP Hour [0,23]. \fB
|
||||
int tm_mday \fP Day of month [1,31]. \fB
|
||||
int tm_mon \fP Month of year [0,11]. \fB
|
||||
int tm_year \fP Years since 1900. \fB
|
||||
int tm_wday \fP Day of week [0,6] (Sunday =0). \fB
|
||||
int tm_yday \fP Day of year [0,365]. \fB
|
||||
int tm_isdst\fP Daylight Savings flag. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The value of \fItm_isdst\fP shall be positive if Daylight Savings
|
||||
Time is in effect, 0 if Daylight Savings Time is not in
|
||||
effect, and negative if the information is not available.
|
||||
.LP
|
||||
The \fI<time.h>\fP header shall define the following symbolic names:
|
||||
.TP 7
|
||||
NULL
|
||||
Null pointer constant.
|
||||
.TP 7
|
||||
CLOCKS_PER_SEC
|
||||
A number used to convert the value returned by the \fIclock\fP() function
|
||||
into
|
||||
seconds.
|
||||
.TP 7
|
||||
CLOCK_PROCESS_CPUTIME_ID
|
||||
.sp
|
||||
The identifier of the CPU-time clock associated with the process making
|
||||
a \fIclock\fP() or
|
||||
\fItimer*\fP() function call.
|
||||
.TP 7
|
||||
CLOCK_THREAD_CPUTIME_ID
|
||||
.sp
|
||||
The identifier of the CPU-time clock associated with the thread making
|
||||
a \fIclock\fP() or \fItimer*\fP() function call.
|
||||
.sp
|
||||
.LP
|
||||
The \fI<time.h>\fP header shall declare the structure \fBtimespec\fP,
|
||||
which has at least the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtime_t tv_sec \fP Seconds. \fB
|
||||
long tv_nsec \fP Nanoseconds. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<time.h>\fP header shall also declare the \fBitimerspec\fP
|
||||
structure, which has at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBstruct timespec it_interval \fP Timer period. \fB
|
||||
struct timespec it_value \fP Timer expiration. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The following manifest constants shall be defined:
|
||||
.TP 7
|
||||
CLOCK_REALTIME
|
||||
The identifier of the system-wide realtime clock.
|
||||
.TP 7
|
||||
TIMER_ABSTIME
|
||||
Flag indicating time is absolute. For functions taking timer objects,
|
||||
this refers to the clock associated with the timer.
|
||||
.TP 7
|
||||
CLOCK_MONOTONIC
|
||||
.sp
|
||||
The identifier for the system-wide monotonic clock, which is defined
|
||||
as a clock whose value cannot be set via \fIclock_settime\fP() and
|
||||
which cannot have backward clock jumps. The maximum possible clock
|
||||
jump shall be implementation-defined.
|
||||
.sp
|
||||
.LP
|
||||
The \fBclock_t\fP, \fBsize_t\fP, \fBtime_t\fP, \fBclockid_t\fP,
|
||||
and \fBtimer_t\fP types shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
Although the value of CLOCKS_PER_SEC is required to be 1 million on
|
||||
all XSI-conformant systems, it may be variable on other
|
||||
systems, and it should not be assumed that CLOCKS_PER_SEC is a compile-time
|
||||
constant.
|
||||
.LP
|
||||
The \fI<time.h>\fP header shall provide a declaration for \fIgetdate_err\fP.
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBchar *asctime(const struct tm *);
|
||||
|
||||
char *asctime_r(const struct tm *restrict, char *restrict);
|
||||
|
||||
clock_t clock(void);
|
||||
|
||||
int clock_getcpuclockid(pid_t, clockid_t *);
|
||||
|
||||
|
||||
int clock_getres(clockid_t, struct timespec *);
|
||||
int clock_gettime(clockid_t, struct timespec *);
|
||||
|
||||
|
||||
int clock_nanosleep(clockid_t, int, const struct timespec *,
|
||||
struct timespec *);
|
||||
|
||||
|
||||
int clock_settime(clockid_t, const struct timespec *);
|
||||
|
||||
char *ctime(const time_t *);
|
||||
|
||||
char *ctime_r(const time_t *, char *);
|
||||
|
||||
double difftime(time_t, time_t);
|
||||
|
||||
struct tm *getdate(const char *);
|
||||
|
||||
struct tm *gmtime(const time_t *);
|
||||
|
||||
struct tm *gmtime_r(const time_t *restrict, struct tm *restrict);
|
||||
|
||||
struct tm *localtime(const time_t *);
|
||||
|
||||
struct tm *localtime_r(const time_t *restrict, struct tm *restrict);
|
||||
|
||||
time_t mktime(struct tm *);
|
||||
|
||||
int nanosleep(const struct timespec *, struct timespec *);
|
||||
|
||||
size_t strftime(char *restrict, size_t, const char *restrict,
|
||||
const struct tm *restrict);
|
||||
|
||||
char *strptime(const char *restrict, const char *restrict,
|
||||
struct tm *restrict);
|
||||
|
||||
time_t time(time_t *);
|
||||
|
||||
int timer_create(clockid_t, struct sigevent *restrict,
|
||||
timer_t *restrict);
|
||||
int timer_delete(timer_t);
|
||||
int timer_gettime(timer_t, struct itimerspec *);
|
||||
int timer_getoverrun(timer_t);
|
||||
int timer_settime(timer_t, int, const struct itimerspec *restrict,
|
||||
struct itimerspec *restrict);
|
||||
|
||||
|
||||
void tzset(void);
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as variables:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fB
|
||||
extern int daylight;
|
||||
extern long timezone;
|
||||
|
||||
|
||||
extern char *tzname[];
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Inclusion of the \fI<time.h>\fP header may make visible all symbols
|
||||
from the \fI<signal.h>\fP header.
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
The range [0,60] for \fItm_sec\fP allows for the occasional leap second.
|
||||
.LP
|
||||
\fItm_year\fP is a signed value; therefore, years before 1900 may
|
||||
be represented.
|
||||
.LP
|
||||
To obtain the number of clock ticks per second returned by the \fItimes\fP()
|
||||
function,
|
||||
applications should call \fIsysconf\fP(_SC_CLK_TCK).
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
The range [0,60] seconds allows for positive or negative leap seconds.
|
||||
The formal definition of UTC does not permit double leap
|
||||
seconds, so all mention of double leap seconds has been removed, and
|
||||
the range shortened from the former [0,61] seconds seen in
|
||||
previous versions of POSIX.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<signal.h>\fP , \fI<sys/types.h>\fP , the System
|
||||
Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIasctime\fP(), \fIclock\fP(),
|
||||
\fIclock_getcpuclockid\fP(), \fIclock_getres\fP(), \fIclock_nanosleep\fP(),
|
||||
\fIctime\fP(), \fIdifftime\fP(), \fIgetdate\fP(), \fIgmtime\fP(),
|
||||
\fIlocaltime\fP(), \fImktime\fP(), \fInanosleep\fP(), \fIstrftime\fP(),
|
||||
\fIstrptime\fP(), \fIsysconf\fP(), \fItime\fP(), \fItimer_create\fP(),
|
||||
\fItimer_delete\fP(), \fItimer_getoverrun\fP(), \fItzname\fP, \fItzset\fP(),
|
||||
\fIutime\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_timeb.h.0p
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_times.h.0p
|
|
@ -0,0 +1,293 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<trace.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <trace.h>
|
||||
.SH NAME
|
||||
trace.h \- tracing
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <trace.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<trace.h>\fP header shall define the \fBposix_trace_event_info\fP
|
||||
structure that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtrace_event_id_t posix_event_id
|
||||
pid_t posix_pid
|
||||
void *posix_prog_address
|
||||
int posix_truncation_status
|
||||
struct timespec posix_timestamp
|
||||
|
||||
pthread_t posix_thread_id
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<trace.h>\fP header shall define the \fBposix_trace_status_info\fP
|
||||
structure that includes at least the following
|
||||
members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint posix_stream_status
|
||||
int posix_stream_full_status
|
||||
int posix_stream_overrun_status
|
||||
|
||||
int posix_stream_flush_status
|
||||
int posix_stream_flush_error
|
||||
int posix_log_overrun_status
|
||||
int posix_log_full_status
|
||||
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The \fI<trace.h>\fP header shall define the following symbols:
|
||||
.LP
|
||||
.sp
|
||||
POSIX_TRACE_ALL_EVENTS
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_APPEND
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
POSIX_TRACE_CLOSE_FOR_CHILD
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
POSIX_TRACE_FILTER
|
||||
.br
|
||||
.sp
|
||||
.sp
|
||||
POSIX_TRACE_FLUSH
|
||||
.br
|
||||
POSIX_TRACE_FLUSH_START
|
||||
.br
|
||||
POSIX_TRACE_FLUSH_STOP
|
||||
.br
|
||||
POSIX_TRACE_FLUSHING
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_FULL
|
||||
.br
|
||||
POSIX_TRACE_LOOP
|
||||
.br
|
||||
POSIX_TRACE_NO_OVERRUN
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_NOT_FLUSHING
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_NOT_FULL
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_INHERITED
|
||||
.br
|
||||
.sp
|
||||
POSIX_TRACE_NOT_TRUNCATED
|
||||
.br
|
||||
POSIX_TRACE_OVERFLOW
|
||||
.br
|
||||
POSIX_TRACE_OVERRUN
|
||||
.br
|
||||
POSIX_TRACE_RESUME
|
||||
.br
|
||||
POSIX_TRACE_RUNNING
|
||||
.br
|
||||
POSIX_TRACE_START
|
||||
.br
|
||||
POSIX_TRACE_STOP
|
||||
.br
|
||||
POSIX_TRACE_SUSPENDED
|
||||
.br
|
||||
POSIX_TRACE_SYSTEM_EVENTS
|
||||
.br
|
||||
POSIX_TRACE_TRUNCATED_READ
|
||||
.br
|
||||
POSIX_TRACE_TRUNCATED_RECORD
|
||||
.br
|
||||
POSIX_TRACE_UNNAMED_USER_EVENT
|
||||
.br
|
||||
POSIX_TRACE_UNTIL_FULL
|
||||
.br
|
||||
POSIX_TRACE_WOPID_EVENTS
|
||||
.br
|
||||
.LP
|
||||
The following types shall be defined as described in \fI<sys/types.h>\fP
|
||||
:
|
||||
.LP
|
||||
.sp
|
||||
\fBtrace_attr_t\fP
|
||||
.br
|
||||
\fBtrace_id_t\fP
|
||||
.br
|
||||
\fBtrace_event_id_t\fP
|
||||
.br
|
||||
.sp
|
||||
\fBtrace_event_set_t\fP
|
||||
.br
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros. Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint posix_trace_attr_destroy(trace_attr_t *);
|
||||
int posix_trace_attr_getclockres(const trace_attr_t *,
|
||||
struct timespec *);
|
||||
int posix_trace_attr_getcreatetime(const trace_attr_t *,
|
||||
struct timespec *);
|
||||
int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
|
||||
|
||||
int posix_trace_attr_getinherited(const trace_attr_t *restrict,
|
||||
int *restrict);
|
||||
|
||||
|
||||
int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
|
||||
int *restrict);
|
||||
int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
|
||||
int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
|
||||
size_t, size_t *restrict);
|
||||
int posix_trace_attr_getname(const trace_attr_t *, char *);
|
||||
int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
|
||||
int *restrict);
|
||||
int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
|
||||
size_t *restrict);
|
||||
int posix_trace_attr_init(trace_attr_t *);
|
||||
|
||||
int posix_trace_attr_setinherited(trace_attr_t *, int);
|
||||
|
||||
|
||||
int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
|
||||
int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
|
||||
|
||||
int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
|
||||
int posix_trace_attr_setname(trace_attr_t *, const char *);
|
||||
int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
|
||||
int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
|
||||
int posix_trace_clear(trace_id_t);
|
||||
|
||||
int posix_trace_close(trace_id_t);
|
||||
|
||||
int posix_trace_create(pid_t, const trace_attr_t *restrict,
|
||||
trace_id_t *restrict);
|
||||
|
||||
int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
|
||||
int, trace_id_t *restrict);
|
||||
|
||||
void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
|
||||
int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
|
||||
trace_event_id_t);
|
||||
int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
|
||||
int posix_trace_eventid_open(const char *restrict,
|
||||
trace_event_id_t *restrict);
|
||||
|
||||
int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
|
||||
int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
|
||||
int posix_trace_eventset_empty(trace_event_set_t *);
|
||||
int posix_trace_eventset_fill(trace_event_set_t *, int);
|
||||
int posix_trace_eventset_ismember(trace_event_id_t,
|
||||
const trace_event_set_t *restrict, int *restrict);
|
||||
|
||||
int posix_trace_eventtypelist_getnext_id(trace_id_t,
|
||||
trace_event_id_t *restrict, int *restrict);
|
||||
int posix_trace_eventtypelist_rewind(trace_id_t);
|
||||
|
||||
int posix_trace_flush(trace_id_t);
|
||||
|
||||
int posix_trace_get_attr(trace_id_t, trace_attr_t *);
|
||||
|
||||
int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
|
||||
|
||||
int posix_trace_get_status(trace_id_t,
|
||||
struct posix_trace_status_info *);
|
||||
int posix_trace_getnext_event(trace_id_t,
|
||||
struct posix_trace_event_info *restrict , void *restrict,
|
||||
size_t, size_t *restrict, int *restrict);
|
||||
|
||||
int posix_trace_open(int, trace_id_t *);
|
||||
int posix_trace_rewind(trace_id_t);
|
||||
|
||||
|
||||
int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
|
||||
|
||||
int posix_trace_shutdown(trace_id_t);
|
||||
int posix_trace_start(trace_id_t);
|
||||
int posix_trace_stop(trace_id_t);
|
||||
|
||||
int posix_trace_timedgetnext_event(trace_id_t,
|
||||
struct posix_trace_event_info *restrict, void *restrict,
|
||||
size_t, size_t *restrict, int *restrict,
|
||||
const struct timespec *restrict);
|
||||
|
||||
|
||||
int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
|
||||
trace_event_id_t *restrict);
|
||||
|
||||
int posix_trace_trygetnext_event(trace_id_t,
|
||||
struct posix_trace_event_info *restrict, void *restrict, size_t,
|
||||
size_t *restrict, int *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
Section 2.11, Tracing, \fIposix_trace_attr_destroy\fP(), \fIposix_trace_attr_getclockres\fP(),
|
||||
\fIposix_trace_attr_getcreatetime\fP(), \fIposix_trace_attr_getgenversion\fP(),
|
||||
\fIposix_trace_attr_getinherited\fP(), \fIposix_trace_attr_getlogfullpolicy\fP(),
|
||||
\fIposix_trace_attr_getlogsize\fP(), \fIposix_trace_attr_getmaxdatasize\fP(),
|
||||
\fIposix_trace_attr_getmaxsystemeventsize\fP(), \fIposix_trace_attr_getmaxusereventsize\fP(),
|
||||
\fIposix_trace_attr_getname\fP(), \fIposix_trace_attr_getstreamfullpolicy\fP(),
|
||||
\fIposix_trace_attr_getstreamsize\fP(), \fIposix_trace_attr_init\fP(),
|
||||
\fIposix_trace_attr_setinherited\fP(), \fIposix_trace_attr_setlogfullpolicy\fP(),
|
||||
\fIposix_trace_attr_setlogsize\fP(), \fIposix_trace_attr_setmaxdatasize\fP(),
|
||||
\fIposix_trace_attr_setname\fP(), \fIposix_trace_attr_setstreamsize\fP(),
|
||||
\fIposix_trace_attr_setstreamfullpolicy\fP(), \fIposix_trace_clear\fP(),
|
||||
\fIposix_trace_close\fP(), \fIposix_trace_create\fP(), \fIposix_trace_create_withlog\fP(),
|
||||
\fIposix_trace_event\fP(), \fIposix_trace_eventid_equal\fP(), \fIposix_trace_eventid_get_name\fP(),
|
||||
\fIposix_trace_eventid_open\fP(), \fIposix_trace_eventtypelist_getnext_id\fP(),
|
||||
\fIposix_trace_eventtypelist_rewind\fP(), \fIposix_trace_eventset_add\fP(),
|
||||
\fIposix_trace_eventset_del\fP(), \fIposix_trace_eventset_empty\fP(),
|
||||
\fIposix_trace_eventset_fill\fP(), \fIposix_trace_eventset_ismember\fP(),
|
||||
\fIposix_trace_flush\fP(), \fIposix_trace_get_attr\fP(), \fIposix_trace_get_filter\fP(),
|
||||
\fIposix_trace_get_status\fP(), \fIposix_trace_getnext_event\fP(),
|
||||
\fIposix_trace_open\fP(), \fIposix_trace_rewind\fP(), \fIposix_trace_set_filter\fP(),
|
||||
\fIposix_trace_shutdown\fP(), \fIposix_trace_start\fP(), \fIposix_trace_stop\fP(),
|
||||
\fIposix_trace_timedgetnext_event\fP(), \fIposix_trace_trid_eventid_open\fP(),
|
||||
\fIposix_trace_trygetnext_event\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_types.h.0p
|
|
@ -0,0 +1,73 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<ucontext.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <ucontext.h>
|
||||
.SH NAME
|
||||
ucontext.h \- user context
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <ucontext.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<ucontext.h>\fP header shall define the \fBmcontext_t\fP type
|
||||
through \fBtypedef\fP.
|
||||
.LP
|
||||
The \fI<ucontext.h>\fP header shall define the \fBucontext_t\fP type
|
||||
as a structure that shall include at least the
|
||||
following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBucontext_t *uc_link \fP Pointer to the context that is resumed \fB
|
||||
\fP when this context returns. \fB
|
||||
sigset_t uc_sigmask \fP The set of signals that are blocked when this \fB
|
||||
\fP context is active. \fB
|
||||
stack_t uc_stack \fP The stack used by this context. \fB
|
||||
mcontext_t uc_mcontext\fP A machine-specific representation of the saved \fB
|
||||
\fP context. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The types \fBsigset_t\fP and \fBstack_t\fP shall be defined as in
|
||||
\fI<signal.h>\fP .
|
||||
.LP
|
||||
The following shall be declared as functions and may also be defined
|
||||
as macros, Function prototypes shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint getcontext(ucontext_t *);
|
||||
int setcontext(const ucontext_t *);
|
||||
void makecontext(ucontext_t *, void (*)(void), int, ...);
|
||||
int swapcontext(ucontext_t *restrict, const ucontext_t *restrict);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<signal.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIgetcontext\fP(), \fImakecontext\fP(), \fIsigaction\fP(), \fIsigprocmask\fP(),
|
||||
\fIsigaltstack\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_uio.h.0p
|
|
@ -0,0 +1,56 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<ulimit.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <ulimit.h>
|
||||
.SH NAME
|
||||
ulimit.h \- ulimit commands
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <ulimit.h> \fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<ulimit.h>\fP header shall define the symbolic constants used
|
||||
by the \fIulimit\fP() function.
|
||||
.LP
|
||||
Symbolic constants:
|
||||
.TP 7
|
||||
UL_GETFSIZE
|
||||
Get maximum file size.
|
||||
.TP 7
|
||||
UL_SETFSIZE
|
||||
Set maximum file size.
|
||||
.sp
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBlong ulimit(int, ...);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIulimit\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
|
@ -0,0 +1 @@
|
|||
.so man0p/sys_un.h.0p
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,62 @@
|
|||
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
||||
.TH "<utime.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
||||
.\" <utime.h>
|
||||
.SH NAME
|
||||
utime.h \- access and modification times structure
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
\fB#include <utime.h>\fP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The \fI<utime.h>\fP header shall declare the structure \fButimbuf\fP,
|
||||
which shall include the following members:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBtime_t actime \fP Access time. \fB
|
||||
time_t modtime \fP Modification time. \fB
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
The times shall be measured in seconds since the Epoch.
|
||||
.LP
|
||||
The type \fBtime_t\fP shall be defined as described in \fI<sys/types.h>\fP
|
||||
\&.
|
||||
.LP
|
||||
The following shall be declared as a function and may also be defined
|
||||
as a macro. A function prototype shall be provided.
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
|
||||
\fBint utime(const char *, const struct utimbuf *);
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
\fIThe following sections are informative.\fP
|
||||
.SH APPLICATION USAGE
|
||||
.LP
|
||||
None.
|
||||
.SH RATIONALE
|
||||
.LP
|
||||
None.
|
||||
.SH FUTURE DIRECTIONS
|
||||
.LP
|
||||
None.
|
||||
.SH SEE ALSO
|
||||
.LP
|
||||
\fI<sys/types.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
|
||||
\fIutime\fP()
|
||||
.SH COPYRIGHT
|
||||
Portions of this text are reprinted and reproduced in electronic form
|
||||
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
||||
-- Portable Operating System Interface (POSIX), The Open Group Base
|
||||
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
|
||||
Electrical and Electronics Engineers, Inc and The Open Group. In the
|
||||
event of any discrepancy between this version and the original IEEE and
|
||||
The Open Group Standard, the original IEEE and The Open Group Standard
|
||||
is the referee document. The original Standard can be obtained online at
|
||||
http://www.opengroup.org/unix/online.html .
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue