the above files may instead be located at directories with the path prefix
.IR /usr/lib64 .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
.SH EXAMPLES
Convert text from the ISO 8859-15 character encoding to UTF-8:
.I /usr/share/i18n/locales
Usual default path for locale definition files.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
.EX
$ \fBlocale\fP
exists with a status of 1.
If given an invalid option, it exits with the status 64.
.SH VERSIONS
-.B pldd
-is available since glibc 2.15.
-.SH STANDARDS
-The
-.B pldd
-command is not specified by POSIX.1.
Some other systems
.\" There are man pages on Solaris and HP-UX.
have a similar command.
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.15.
.SH NOTES
The command
.PP
.BR \-V ", " \-\-version
Display the program version and exit.
.SH STANDARDS
-The
-.B sprof
-command is a GNU extension, not present in POSIX.1.
+GNU.
.SH EXAMPLES
The following example demonstrates the use of
.BR sprof .
.SH RETURN VALUE
These functions do not return.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-The function
+.TP
+.BR _exit ()
+POSIX.1-2008.
+.TP
+.BR _Exit ()
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.PP
.BR _Exit ()
was introduced by C99.
.SH NOTES
.SH FILES
.I /usr/include/linux/unistd.h
.SH STANDARDS
-The use of these macros is Linux-specific, and deprecated.
-.SH NOTES
-Starting around kernel 2.6.18, the _syscall macros were removed
+Linux.
+.SH HISTORY
+Starting around Linux 2.6.18, the _syscall macros were removed
from header files supplied to user space.
Use
.BR syscall (2)
on those architectures,
.BR syscall (2)
was always required.)
-.PP
+.SH NOTES
The _syscall() macros
.I "do not"
produce a prototype.
.B ERESTARTSYS
may be seen during a trace.
.SH VERSIONS
-The
-.BR accept4 ()
-system call is available starting with Linux 2.6.28;
-support in glibc is available starting with glibc 2.10.
-.SH STANDARDS
-.BR accept ():
-POSIX.1-2001, POSIX.1-2008,
-SVr4, 4.4BSD
-.RB ( accept ()
-first appeared in 4.2BSD).
-.\" The BSD man page documents five possible error returns
-.\" (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT).
-.\" POSIX.1-2001 documents errors
-.\" EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
-.\" ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
-.\" In addition, SUSv2 documents EFAULT and ENOSR.
-.PP
-.BR accept4 ()
-is a nonstandard Linux extension.
-.PP
On Linux, the new socket returned by
.BR accept ()
does \fInot\fP inherit file status flags such as
of file status flags and always explicitly set all required flags on
the socket returned from
.BR accept ().
+.SH STANDARDS
+.TP
+.BR accept ()
+POSIX.1-2008.
+.TP
+.BR accept4 ()
+Linux.
+.PP
+.SH HISTORY
+.TP
+.BR accept ()
+POSIX.1-2001, SVr4, 4.4BSD
+.RB ( accept ()
+first appeared in 4.2BSD).
+.\" The BSD man page documents five possible error returns
+.\" (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT).
+.\" POSIX.1-2001 documents errors
+.\" EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
+.\" ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
+.\" In addition, SUSv2 documents EFAULT and ENOSR.
+.TP
+.BR accept4 ()
+Linux 2.6.28,
+glibc 2.10.
.SH NOTES
There may not always be a connection waiting after a
.B SIGIO
Write access was requested to an executable which is being
executed.
.SH VERSIONS
+If the calling process has appropriate privileges (i.e., is superuser),
+POSIX.1-2001 permits an implementation to indicate success for an
+.B X_OK
+check even if none of the execute file permission bits are set.
+.\" HPU-UX 11 and Tru64 5.1 do this.
+Linux does not do this.
+.\"
+.SS C library/kernel differences
+The raw
.BR faccessat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.PP
-.BR faccessat2 ()
-was added in Linux 5.8.
+system call takes only the first three arguments.
+The
+.B AT_EACCESS
+and
+.B AT_SYMLINK_NOFOLLOW
+flags are actually implemented within the glibc wrapper function for
+.BR faccessat ().
+If either of these flags is specified, then the wrapper function employs
+.BR fstatat (2)
+to determine access permissions, but see BUGS.
+.\"
+.SS glibc notes
+On older kernels where
+.BR faccessat ()
+is unavailable (and when the
+.B AT_EACCESS
+and
+.B AT_SYMLINK_NOFOLLOW
+flags are not specified),
+the glibc wrapper function falls back to the use of
+.BR access ().
+When
+.I pathname
+is a relative pathname,
+glibc constructs a pathname based on the symbolic link in
+.I /proc/self/fd
+that corresponds to the
+.I dirfd
+argument.
.SH STANDARDS
-.BR access ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR faccessat ():
+.TP
+.BR access ()
+.TQ
+.BR faccessat ()
POSIX.1-2008.
-.PP
-.BR faccessat2 ():
-Linux-specific.
+.TP
+.BR faccessat2 ()
+Linux.
+.SH HISTORY
+.TP
+.BR access ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR faccessat ()
+Linux 2.6.16,
+glibc 2.4.
+.TP
+.BR faccessat2 ()
+Linux 5.8.
.SH NOTES
.BR Warning :
Using these calls to check if a user is authorized to, for example,
.I mode
are permitted.
.PP
-If the calling process has appropriate privileges (i.e., is superuser),
-POSIX.1-2001 permits an implementation to indicate success for an
-.B X_OK
-check even if none of the execute file permission bits are set.
-.\" HPU-UX 11 and Tru64 5.1 do this.
-Linux does not do this.
-.PP
A file is accessible only if the permissions on each of the
directories in the path prefix of
.I pathname
(NFS versions 3 and higher perform the check on the server.)
Similar problems can occur to FUSE mounts.
.\"
-.\"
-.SS C library/kernel differences
-The raw
-.BR faccessat ()
-system call takes only the first three arguments.
-The
-.B AT_EACCESS
-and
-.B AT_SYMLINK_NOFOLLOW
-flags are actually implemented within the glibc wrapper function for
-.BR faccessat ().
-If either of these flags is specified, then the wrapper function employs
-.BR fstatat (2)
-to determine access permissions, but see BUGS.
-.\"
-.SS glibc notes
-On older kernels where
-.BR faccessat ()
-is unavailable (and when the
-.B AT_EACCESS
-and
-.B AT_SYMLINK_NOFOLLOW
-flags are not specified),
-the glibc wrapper function falls back to the use of
-.BR access ().
-When
-.I pathname
-is a relative pathname,
-glibc constructs a pathname based on the symbolic link in
-.I /proc/self/fd
-that corresponds to the
-.I dirfd
-argument.
.SH BUGS
Because the Linux kernel's
.BR faccessat ()
.B EUSERS
There are no more free file structures or we ran out of memory.
.SH STANDARDS
-SVr4, 4.3BSD (but not POSIX).
+None.
+.SH HISTORY
+SVr4, 4.3BSD.
.\" SVr4 documents an EBUSY error condition, but no EISDIR or ENOSYS.
.\" Also AIX and HP-UX document EBUSY (attempt is made
.\" to enable accounting when it is already enabled), as does Solaris
started with a period (\[aq].\[aq]).
Keyrings with descriptions (names)
that begin with a period are reserved to the implementation.
-.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
.SH STANDARDS
-This system call is a nonstandard Linux extension.
+Linux.
+.SH HISTORY
+Linux 2.6.10.
.SH NOTES
glibc does not provide a wrapper for this system call.
A wrapper is provided in the
.TE
.sp 1
.SH STANDARDS
-None of these interfaces is described in POSIX.1
-.PP
+.TP
.BR adjtimex ()
-and
+.TQ
.BR clock_adjtime ()
-are Linux-specific and should not be used in programs
-intended to be portable.
+Linux.
.PP
The preferred API for the NTP daemon is
.BR ntp_adjtime ().
alarm was due to be delivered, or zero if there was no previously
scheduled alarm.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
.BR alarm ()
and
Gives info on the number of configured hugetlb pages and on their size
in the three variables HugePages_Total, HugePages_Free, Hugepagesize.
.SH STANDARDS
-These extinct system calls were specific to Linux on Intel processors.
-.SH NOTES
+Linux on Intel processors.
+.SH HISTORY
These system calls are gone;
they existed only in Linux 2.5.36 through to Linux 2.5.54.
+.SH NOTES
Now the hugetlbfs filesystem can be used instead.
Memory backed by huge pages (if the CPU supports them) is obtained by
using
.\" .SH AUTHOR
.\" Man page written by Andi Kleen.
.SH STANDARDS
-.BR arch_prctl ()
-is a Linux/x86-64 extension and should not be used in programs intended
-to be portable.
+Linux/x86-64.
.SH NOTES
.BR arch_prctl ()
is supported only on Linux/x86-64 for 64-bit programs currently.
Caller does not have the
.B CAP_SYS_ADMIN
capability.
-.SH VERSIONS
-Since glibc 2.23, glibc no longer supports this obsolete system call.
.SH STANDARDS
-.BR bdflush ()
-is Linux-specific and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Since glibc 2.23, glibc no longer supports this obsolete system call.
.SH SEE ALSO
.BR sync (1),
.BR fsync (2),
.B EROFS
The socket inode would reside on a read-only filesystem.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
.RB ( bind ()
first appeared in 4.2BSD).
.\" SVr4 documents an additional
(without the
.B CAP_SYS_ADMIN
capability).
-.SH VERSIONS
-The
-.BR bpf ()
-system call first appeared in Linux 3.18.
.SH STANDARDS
-The
-.BR bpf ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.18.
.SH NOTES
Prior to Linux 4.4, all
.BR bpf ()
is set to
.BR ENOMEM .
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001.
.\"
.\" .BR brk ()
or
.B BCACHE
(but see BUGS).
-.SH STANDARDS
-Historically, this system call was available on all MIPS UNIX variants
-including RISC/os, IRIX, Ultrix, NetBSD, OpenBSD, and FreeBSD
-(and also on some non-UNIX MIPS operating systems), so that
-the existence of this call in MIPS operating systems is a de-facto
-standard.
-.SS Caveat
+.SH VERSIONS
.BR cacheflush ()
should not be used in programs intended to be portable.
On Linux, this call first appeared on the MIPS architecture,
but nowadays, Linux provides a
.BR cacheflush ()
system call on some other architectures, but with different arguments.
-.SH NOTES
.SS Architecture-specific variants
glibc provides a wrapper for this system call,
with the prototype shown in SYNOPSIS,
instead of
.I void *
for the parameters.
+.SH STANDARDS
+Historically, this system call was available on all MIPS UNIX variants
+including RISC/os, IRIX, Ultrix, NetBSD, OpenBSD, and FreeBSD
+(and also on some non-UNIX MIPS operating systems), so that
+the existence of this call in MIPS operating systems is a de-facto
+standard.
.SH BUGS
Linux kernels older than Linux 2.6.11 ignore the
.I addr
.B ESRCH
No such thread.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
.SH NOTES
The portable interface to the capability querying and setting
functions is provided by the
.I fd
does not refer to a directory.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
.SH NOTES
The current working directory is the starting point for interpreting
relative pathnames (those not starting with \[aq]/\[aq]).
.B EROFS
The named file resides on a read-only filesystem.
.SH VERSIONS
-.BR fchmodat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR chmod (),
-.BR fchmod ():
-4.4BSD, SVr4, POSIX.1-2001i, POSIX.1-2008.
-.PP
-.BR fchmodat ():
-POSIX.1-2008.
-.SH NOTES
.SS C library/kernel differences
The GNU C library
.BR fchmodat ()
that corresponds to the
.I dirfd
argument.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR chmod ()
+.TQ
+.BR fchmod ()
+4.4BSD, SVr4, POSIX.1-2001.
+.TP
+.BR fchmodat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH SEE ALSO
.BR chmod (1),
.BR chown (2),
.B EROFS
The named file resides on a read-only filesystem.
.SH VERSIONS
-.BR fchownat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR chown (),
-.BR fchown (),
-.BR lchown ():
-4.4BSD, SVr4, POSIX.1-2001, POSIX.1-2008.
-.PP
The 4.4BSD version can be
used only by the superuser (that is, ordinary users cannot give away files).
.\" chown():
.\" fchown():
.\" SVr4 documents additional EINVAL, EIO, EINTR, and ENOLINK
.\" error conditions.
-.PP
-.BR fchownat ():
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR chown ()
+.TQ
+.BR fchown ()
+.TQ
+.BR lchown ()
+4.4BSD, SVr4, POSIX.1-2001.
+.TP
+.BR fchownat ()
POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH NOTES
.SS Ownership of new files
When a new file is created (by, for example,
.B EPERM
The caller has insufficient privilege.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.4BSD, SUSv2 (marked LEGACY).
This function is not part of POSIX.1-2001.
.\" SVr4 documents additional EINTR, ENOLINK and EMULTIHOP error conditions.
.ad
.sp 1
.SH VERSIONS
-These system calls first appeared in Linux 2.6.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
-.PP
-On POSIX systems on which these functions are available, the symbol
-.B _POSIX_TIMERS
-is defined in \fI<unistd.h>\fP to a value greater than 0.
-The symbols
-.BR _POSIX_MONOTONIC_CLOCK ,
-.BR _POSIX_CPUTIME ,
-.B _POSIX_THREAD_CPUTIME
-indicate that
-.BR CLOCK_MONOTONIC ,
-.BR CLOCK_PROCESS_CPUTIME_ID ,
-.B CLOCK_THREAD_CPUTIME_ID
-are available.
-(See also
-.BR sysconf (3).)
-.SH NOTES
POSIX.1 specifies the following:
.RS
.PP
On Linux, these clocks are not settable
(i.e., no process has "appropriate privileges").
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=11972
-.\"
.SS C library/kernel differences
On some architectures, an implementation of
.BR clock_gettime ()
is provided in the
.BR vdso (7).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
+Linux 2.6.
+.PP
+On POSIX systems on which these functions are available, the symbol
+.B _POSIX_TIMERS
+is defined in \fI<unistd.h>\fP to a value greater than 0.
+The symbols
+.BR _POSIX_MONOTONIC_CLOCK ,
+.BR _POSIX_CPUTIME ,
+.B _POSIX_THREAD_CPUTIME
+indicate that
+.BR CLOCK_MONOTONIC ,
+.BR CLOCK_PROCESS_CPUTIME_ID ,
+.B CLOCK_THREAD_CPUTIME_ID
+are available.
+(See also
+.BR sysconf (3).)
+POSIX.1-2008 makes thes APIs mandatory.
.\"
.SS Historical note for SMP systems
Before Linux added kernel support for
.B ENOTSUP
The kernel does not support sleeping against this
.IR clockid .
-.SH VERSIONS
-The
-.BR clock_nanosleep ()
-system call first appeared in Linux 2.6.
-Support is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+Linux 2.6,
+glibc 2.1.
.SH NOTES
If the interval specified in
.I request
.B ENOSPC
error above.
.SH VERSIONS
-The
-.BR clone3 ()
-system call first appeared in Linux 5.3.
-.\" There is no entry for
-.\" .BR clone ()
-.\" in libc5.
-.\" glibc2 provides
-.\" .BR clone ()
-.\" as described in this manual page.
-.SH STANDARDS
-These system calls
-are Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
-One use of these systems calls
-is to implement threads: multiple flows of control in a program that
-run concurrently in a shared address space.
-.PP
-Note that the glibc
+The glibc
.BR clone ()
wrapper function makes some changes
in the memory pointed to by
do not use the buffer employed for the parent's stack
as the stack of the child.
.PP
-The
-.BR kcmp (2)
-system call can be used to test whether two processes share various
-resources such as a file descriptor table,
-System V semaphore undo operations, or a virtual address space.
-.PP
-Handlers registered using
-.BR pthread_atfork (3)
-are not executed during a clone call.
-.PP
-In the Linux 2.4.x series,
-.B CLONE_THREAD
-generally does not make the parent of the new thread the same
-as the parent of the calling process.
-However, from Linux 2.4.7 to Linux 2.4.18 the
-.B CLONE_THREAD
-flag implied the
-.B CLONE_PARENT
-flag (as in Linux 2.6.0 and later).
-.PP
On i386,
.BR clone ()
should not be called through vsyscall, but directly through
.IR "int $0x80" .
-.\"
.SS C library/kernel differences
The raw
.BR clone ()
.I stack_size
specifies the size of the stack pointed to by
.IR stack_base .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
+.BR clone3 ()
+Linux 5.3.
+.\" There is no entry for
+.\" .BR clone ()
+.\" in libc5.
+.\" glibc2 provides
+.\" .BR clone ()
+.\" as described in this manual page.
.SS Linux 2.4 and earlier
+In the Linux 2.4.x series,
+.B CLONE_THREAD
+generally does not make the parent of the new thread the same
+as the parent of the calling process.
+However, from Linux 2.4.7 to Linux 2.4.18 the
+.B CLONE_THREAD
+flag implied the
+.B CLONE_PARENT
+flag (as in Linux 2.6.0 and later).
+.PP
In Linux 2.4 and earlier,
.BR clone ()
does not take arguments
.IR tls ,
and
.IR child_tid .
+.SH NOTES
+One use of these systems calls
+is to implement threads: multiple flows of control in a program that
+run concurrently in a shared address space.
+.PP
+The
+.BR kcmp (2)
+system call can be used to test whether two processes share various
+resources such as a file descriptor table,
+System V semaphore undo operations, or a virtual address space.
+.PP
+Handlers registered using
+.BR pthread_atfork (3)
+are not executed during a clone call.
.SH BUGS
GNU C library versions 2.3.4 up to and including 2.24
contained a wrapper function for
.BR close ()
should not be retried after an error.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.\" SVr4 documents an additional ENOLINK error condition.
.SH NOTES
A successful close does not guarantee that the data has been successfully
.TP
.B ENOMEM
Insufficient kernel memory was available.
-.SH VERSIONS
-.BR close_range ()
-first appeared in Linux 5.9.
-Library support was added in glibc 2.34.
.SH STANDARDS
-.BR close_range ()
-is a nonstandard function that is also present on FreeBSD.
+None.
+.SH HISTORY
+FreeBSD.
+Linux 5.9,
+glibc 2.34.
.SH NOTES
.SS Closing all open file descriptors
.\" 278a5fbaed89dacd04e9d052f4594ffd0e0585de
Note that for IP sockets the timeout may
be very long when syncookies are enabled on the server.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD,
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD,
.RB (connect ()
first appeared in 4.2BSD).
.\" SVr4 documents the additional
.\" It also
.\" documents many additional error conditions not described here.
.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
-.PP
If
.BR connect ()
fails, consider the state of the socket as unspecified.
and the source and target filesystems are not of the same type,
or do not support cross-filesystem copy.
.SH VERSIONS
-The
-.BR copy_file_range ()
-system call first appeared in Linux 4.5, but glibc 2.27 provides a user-space
-emulation when it is not available.
-.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
-.PP
A major rework of the kernel implementation occurred in Linux 5.3.
Areas of the API that weren't clearly defined were clarified and the API bounds
are much more strictly checked than on earlier kernels.
Applications should target the behaviour and requirements of Linux 5.19,
that was also backported to earlier stable kernels.
.SH STANDARDS
-The
-.BR copy_file_range ()
-system call is a nonstandard Linux and GNU extension.
+Linux, GNU.
+.SH HISTORY
+Linux 4.5,
+but glibc 2.27 provides a user-space
+emulation when it is not available.
+.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
.SH NOTES
If
.I fd_in
(did not have the
.B CAP_SYS_MODULE
capability).
-.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
-.\" Removed in Linux 2.5.48
.SH STANDARDS
-.BR create_module ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
+Removed in Linux 2.6.
+.\" Removed in Linux 2.5.48
+.PP
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc versions before glibc 2.23 did export an ABI for this system call.
was not specified in
.IR flags .
.SH STANDARDS
-.BR delete_module ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
The
.BR delete_module ()
system call is not supported by glibc.
manually declare the interface in your code;
alternatively, you can invoke the system call using
.BR syscall (2).
-.PP
-The uninterruptible sleep that may occur if
-.B O_NONBLOCK
-is omitted from
-.I flags
-is considered undesirable, because the sleeping process is left
-in an unkillable state.
-As at Linux 3.7, specifying
-.B O_NONBLOCK
-is optional, but in future kernels it is likely to become mandatory.
.SS Linux 2.4 and earlier
In Linux 2.4 and earlier, the system call took only one argument:
.PP
in Linux 2.4 and earlier are
.I not
currently explained in this manual page.
+.SH NOTES
+The uninterruptible sleep that may occur if
+.B O_NONBLOCK
+is omitted from
+.I flags
+is considered undesirable, because the sleeping process is left
+in an unkillable state.
+As at Linux 3.7, specifying
+.B O_NONBLOCK
+is optional, but in future kernels it is likely to become mandatory.
.SH SEE ALSO
.BR create_module (2),
.BR init_module (2),
.B RLIMIT_NOFILE
in
.BR getrlimit (2)).
-.SH VERSIONS
-.BR dup3 ()
-was added in Linux 2.6.27;
-glibc support is available since glibc 2.9.
.SH STANDARDS
-.BR dup (),
-.BR dup2 ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
+.TP
+.BR dup ()
+.TQ
+.BR dup2 ()
+POSIX.1-2008.
+.TP
.BR dup3 ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+.TP
+.BR dup ()
+.TQ
+.BR dup2 ()
+POSIX.1-2001, SVr4, 4.3BSD.
.\" SVr4 documents additional
.\" EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
.\" The EBUSY return is Linux-specific.
+.TP
+.BR dup3 ()
+Linux 2.6.27,
+glibc 2.9.
.SH NOTES
The error returned by
.BR dup2 ()
instance.
Since Linux 2.6.8, the
.I size
-argument is ignored, but must be greater than zero; see NOTES.
+argument is ignored, but must be greater than zero; see HISTORY.
.PP
.BR epoll_create ()
returns a file descriptor referring to the new epoll instance.
.TP
.B ENOMEM
There was insufficient memory to create the kernel object.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR epoll_create ()
-was added in Linux 2.6.
-Library support is provided in glibc 2.3.2.
-.PP
+Linux 2.6,
+glibc 2.3.2.
.\" To be precise: kernel 2.5.44.
.\" The interface should be finalized by Linux kernel 2.5.66.
+.TP
.BR epoll_create1 ()
-was added in Linux 2.6.27.
-Library support is provided in glibc 2.9.
-.SH STANDARDS
-.BR epoll_create ()
-and
-.BR epoll_create1 ()
-are Linux-specific.
-.SH NOTES
+Linux 2.6.27,
+glibc 2.9.
+.PP
In the initial
.BR epoll_create ()
implementation, the
This error can occur if
.I fd
refers to, for example, a regular file or a directory.
-.SH VERSIONS
-.BR epoll_ctl ()
-was added to in Linux 2.6.
-.\" To be precise: kernel 2.5.44.
-.\" The interface should be finalized by Linux kernel 2.5.66.
-Library support is provided in glibc 2.3.2.
.SH STANDARDS
-.BR epoll_ctl ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6,
+.\" To be precise: Linux 2.5.44.
+.\" The interface should be finalized by Linux 2.5.66.
+glibc 2.3.2.
.SH NOTES
The
.B epoll
file descriptor, or
.I maxevents
is less than or equal to zero.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR epoll_wait ()
-was added in Linux 2.6.
-.\" To be precise: kernel 2.5.44.
+Linux 2.6,
+.\" To be precise: Linux 2.5.44.
.\" The interface should be finalized by Linux 2.5.66.
-Library support is provided in glibc 2.3.2.
-.PP
+glibc 2.3.2.
+.TP
.BR epoll_pwait ()
-was added in Linux 2.6.19.
-Library support is provided in glibc 2.6.
-.PP
-.BR epoll_pwait2 ()
-was added in Linux 5.11.
-.SH STANDARDS
-.BR epoll_wait (),
-.BR epoll_pwait (),
-and
+Linux 2.6.19,
+glibc 2.6.
+.TP
.BR epoll_pwait2 ()
-are Linux-specific.
+Linux 5.11.
.SH NOTES
While one thread is blocked in a call to
.BR epoll_wait (),
.ad
.sp 1
.SH VERSIONS
+.SS C library/kernel differences
+There are two underlying Linux system calls:
+.BR eventfd ()
+and the more recent
+.BR eventfd2 ().
+The former system call does not implement a
+.I flags
+argument.
+The latter system call implements the
+.I flags
+values described above.
+The glibc wrapper function will use
+.BR eventfd2 ()
+where it is available.
+.SS Additional glibc features
+The GNU C library defines an additional type,
+and two functions that attempt to abstract some of the details of
+reading and writing on an eventfd file descriptor:
+.PP
+.in +4n
+.EX
+typedef uint64_t eventfd_t;
+
+int eventfd_read(int fd, eventfd_t *value);
+int eventfd_write(int fd, eventfd_t value);
+.EE
+.in
+.PP
+The functions perform the read and write operations on an
+eventfd file descriptor,
+returning 0 if the correct number of bytes was transferred,
+or \-1 otherwise.
+.SH STANDARDS
+Linux, GNU.
+.SH HISTORY
+.TP
.BR eventfd ()
-is available since Linux 2.6.22.
-Working support is provided since glibc 2.8.
+Linux 2.6.22,
+glibc 2.8.
.\" eventfd() is in glibc 2.7, but reportedly does not build
-The
+.TP
.BR eventfd2 ()
-system call (see NOTES) is available since Linux 2.6.27.
+Linux 2.6.27 (see VERSIONS).
Since glibc 2.9, the
.BR eventfd ()
wrapper will employ the
.BR eventfd2 ()
system call, if it is supported by the kernel.
-.SH STANDARDS
-.BR eventfd ()
-and
-.BR eventfd2 ()
-are Linux-specific.
.SH NOTES
Applications can use an eventfd file descriptor instead of a pipe (see
.BR pipe (2))
See
.BR proc (5)
for further details.
-.\"
-.SS C library/kernel differences
-There are two underlying Linux system calls:
-.BR eventfd ()
-and the more recent
-.BR eventfd2 ().
-The former system call does not implement a
-.I flags
-argument.
-The latter system call implements the
-.I flags
-values described above.
-The glibc wrapper function will use
-.BR eventfd2 ()
-where it is available.
-.SS Additional glibc features
-The GNU C library defines an additional type,
-and two functions that attempt to abstract some of the details of
-reading and writing on an eventfd file descriptor:
-.PP
-.in +4n
-.EX
-typedef uint64_t eventfd_t;
-
-int eventfd_read(int fd, eventfd_t *value);
-int eventfd_write(int fd, eventfd_t value);
-.EE
-.in
-.PP
-The functions perform the read and write operations on an
-eventfd file descriptor,
-returning 0 if the correct number of bytes was transferred,
-or \-1 otherwise.
.SH EXAMPLES
The following program creates an eventfd file descriptor
and then forks to create a child process.
.TP
.B ETXTBSY
The specified executable was open for writing by one or more processes.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
POSIX does not document the #! behavior, but it exists
(with some variations) on other UNIX systems.
-.\" SVr4 documents additional error
-.\" conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
-.\" document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
-.\" EISDIR or ELIBBAD error conditions.
-.SH NOTES
-One sometimes sees
-.BR execve ()
-(and the related functions described in
-.BR exec (3))
-described as "executing a
-.I new
-process" (or similar).
-This is a highly misleading description:
-there is no new process;
-many attributes of the calling process remain unchanged
-(in particular, its PID).
-All that
-.BR execve ()
-does is arrange for an existing process (the calling process)
-to execute a new program.
-.PP
-Set-user-ID and set-group-ID processes can not be
-.BR ptrace (2)d.
-.PP
-The result of mounting a filesystem
-.I nosuid
-varies across Linux kernel versions:
-some will refuse execution of set-user-ID and set-group-ID
-executables when this would
-give the user powers they did not have already (and return
-.BR EPERM ),
-some will just ignore the set-user-ID and set-group-ID bits and
-.BR exec ()
-successfully.
.PP
On Linux,
.I argv
will also change,
to reflect the fact that the limit on space for holding
command-line arguments and environment variables has changed.
-.PP
-In most cases where
-.BR execve ()
-fails, control returns to the original executable image,
-and the caller of
-.BR execve ()
-can then handle the error.
-However, in (rare) cases (typically caused by resource exhaustion),
-failure may occur past the point of no return:
-the original executable image has been torn down,
-but the new image could not be completely built.
-In such cases, the kernel kills the process with a
-.\" commit 19d860a140beac48a1377f179e693abe86a9dac9
-.B SIGSEGV
-.RB ( SIGKILL
-until Linux 3.17)
-signal.
.\"
.SS Interpreter scripts
The kernel imposes a maximum length on the text that follows the
.PP
Linux (like most other modern UNIX systems)
ignores the set-user-ID and set-group-ID bits on scripts.
-.\"
-.\" .SH BUGS
-.\" Some Linux versions have failed to check permissions on ELF
-.\" interpreters. This is a security hole, because it allows users to
-.\" open any file, such as a rewinding tape device, for reading. Some
-.\" Linux versions have also had other security holes in
-.\" .BR execve ()
-.\" that could be exploited for denial of service by a suitably crafted
-.\" ELF binary. There are no known problems with Linux 2.0.34 or Linux 2.2.15.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.\" SVr4 documents additional error
+.\" conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
+.\" document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
+.\" EISDIR or ELIBBAD error conditions.
+.PP
+With UNIX\ V6, the argument list of an
+.BR exec ()
+call was ended by 0,
+while the argument list of
+.I main
+was ended by \-1.
+Thus, this argument list was not directly usable in a further
+.BR exec ()
+call.
+Since UNIX\ V7, both are NULL.
+.SH NOTES
+One sometimes sees
+.BR execve ()
+(and the related functions described in
+.BR exec (3))
+described as "executing a
+.I new
+process" (or similar).
+This is a highly misleading description:
+there is no new process;
+many attributes of the calling process remain unchanged
+(in particular, its PID).
+All that
+.BR execve ()
+does is arrange for an existing process (the calling process)
+to execute a new program.
+.PP
+Set-user-ID and set-group-ID processes can not be
+.BR ptrace (2)d.
+.PP
+The result of mounting a filesystem
+.I nosuid
+varies across Linux kernel versions:
+some will refuse execution of set-user-ID and set-group-ID
+executables when this would
+give the user powers they did not have already (and return
+.BR EPERM ),
+some will just ignore the set-user-ID and set-group-ID bits and
+.BR exec ()
+successfully.
+.PP
+In most cases where
+.BR execve ()
+fails, control returns to the original executable image,
+and the caller of
+.BR execve ()
+can then handle the error.
+However, in (rare) cases (typically caused by resource exhaustion),
+failure may occur past the point of no return:
+the original executable image has been torn down,
+but the new image could not be completely built.
+In such cases, the kernel kills the process with a
+.\" commit 19d860a140beac48a1377f179e693abe86a9dac9
+.B SIGSEGV
+.RB ( SIGKILL
+until Linux 3.17)
+signal.
.SS execve() and EAGAIN
A more detailed explanation of the
.B EAGAIN
The flag is also cleared if a subsequent call to
.BR fork (2)
by this process succeeds.
-.SS Historical
-With UNIX\ V6, the argument list of an
-.BR exec ()
-call was ended by 0,
-while the argument list of
-.I main
-was ended by \-1.
-Thus, this argument list was not directly usable in a further
-.BR exec ()
-call.
-Since UNIX\ V7, both are NULL.
.\"
.\" .SH BUGS
.\" Some Linux versions have failed to check permissions on ELF
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR execveat ()
-was added in Linux 3.19.
-Library support was added in glibc 2.34.
.SH STANDARDS
-The
-.BR execveat ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.19,
+glibc 2.34.
.SH NOTES
In addition to the reasons explained in
.BR openat (2),
in the calling process's thread group.
.SH RETURN VALUE
This system call does not return.
-.SH VERSIONS
-This call is present since Linux 2.5.35.
.SH STANDARDS
-This call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.35.
.SH NOTES
Since glibc 2.3, this is the system call invoked when the
.BR _exit (2)
but the file referred to by
.I fd
is currently being executed.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR fallocate ()
-is available since Linux 2.6.23.
-Support is provided since glibc 2.10.
-The
+Linux 2.6.23,
+glibc 2.10.
+.TP
.B FALLOC_FL_*
-flags are defined in glibc headers only since glibc 2.18.
+glibc 2.18.
.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
-.SH STANDARDS
-.BR fallocate ()
-is Linux-specific.
.SH SEE ALSO
.BR fallocate (1),
.BR ftruncate (2),
.B EPERM
The operation is not permitted because the caller lacks a required capability.
.SH VERSIONS
-.BR fanotify_init ()
-was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
-.PP
Prior to Linux 5.13,
.\" commit 7cea2a3c505e87a9d6afc78be4a7f7be636a73a7
calling
listening process itself generated the event.
.RE
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.37.
+.\" was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH BUGS
The following bug was present before Linux 3.18:
.IP \[bu] 3
than its root superblock.
This error can be returned only with an fanotify group that identifies
filesystem objects by file handles.
-.SH VERSIONS
-.BR fanotify_mark ()
-was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.37.
+.\" was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH NOTES
.SS FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM
When using either
or the current set of seals on the file already includes
.BR F_SEAL_SEAL .
.SH STANDARDS
-SVr4, 4.3BSD, POSIX.1-2001.
-Only the operations
-.BR F_DUPFD ,
-.BR F_GETFD ,
-.BR F_SETFD ,
-.BR F_GETFL ,
-.BR F_SETFL ,
-.BR F_GETLK ,
-.BR F_SETLK ,
-and
-.B F_SETLKW
-are specified in POSIX.1-2001.
-.PP
-.B F_GETOWN
-and
-.B F_SETOWN
-are specified in POSIX.1-2001.
-(To get their definitions, define either
-.\" .BR _BSD_SOURCE ,
-.\" or
-.B _XOPEN_SOURCE
-with the value 500 or greater, or
-.B _POSIX_C_SOURCE
-with the value 200809L or greater.)
-.PP
-.B F_DUPFD_CLOEXEC
-is specified in POSIX.1-2008.
-(To get this definition, define
-.B _POSIX_C_SOURCE
-with the value 200809L or greater, or
-.B _XOPEN_SOURCE
-with the value 700 or greater.)
+POSIX.1-2008.
.PP
.BR F_GETOWN_EX ,
.BR F_SETOWN_EX ,
.B F_GET_SEALS
are Linux-specific.
.\" FIXME . Once glibc adds support, add a note about FTM requirements
+.SH HISTORY
+SVr4, 4.3BSD, POSIX.1-2001.
+.PP
+Only the operations
+.BR F_DUPFD ,
+.BR F_GETFD ,
+.BR F_SETFD ,
+.BR F_GETFL ,
+.BR F_SETFL ,
+.BR F_GETLK ,
+.BR F_SETLK ,
+and
+.B F_SETLKW
+are specified in POSIX.1-2001.
+.PP
+.B F_GETOWN
+and
+.B F_SETOWN
+are specified in POSIX.1-2001.
+(To get their definitions, define either
+.\" .BR _BSD_SOURCE ,
+.\" or
+.B _XOPEN_SOURCE
+with the value 500 or greater, or
+.B _POSIX_C_SOURCE
+with the value 200809L or greater.)
+.PP
+.B F_DUPFD_CLOEXEC
+is specified in POSIX.1-2008.
+(To get this definition, define
+.B _POSIX_C_SOURCE
+with the value 200809L or greater, or
+.B _XOPEN_SOURCE
+with the value 700 or greater.)
.SH NOTES
The errors returned by
.BR dup2 (2)
The file is locked and the
.B LOCK_NB
flag was selected.
-.SH STANDARDS
-4.4BSD (the
-.BR flock ()
-call first appeared in 4.2BSD).
-A version of
-.BR flock (),
-possibly implemented in terms of
-.BR fcntl (2),
-appears on most UNIX systems.
-.SH NOTES
+.SH VERSIONS
Since Linux 2.0,
.BR flock ()
is implemented as a system call in its own right rather
locks
.I do
interact with one another.)
-.PP
-.BR flock ()
-places advisory locks only; given suitable permissions on a file,
-a process is free to ignore the use of
+.SS CIFS details
+Up to Linux 5.4,
.BR flock ()
-and perform I/O on the file.
+is not propagated over SMB.
+A file with such locks will not appear locked for remote clients.
.PP
+Since Linux 5.5,
.BR flock ()
-and
+locks are emulated with SMB byte-range locks on the entire file.
+Similarly to NFS, this means that
.BR fcntl (2)
-locks have different semantics with respect to forked processes and
-.BR dup (2).
-On systems that implement
-.BR flock ()
-using
-.BR fcntl (2),
-the semantics of
+and
.BR flock ()
-will be different from those described in this manual page.
+locks interact with one another.
+Another important side-effect is that the locks are not advisory anymore:
+any IO on a locked file will always fail with
+.B EACCES
+when done from a separate file descriptor.
+This difference originates from the design of locks in the SMB protocol,
+which provides mandatory locking semantics.
.PP
-Converting a lock
-(shared to exclusive, or vice versa) is not guaranteed to be atomic:
-the existing lock is first removed, and then a new lock is established.
-Between these two steps,
-a pending lock request by another process may be granted,
-with the result that the conversion either blocks, or fails if
-.B LOCK_NB
-was specified.
-(This is the original BSD behavior,
-and occurs on many other implementations.)
-.\" Kernel 2.5.21 changed things a little: during lock conversion
-.\" it is now the highest priority process that will get the lock -- mtk
+Remote and mandatory locking semantics may vary with
+SMB protocol, mount options and server type.
+See
+.BR mount.cifs (8)
+for additional information.
+.SH STANDARDS
+BSD.
+.SH HISTORY
+4.4BSD (the
+.BR flock ()
+call first appeared in 4.2BSD).
+A version of
+.BR flock (),
+possibly implemented in terms of
+.BR fcntl (2),
+appears on most UNIX systems.
.SS NFS details
Up to Linux 2.6.11,
.BR flock ()
.I "local_lock"
option in
.BR nfs (5).
-.SS CIFS details
-Up to Linux 5.4,
+.SH NOTES
.BR flock ()
-is not propagated over SMB.
-A file with such locks will not appear locked for remote clients.
+places advisory locks only; given suitable permissions on a file,
+a process is free to ignore the use of
+.BR flock ()
+and perform I/O on the file.
.PP
-Since Linux 5.5,
.BR flock ()
-locks are emulated with SMB byte-range locks on the entire file.
-Similarly to NFS, this means that
-.BR fcntl (2)
and
+.BR fcntl (2)
+locks have different semantics with respect to forked processes and
+.BR dup (2).
+On systems that implement
.BR flock ()
-locks interact with one another.
-Another important side-effect is that the locks are not advisory anymore:
-any IO on a locked file will always fail with
-.B EACCES
-when done from a separate file descriptor.
-This difference originates from the design of locks in the SMB protocol,
-which provides mandatory locking semantics.
+using
+.BR fcntl (2),
+the semantics of
+.BR flock ()
+will be different from those described in this manual page.
.PP
-Remote and mandatory locking semantics may vary with
-SMB protocol, mount options and server type.
-See
-.BR mount.cifs (8)
-for additional information.
+Converting a lock
+(shared to exclusive, or vice versa) is not guaranteed to be atomic:
+the existing lock is first removed, and then a new lock is established.
+Between these two steps,
+a pending lock request by another process may be granted,
+with the result that the conversion either blocks, or fails if
+.B LOCK_NB
+was specified.
+(This is the original BSD behavior,
+and occurs on many other implementations.)
+.\" Kernel 2.5.21 changed things a little: during lock conversion
+.\" it is now the highest priority process that will get the lock -- mtk
.SH SEE ALSO
.BR flock (1),
.BR close (2),
.\" commit 4a2c7a7837da1b91468e50426066d988050e4d56
System call was interrupted by a signal and will be restarted.
(This can be seen only during a trace.)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
-Under Linux,
-.BR fork ()
-is implemented using copy-on-write pages, so the only penalty that it incurs
-is the time and memory required to duplicate the parent's page tables,
-and to create a unique task structure for the child.
+.SH VERSIONS
.SS C library/kernel differences
Since glibc 2.3.3,
.\" nptl/sysdeps/unix/sysv/linux/fork.c
established using
.BR pthread_atfork (3).
.\" and does some magic to ensure that getpid(2) returns the right value.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SH NOTES
+Under Linux,
+.BR fork ()
+is implemented using copy-on-write pages, so the only penalty that it incurs
+is the time and memory required to duplicate the parent's page tables,
+and to create a unique task structure for the child.
.SH EXAMPLES
See
.BR pipe (2)
.BR write (2)
system call, and some previous write failed due to insufficient
storage space.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
+.SH VERSIONS
On POSIX systems on which
.BR fdatasync ()
is available,
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines them to 1.
-.SH NOTES
+.PP
On some UNIX systems (but not Linux),
.I fd
must be a
.I writable
file descriptor.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.PP
In Linux 2.2 and earlier,
.BR fdatasync ()
.\"
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"
-.SH VERSIONS
-Futexes were first made available in a stable kernel release
-with Linux 2.6.0.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.0.
.PP
Initial futex support was merged in Linux 2.5.7 but with different
semantics from what was described above.
described in this page was introduced in Linux 2.5.40.
A fifth argument was added in Linux 2.5.70,
and a sixth argument was added in Linux 2.6.7.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
-Several higher-level programming abstractions are implemented via futexes,
-including POSIX semaphores and
-various POSIX threads synchronization mechanisms
-(mutexes, condition variables, read-write locks, and barriers).
-.\" TODO FIXME(Torvald) Above, we cite this section and claim it contains
-.\" details on the synchronization semantics; add the C11 equivalents
-.\" here (or whatever we find consensus for).
-.\"
-.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.\"
.SH EXAMPLES
The program below demonstrates use of futexes in a program where a parent
process and a child process use a pair of futexes located inside a
.I dirfd
is a file descriptor referring to a file other than a directory.
.SH VERSIONS
+.SS glibc
+If
+.I pathname
+is NULL, then the glibc
.BR futimesat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
+wrapper function updates the times for the file referred to by
+.IR dirfd .
+.\" The Solaris futimesat() also has this strangeness.
.SH STANDARDS
-This system call is nonstandard.
+None.
+.SH HISTORY
+Linux 2.6.16,
+glibc 2.4.
+.PP
It was implemented from a specification that was proposed for POSIX.1,
but that specification was replaced by the one for
.BR utimensat (2).
.PP
A similar system call exists on Solaris.
.SH NOTES
-.SS glibc notes
-If
-.I pathname
-is NULL, then the glibc
-.BR futimesat ()
-wrapper function updates the times for the file referred to by
-.IR dirfd .
-.\" The Solaris futimesat() also has this strangeness.
.SH SEE ALSO
.BR stat (2),
.BR utimensat (2),
.B ENOSYS
.BR get_kernel_syms ()
is not supported in this version of the kernel.
-.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
-.\" Removed in Linux 2.5.48
.SH STANDARDS
-.BR get_kernel_syms ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
+Removed in Linux 2.6.
+.\" Removed in Linux 2.5.48
+.PP
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc versions before glibc 2.23 did export an ABI for this system call.
(And there are other
.B EINVAL
cases.)
-.SH VERSIONS
-The
-.BR get_mempolicy ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
.SH NOTES
For information on library support, see
.BR numa (7).
.TP
.B EFAULT
Arguments point outside the calling process's address space.
-.SH VERSIONS
-.BR getcpu ()
-was added in Linux 2.6.19 for x86-64 and i386.
-Library support was added in glibc 2.29
-(Earlier glibc versions did not provide a wrapper for this system call,
-necessitating the use of
-.BR syscall (2).)
.SH STANDARDS
-.BR getcpu ()
-is Linux-specific.
-.SH NOTES
-Linux makes a best effort to make this call as fast as possible.
-(On some architectures, this is done via an implementation in the
-.BR vdso (7).)
-The intention of
-.BR getcpu ()
-is to allow programs to make optimizations with per-CPU data
-or for NUMA optimization.
+Linux.
+.SH HISTORY
+Linux 2.6.19 (x86-64 and i386),
+glibc 2.29.
.\"
.SS C library/kernel differences
The kernel system call has a third argument:
.\" although in practice the scheduler's attempt to maintain
.\" soft CPU affinity means that the information is unlikely to change
.\" over the course of the caching interval.
+.SH NOTES
+Linux makes a best effort to make this call as fast as possible.
+(On some architectures, this is done via an implementation in the
+.BR vdso (7).)
+The intention of
+.BR getcpu ()
+is to allow programs to make optimizations with per-CPU data
+or for NUMA optimization.
.SH SEE ALSO
.BR mbind (2),
.BR sched_setaffinity (2),
.B ENOTDIR
File descriptor does not refer to a directory.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.\" SVr4 documents additional ENOLINK, EIO error conditions.
-.SH NOTES
-Library support for
+.TP
.BR getdents64 ()
-was added in glibc 2.30;
+glibc 2.30.
+.SH NOTES
glibc does not provide a wrapper for
.BR getdents ();
call
.BR getdents ()
-(or
-.BR getdents64 ()
-on earlier glibc versions) using
+using
.BR syscall (2).
In that case you will need to define the
.I linux_dirent
is longer than
.I len
bytes.
-.SH STANDARDS
-POSIX does not specify these calls.
-.\" But they appear on most systems...
-.SH NOTES
-Since Linux 1.0, the limit on the length of a domain name,
-including the terminating null byte, is 64 bytes.
-In older kernels, it was 8 bytes.
-.PP
+.SH VERSIONS
On most Linux architectures (including x86),
there is no
.BR getdomainname ()
.I domainname
field returned from a call to
.BR uname (2).
+.SH STANDARDS
+None.
+.\" But they appear on most systems...
+.SH HISTORY
+Since Linux 1.0, the limit on the length of a domain name,
+including the terminating null byte, is 64 bytes.
+In older kernels, it was 8 bytes.
.SH SEE ALSO
.BR gethostname (2),
.BR sethostname (2),
.\" https://www.austingroupbugs.net/view.php?id=511
.\" 0000511: getuid and friends should not modify errno
.IR errno .
+.SH VERSIONS
+On Alpha, instead of a pair of
+.BR getgid ()
+and
+.BR getegid ()
+system calls, a single
+.BR getxgid ()
+system call is provided, which returns a pair of real and effective GIDs.
+The glibc
+.BR getgid ()
+and
+.BR getegid ()
+wrapper functions transparently deal with this.
+See
+.BR syscall (2)
+for details regarding register mapping.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
The original Linux
.BR getgid ()
and
and
.BR getegid ()
wrapper functions transparently deal with the variations across kernel versions.
-.PP
-On Alpha, instead of a pair of
-.BR getgid ()
-and
-.BR getegid ()
-system calls, a single
-.BR getxgid ()
-system call is provided, which returns a pair of real and effective GIDs.
-The glibc
-.BR getgid ()
-and
-.BR getegid ()
-wrapper functions transparently deal with this.
-See
-.BR syscall (2)
-for details regarding register mapping.
.SH SEE ALSO
.BR getresgid (2),
.BR setgid (2),
.IR /proc/ pid /setgroups
in
.BR user_namespaces (7).
+.SH VERSIONS
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including the one for
+.BR setgroups ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-.BR getgroups ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR setgroups ():
+.TP
+.BR getgroups ()
+POSIX.1-2008.
+.TP
+.BR setgroups ()
+None.
+.SH HISTORY
+.TP
+.BR getgroups ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR setgroups ()
SVr4, 4.3BSD.
Since
.BR setgroups ()
requires privilege, it is not covered by POSIX.1.
+.PP
+The original Linux
+.BR getgroups ()
+system call supported only 16-bit group IDs.
+Subsequently, Linux 2.4 added
+.BR getgroups32 (),
+supporting 32-bit IDs.
+The glibc
+.BR getgroups ()
+wrapper function transparently deals with the variation across kernel versions.
.SH NOTES
A process can have up to
.B NGROUPS_MAX
Since Linux 2.6.4, the maximum number of supplementary group IDs is also
exposed via the Linux-specific read-only file,
.IR /proc/sys/kernel/ngroups_max .
-.PP
-The original Linux
-.BR getgroups ()
-system call supported only 16-bit group IDs.
-Subsequently, Linux 2.4 added
-.BR getgroups32 (),
-supporting 32-bit IDs.
-The glibc
-.BR getgroups ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including the one for
-.BR setgroups ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getgid (2),
.BR setgid (2),
.B CAP_SYS_ADMIN
capability in the user namespace associated with its UTS namespace (see
.BR namespaces (7)).
-.SH STANDARDS
-SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
-POSIX.1-2001 and POSIX.1-2008 specify
-.BR gethostname ()
-but not
-.BR sethostname ().
-.SH NOTES
+.SH VERSIONS
SUSv2 guarantees that "Host names are limited to 255 bytes".
POSIX.1 guarantees that "Host names (not including
the terminating null byte) are limited to
.BR ENAMETOOLONG ;
in this case, a terminating null byte is not included in the returned
.IR name .
+.SH STANDARDS
+.TP
+.BR gethostname ()
+POSIX.1-2008.
+.TP
+.BR sethostname ()
+None.
+.SH HISTORY
+SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
+POSIX.1-2001 and POSIX.1-2008 specify
+.BR gethostname ()
+but not
+.BR sethostname ().
.PP
Versions of glibc before glibc 2.2
.\" At least glibc 2.0 and glibc 2.1, older versions not checked
fields in the structure pointed to by
.I new_value
contains a value outside the range [0, 999999].
+.SH VERSIONS
+The standards are silent on the meaning of the call:
+.PP
+.in +4n
+.EX
+setitimer(which, NULL, &old_value);
+.EE
+.in
+.PP
+Many systems (Solaris, the BSDs, and perhaps others)
+treat this as equivalent to:
+.PP
+.in +4n
+.EX
+getitimer(which, &old_value);
+.EE
+.in
+.PP
+In Linux, this is treated as being equivalent to a call in which the
+.I new_value
+fields are zero; that is, the timer is disabled.
+.IR "Don't use this Linux misfeature" :
+it is nonportable and unnecessary.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).
POSIX.1-2008 marks
.BR getitimer ()
and
.BR usleep (3)
unspecified.
-.PP
-The standards are silent on the meaning of the call:
-.PP
-.in +4n
-.EX
-setitimer(which, NULL, &old_value);
-.EE
-.in
-.PP
-Many systems (Solaris, the BSDs, and perhaps others)
-treat this as equivalent to:
-.PP
-.in +4n
-.EX
-getitimer(which, &old_value);
-.EE
-.in
-.PP
-In Linux, this is treated as being equivalent to a call in which the
-.I new_value
-fields are zero; that is, the timer is disabled.
-.IR "Don't use this Linux misfeature" :
-it is nonportable and unnecessary.
.SH BUGS
The generation and delivery of a signal are distinct, and
only one instance of each of the signals listed above may be pending
where "page" is a fixed-length block,
the unit for memory allocation and file mapping performed by
.BR mmap (2).
-.\" .SH HISTORY
-.\" This call first appeared in 4.2BSD.
.SH STANDARDS
+None.
+.SH HISTORY
+This call first appeared in 4.2BSD.
SVr4, 4.4BSD, SUSv2.
In SUSv2 the
.BR getpagesize ()
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( getpeername ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
For background on the
.I socklen_t
operation).
.SH ERRORS
These functions are always successful.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD, SVr4.
-.SH NOTES
-If the caller's parent is in a different PID namespace (see
-.BR pid_namespaces (7)),
+.SH VERSIONS
+On Alpha, instead of a pair of
+.BR getpid ()
+and
.BR getppid ()
-returns 0.
-.PP
-From a kernel perspective,
-the PID (which is shared by all of the threads in a multithreaded process)
-is sometimes also known as the thread group ID (TGID).
-This contrasts with the kernel thread ID (TID),
-which is unique for each thread.
-For further details, see
-.BR gettid (2)
-and the discussion of the
-.B CLONE_THREAD
-flag in
-.BR clone (2).
-.\"
+system calls, a single
+.BR getxpid ()
+system call is provided, which returns a pair of PID and parent PID.
+The glibc
+.BR getpid ()
+and
+.BR getppid ()
+wrapper functions transparently deal with this.
+See
+.BR syscall (2)
+for details regarding register mapping.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD, SVr4.
.SS C library/kernel differences
From glibc 2.3.4 up to and including glibc 2.24,
the glibc wrapper function for
always invoke the actual system call, rather than returning a cached value.
.\" FIXME .
.\" Review progress of https://bugzilla.redhat.com/show_bug.cgi?id=1469757
-.PP
-On Alpha, instead of a pair of
-.BR getpid ()
-and
-.BR getppid ()
-system calls, a single
-.BR getxpid ()
-system call is provided, which returns a pair of PID and parent PID.
-The glibc
-.BR getpid ()
-and
+.SH NOTES
+If the caller's parent is in a different PID namespace (see
+.BR pid_namespaces (7)),
.BR getppid ()
-wrapper functions transparently deal with this.
-See
-.BR syscall (2)
-for details regarding register mapping.
+returns 0.
+.PP
+From a kernel perspective,
+the PID (which is shared by all of the threads in a multithreaded process)
+is sometimes also known as the thread group ID (TGID).
+This contrasts with the kernel thread ID (TID),
+which is unique for each thread.
+For further details, see
+.BR gettid (2)
+and the discussion of the
+.B CLONE_THREAD
+flag in
+.BR clone (2).
.SH SEE ALSO
.BR clone (2),
.BR fork (2),
.I who
values specified.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
.SH NOTES
For further details on the nice value, see
The glibc wrapper function for
.BR getrandom ()
determined that the underlying kernel does not implement this system call.
-.SH VERSIONS
-.BR getrandom ()
-was introduced in Linux 3.17.
-Support was added in glibc 2.25.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.17,
+glibc 2.25.
.SH NOTES
For an overview and comparison of the various interfaces that
can be used to obtain randomness, see
.B EFAULT
One of the arguments specified an address outside the calling program's
address space.
-.SH VERSIONS
-These system calls were added on Linux 2.1.44.
-.PP
-The prototypes are given since glibc 2.3.2,
-provided
-.B _GNU_SOURCE
-is defined.
.SH STANDARDS
-These calls are nonstandard;
-they also appear on HP-UX and some of the BSDs.
-.SH NOTES
+None.
+These calls also appear on HP-UX and some of the BSDs.
+.SH HISTORY
+Linux 2.1.44,
+glibc 2.3.2.
+.PP
The original Linux
.BR getresuid ()
and
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR prlimit ()
-system call is available since Linux 2.6.36.
-Library support is available since glibc 2.13.
.SH STANDARDS
-.BR getrlimit (),
-.BR setrlimit ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
-.BR prlimit ():
-Linux-specific.
+.TP
+.BR getrlimit ()
+.TQ
+.BR setrlimit ()
+POSIX.1-2008.
+.TP
+.BR prlimit ()
+Linux.
.PP
.B RLIMIT_MEMLOCK
and
and
.B RLIMIT_SIGPENDING
are Linux-specific.
+.SH HISTORY
+.TP
+.BR getrlimit ()
+.TQ
+.BR setrlimit ()
+POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR prlimit ()
+Linux 2.6.36,
+glibc 2.13.
.SH NOTES
A child process created via
.BR fork (2)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.PP
POSIX.1 specifies
.BR getrusage (),
but specifies only the fields
.PP
.B RUSAGE_THREAD
is Linux-specific.
-.SH NOTES
-Resource usage metrics are preserved across an
-.BR execve (2).
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.PP
Before Linux 2.6.9, if the disposition of
.B SIGCHLD
(Since Linux 2.33, glibc no longer provides an
.BR vtimes ()
implementation.)
+.SH NOTES
+Resource usage metrics are preserved across an
+.BR execve (2).
.PP
See also the description of
.IR /proc/ pid /stat
.I pid
was found.
.SH VERSIONS
-This system call is available since Linux 2.0.
+Linux does not return
+.BR EPERM .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+Linux 2.0.
.\" Linux has this system call since Linux 1.3.44.
.\" There is libc support since libc 5.2.19.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
.SH NOTES
-Linux does not return
-.BR EPERM .
-.PP
See
.BR credentials (7)
for a description of sessions and session IDs.
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( getsockname ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.\" SVr4 documents additional ENOMEM
.\" and ENOSR error codes.
.SH NOTES
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-SVr4, 4.4BSD (these system calls first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+SVr4, 4.4BSD (first appeared in 4.2BSD).
.\" SVr4 documents additional ENOMEM and ENOSR error codes, but does
.\" not document the
.\" .BR SO_SNDLOWAT ", " SO_RCVLOWAT ", " SO_SNDTIMEO ", " SO_RCVTIMEO
On success, returns the thread ID of the calling thread.
.SH ERRORS
This call is always successful.
-.SH VERSIONS
-The
-.BR gettid ()
-system call first appeared in Linux 2.4.11.
-Library support was added in glibc 2.30.
-(Earlier glibc versions did not provide a wrapper for this system call,
-necessitating the use of
-.BR syscall (2).)
.SH STANDARDS
-.BR gettid ()
-is Linux-specific and should not be used in programs that
-are intended to be portable.
+Linux.
+.SH HISTORY
+Linux 2.4.11,
+glibc 2.30.
.SH NOTES
The thread ID returned by this call is not the same thing as a
POSIX thread ID (i.e., the opaque value returned by
under Linux the
.B CAP_SYS_TIME
capability is required.
+.SH VERSIONS
+.SS C library/kernel differences
+On some architectures, an implementation of
+.BR gettimeofday ()
+is provided in the
+.BR vdso (7).
.SH STANDARDS
+.TP
+.BR gettimeofday ()
+POSIX.1-2008 (obsolete).
+.TP
+.BR settimeofday ()
+None.
+.SH HISTORY
SVr4, 4.3BSD.
POSIX.1-2001 describes
.BR gettimeofday ()
as obsolete, recommending the use of
.BR clock_gettime (2)
instead.
-.SH NOTES
-The time returned by
-.BR gettimeofday ()
-.I is
-affected by discontinuous jumps in the system time
-(e.g., if the system administrator manually changes the system time).
-If you need a monotonically increasing clock, see
-.BR clock_gettime (2).
-.PP
-Macros for operating on
-.I timeval
-structures are described in
-.BR timeradd (3).
.PP
Traditionally, the fields of
.I struct timeval
were of type
.IR long .
.\"
-.SS C library/kernel differences
-On some architectures, an implementation of
-.BR gettimeofday ()
-is provided in the
-.BR vdso (7).
-.\"
.SS The tz_dsttime field
On a non-Linux kernel, with glibc, the
.I tz_dsttime
decisions.
So this method of representing timezones
has been abandoned.
+.SH NOTES
+The time returned by
+.BR gettimeofday ()
+.I is
+affected by discontinuous jumps in the system time
+(e.g., if the system administrator manually changes the system time).
+If you need a monotonically increasing clock, see
+.BR clock_gettime (2).
+.PP
+Macros for operating on
+.I timeval
+structures are described in
+.BR timeradd (3).
.SH SEE ALSO
.BR date (1),
.BR adjtimex (2),
.\" 0000511: getuid and friends should not modify errno
.IR errno .
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
-.SS History
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
In UNIX\ V6 the
.BR getuid ()
call returned
.B EFAULT
if the unwind info can't be stored in the space specified by
.IR buf .
-.SH VERSIONS
-This system call is available since Linux 2.4.
.SH STANDARDS
-This system call is Linux-specific,
-and is available only on the IA-64 architecture.
-.SH NOTES
+Linux on IA-64.
+.SH HISTORY
+Linux 2.4.
+.PP
This system call has been deprecated.
The modern way to obtain the kernel's unwind data is via the
.BR vdso (7).
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
.nf
.B #include <unistd.h>
.PP
-.B int idle(void);
+.B [[deprecated]] int idle(void);
.fi
.SH DESCRIPTION
.BR idle ()
.TP
.B EPERM
Always, for a user process.
-.SH VERSIONS
-Since Linux 2.3.13, this system call does not exist anymore.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Removed in Linux 2.3.13.
is set to the value returned by the
.I init
function.
-.SH VERSIONS
-.BR finit_module ()
-is available since Linux 3.8.
.SH STANDARDS
-.BR init_module ()
-and
+Linux.
+.SH HISTORY
+.TP
.BR finit_module ()
-are Linux-specific.
-.SH NOTES
+Linux 3.8.
+.PP
The
.BR init_module ()
system call is not supported by glibc.
manually declare the interface in your code;
alternatively, you can invoke the system call using
.BR syscall (2).
-.PP
-Information about currently loaded modules can be found in
-.I /proc/modules
-and in the file trees under the per-module subdirectories under
-.IR /sys/module .
-.PP
-See the Linux kernel source file
-.I include/linux/module.h
-for some useful background information.
.SS Linux 2.4 and earlier
In Linux 2.4 and earlier, the
.BR init_module ()
are expected to point within the module body and be
initialized as appropriate for kernel space, that is, relocated with
the rest of the module.
+.SH NOTES
+Information about currently loaded modules can be found in
+.I /proc/modules
+and in the file trees under the per-module subdirectories under
+.IR /sys/module .
+.PP
+See the Linux kernel source file
+.I include/linux/module.h
+for some useful background information.
.SH SEE ALSO
.BR create_module (2),
.BR delete_module (2),
and
.I pathname
is not a directory.
-.SH VERSIONS
-Inotify was merged into the 2.6.13 Linux kernel.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH EXAMPLES
See
.BR inotify (7).
.TP
.B ENOMEM
Insufficient kernel memory is available.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR inotify_init ()
-first appeared in Linux 2.6.13;
-library support was added in glibc 2.4.
+Linux 2.6.13,
+glibc 2.4.
+.TP
.BR inotify_init1 ()
-was added in Linux 2.6.27;
-library support was added in glibc 2.9.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 2.6.27,
+glibc 2.9.
.SH SEE ALSO
.BR inotify_add_watch (2),
.BR inotify_rm_watch (2),
is not valid; or
.I fd
is not an inotify file descriptor.
-.SH VERSIONS
-Inotify was merged into the 2.6.13 Linux kernel.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH SEE ALSO
.BR inotify_add_watch (2),
.BR inotify_init (2),
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Definition of needed types */"
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_cancel ()
On success,
.BR io_cancel ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
.BR io_cancel ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_cancel ()
-is Linux-specific and should not be used
-in programs that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_cancel ()
wrapper function provided by
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_destroy (2),
.BR io_getevents (2),
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_destroy ()
On success,
.BR io_destroy ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EFAULT
.BR io_destroy ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_destroy ()
-is Linux-specific and should not be used in programs
-that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_destroy ()
wrapper function provided by
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_getevents (2),
.SH LIBRARY
Standard C library
.RI ( libc ", " \-lc )
+.PP
+Alternatively, Asynchronous I/O library
+.RI ( libaio ", " \-laio );
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Definition of " *io_* " types */"
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_getevents ()
.IR min_nr ,
if the call was interrupted by a signal handler.
.PP
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EFAULT
.BR io_getevents ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_getevents ()
-is Linux-specific and should not be used in
-programs that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_getevents ()
wrapper function provided by
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH BUGS
An invalid
.I ctx_id
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see VERSIONS.
.SH DESCRIPTION
.IR Note :
this page describes the raw Linux system call interface.
uses a different type for the
.I ctx_idp
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_setup ()
On success,
.BR io_setup ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
.BR io_setup ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_setup ()
-is Linux-specific and should not be used in programs
-that are intended to be portable.
-.SH NOTES
glibc does not provide a wrapper for this system call.
You could invoke it using
.BR syscall (2).
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_destroy (2),
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see VERSIONS.
.SH DESCRIPTION
.IR Note :
this page describes the raw Linux system call interface.
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_submit ()
.BR io_submit ()
returns the number of \fIiocb\fPs submitted (which may be
less than \fInr\fP, or 0 if \fInr\fP is zero).
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
.B CAP_SYS_ADMIN
capability.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_submit ()
-is Linux-specific and should not be used in
-programs that are intended to be portable.
-.SH NOTES
glibc does not provide a wrapper for this system call.
You could invoke it using
.BR syscall (2).
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_destroy (2),
file descriptor
.I fd
references.
-.SH STANDARDS
-No single standard.
+.SH VERSIONS
Arguments, returns, and semantics of
.BR ioctl ()
vary according to the device driver in question (the call is used as a
catch-all for operations that don't cleanly fit the UNIX stream I/O
model).
-.PP
-The
-.BR ioctl ()
-system call appeared in Version 7 AT&T UNIX.
+.SH STANDARDS
+None.
+.SH HISTORY
+Version\~7 AT&T UNIX.
.SH NOTES
In order to use this call, one needs an open file descriptor.
Often the
.PP
For further error values, see
.BR ioctl (2).
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.B VFAT_IOCTL_READDIR_BOTH
-and
+.TQ
.B VFAT_IOCTL_READDIR_SHORT
-first appeared in Linux 2.0.
-.PP
+Linux 2.0.
+.TP
.B FAT_IOCTL_GET_ATTRIBUTES
-and
+.TQ
.B FAT_IOCTL_SET_ATTRIBUTES
-first appeared
.\" just before we got Git history
-in Linux 2.6.12.
-.PP
+Linux 2.6.12.
+.TP
.B FAT_IOCTL_GET_VOLUME_ID
-was introduced in version 3.11
+Linux 3.11.
.\" commit 6e5b93ee55d401f1619092fb675b57c28c9ed7ec
-of the Linux kernel.
-.SH STANDARDS
-This API is Linux-specific.
.SH EXAMPLES
.SS Toggling the archive flag
The following program demonstrates the usage of
.B EXDEV
.IR dest_fd " and " src_fd
are not on the same mounted filesystem.
-.SH VERSIONS
-These ioctl operations first appeared in Linux 4.5.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.5.
+.PP
They were previously known as
.B BTRFS_IOC_CLONE
and
.BR BTRFS_IOC_CLONE_RANGE ,
and were private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
Because a copy-on-write operation requires the allocation of new storage, the
.BR fallocate (2)
.I src_fd
are not on the same mounted filesystem.
.SH VERSIONS
-This ioctl operation first appeared in Linux 4.5.
+Some filesystems may limit the amount of data that can be deduplicated in a
+single call.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.5.
+.PP
It was previously known as
.B BTRFS_IOC_FILE_EXTENT_SAME
and was private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
Because a copy-on-write operation requires the allocation of new storage, the
.BR fallocate (2)
operation may unshare shared blocks to guarantee that subsequent writes will
not fail because of lack of disk space.
-.PP
-Some filesystems may limit the amount of data that can be deduplicated in a
-single call.
.SH SEE ALSO
.BR ioctl (2)
.TP
.B EPERM
The calling process does not have sufficient permissions to set the label.
-.SH VERSIONS
-These
-.BR ioctl (2)
-operations first appeared in Linux 4.18.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.18.
+.PP
They were previously known as
.B BTRFS_IOC_GET_FSLABEL
and
.B BTRFS_IOC_SET_FSLABEL
and were private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
The maximum string length for this interface is
.BR FSLABEL_MAX ,
.TP
.B EUCLEAN
The filesystem metadata is corrupt and needs repair.
-.SH VERSIONS
-The
-.B FS_IOC_GETFSMAP
-operation first appeared in Linux 4.12.
.SH STANDARDS
-This API is Linux-specific.
+Linux.
+.PP
Not all filesystems support it.
+.SH HISTORY
+Linux 4.12.
.SH EXAMPLES
See
.I io/fsmap.c
.BR FS_DIRSYNC_FL ,
which is inherited only by subdirectories.
.SH STANDARDS
-Inode flags are a nonstandard Linux extension.
+Linux.
.SH NOTES
In order to change the inode flags of a file using the
.B FS_IOC_SETFLAGS
.I /proc/[pid]/ns/*
file.
.SH STANDARDS
-Namespaces and the operations described on this page are a Linux-specific.
+Linux.
.SH EXAMPLES
The example shown below uses the
.BR ioctl (2)
.B UFFDIO_API
operation).
.SH STANDARDS
-These
-.BR ioctl (2)
-operations are Linux-specific.
+Linux.
.SH BUGS
In order to detect available userfault features and
enable some subset of those features
.TP
.B EPERM
The calling thread has insufficient privilege.
-.SH STANDARDS
-.BR ioperm ()
-is Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
-The
-.I /proc/ioports
-file shows the I/O ports that are currently allocated on the system.
-.PP
-Before Linux 2.4,
-permissions were not inherited by a child created by
-.BR fork (2).
-.PP
+.SH VERSIONS
glibc has an
.BR ioperm ()
prototype both in
and in
.IR <sys/perm.h> .
Avoid the latter, it is available on i386 only.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Before Linux 2.4,
+permissions were not inherited by a child created by
+.BR fork (2).
+.SH NOTES
+The
+.I /proc/ioports
+file shows the I/O ports that are currently allocated on the system.
.SH SEE ALSO
.BR iopl (2),
.BR outb (2),
.B CAP_SYS_RAWIO
capability is required to raise the I/O privilege level
above its current value.
-.SH STANDARDS
-.BR iopl ()
-is Linux-specific and should not be used in programs that are
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
.\" Libc5 treats it as a system call and has a prototype in
.\" .IR <unistd.h> .
.\" glibc1 does not have a prototype.
and in
.IR <sys/perm.h> .
Avoid the latter, it is available on i386 only.
-.PP
+.SH STANDARDS
+Linux.
+.SH HISTORY
Prior to Linux 5.5
.BR iopl ()
allowed the thread to disable interrupts while running
.I which
and
.IR who .
-.SH VERSIONS
-These system calls have been available on Linux since
-kernel 2.6.13.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH NOTES
Two or more processes or threads can share an I/O context.
This will be the case when
User-space programs should call the appropriate functions by their usual names.
Only standard library implementors and kernel hackers need to know about
.BR ipc ().
-.SH STANDARDS
-.BR ipc ()
-is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
On some architectures\[em]for example x86-64 and ARM\[em]there is no
.BR ipc ()
system call; instead,
.BR semctl (2),
.BR shmctl (2),
and so on really are implemented as separate system calls.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR msgctl (2),
.BR msgget (2),
or
.I pid2
does not exist.
-.SH VERSIONS
-The
-.BR kcmp ()
-system call first appeared in Linux 3.5.
.SH STANDARDS
-.BR kcmp ()
-is Linux-specific and should not be used in programs intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
+Linux 3.5.
+.PP
Before Linux 5.12,
this system call is available only if the kernel is configured with
.BR CONFIG_CHECKPOINT_RESTORE ,
Since Linux 5.12,
this system call is also available if the kernel is configured with
.BR CONFIG_KCMP .
-.PP
+.SH NOTES
See
.BR clone (2)
for some background information on the shared resources
The caller does not have the
.B CAP_SYS_BOOT
capability.
-.SH VERSIONS
-The
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR kexec_load ()
-system call first appeared in Linux 2.6.13.
-The
+Linux 2.6.13.
+.TP
.BR kexec_file_load ()
-system call first appeared in Linux 3.17.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 3.17.
.SH SEE ALSO
.BR reboot (2),
.BR syscall (2),
.PP
Alternatively, Linux Key Management Utilities
.RI ( libkeyutils ", " \-lkeyutils );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/keyctl.h>" " /* Definition of " KEY* " constants */"
.B KEYCTL_DH_COMPUTE
and the initialization of crypto modules has timed out.
.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
-.SH STANDARDS
-This system call is a nonstandard Linux extension.
-.SH NOTES
A wrapper is provided in the
.I libkeyutils
library.
However, rather than using this system call directly,
you probably want to use the various library functions
mentioned in the descriptions of individual operations above.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.10.
.SH EXAMPLES
The program below provide subset of the functionality of the
.BR request\-key (8)
.BR wait (2)ed
for.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SS Linux notes
+Across different kernel versions, Linux has enforced different rules
+for the permissions required for an unprivileged process
+to send a signal to another process.
+.\" In the 0.* kernels things chopped and changed quite
+.\" a bit - MTK, 24 Jul 02
+In Linux 1.0 to 1.2.2, a signal could be sent if the
+effective user ID of the sender matched effective user ID of the target,
+or the real user ID of the sender matched the real user ID of the target.
+From Linux 1.2.3 until 1.3.77, a signal could be sent if the
+effective user ID of the sender matched either the real or effective
+user ID of the target.
+The current rules, which conform to POSIX.1, were adopted
+in Linux 1.3.78.
.SH NOTES
The only signals that can be sent to process ID 1, the
.I init
unblocked signal must be delivered to the sending thread before the
.BR kill ()
returns.
-.SS Linux notes
-Across different kernel versions, Linux has enforced different rules
-for the permissions required for an unprivileged process
-to send a signal to another process.
-.\" In the 0.* kernels things chopped and changed quite
-.\" a bit - MTK, 24 Jul 02
-In Linux 1.0 to 1.2.2, a signal could be sent if the
-effective user ID of the sender matched effective user ID of the target,
-or the real user ID of the sender matched the real user ID of the target.
-From Linux 1.2.3 until 1.3.77, a signal could be sent if the
-effective user ID of the sender matched either the real or effective
-user ID of the target.
-The current rules, which conform to POSIX.1, were adopted
-in Linux 1.3.78.
.SH BUGS
In Linux 2.6 up to and including Linux 2.6.7,
there was a bug that meant that when sending signals to a process group,
.B EFAULT
.I rule_attr
was not a valid address.
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
Empty accesses (i.e.,
.I attr\->handled_access_fs
is 0).
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
.B E2BIG
The maximum number of composed rulesets is reached for the calling thread.
This limit is currently 64.
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
.I olddirfd
refers to a directory.
.SH VERSIONS
-.BR linkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR link ():
-SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008.
-.\" SVr4 documents additional ENOLINK and
-.\" EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
-.\" X/OPEN does not document EFAULT, ENOMEM or EIO.
-.PP
-.BR linkat ():
-POSIX.1-2008.
-.SH NOTES
-Hard links, as created by
-.BR link (),
-cannot span filesystems.
-Use
-.BR symlink (2)
-if this is required.
-.PP
POSIX.1-2001 says that
.BR link ()
should dereference
For precise control over the treatment of symbolic links when
creating a link, use
.BR linkat ().
-.SS glibc notes
+.SS glibc
On older kernels where
.BR linkat ()
is unavailable, the glibc wrapper function falls back to the use of
and
.I newdirfd
arguments.
+.SH STANDARDS
+.TP
+.BR link ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR link ()
+SVr4, 4.3BSD, POSIX.1-2001 (but see VERSIONS).
+.\" SVr4 documents additional ENOLINK and
+.\" EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
+.\" X/OPEN does not document EFAULT, ENOMEM or EIO.
+.TP
+.BR linkat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+Hard links, as created by
+.BR link (),
+cannot span filesystems.
+Use
+.BR symlink (2)
+if this is required.
.SH BUGS
On NFS filesystems, the return code may be wrong in case the NFS server
performs the link creation and dies before it can say so.
.BR listen ()
operation.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD
-.RB ( listen ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
To accept connections, the following steps are performed:
.RS 4
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
.B EINVAL
.I whence
is invalid.
-.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
You probably want to use the
.BR lseek (2)
wrapper function instead.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR lseek (2),
.BR open (2),
.TP
.B ERANGE
The buffer was not large enough to hold the path of the directory entry.
-.SH VERSIONS
-Available since Linux 2.5.43.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.43.
+.PP
The
.B ENAMETOOLONG
-error return was added in Linux 2.5.70.
-.SH STANDARDS
-.BR lookup_dcookie ()
-is Linux-specific.
+error was added in Linux 2.5.70.
.SH NOTES
.BR lookup_dcookie ()
is a special-purpose system call, currently used only by the
.B ESPIPE
.I fd
is associated with a pipe, socket, or FIFO.
+.SH VERSIONS
+On Linux, using
+.BR lseek ()
+on a terminal device fails with the error
+.BR ESPIPE .
+.\" Other systems return the number of written characters,
+.\" using SEEK_SET to set the counter. (Of written characters.)
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.PP
.B SEEK_DATA
and
moves the file offset to the end of the file, regardless of the use of
.BR lseek ().
.PP
-The
-.I off_t
-data type is a signed integer data type specified by POSIX.1.
-.PP
Some devices are incapable of seeking and POSIX does not specify which
devices must support
.BR lseek ().
-.PP
-On Linux, using
-.BR lseek ()
-on a terminal device fails with the error
-\fBESPIPE\fP.
-.\" Other systems return the number of written characters,
-.\" using SEEK_SET to set the counter. (Of written characters.)
.SH SEE ALSO
.BR dup (2),
.BR fallocate (2),
flag described elsewhere in this page)
was encountered.
.SH VERSIONS
-Since Linux 3.18,
-.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
-support for this system call is optional,
-depending on the setting of the
-.B CONFIG_ADVISE_SYSCALLS
-configuration option.
-.SH STANDARDS
-.BR madvise ()
-is not specified by any standards.
Versions of this system call, implementing a wide variety of
.I advice
values, exist on many other implementations.
and
.BR POSIX_MADV_DONTNEED ,
and so on, with behavior close to the similarly named flags listed above.
-.SH NOTES
-.SS Linux notes
+.SS Linux
The Linux implementation requires that the address
.I addr
be page-aligned, and allows
will return zero iff
.I advice
is supported by the kernel and can be relied on to probe for support.
-.\" .SH HISTORY
-.\" The
-.\" .BR madvise ()
-.\" function first appeared in 4.4BSD.
+.SH STANDARDS
+None.
+.SH HISTORY
+First appeared in 4.4BSD.
+.PP
+Since Linux 3.18,
+.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
+support for this system call is optional,
+depending on the setting of the
+.B CONFIG_ADVISE_SYSCALLS
+configuration option.
.SH SEE ALSO
.BR getrlimit (2),
.BR memfd_secret (2),
.B CAP_SYS_NICE
privilege.
.\" ---------------------------------------------------------------
-.SH VERSIONS
-The
-.BR mbind ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
+.PP
+Support for huge page policy was added with Linux 2.6.16.
+For interleave policy to be effective on huge page mappings the
+policied memory needs to be tens of megabytes or larger.
+.PP
+Before Linux 5.7.
+.\" commit dcf1763546d76c372f3136c8d6b2b6e77f140cf0
+.B MPOL_MF_STRICT
+was ignored on huge page mappings.
+.PP
+.B MPOL_MF_MOVE
+and
+.B MPOL_MF_MOVE_ALL
+are available only on Linux 2.6.16 and later.
.SH NOTES
For information on library support, see
.BR numa (7).
This method will work for
.BR set_mempolicy (2),
as well.
-.PP
-Support for huge page policy was added with Linux 2.6.16.
-For interleave policy to be effective on huge page mappings the
-policied memory needs to be tens of megabytes or larger.
-.PP
-Before Linux 5.7.
-.\" commit dcf1763546d76c372f3136c8d6b2b6e77f140cf0
-.B MPOL_MF_STRICT
-was ignored on huge page mappings.
-.PP
-.B MPOL_MF_MOVE
-and
-.B MPOL_MF_MOVE_ALL
-are available only on Linux 2.6.16 and later.
.SH SEE ALSO
.BR get_mempolicy (2),
.BR getcpu (2),
.B EPERM
The current process was not registered prior to using private expedited
commands.
-.SH VERSIONS
-The
-.BR membarrier ()
-system call was added in Linux 4.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.3.
.PP
-Before Linux 5.10, the prototype for
-.BR membarrier ()
-was:
+Before Linux 5.10, the prototype was:
.PP
.in +4n
.EX
.BI "int membarrier(int " cmd ", int " flags );
.EE
.in
-.SH STANDARDS
-.BR membarrier ()
-is Linux-specific.
-.\" .SH SEE ALSO
-.\" FIXME See if the following syscalls make it into Linux 4.15 or later
-.\" .BR cpu_opv (2),
-.\" .BR rseq (2)
.SH NOTES
A memory barrier instruction is part of the instruction set of
architectures with weakly ordered memory models.
}
.EE
.in
+.\" .SH SEE ALSO
+.\" FIXME See if the following syscalls make it into Linux 4.15 or later
+.\" .BR cpu_opv (2),
+.\" .BR rseq (2)
.TP
.B ENOMEM
There was insufficient memory to create a new anonymous file.
-.SH VERSIONS
-The
-.BR memfd_create ()
-system call first appeared in Linux 3.17;
-glibc support was added in glibc 2.27.
.TP
.B EPERM
The
in
.BR proc (5).
.SH STANDARDS
-The
-.BR memfd_create ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.17,
+glibc 2.27.
.SH NOTES
.\" See also http://lwn.net/Articles/593918/
.\" and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
is not implemented on this architecture,
or has not been enabled on the kernel command-line with
.BR secretmem_enable =1.
-.SH VERSIONS
-The
-.BR memfd_secret ()
-system call first appeared in Linux 5.14.
.SH STANDARDS
-The
-.BR memfd_secret ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.14.
.SH NOTES
The
.BR memfd_secret ()
.I pid
could be found.
.\" FIXME Document the other errors that can occur for migrate_pages()
-.SH VERSIONS
-The
-.BR migrate_pages ()
-system call first appeared in Linux 2.6.16.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
For information on library support, see
.BR numa (7).
+
.I length
contained unmapped memory.
-.SH VERSIONS
-Available since Linux 2.3.99pre1 and glibc 2.2.
.SH STANDARDS
-.BR mincore ()
-is not specified in POSIX.1,
-and it is not available on all UNIX implementations.
-.\" It is on at least NetBSD, FreeBSD, OpenBSD, Solaris 8,
-.\" AIX 5.1, SunOS 4.1
-.\" .SH HISTORY
-.\" The
-.\" .BR mincore ()
-.\" function first appeared in 4.4BSD.
+None.
+.SH HISTORY
+Linux 2.3.99pre1,
+glibc 2.2.
+.PP
+First appeared in 4.4BSD.
+.PP
+NetBSD, FreeBSD, OpenBSD, Solaris 8,
+AIX 5.1, SunOS 4.1.
.SH BUGS
Before Linux 2.6.21,
.BR mincore ()
.I pathname
refers to a file on a read-only filesystem.
.SH VERSIONS
-.BR mkdirat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR mkdir ():
-SVr4, BSD, POSIX.1-2001, POSIX.1-2008.
-.\" SVr4 documents additional EIO, EMULTIHOP
-.PP
-.BR mkdirat ():
-POSIX.1-2008.
-.SH NOTES
Under Linux, apart from the permission bits, the
.B S_ISVTX
.I mode
bit is also honored.
-.PP
-There are many infelicities in the protocol underlying NFS.
-Some of these affect
-.BR mkdir ().
.SS glibc notes
On older kernels where
.BR mkdirat ()
that corresponds to the
.I dirfd
argument.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mkdir ()
+SVr4, BSD, POSIX.1-2001.
+.\" SVr4 documents additional EIO, EMULTIHOP
+.TP
+.BR mkdirat ()
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+There are many infelicities in the protocol underlying NFS.
+Some of these affect
+.BR mkdir ().
.SH SEE ALSO
.BR mkdir (1),
.BR chmod (2),
.I pathname
refers to a file on a read-only filesystem.
.SH VERSIONS
-.BR mknodat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR mknod ():
-SVr4, 4.4BSD, POSIX.1-2001 (but see below), POSIX.1-2008.
-.\" The Linux version differs from the SVr4 version in that it
-.\" does not require root permission to create pipes, also in that no
-.\" EMULTIHOP, ENOLINK, or EINTR error is documented.
-.PP
-.BR mknodat ():
-POSIX.1-2008.
-.SH NOTES
POSIX.1-2001 says: "The only portable use of
.BR mknod ()
is to create a FIFO-special file.
One should make directories with
.BR mkdir (2).
.\" and one should make UNIX domain sockets with socket(2) and bind(2).
-.PP
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mknod ()
+SVr4, 4.4BSD, POSIX.1-2001 (but see VERSIONS).
+.\" The Linux version differs from the SVr4 version in that it
+.\" does not require root permission to create pipes, also in that no
+.\" EMULTIHOP, ENOLINK, or EINTR error is documented.
+.TP
+.BR mknodat ()
+Linux 2.6.16,
+glibc 2.4.
+POSIX.1-2008.
+.SH NOTES
There are many infelicities in the protocol underlying NFS.
Some of these affect
.BR mknod ()
(Linux 2.6.8 and earlier) The caller was not privileged
.RB ( CAP_IPC_LOCK ).
.SH VERSIONS
-.BR mlock2 ()
-is available since Linux 4.4;
-glibc support was added in glibc 2.27.
-.SH STANDARDS
+.SS Linux
+Under Linux,
.BR mlock (),
-.BR munlock (),
-.BR mlockall (),
+.BR mlock2 (),
and
-.BR munlockall ():
-POSIX.1-2001, POSIX.1-2008, SVr4.
+.BR munlock ()
+automatically round
+.I addr
+down to the nearest page boundary.
+However, the POSIX.1 specification of
+.BR mlock ()
+and
+.BR munlock ()
+allows an implementation to require that
+.I addr
+is page aligned, so portable applications should ensure this.
.PP
+The
+.I VmLck
+field of the Linux-specific
+.I /proc/[pid]/status
+file shows how many kilobytes of memory the process with ID
+.I PID
+has locked using
+.BR mlock (),
+.BR mlock2 (),
+.BR mlockall (),
+and
+.BR mmap (2)
+.BR MAP_LOCKED .
+.SH STANDARDS
+.TP
+.BR mlock ()
+.TQ
+.BR munlock ()
+.TQ
+.BR mlockall ()
+.TQ
+.BR munlockall ()
+POSIX.1-2008.
+.TP
.BR mlock2 ()
-is Linux specific.
+Linux.
.PP
On POSIX systems on which
.BR mlock ()
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines it to 1.
+.SH HISTORY
+.TP
+.BR mlock ()
+.TQ
+.BR munlock ()
+.TQ
+.BR mlockall ()
+.TQ
+.BR munlockall ()
+POSIX.1-2001, POSIX.1-2008, SVr4.
+.TP
+.BR mlock2 ()
+Linux 4.4,
+glibc 2.27.
.SH NOTES
Memory locking has two main applications: real-time algorithms and
high-security data processing.
large mappings where only a (small) portion of pages in the mapping are touched.
In such cases, locking all of the pages in a mapping would incur
a significant penalty for memory locking.
-.SS Linux notes
-Under Linux,
-.BR mlock (),
-.BR mlock2 (),
-and
-.BR munlock ()
-automatically round
-.I addr
-down to the nearest page boundary.
-However, the POSIX.1 specification of
-.BR mlock ()
-and
-.BR munlock ()
-allows an implementation to require that
-.I addr
-is page aligned, so portable applications should ensure this.
-.PP
-The
-.I VmLck
-field of the Linux-specific
-.I /proc/[pid]/status
-file shows how many kilobytes of memory the process with ID
-.I PID
-has locked using
-.BR mlock (),
-.BR mlock2 (),
-.BR mlockall (),
-and
-.BR mmap (2)
-.BR MAP_LOCKED .
.SS Limits and permissions
In Linux 2.6.8 and earlier,
a process must be privileged
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
-.\" SVr4 documents additional error codes ENXIO and ENODEV.
-.\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
-.PP
-On POSIX systems on which
-.BR mmap (),
-.BR msync (2),
-and
-.BR munmap ()
-are available,
-.B _POSIX_MAPPED_FILES
-is defined in \fI<unistd.h>\fP to a value greater than 0.
-(See also
-.BR sysconf (3).)
-.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
-.\" -1: unavailable, 0: ask using sysconf().
-.\" glibc defines it to 1.
-.SH NOTES
-Memory mapped by
-.BR mmap ()
-is preserved across
-.BR fork (2),
-with the same attributes.
-.PP
-A file is mapped in multiples of the page size.
-For a file that is not
-a multiple of the page size,
-the remaining bytes in the partial page at the end of the mapping
-are zeroed when mapped,
-and modifications to that region are not written out to the file.
-The effect of
-changing the size of the underlying file of a mapping on the pages that
-correspond to added or removed regions of the file is unspecified.
-.PP
+.SH VERSIONS
On some hardware architectures (e.g., i386),
.B PROT_WRITE
implies
.BR MAP_POPULATE ,
and
.BR MAP_STACK .
+.SS C library/kernel differences
+This page describes the interface provided by the glibc
+.BR mmap ()
+wrapper function.
+Originally, this function invoked a system call of the same name.
+Since Linux 2.4, that system call has been superseded by
+.BR mmap2 (2),
+and nowadays
+.\" Since around glibc 2.1/2.2, depending on the platform.
+the glibc
+.BR mmap ()
+wrapper function invokes
+.BR mmap2 (2)
+with a suitably adjusted value for
+.IR offset .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
+.\" SVr4 documents additional error codes ENXIO and ENODEV.
+.\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
+.PP
+On POSIX systems on which
+.BR mmap (),
+.BR msync (2),
+and
+.BR munmap ()
+are available,
+.B _POSIX_MAPPED_FILES
+is defined in \fI<unistd.h>\fP to a value greater than 0.
+(See also
+.BR sysconf (3).)
+.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
+.\" -1: unavailable, 0: ask using sysconf().
+.\" glibc defines it to 1.
+.SH NOTES
+Memory mapped by
+.BR mmap ()
+is preserved across
+.BR fork (2),
+with the same attributes.
+.PP
+A file is mapped in multiples of the page size.
+For a file that is not
+a multiple of the page size,
+the remaining bytes in the partial page at the end of the mapping
+are zeroed when mapped,
+and modifications to that region are not written out to the file.
+The effect of
+changing the size of the underlying file of a mapping on the pages that
+correspond to added or removed regions of the file is unspecified.
.PP
An application can determine which pages of a mapping are
currently resident in the buffer/page cache using
.I length
must both be a multiple of the underlying huge page size.
.\"
-.SS C library/kernel differences
-This page describes the interface provided by the glibc
-.BR mmap ()
-wrapper function.
-Originally, this function invoked a system call of the same name.
-Since Linux 2.4, that system call has been superseded by
-.BR mmap2 (2),
-and nowadays
-.\" Since around glibc 2.1/2.2, depending on the platform.
-the glibc
-.BR mmap ()
-wrapper function invokes
-.BR mmap2 (2)
-with a suitably adjusted value for
-.IR offset .
.SH BUGS
On Linux, there are no guarantees like those suggested above under
.BR MAP_NORESERVE .
can also return any of the errors described in
.BR mmap (2).
.SH VERSIONS
-.BR mmap2 ()
-is available since Linux 2.3.31.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
On architectures where this system call is present,
the glibc
.BR mmap ()
.\" ia64 can have page sizes ranging from 4 kB to 64 kB.
.\" On cris, it looks like the unit might also be the page size,
.\" which is 8192 bytes. -- mtk, June 2007
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.3.31.
.SH SEE ALSO
.BR getpagesize (2),
.BR mmap (2),
.I func
is neither 0, 1, 2, nor 0x11.
.SH STANDARDS
-This call is Linux-specific and should not be used in programs intended
-to be portable.
+Linux.
.SH NOTES
.BR modify_ldt ()
should not be used for thread-local storage, as it slows down context
See
.BR EACCES ,
above.
-.SH VERSIONS
+.\"
+.SH STANDARDS
+Linux.
+.SH HISTORY
The definitions of
.BR MS_DIRSYNC ,
.BR MS_MOVE ,
and
.B MS_UNBINDABLE
were added to glibc headers in glibc 2.12.
-.\"
-.SH STANDARDS
-This function is Linux-specific and should not be used in
-programs intended to be portable.
-.SH NOTES
+.PP
Since Linux 2.4 a single filesystem can be mounted at
multiple mount points, and multiple mounts can be stacked
on the same mount point.
just silently ignored in this case.
.\" The change is in patch-2.4.0-prerelease.
.\"
+.SH NOTES
.SS Mount namespaces
Starting with Linux 2.4.19, Linux provides mount namespaces.
A mount namespace is the set of filesystem mounts that
The caller does not have
.B CAP_SYS_ADMIN
in the initial user namespace.
-.SH VERSIONS
-.BR mount_setattr ()
-first appeared in Linux 5.12.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 5.12.
.\" commit 7d6beb71da3cc033649d641e1e608713b8220290
.\" commit 2a1867219c7b27f928e2545782b86daaf9ad50bd
.\" commit 9caccd41541a6f7d6279928d9f971f6642c361af
-.SH STANDARDS
-.BR mount_setattr ()
-is Linux-specific.
.SH NOTES
.SS ID-mapped mounts
Creating an ID-mapped mount makes it possible to
.TP
.B ESRCH
Process does not exist.
-.SH VERSIONS
-.BR move_pages ()
-first appeared in Linux 2.6.18.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.18.
.SH NOTES
For information on library support, see
.BR numa (7).
would result in three mappings:
two read/write mappings at each end and a read-only mapping in the middle.)
.SH VERSIONS
-.BR pkey_mprotect ()
-first appeared in Linux 4.9;
-library support was added in glibc 2.27.
-.SH STANDARDS
-.BR mprotect ():
-POSIX.1-2001, POSIX.1-2008, SVr4.
.\" SVr4 defines an additional error
.\" code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
POSIX says that the behavior of
was not obtained via
.BR mmap (2).
.PP
-.BR pkey_mprotect ()
-is a nonportable Linux extension.
-.SH NOTES
On Linux, it is always permissible to call
.BR mprotect ()
on any address in a process's address space (except for the
.BR pkey_mprotect ()
is equivalent to
.BR mprotect ().
+.SH STANDARDS
+.TP
+.BR mprotect ()
+POSIX.1-2008.
+.TP
+.BR pkey_mprotect ()
+Linux.
+.SH HISTORY
+.TP
+.BR mprotect ()
+POSIX.1-2001, SVr4.
+.TP
+.BR pkey_mprotect ()
+Linux 4.9,
+glibc 2.27.
+.SH NOTES
.SH EXAMPLES
.\" sigaction.2 refers to this example
The program below demonstrates the use of
see the description of
.BR mq_setattr (3).
.SH STANDARDS
-This interface is nonstandard; avoid its use.
+None.
.SH NOTES
Never call it unless you are writing a C library!
.SH SEE ALSO
Or, it would exceed the maximum number of allowed mappings.
.RE
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
.\" 4.2BSD had a (never actually implemented)
.\" .BR mremap (2)
.\" call with completely different semantics.
+.\" .PP
+Prior to glibc 2.4, glibc did not expose the definition of
+.BR MREMAP_FIXED ,
+and the prototype for
+.BR mremap ()
+did not allow for the
+.I new_address
+argument.
.SH NOTES
.BR mremap ()
changes the
with
.B ENOMEM
if the area cannot be populated.
-.PP
-Prior to glibc 2.4, glibc did not expose the definition of
-.BR MREMAP_FIXED ,
-and the prototype for
-.BR mremap ()
-did not allow for the
-.I new_address
-argument.
.\"
.SS MREMAP_DONTUNMAP use cases
Possible applications for
.B CAP_SYS_RESOURCE
capability).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVID does not document the EIDRM error condition.
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR MSG_STAT ,
-and
-.B MSG_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future these may modified or moved to a
-.I /proc
-filesystem interface.
.PP
Various fields in the \fIstruct msqid_ds\fP were
typed as
.B IPC_64
flag in
.IR cmd .)
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR MSG_STAT ,
+and
+.B MSG_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future these may modified or moved to a
+.I /proc
+filesystem interface.
.SH SEE ALSO
.BR msgget (2),
.BR msgrcv (2),
.RB ( MSGMNI )
would be exceeded.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.SS Linux
+Until Linux 2.3.20, Linux would return
+.B EIDRM
+for a
+.BR msgget ()
+on a message queue scheduled for deletion.
.SH NOTES
.B IPC_PRIVATE
isn't a flag field but a
Since Linux 3.19, the default value is 32,000.
On Linux, this limit can be read and modified via
.IR /proc/sys/kernel/msgmni .
-.SS Linux notes
-Until Linux 2.3.20, Linux would return
-.B EIDRM
-for a
-.BR msgget ()
-on a message queue scheduled for deletion.
.SH BUGS
The name choice
.B IPC_PRIVATE
and this kernel was configured without
.BR CONFIG_CHECKPOINT_RESTORE .
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
.PP
The
.B MSG_EXCEPT
.B _GNU_SOURCE
.\" MSG_COPY since glibc 2.18
feature test macro.
-.SH NOTES
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
The
.I msgp
argument is declared as \fIstruct msgbuf\ *\fP in
glibc 2.0 and 2.1.
It is declared as \fIvoid\ *\fP
in glibc 2.2 and later, as required by SUSv2 and SUSv3.
-.PP
+.SH NOTES
The following limits on message queue resources affect the
.BR msgsnd ()
call:
.TP
.B ENOMEM
The indicated memory (or part of it) was not mapped.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-This call was introduced in Linux 1.3.21, and then used
-.B EFAULT
-instead of
-.BR ENOMEM .
-In Linux 2.4.19, this was changed to the POSIX value
-.BR ENOMEM .
-.PP
-On POSIX systems on which
-.BR msync ()
-is available, both
-.B _POSIX_MAPPED_FILES
-and
-.B _POSIX_SYNCHRONIZED_IO
-are defined in
-.I <unistd.h>
-to a value greater than 0.
-(See also
-.BR sysconf (3).)
-.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
-.\" -1: unavailable, 0: ask using sysconf().
-.\" glibc defines them to 1.
-.SH NOTES
+.SH VERSIONS
According to POSIX, either
.B MS_SYNC
or
.B MS_ASYNC
in
.IR flags .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+This call was introduced in Linux 1.3.21, and then used
+.B EFAULT
+instead of
+.BR ENOMEM .
+In Linux 2.4.19, this was changed to the POSIX value
+.BR ENOMEM .
+.PP
+On POSIX systems on which
+.BR msync ()
+is available, both
+.B _POSIX_MAPPED_FILES
+and
+.B _POSIX_SYNCHRONIZED_IO
+are defined in
+.I <unistd.h>
+to a value greater than 0.
+(See also
+.BR sysconf (3).)
+.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
+.\" -1: unavailable, 0: ask using sysconf().
+.\" glibc defines them to 1.
.SH SEE ALSO
.BR mmap (2)
.PP
field was not in the range [0, 999999999] or
.I tv_sec
was negative.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-If the interval specified in
-.I req
-is not an exact multiple of the granularity underlying clock (see
-.BR time (7)),
-then the interval will be rounded up to the next multiple.
-Furthermore, after the sleep completes, there may still be a delay before
-the CPU becomes free to once again execute the calling thread.
-.PP
-The fact that
-.BR nanosleep ()
-sleeps for a relative interval can be problematic if the call
-is repeatedly restarted after being interrupted by signals,
-since the time between the interruptions and restarts of the call
-will lead to drift in the time when the sleep finally completes.
-This problem can be avoided by using
-.BR clock_nanosleep (2)
-with an absolute time value.
-.PP
+.SH VERSIONS
POSIX.1 specifies that
.BR nanosleep ()
should measure time against the
Consequently, these time services shall expire when the requested relative
interval elapses, independently of the new or old value of the clock.
.RE
-.SS Old behavior
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
In order to support applications requiring much more precise pauses
(e.g., in order to control some time-critical hardware),
.BR nanosleep ()
.BR SCHED_RR .
This special extension was removed in Linux 2.5.39,
and is thus not available in Linux 2.6.0 and later kernels.
+.SH NOTES
+If the interval specified in
+.I req
+is not an exact multiple of the granularity underlying clock (see
+.BR time (7)),
+then the interval will be rounded up to the next multiple.
+Furthermore, after the sleep completes, there may still be a delay before
+the CPU becomes free to once again execute the calling thread.
+.PP
+The fact that
+.BR nanosleep ()
+sleeps for a relative interval can be problematic if the call
+is repeatedly restarted after being interrupted by signals,
+since the time between the interruptions and restarts of the call
+will lead to drift in the time when the sleep finally completes.
+This problem can be avoided by using
+.BR clock_nanosleep (2)
+with an absolute time value.
.SH BUGS
If a program that catches signals and uses
.BR nanosleep ()
On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.SH VERSIONS
-This system call was removed in Linux 3.1.
-Library support was removed in glibc 2.28.
.SH STANDARDS
-This call is Linux-specific.
+Linux.
+.SH HISTORY
+Removed in Linux 3.1.
+Removed in glibc 2.28.
.SH SEE ALSO
.BR nfsd (7)
.B RLIMIT_NICE
resource limit in
.BR setrlimit (2).)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-However, the raw system call and (g)libc
-(earlier than glibc 2.2.4) return value is nonstandard, see below.
-.\" SVr4 documents an additional
-.\" .B EINVAL
-.\" error code.
-.SH NOTES
-For further details on the nice value, see
-.BR sched (7).
-.PP
-.IR Note :
-the addition of the "autogroup" feature in Linux 2.6.38 means that
-the nice value no longer has its traditional effect in many circumstances.
-For details, see
-.BR sched (7).
-.\"
+.SH VERSIONS
.SS C library/kernel differences
POSIX.1 specifies that
.BR nice ()
wrapper function provided by glibc provides conformance to POSIX.1 by calling
.BR getpriority (2)
to obtain the new nice value, which is then returned to the caller.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.\" SVr4 documents an additional
+.\" .B EINVAL
+.\" error code.
+.SH NOTES
+For further details on the nice value, see
+.BR sched (7).
+.PP
+.IR Note :
+the addition of the "autogroup" feature in Linux 2.6.38 means that
+the nice value no longer has its traditional effect in many circumstances.
+For details, see
+.BR sched (7).
.SH SEE ALSO
.BR nice (1),
.BR renice (1),
(see
.BR fcntl (2)).
.SH VERSIONS
+The (undefined) effect of
+.B O_RDONLY | O_TRUNC
+varies among implementations.
+On many systems the file is actually truncated.
+.\" Linux 2.0, 2.5: truncate
+.\" Solaris 5.7, 5.8: truncate
+.\" Irix 6.5: truncate
+.\" Tru64 5.1B: truncate
+.\" HP-UX 11.22: truncate
+.\" FreeBSD 4.7: truncate
+.SS Synchronized I/O
+The POSIX.1-2008 "synchronized I/O" option
+specifies different variants of synchronized I/O,
+and specifies the
+.BR open ()
+flags
+.BR O_SYNC ,
+.BR O_DSYNC ,
+and
+.B O_RSYNC
+for controlling the behavior.
+Regardless of whether an implementation supports this option,
+it must at least support the use of
+.B O_SYNC
+for regular files.
+.PP
+Linux implements
+.B O_SYNC
+and
+.BR O_DSYNC ,
+but not
+.BR O_RSYNC .
+Somewhat incorrectly, glibc defines
+.B O_RSYNC
+to have the same value as
+.BR O_SYNC .
+.RB ( O_RSYNC
+is defined in the Linux header file
+.I <asm/fcntl.h>
+on HP PA-RISC, but it is not used.)
+.PP
+.B O_SYNC
+provides synchronized I/O
+.I file
+integrity completion,
+meaning write operations will flush data and all associated metadata
+to the underlying hardware.
+.B O_DSYNC
+provides synchronized I/O
+.I data
+integrity completion,
+meaning write operations will flush data
+to the underlying hardware,
+but will only flush metadata updates that are required
+to allow a subsequent read operation to complete successfully.
+Data integrity completion can reduce the number of disk operations
+that are required for applications that don't need the guarantees
+of file integrity completion.
+.PP
+To understand the difference between the two types of completion,
+consider two pieces of file metadata:
+the file last modification timestamp
+.RI ( st_mtime )
+and the file length.
+All write operations will update the last file modification timestamp,
+but only writes that add data to the end of the
+file will change the file length.
+The last modification timestamp is not needed to ensure that
+a read completes successfully, but the file length is.
+Thus,
+.B O_DSYNC
+would only guarantee to flush updates to the file length metadata
+(whereas
+.B O_SYNC
+would also always flush the last modification timestamp metadata).
+.PP
+Before Linux 2.6.33, Linux implemented only the
+.B O_SYNC
+flag for
+.BR open ().
+However, when that flag was specified,
+most filesystems actually provided the equivalent of synchronized I/O
+.I data
+integrity completion (i.e.,
+.B O_SYNC
+was actually implemented as the equivalent of
+.BR O_DSYNC ).
+.PP
+Since Linux 2.6.33, proper
+.B O_SYNC
+support is provided.
+However, to ensure backward binary compatibility,
+.B O_DSYNC
+was defined with the same value as the historical
+.BR O_SYNC ,
+and
+.B O_SYNC
+was defined as a new (two-bit) flag value that includes the
+.B O_DSYNC
+flag value.
+This ensures that applications compiled against
+new headers get at least
+.B O_DSYNC
+semantics before Linux 2.6.33.
+.\"
+.SS C library/kernel differences
+Since glibc 2.26,
+the glibc wrapper function for
+.BR open ()
+employs the
.BR openat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
+system call, rather than the kernel's
+.BR open ()
+system call.
+For certain architectures, this is also true before glibc 2.26.
+.\"
.SH STANDARDS
-.BR open (),
+.TP
+.BR open ()
+.TQ
.BR creat ()
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR openat ():
+.TQ
+.BR openat ()
POSIX.1-2008.
.PP
.BR openat2 (2)
-is Linux-specific.
+Linux.
.PP
The
.BR O_DIRECT ,
with a value greater than or equal to 700.
In glibc 2.11 and earlier, one obtains the definitions by defining
.BR _GNU_SOURCE .
-.PP
-As noted in
-.BR feature_test_macros (7),
-feature test macros such as
-.BR _POSIX_C_SOURCE ,
-.BR _XOPEN_SOURCE ,
-and
-.B _GNU_SOURCE
-must be defined before including
-.I any
-header files.
+.SH HISTORY
+.TP
+.BR open ()
+.TQ
+.BR creat ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR openat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH NOTES
Under Linux, the
.B O_NONBLOCK
for use with
.BR ioctl (2).
.PP
-The (undefined) effect of
-.B O_RDONLY | O_TRUNC
-varies among implementations.
-On many systems the file is actually truncated.
-.\" Linux 2.0, 2.5: truncate
-.\" Solaris 5.7, 5.8: truncate
-.\" Irix 6.5: truncate
-.\" Tru64 5.1B: truncate
-.\" HP-UX 11.22: truncate
-.\" FreeBSD 4.7: truncate
-.PP
Note that
.BR open ()
can open device special files, but
(in the same process or in two different processes)
refer to the same open file description.
.\"
-.\"
-.SS Synchronized I/O
-The POSIX.1-2008 "synchronized I/O" option
-specifies different variants of synchronized I/O,
-and specifies the
-.BR open ()
-flags
-.BR O_SYNC ,
-.BR O_DSYNC ,
-and
-.B O_RSYNC
-for controlling the behavior.
-Regardless of whether an implementation supports this option,
-it must at least support the use of
-.B O_SYNC
-for regular files.
-.PP
-Linux implements
-.B O_SYNC
-and
-.BR O_DSYNC ,
-but not
-.BR O_RSYNC .
-Somewhat incorrectly, glibc defines
-.B O_RSYNC
-to have the same value as
-.BR O_SYNC .
-.RB ( O_RSYNC
-is defined in the Linux header file
-.I <asm/fcntl.h>
-on HP PA-RISC, but it is not used.)
-.PP
-.B O_SYNC
-provides synchronized I/O
-.I file
-integrity completion,
-meaning write operations will flush data and all associated metadata
-to the underlying hardware.
-.B O_DSYNC
-provides synchronized I/O
-.I data
-integrity completion,
-meaning write operations will flush data
-to the underlying hardware,
-but will only flush metadata updates that are required
-to allow a subsequent read operation to complete successfully.
-Data integrity completion can reduce the number of disk operations
-that are required for applications that don't need the guarantees
-of file integrity completion.
-.PP
-To understand the difference between the two types of completion,
-consider two pieces of file metadata:
-the file last modification timestamp
-.RI ( st_mtime )
-and the file length.
-All write operations will update the last file modification timestamp,
-but only writes that add data to the end of the
-file will change the file length.
-The last modification timestamp is not needed to ensure that
-a read completes successfully, but the file length is.
-Thus,
-.B O_DSYNC
-would only guarantee to flush updates to the file length metadata
-(whereas
-.B O_SYNC
-would also always flush the last modification timestamp metadata).
-.PP
-Before Linux 2.6.33, Linux implemented only the
-.B O_SYNC
-flag for
-.BR open ().
-However, when that flag was specified,
-most filesystems actually provided the equivalent of synchronized I/O
-.I data
-integrity completion (i.e.,
-.B O_SYNC
-was actually implemented as the equivalent of
-.BR O_DSYNC ).
-.PP
-Since Linux 2.6.33, proper
-.B O_SYNC
-support is provided.
-However, to ensure backward binary compatibility,
-.B O_DSYNC
-was defined with the same value as the historical
-.BR O_SYNC ,
-and
-.B O_SYNC
-was defined as a new (two-bit) flag value that includes the
-.B O_DSYNC
-flag value.
-This ensures that applications compiled against
-new headers get at least
-.B O_DSYNC
-semantics before Linux 2.6.33.
-.\"
-.SS C library/kernel differences
-Since glibc 2.26,
-the glibc wrapper function for
-.BR open ()
-employs the
-.BR openat ()
-system call, rather than the kernel's
-.BR open ()
-system call.
-For certain architectures, this is also true before glibc 2.26.
-.\"
.SS NFS
There are many infelicities in the protocol underlying NFS, affecting
amongst others
is not valid.
This error will occur if, for example, the file has been deleted.
.SH VERSIONS
-These system calls first appeared in Linux 2.6.39.
-Library support is provided since glibc 2.14.
-.SH STANDARDS
-These system calls are nonstandard Linux extensions.
-.PP
FreeBSD has a broadly similar pair of system calls in the form of
.BR getfh ()
and
.BR openfh ().
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.39,
+glibc 2.14.
.SH NOTES
A file handle can be generated in one process using
.BR name_to_handle_at ()
contains
.BR RESOLVE_NO_XDEV ,
and a path component crosses a mount point.
-.SH VERSIONS
-.BR openat2 ()
-first appeared in Linux 5.6.
-.\" commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.6.
+.\" commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
.PP
The semantics of
.B RESOLVE_BENEATH
I/O ports in question.
Failure to do this will cause the application
to receive a segmentation fault.
-.SH STANDARDS
+.SH VERSIONS
.BR outb ()
and friends are hardware-specific.
The
.I port
argument is passed second,
which is the opposite order from most DOS implementations.
+.SH STANDARDS
+None.
.SH SEE ALSO
.BR ioperm (2),
.BR iopl (2)
.B EINTR
a signal was caught and the signal-catching function returned.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR kill (2),
.BR select (2),
This does not apply to
.BR pciconfig_iobase ().
.SH STANDARDS
-These calls are Linux-specific, available since Linux 2.0.26/2.1.11.
+Linux.
+.SH HISTORY
+Linux 2.0.26/2.1.11.
.SH SEE ALSO
.BR capabilities (7)
.TP
.B ESRCH
Returned if attempting to attach to a process that does not exist.
-.SH VERSION
+.SH STANDARDS
+Linux.
+.SH HISTORY
.BR perf_event_open ()
was introduced in Linux 2.6.31 but was called
.\" commit 0793a61d4df8daeac6492dbf8d2f3e5713caae5e
.BR perf_counter_open ().
It was renamed in Linux 2.6.32.
.\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
-.SH STANDARDS
-This
-.BR perf_event_open ()
-system call Linux-specific
-and should not be used in programs intended to be portable.
.SH NOTES
The official way of knowing if
.BR perf_event_open ()
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see HISTORY.
.SH DESCRIPTION
The IA-64-specific
.BR perfmonctl ()
On error, \-1 is returned and
.I errno
is set to indicate the error.
-.SH VERSIONS
-.BR perfmonctl ()
-was added in Linux 2.4;
-.\" commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7
-it was removed in Linux 5.10.
.SH STANDARDS
-.BR perfmonctl ()
-is Linux-specific and is available only on the IA-64 architecture.
-.SH NOTES
+Linux on IA-64.
+.SH HISTORY
+Added in Linux 2.4;
+.\" commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7
+removed in Linux 5.10.
+.PP
This system call was broken for many years,
and ultimately removed in Linux 5.10.
.PP
.TP
.B EINVAL
The kernel was unable to change the personality.
-.SH VERSIONS
-This system call first appeared in Linux 1.1.20
-(and thus first in a stable kernel release with Linux 1.2.0);
-library support was added in glibc 2.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 1.1.20,
+.\" (and thus first in a stable kernel release with Linux 1.2.0)
+glibc 2.3.
.\" personality wrapper first appeared in glibc 1.90,
.\" <sys/personality.h> was added later in glibc 2.2.91.
-.SH STANDARDS
-.BR personality ()
-is Linux-specific and should not be used in programs intended to
-be portable.
.SH SEE ALSO
.BR setarch (8)
.I pidfd
does not exist
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-.BR pidfd_getfd ()
-first appeared in Linux 5.6.
-.\" commit 8649c322f75c96e7ced2fec201e123b2b073bf09
.SH STANDARDS
-.BR pidfd_getfd ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.6.
+.\" commit 8649c322f75c96e7ced2fec201e123b2b073bf09
.SH NOTES
For a description of PID file descriptors, see
.BR pidfd_open (2).
The process specified by
.I pid
does not exist.
-.SH VERSIONS
-.BR pidfd_open ()
-first appeared in Linux 5.3.
.SH STANDARDS
-.BR pidfd_open ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.3.
.SH NOTES
The following code sequence can be used to obtain a file descriptor
for the child of
.B ESRCH
The target process does not exist
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-.BR pidfd_send_signal ()
-first appeared in Linux 5.1.
.SH STANDARDS
-.BR pidfd_send_signal ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.1.
.SH NOTES
.SS PID file descriptors
The
.RB ( CONFIG_WATCH_QUEUE )
is not compiled into the kernel.
.SH VERSIONS
-.BR pipe2 ()
-was added in Linux 2.6.27;
-glibc support is available starting with glibc 2.9.
-.SH STANDARDS
-.BR pipe ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR pipe2 ()
-is Linux-specific.
-.SH NOTES
.\" See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z
.\" for example, section 3.2.1 "Registers and the Stack Frame".
The System V ABI on some architectures allows the use of more than one register
See
.BR syscall (2)
for information regarding registers used for storing second file descriptor.
+.SH STANDARDS
+.TP
+.BR pipe ()
+POSIX.1-2008.
+.TP
+.BR pipe2 ()
+Linux.
+.SH HISTORY
+.TP
+.BR pipe ()
+POSIX.1-2001.
+.TP
+.BR pipe2 ()
+Linux 2.6.27,
+glibc 2.9.
.SH EXAMPLES
.\" fork.2 refers to this example program.
The following program creates a pipe, and then
The calling process does not have the
.B CAP_SYS_ADMIN
capability.
-.SH VERSIONS
-.BR pivot_root ()
-was introduced in Linux 2.3.41.
.SH STANDARDS
-.BR pivot_root ()
-is Linux-specific and hence is not portable.
+Linux.
+.SH HISTORY
+Linux 2.3.41.
.SH NOTES
A command-line interface for this system call is provided by
.BR pivot_root (8).
Applications should always be prepared to handle this error, since
factors outside of the application's control can reduce the number
of available pkeys.
-.SH VERSIONS
-.BR pkey_alloc ()
-and
-.BR pkey_free ()
-were added in Linux 4.9;
-library support was added in glibc 2.27.
.SH STANDARDS
-The
-.BR pkey_alloc ()
-and
-.BR pkey_free ()
-system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 4.9,
+glibc 2.27.
.SH NOTES
.BR pkey_alloc ()
is always safe to call regardless of whether or not the operating system
.B ENOMEM
Unable to allocate memory for kernel data structures.
.SH VERSIONS
-The
-.BR poll ()
-system call was introduced in Linux 2.1.23.
-On older kernels that lack this system call,
-the glibc
-.BR poll ()
-wrapper function provides emulation using
-.BR select (2).
-.PP
-The
-.BR ppoll ()
-system call was added in Linux 2.6.16.
-The
-.BR ppoll ()
-library call was added in glibc 2.4.
-.SH STANDARDS
-.BR poll ()
-conforms to POSIX.1-2001 and POSIX.1-2008.
-.BR ppoll ()
-is Linux-specific.
-.\" FIXME .
-.\" ppoll() is proposed for inclusion in POSIX:
-.\" https://www.austingroupbugs.net/view.php?id=1263
-.\" NetBSD 3.0 has a pollts() which is like Linux ppoll().
-.SH NOTES
-The operation of
-.BR poll ()
-and
-.BR ppoll ()
-is not affected by the
-.B O_NONBLOCK
-flag.
-.PP
On some other UNIX systems,
.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
.BR poll ()
for
.BR poll ().
This constant is not provided in glibc.
-.PP
-For a discussion of what may happen if a file descriptor being monitored by
-.BR poll ()
-is closed in another thread, see
-.BR select (2).
.SS C library/kernel differences
The Linux
.BR ppoll ()
.BR sigprocmask (2)
for a discussion on the differences between the kernel and the libc
notion of the sigset.
+.SH STANDARDS
+.TP
+.BR poll ()
+POSIX.1-2008.
+.TP
+.BR ppoll ()
+Linux.
+.\" FIXME .
+.\" ppoll() is proposed for inclusion in POSIX:
+.\" https://www.austingroupbugs.net/view.php?id=1263
+.\" NetBSD 3.0 has a pollts() which is like Linux ppoll().
+.SH HISTORY
+.TP
+.BR poll ()
+POSIX.1-2001.
+Linux 2.1.23.
+.IP
+On older kernels that lack this system call,
+the glibc
+.BR poll ()
+wrapper function provides emulation using
+.BR select (2).
+.TP
+.BR ppoll ()
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+The operation of
+.BR poll ()
+and
+.BR ppoll ()
+is not affected by the
+.B O_NONBLOCK
+flag.
+.PP
+For a discussion of what may happen if a file descriptor being monitored by
+.BR poll ()
+is closed in another thread, see
+.BR select (2).
.SH BUGS
See the discussion of spurious readiness notifications under the
BUGS section of
.B EINVAL
in this case.)
.SH VERSIONS
-Kernel support first appeared in Linux 2.5.60;
-the underlying system call is called
-.BR fadvise64 ().
-.\" of fadvise64_64()
-Library support has been provided since glibc 2.2,
-via the wrapper function
-.BR posix_fadvise ().
-.PP
-Since Linux 3.18,
-.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
-support for the underlying system call is optional,
-depending on the setting of the
-.B CONFIG_ADVISE_SYSCALLS
-configuration option.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-Note that the type of the
-.I len
-argument was changed from
-.I size_t
-to
-.I off_t
-in POSIX.1-2001 TC1.
-.SH NOTES
Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the
default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles
this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely.
These changes affect the entire file, not just the specified region
(but other open file handles to the same file are unaffected).
-.PP
-The contents of the kernel buffer cache can be cleared via the
-.I /proc/sys/vm/drop_caches
-interface described in
-.BR proc (5).
-.PP
-One can obtain a snapshot of which pages of a file are resident
-in the buffer cache by opening a file, mapping it with
-.BR mmap (2),
-and then applying
-.BR mincore (2)
-to the mapping.
.SS C library/kernel differences
The name of the wrapper function in the C library is
.BR posix_fadvise ().
.BR posix_fadvise ()
wrapper function,
which invokes the appropriate architecture-specific system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Kernel support first appeared in Linux 2.5.60;
+the underlying system call is called
+.BR fadvise64 ().
+.\" of fadvise64_64()
+Library support has been provided since glibc 2.2,
+via the wrapper function
+.BR posix_fadvise ().
+.PP
+Since Linux 3.18,
+.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
+support for the underlying system call is optional,
+depending on the setting of the
+.B CONFIG_ADVISE_SYSCALLS
+configuration option.
+.PP
+The type of the
+.I len
+argument was changed from
+.I size_t
+to
+.I off_t
+in POSIX.1-2001 TC1.
+.SH NOTES
+The contents of the kernel buffer cache can be cleared via the
+.I /proc/sys/vm/drop_caches
+interface described in
+.BR proc (5).
+.PP
+One can obtain a snapshot of which pages of a file are resident
+in the buffer cache by opening a file, mapping it with
+.BR mmap (2),
+and then applying
+.BR mincore (2)
+to the mapping.
.SH BUGS
Before Linux 2.6.6, if
.I len
nor
.BR PR_SPEC_DISABLE_NOEXEC .
.SH VERSIONS
-The
-.BR prctl ()
-system call was introduced in Linux 2.1.57.
-.\" The library interface was added in glibc 2.0.6
-.SH STANDARDS
-This call is Linux-specific.
IRIX has a
.BR prctl ()
system call (also introduced in Linux 2.1.44
get the maximum number of processors the calling process can use,
find out whether a specified process is currently blocked,
get or set the maximum stack size, and so on.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.1.57,
+glibc 2.0.6
.SH SEE ALSO
.BR signal (2),
.BR core (5)
.BR write (2)
or
.BR lseek (2).
-.SH VERSIONS
-The
-.BR pread ()
-and
-.BR pwrite ()
-system calls were added in Linux 2.1.60;
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Added in Linux 2.1.60;
the entries in the i386 system call table were added in Linux 2.1.69.
C library support (including emulation using
.BR lseek (2)
on older kernels without the system calls) was added in glibc 2.1.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-The
-.BR pread ()
-and
-.BR pwrite ()
-system calls are especially useful in multithreaded applications.
-They allow multiple threads to perform I/O on the same file descriptor
-without being affected by changes to the file offset by other threads.
-.\"
.SS C library/kernel differences
On Linux, the underlying system calls were renamed
in Linux 2.6:
the calling signature for these system calls differ,
for the reasons described in
.BR syscall (2).
+.SH NOTES
+The
+.BR pread ()
+and
+.BR pwrite ()
+system calls are especially useful in multithreaded applications.
+They allow multiple threads to perform I/O on the same file descriptor
+without being affected by changes to the file offset by other threads.
.SH BUGS
POSIX requires that opening a file with the
.B O_APPEND
for
.IR advice -specific
errors.
-.SH VERSIONS
-This system call first appeared in Linux 5.10.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 5.10.
.\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
+.PP
Support for this system call is optional,
depending on the setting of the
.B CONFIG_ADVISE_SYSCALLS
configuration option.
-.SH STANDARDS
-The
-.BR process_madvise ()
-system call is Linux-specific.
-.SH NOTES
+.PP
When this system call first appeared in Linux 5.10,
permission to apply advice to another process was entirely governed by
ptrace access mode
No process with ID
.I pid
exists.
-.SH VERSIONS
-These system calls were added in Linux 3.2.
-Support is provided since glibc 2.15.
.SH STANDARDS
-These system calls are nonstandard Linux extensions.
+Linux.
+.SH HISTORY
+Linux 3.2,
+glibc 2.15.
.SH NOTES
The data transfers performed by
.BR process_vm_readv ()
by the caller, or is not stopped
(for requests that require a stopped tracee).
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.3BSD.
+.PP
+Before Linux 2.6.26,
+.\" See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
+.BR init (1),
+the process with PID 1, may not be traced.
.SH NOTES
Although arguments to
.BR ptrace ()
or
.IR "(void\ *)\ 0".
.PP
-Before Linux 2.6.26,
-.\" See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
-.BR init (1),
-the process with PID 1, may not be traced.
-.PP
A tracees parent continues to be the tracer even if that tracer calls
.BR execve (2).
.PP
.BR query_module ()
is not supported in this version of the kernel
(e.g., Linux 2.6 or later).
+.SH STANDARDS
+Linux.
.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
+Removed in Linux 2.6.
.\" Removed in Linux 2.5.48
-.SH STANDARDS
-.BR query_module ()
-is Linux-specific.
-.SH NOTES
+.PP
Some of the information that was formerly available via
.BR query_module ()
can be obtained from
Other errors may occur, depending on the object connected to
.IR fd .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES
The types
.BR readahead ()
can be applied.
.SH VERSIONS
-The
-.BR readahead ()
-system call appeared in Linux 2.4.13;
-glibc support has been provided since glibc 2.3.
-.SH STANDARDS
-The
-.BR readahead ()
-system call is Linux-specific, and its use should be avoided
-in portable applications.
-.SH NOTES
On some 32-bit architectures,
the calling signature for this system call differs,
for the reasons described in
.BR syscall (2).
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.4.13,
+glibc 2.3.
.SH BUGS
.BR readahead ()
attempts to schedule the reads in the background and return immediately.
.TP
.B ENOTDIR
File descriptor does not refer to a directory.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
+.SH VERSIONS
You will need to define the
.I old_linux_dirent
structure yourself.
instead.
.PP
This system call does not exist on x86-64.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR getdents (2),
.BR readdir (3)
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR readlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR readlink ():
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR readlink ()
4.4BSD
-.RB ( readlink ()
-first appeared in 4.2BSD),
+(first appeared in 4.2BSD),
POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR readlinkat ():
+.TP
+.BR readlinkat ()
POSIX.1-2008.
-.SH NOTES
+Linux 2.6.16,
+glibc 2.4.
+.PP
Up to and including glibc 2.4, the return type of
.BR readlink ()
was declared as
Nowadays, the return type is declared as
.IR ssize_t ,
as (newly) required in POSIX.1-2001.
-.PP
+.SS glibc
+On older kernels where
+.BR readlinkat ()
+is unavailable, the glibc wrapper function falls back to the use of
+.BR readlink ().
+When
+.I pathname
+is a relative pathname,
+glibc constructs a pathname based on the symbolic link in
+.I /proc/self/fd
+that corresponds to the
+.I dirfd
+argument.
+.SH NOTES
Using a statically sized buffer might not provide enough room for the
symbolic link contents.
The required size for the buffer can be obtained from the
for the buffer size,
as this constant is not guaranteed to be defined per POSIX
if the system does not have such limit.
-.SS glibc notes
-On older kernels where
-.BR readlinkat ()
-is unavailable, the glibc wrapper function falls back to the use of
-.BR readlink ().
-When
-.I pathname
-is a relative pathname,
-glibc constructs a pathname based on the symbolic link in
-.I /proc/self/fd
-that corresponds to the
-.I dirfd
-argument.
.SH EXAMPLES
The following program allocates the buffer needed by
.BR readlink ()
.B EOPNOTSUPP
An unknown flag is specified in \fIflags\fP.
.SH VERSIONS
+.SS C library/kernel differences
+The raw
.BR preadv ()
and
.BR pwritev ()
-first appeared in Linux 2.6.30; library support was added in glibc 2.10.
+system calls have call signatures that differ slightly from that of the
+corresponding GNU C library wrapper functions shown in the SYNOPSIS.
+The final argument,
+.IR offset ,
+is unpacked by the wrapper functions into two arguments in the system calls:
+.PP
+.BI " unsigned long " pos_l ", unsigned long " pos
.PP
+These arguments contain, respectively, the low order and high order 32 bits of
+.IR offset .
+.SH STANDARDS
+.TP
+.BR readv ()
+.TQ
+.BR writev ()
+POSIX.1-2008.
+.TP
+.BR preadv ()
+.TQ
+.BR pwritev ()
+BSD.
+.TP
.BR preadv2 ()
-and
+.TQ
.BR pwritev2 ()
-first appeared in Linux 4.6.
-Library support was added in glibc 2.26.
-.SH STANDARDS
-.BR readv (),
-.BR writev ():
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD (these system calls first appeared in 4.2BSD).
+Linux.
+.SH HISTORY
+.TP
+.BR readv ()
+.TQ
+.BR writev ()
+POSIX.1-2001,
+4.4BSD (first appeared in 4.2BSD).
.\" Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
.\" and \fIint\fP as the return type.
.\" The readv/writev system calls were buggy before Linux 1.3.40.
.PP
.BR preadv (),
.BR pwritev ():
-nonstandard, but present also on the modern BSDs.
+Linux 2.6.30,
+glibc 2.10.
.PP
.BR preadv2 (),
.BR pwritev2 ():
-nonstandard Linux extension.
-.SH NOTES
-POSIX.1 allows an implementation to place a limit on
-the number of items that can be passed in
-.IR iov .
-An implementation can advertise its limit by defining
-.B IOV_MAX
-in
-.I <limits.h>
-or at run time via the return value from
-.IR sysconf(_SC_IOV_MAX) .
-On modern Linux systems, the limit is 1024.
-Back in Linux 2.0 days, this limit was 16.
-.\"
-.\"
-.SS C library/kernel differences
-The raw
-.BR preadv ()
-and
-.BR pwritev ()
-system calls have call signatures that differ slightly from that of the
-corresponding GNU C library wrapper functions shown in the SYNOPSIS.
-The final argument,
-.IR offset ,
-is unpacked by the wrapper functions into two arguments in the system calls:
-.PP
-.BI " unsigned long " pos_l ", unsigned long " pos
-.PP
-These arguments contain, respectively, the low order and high order 32 bits of
-.IR offset .
+Linux 4.6,
+glibc 2.26.
.SS Historical C library/kernel differences
To deal with the fact that
.B IOV_MAX
And since glibc 2.20
(which requires a minimum of Linux 2.6.32),
the glibc wrapper functions always just directly invoke the system calls.
+.SH NOTES
+POSIX.1 allows an implementation to place a limit on
+the number of items that can be passed in
+.IR iov .
+An implementation can advertise its limit by defining
+.B IOV_MAX
+in
+.I <limits.h>
+or at run time via the return value from
+.IR sysconf(_SC_IOV_MAX) .
+On modern Linux systems, the limit is 1024.
+Back in Linux 2.0 days, this limit was 16.
+.\"
+.\"
.SH BUGS
Linux 5.9 and Linux 5.10 have a bug where
.BR preadv2 ()
.B CAP_SYS_BOOT
inside its user namespace.
.SH STANDARDS
-.BR reboot ()
-is Linux-specific,
-and should not be used in programs intended to be portable.
+Linux.
.SH SEE ALSO
.BR systemctl (1),
.BR systemd (1),
The file descriptor
.I sockfd
does not refer to a socket.
+.SH VERSIONS
+According to POSIX.1,
+.\" POSIX.1-2001, POSIX.1-2008
+the
+.I msg_controllen
+field of the
+.I msghdr
+structure should be typed as
+.IR socklen_t ,
+and the
+.I msg_iovlen
+field should be typed as
+.IR int ,
+but glibc currently types both as
+.IR size_t .
+.\" glibc bug for msg_controllen raised 12 Mar 2006
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
+.\" The problem is an underlying kernel issue: the size of the
+.\" __kernel_size_t type used to type these fields varies
+.\" across architectures, but socklen_t is always 32 bits,
+.\" as (at least with GCC) is int.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD (these interfaces first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+4.4BSD (first appeared in 4.2BSD).
.PP
POSIX.1 describes only the
.BR MSG_OOB ,
See also
.BR accept (2).
.PP
-According to POSIX.1,
-.\" POSIX.1-2001, POSIX.1-2008
-the
-.I msg_controllen
-field of the
-.I msghdr
-structure should be typed as
-.IR socklen_t ,
-and the
-.I msg_iovlen
-field should be typed as
-.IR int ,
-but glibc currently types both as
-.IR size_t .
-.\" glibc bug for msg_controllen raised 12 Mar 2006
-.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
-.\" The problem is an underlying kernel issue: the size of the
-.\" __kernel_size_t type used to type these fields varies
-.\" across architectures, but socklen_t is always 32 bits,
-.\" as (at least with GCC) is int.
-.PP
See
.BR recvmmsg (2)
for information about a Linux-specific system call
is invalid.
.PP
See also BUGS.
-.SH VERSIONS
-The
-.BR recvmmsg ()
-system call was added in Linux 2.6.33.
-Support in glibc was added in glibc 2.12.
.SH STANDARDS
-.BR recvmmsg ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.33,
+glibc 2.12.
.SH BUGS
The
.I timeout
.I pgoff
is invalid.
.\" And possibly others from vma->vm_ops->populate()
-.SH VERSIONS
-The
-.BR remap_file_pages ()
-system call appeared in Linux 2.5.46;
-glibc support was added in glibc 2.3.3.
.SH STANDARDS
-The
-.BR remap_file_pages ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.46,
+glibc 2.3.3.
.SH NOTES
Since Linux 2.6.23,
.\" commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
but the caller does not have the
.B CAP_MKNOD
capability.
-.SH VERSIONS
-.BR renameat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.PP
-.BR renameat2 ()
-was added in Linux 3.15; library support was added in glibc 2.28.
.SH STANDARDS
-.BR rename ():
-4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR renameat ():
+.TP
+.BR rename ()
+C11, POSIX.1-2008.
+.TP
+.BR renameat ()
POSIX.1-2008.
-.PP
+.TP
.BR renameat2 ()
-is Linux-specific.
-.SH NOTES
-.\"
+Linux.
+.SH HISTORY
+.TP
+.BR rename ()
+4.3BSD, C89, POSIX.1-2001.
+.TP
+.BR renameat ()
+Linux 2.6.16,
+glibc 2.4.
+.TP
+.BR renameat2 ()
+Linux 3.15,
+glibc 2.28.
.SS glibc notes
On older kernels where
.BR renameat ()
The
.I type
argument started with a period (\[aq].\[aq]).
-.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.10.
+.PP
The ability to instantiate keys upon request was added
.\" commit 3e30148c3d524a9c1c63ca28261bc24c457eb07a
in Linux 2.6.13.
-.SH STANDARDS
-This system call is a nonstandard Linux extension.
.SH EXAMPLES
The program below demonstrates the use of
.BR request_key ().
.I errno
is set as per the errors for whatever system call is being restarted by
.BR restart_syscall ().
-.SH VERSIONS
-The
-.BR restart_syscall ()
-system call is present since Linux 2.6.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.
.SH NOTES
There is no glibc wrapper for this system call,
because it is intended for use only by the kernel and
.I pathname
refers to a directory on a read-only filesystem.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH BUGS
Infelicities in the protocol underlying NFS can cause the unexpected
disappearance of directories which are still being used.
and
.I tid
was found.
-.SH VERSIONS
-The
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR rt_sigqueueinfo ()
-system call was added in Linux 2.2.
-The
+Linux 2.2.
+.TP
.BR rt_tgsigqueueinfo ()
-system call was added in Linux 2.6.31.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 2.6.31.
.SH NOTES
Since these system calls are not intended for application use,
there are no glibc wrapper functions; use
.TP
.B EOPNOTSUPP
The guarded storage facility is not supported by the hardware.
-.SH VERSIONS
-.\" 916cda1aa1b412d7cf2991c3af7479544942d121, v4.12-rc1~139^2~56^2
-This system call is available since Linux 4.12.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-.PP
-The guarded storage facility is available beginning with System z14.
+Linux on s390.
+.SH HISTORY
+.\" 916cda1aa1b412d7cf2991c3af7479544942d121, v4.12-rc1~139^2~56^2
+Linux 4.12.
+System z14.
.SH NOTES
The description of the guarded storage facility along with related
instructions and Guarded Storage Control Block and
.TP
.B ENOMEM
Insufficient memory.
-.SH VERSIONS
-These system calls are available since Linux 3.19.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-The required PCI support is available beginning with System z EC12.
+Linux on s390.
+.SH HISTORY
+Linux 3.19.
+System z EC12.
.SH SEE ALSO
.BR syscall (2)
.TP
.B EOPNOTSUPP
The run-time instrumentation facility is not available.
-.SH VERSIONS
-This system call is available since Linux 3.7.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-The run-time instrumentation facility is available
-beginning with System z EC12.
+Linux on s390.
+.SH HISTORY
+Linux 3.7.
+System z EC12.
.SH NOTES
The
.I asm/runtime_instr.h
The value specified in
.I function_code
is not valid.
-.SH VERSIONS
-This system call is available since Linux 4.15.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
+Linux on s390.
+.SH HISTORY
+Linux 4.15.
.SH NOTES
For details of the STHYI instruction, see
.UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm
.I policy
does not identify a defined scheduling policy.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
.B ESRCH
Could not find a process with the ID
.IR pid .
+.SH VERSIONS
+.SS Linux
+Linux 3.9 added
+.\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
+a new mechanism for adjusting (and viewing) the
+.B SCHED_RR
+quantum: the
+.I /proc/sys/kernel/sched_rr_timeslice_ms
+file exposes the quantum as a millisecond value, whose default is 100.
+Writing 0 to this file resets the quantum to the default value.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-POSIX systems on which
-.BR sched_rr_get_interval ()
-is available define
-.B _POSIX_PRIORITY_SCHEDULING
-in
-.IR <unistd.h> .
-.SS Linux notes
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SS Linux
POSIX does not specify any mechanism for controlling the size of the
round-robin time quantum.
Older Linux kernels provide a (nonportable) method of doing this.
This method of adjusting the quantum was removed
.\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
starting with Linux 2.6.24.
-.PP
-Linux 3.9 added
-.\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
-a new mechanism for adjusting (and viewing) the
-.B SCHED_RR
-quantum: the
-.I /proc/sys/kernel/sched_rr_timeslice_ms
-file exposes the quantum as a millisecond value, whose default is 100.
-Writing 0 to this file resets the quantum to the default value.
+.SH NOTES
+POSIX systems on which
+.BR sched_rr_get_interval ()
+is available define
+.B _POSIX_PRIORITY_SCHEDULING
+in
+.IR <unistd.h> .
.\" .SH BUGS
.\" As of Linux 1.3.81
.\" .BR sched_rr_get_interval ()
.TP
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
-.SH VERSIONS
-The CPU affinity system calls were introduced in Linux kernel 2.5.8.
-The system call wrappers were introduced in glibc 2.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.8,
+glibc 2.3.
+.PP
Initially, the glibc interfaces included a
.I cpusetsize
argument, typed as
.I cpusetsize
argument was removed, but was then restored in glibc 2.3.4, with type
.IR size_t .
-.SH STANDARDS
-These system calls are Linux-specific.
.SH NOTES
After a call to
.BR sched_setaffinity (),
does not include all CPUs in the system
(see
.BR sched_setaffinity (2)).
-.SH VERSIONS
-These system calls first appeared in Linux 3.14.
-.\" FIXME . Add glibc version
.SH STANDARDS
-These system calls are nonstandard Linux extensions.
+Linux.
+.SH HISTORY
+Linux 3.14.
+.\" FIXME . Add glibc version
.SH NOTES
glibc does not provide wrappers for these system calls; call them using
.BR syscall (2).
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
.TP
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008 (but see BUGS below).
-The \fBSCHED_BATCH\fP and \fBSCHED_IDLE\fP policies are Linux-specific.
-.SH NOTES
-Further details of the semantics of all of the above "normal"
-and "real-time" scheduling policies can be found in the
-.BR sched (7)
-manual page.
-That page also describes an additional policy,
-.BR SCHED_DEADLINE ,
-which is settable only via
-.BR sched_setattr (2).
-.PP
-POSIX systems on which
-.BR sched_setscheduler ()
-and
-.BR sched_getscheduler ()
-are available define
-.B _POSIX_PRIORITY_SCHEDULING
-in \fI<unistd.h>\fP.
-.PP
+.SH VERSIONS
POSIX.1 does not detail the permissions that an unprivileged
thread requires in order to call
.BR sched_setscheduler (),
instead of the
.BR sched_* (2)
system calls.)
+.SH STANDARDS
+POSIX.1-2008 (but see BUGS below).
+.PP
+.B SCHED_BATCH
+and
+.B SCHED_IDLE
+are Linux-specific.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+Further details of the semantics of all of the above "normal"
+and "real-time" scheduling policies can be found in the
+.BR sched (7)
+manual page.
+That page also describes an additional policy,
+.BR SCHED_DEADLINE ,
+which is settable only via
+.BR sched_setattr (2).
+.PP
+POSIX systems on which
+.BR sched_setscheduler ()
+and
+.BR sched_getscheduler ()
+are available define
+.B _POSIX_PRIORITY_SCHEDULING
+in \fI<unistd.h>\fP.
.SH BUGS
POSIX.1 says that on success,
.BR sched_setscheduler ()
.BR sched_yield ()
always succeeds.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
If the calling thread is the only thread in the highest
priority list at that time,
.B ESRCH
Another thread caused a failure during thread sync, but its ID could not
be determined.
-.SH VERSIONS
-The
-.BR seccomp ()
-system call first appeared in Linux 3.17.
-.\" FIXME . Add glibc version
.SH STANDARDS
-The
-.BR seccomp ()
-system call is a nonstandard Linux extension.
+Linux.
+.SH HISTORY
+Linux 3.17.
+.\" FIXME . Add glibc version
.SH NOTES
Rather than hand-coding seccomp filters as shown in the example below,
you may prefer to employ the
.B ENOMEM
Unable to allocate memory for internal tables.
.SH VERSIONS
-.BR pselect ()
-was added in Linux 2.6.16.
-Prior to this,
-.BR pselect ()
-was emulated in glibc (but see BUGS).
+On some other UNIX systems,
+.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
+.BR select ()
+can fail with the error
+.B EAGAIN
+if the system fails to allocate kernel-internal resources, rather than
+.B ENOMEM
+as Linux does.
+POSIX specifies this error for
+.BR poll (2),
+but not for
+.BR select ().
+Portable programs may wish to check for
+.B EAGAIN
+and loop, just as with
+.BR EINTR .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR select ()
-conforms to POSIX.1-2001, POSIX.1-2008, and
-4.4BSD
-.RB ( select ()
-first appeared in 4.2BSD).
+POSIX.1-2001, 4.4BSD (first appeared in 4.2BSD).
+.IP
Generally portable to/from
non-BSD systems supporting clones of the BSD socket layer (including
System\ V variants).
However, note that the System\ V variant typically
sets the timeout variable before returning, but the BSD variant does not.
-.PP
+.TP
.BR pselect ()
-is defined in POSIX.1g, and in
-POSIX.1-2001 and POSIX.1-2008.
-.PP
+Linux 2.6.16.
+POSIX.1g, POSIX.1-2001.
+.IP
+Prior to this,
+it was emulated in glibc (but see BUGS).
+.TP
.B fd_set
-is defined in POSIX.1-2001 and later.
+POSIX.1-2001.
.SH NOTES
The following header also provides the
.I fd_set
is not affected by the
.B O_NONBLOCK
flag.
-.PP
-On some other UNIX systems,
-.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
-.BR select ()
-can fail with the error
-.B EAGAIN
-if the system fails to allocate kernel-internal resources, rather than
-.B ENOMEM
-as Linux does.
-POSIX specifies this error for
-.BR poll (2),
-but not for
-.BR select ().
-Portable programs may wish to check for
-.B EAGAIN
-and loop, just as with
-.BR EINTR .
.\"
.SS The self-pipe trick
On systems that lack
is to be set (for some semaphore of the set) is less than 0
or greater than the implementation limit
.BR SEMVMX .
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
-.PP
+.SH VERSIONS
POSIX.1 specifies the
.\" POSIX.1-2001, POSIX.1-2008
.I sem_nsems
It was also so defined on Linux 2.2 and earlier,
but, since Linux 2.4, the field has the type
.IR "unsigned\ long" .
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR SEM_STAT ,
-and
-.B SEM_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future these may modified or moved to a
-.I /proc
-filesystem interface.
-.PP
-Various fields in a \fIstruct semid_ds\fP were typed as
-.I short
-under Linux 2.2
-and have become
-.I long
-under Linux 2.4.
-To take advantage of this,
-a recompilation under glibc-2.1.91 or later should suffice.
-(The kernel distinguishes old and new calls by an
-.B IPC_64
-flag in
-.IR cmd .)
-.PP
-In some earlier versions of glibc, the
-.I semun
-union was defined in \fI<sys/sem.h>\fP, but POSIX.1 requires
-.\" POSIX.1-2001, POSIX.1-2008
-that the caller define this union.
-On versions of glibc where this union is \fInot\fP defined,
-the macro
-.B _SEM_SEMUN_UNDEFINED
-is defined in \fI<sys/sem.h>\fP.
-.PP
-The following system limit on semaphore sets affects a
-.BR semctl ()
-call:
-.TP
-.B SEMVMX
-Maximum value for
-.BR semval :
-implementation dependent (32767).
-.PP
-For greater portability, it is best to always call
-.BR semctl ()
-with four arguments.
.\"
.SS The sempid value
POSIX.1 defines
This was rectified
.\" commit a5f4db877177d2a3d7ae62a7bac3a5a27e083d7f
in Linux 4.6.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
+.PP
+Various fields in a \fIstruct semid_ds\fP were typed as
+.I short
+under Linux 2.2
+and have become
+.I long
+under Linux 2.4.
+To take advantage of this,
+a recompilation under glibc-2.1.91 or later should suffice.
+(The kernel distinguishes old and new calls by an
+.B IPC_64
+flag in
+.IR cmd .)
+.PP
+In some earlier versions of glibc, the
+.I semun
+union was defined in \fI<sys/sem.h>\fP, but POSIX.1 requires
+.\" POSIX.1-2001, POSIX.1-2008
+that the caller define this union.
+On versions of glibc where this union is \fInot\fP defined,
+the macro
+.B _SEM_SEMUN_UNDEFINED
+is defined in \fI<sys/sem.h>\fP.
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR SEM_STAT ,
+and
+.B SEM_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future these may modified or moved to a
+.I /proc
+filesystem interface.
+.PP
+The following system limit on semaphore sets affects a
+.BR semctl ()
+call:
+.TP
+.B SEMVMX
+Maximum value for
+.BR semval :
+implementation dependent (32767).
+.PP
+For greater portability, it is best to always call
+.BR semctl ()
+with four arguments.
.SH EXAMPLES
See
.BR shmop (2).
.RB ( SEMMNS ),
would be exceeded.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, POSIX.1-2001.
.\" SVr4 documents additional error conditions EFBIG, E2BIG, EAGAIN,
.\" ERANGE, EFAULT.
.BR SEMVMX ,
the implementation dependent maximum value for
.IR semval .
-.SH VERSIONS
-.BR semtimedop ()
-first appeared in Linux 2.5.52,
-and was subsequently backported into Linux 2.4.22.
-glibc support for
-.BR semtimedop ()
-first appeared in Linux 2.3.3.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH VERSIONS
+Linux 2.5.52 (backported into Linux 2.4.22),
+glibc 2.3.3.
+POSIX.1-2001, SVr4.
.\" SVr4 documents additional error conditions EINVAL, EFBIG, ENOSPC.
.SH NOTES
The
unless
.B MSG_NOSIGNAL
is set.
-.SH STANDARDS
-4.4BSD, SVr4, POSIX.1-2001.
-These interfaces first appeared in 4.2BSD.
-.PP
-POSIX.1-2001 describes only the
-.B MSG_OOB
-and
-.B MSG_EOR
-flags.
-POSIX.1-2008 adds a specification of
-.BR MSG_NOSIGNAL .
-The
-.B MSG_CONFIRM
-flag is a Linux extension.
-.SH NOTES
+.SH VERSIONS
According to POSIX.1-2001, the
.I msg_controllen
field of the
.\" __kernel_size_t type used to type these fields varies
.\" across architectures, but socklen_t is always 32 bits,
.\" as (at least with GCC) is int.
+.SH STANDARDS
+POSIX.1-2008.
+.PP
+.B MSG_CONFIRM
+is a Linux extension.
+.SH HISTORY
+4.4BSD, SVr4, POSIX.1-2001.
+(first appeared in 4.2BSD).
.PP
+POSIX.1-2001 describes only the
+.B MSG_OOB
+and
+.B MSG_EOR
+flags.
+POSIX.1-2008 adds a specification of
+.BR MSG_NOSIGNAL .
+.SH NOTES
See
.BR sendmmsg (2)
for information about a Linux-specific system call
.I offset
is not NULL but the input file is not seekable.
.SH VERSIONS
-.BR sendfile ()
-first appeared in Linux 2.2.
-The include file
-.I <sys/sendfile.h>
-is present since glibc 2.1.
-.SH STANDARDS
-Not specified in POSIX.1-2001, nor in other standards.
-.PP
Other UNIX systems implement
.BR sendfile ()
with different semantics and prototypes.
It should not be used in portable programs.
-.SH NOTES
-.BR sendfile ()
-will transfer at most 0x7ffff000 (2,147,479,552) bytes,
-returning the number of bytes actually transferred.
-.\" commit e28cc71572da38a5a12c1cfe4d7032017adccf69
-(This is true on both 32-bit and 64-bit systems.)
-.PP
-If you plan to use
-.BR sendfile ()
-for sending files to a TCP socket, but need
-to send some header data in front of the file contents, you will find
-it useful to employ the
-.B TCP_CORK
-option, described in
-.BR tcp (7),
-to minimize the number of packets and to tune performance.
+.SH STANDARDS
+None.
+.SH HISTORY
+Linux 2.2,
+glibc 2.1.
.PP
In Linux 2.4 and earlier,
.I out_fd
The glibc
.BR sendfile ()
wrapper function transparently deals with the kernel differences.
+.SH NOTES
+.BR sendfile ()
+will transfer at most 0x7ffff000 (2,147,479,552) bytes,
+returning the number of bytes actually transferred.
+.\" commit e28cc71572da38a5a12c1cfe4d7032017adccf69
+(This is true on both 32-bit and 64-bit systems.)
+.PP
+If you plan to use
+.BR sendfile ()
+for sending files to a TCP socket, but need
+to send some header data in front of the file contents, you will find
+it useful to employ the
+.B TCP_CORK
+option, described in
+.BR tcp (7),
+to minimize the number of packets and to tune performance.
.PP
Applications may wish to fall back to
.BR read (2)
.\"
.\" This matches the behavior of other syscalls like read/write - it
.\" is not an error if less than the requested number of elements are sent.
-.SH VERSIONS
-The
-.BR sendmmsg ()
-system call was added in Linux 3.0.
-Support in glibc was added in Linux 2.14.
.SH STANDARDS
-.BR sendmmsg ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.0,
+glibc 2.14.
.SH NOTES
The value specified in
.I vlen
.TP
.B ENOMEM
Insufficient kernel memory was available.
-.SH VERSIONS
-The
-.BR set_mempolicy ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
.SH NOTES
Memory policy is not remembered if the page is swapped out.
When such a page is paged back in, it will use the policy of
.B ESRCH
.RB ( set_thread_area ())
A free TLS entry could not be located.
-.SH VERSIONS
-.BR set_thread_area ()
-first appeared in Linux 2.5.29.
-.BR get_thread_area ()
-first appeared in Linux 2.5.32.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR set_thread_area ()
-and
+Linux 2.5.29.
+.TP
.BR get_thread_area ()
-are Linux-specific and should not be used in programs that are intended
-to be portable.
+Linux 2.5.32.
.SH NOTES
These system calls are generally intended for use only by threading libraries.
.PP
.SH ERRORS
.BR set_tid_address ()
always succeeds.
-.SH VERSIONS
-This call is present since Linux 2.5.48.
-Details as given here are valid since Linux 2.5.49.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.48.
+.PP
+Details as given here are valid since Linux 2.5.49.
.SH SEE ALSO
.BR clone (2),
.BR futex (2),
.I egid
does not match the current real group ID, current effective group ID,
or current saved set-group-ID.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
Setting the effective user (group) ID to the
saved set-user-ID (saved set-group-ID) is
possible since Linux 1.1.37 (1.1.38).
.BR setreuid (2)
and
.BR setregid (2).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR geteuid (2),
.BR setresuid (2),
.nf
.B #include <sys/fsuid.h>
.PP
-.BI "int setfsgid(gid_t " fsgid );
+.BI "[[deprecated]] int setfsgid(gid_t " fsgid );
.fi
.SH DESCRIPTION
On Linux, a process has both a filesystem group ID and an effective group ID.
.SH RETURN VALUE
On both success and failure,
this call returns the previous filesystem group ID of the caller.
-.SH VERSIONS
-This system call is present since Linux 1.2.
-.\" This system call is present since Linux 1.1.44
-.\" and in libc since libc 4.7.6.
.SH STANDARDS
-.BR setfsgid ()
-is Linux-specific and should not be used in programs intended
-to be portable.
+Linux.
+.SH HISTORY
+Linux 1.2.
+.\" Linux 1.1.44
+.\" and in libc since libc 4.7.6.
+.SS C library/kernel differences
+In glibc 2.15 and earlier,
+when the wrapper for this system call determines that the argument can't be
+passed to the kernel without integer truncation (because the kernel
+is old and does not support 32-bit group IDs),
+it will return \-1 and set \fIerrno\fP to
+.B EINVAL
+without attempting
+the system call.
.SH NOTES
The filesystem group ID concept and the
.BR setfsgid ()
The glibc
.BR setfsgid ()
wrapper function transparently deals with the variation across kernel versions.
-.SS C library/kernel differences
-In glibc 2.15 and earlier,
-when the wrapper for this system call determines that the argument can't be
-passed to the kernel without integer truncation (because the kernel
-is old and does not support 32-bit group IDs),
-it will return \-1 and set \fIerrno\fP to
-.B EINVAL
-without attempting
-the system call.
.SH BUGS
No error indications of any kind are returned to the caller,
and the fact that both successful and unsuccessful calls return
.nf
.B #include <sys/fsuid.h>
.PP
-.BI "int setfsuid(uid_t " fsuid );
+.BI "[[deprecated]] int setfsuid(uid_t " fsuid );
.fi
.SH DESCRIPTION
On Linux, a process has both a filesystem user ID and an effective user ID.
.SH RETURN VALUE
On both success and failure,
this call returns the previous filesystem user ID of the caller.
-.SH VERSIONS
-This system call is present since Linux 1.2.
-.\" This system call is present since Linux 1.1.44
-.\" and in libc since libc 4.7.6.
.SH STANDARDS
-.BR setfsuid ()
-is Linux-specific and should not be used in programs intended
-to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
+Linux 1.2.
+.\" Linux 1.1.44
+.\" and in libc since libc 4.7.6.
+.PP
At the time when this system call was introduced, one process
could send a signal to another process with the same effective user ID.
This meant that if a privileged process changed its effective user ID
.I gid
does not match the real group ID or saved set-group-ID of
the calling process.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.SH NOTES
-The original Linux
-.BR setgid ()
-system call supported only 16-bit group IDs.
-Subsequently, Linux 2.4 added
-.BR setgid32 ()
-supporting 32-bit IDs.
-The glibc
-.BR setgid ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
At the kernel level, user IDs and group IDs are a per-thread attribute.
However, POSIX requires that all threads in a process
all of the other threads in the process also change their credentials.
For details, see
.BR nptl (7).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
+The original Linux
+.BR setgid ()
+system call supported only 16-bit group IDs.
+Subsequently, Linux 2.4 added
+.BR setgid32 ()
+supporting 32-bit IDs.
+The glibc
+.BR setgid ()
+wrapper function transparently deals with the variation across kernel versions.
.SH SEE ALSO
.BR getgid (2),
.BR setegid (2),
.I fd
is a PID file descriptor but the process it refers to no longer exists
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-The
-.BR setns ()
-system call first appeared in Linux 3.0;
-library support was added in glibc 2.14.
.SH STANDARDS
-The
-.BR setns ()
-system call is Linux-specific.
+Linux.
+.SH VERSIONS
+Linux 3.0,
+glibc 2.14.
.SH NOTES
For further information on the
.IR /proc/ pid /ns/
.I pid
is not the calling process and not a child of the calling process.
.SH STANDARDS
+.TP
+.BR getpgid ()
+.TQ
.BR setpgid ()
-and the version of
-.BR getpgrp ()
-with no arguments
-conform to POSIX.1-2001.
-.PP
-POSIX.1-2001 also specifies
+.TQ
+.BR getpgrp "() (no args)"
+.TQ
+.BR setpgrp "() (no args)"
+POSIX.1-2008 (but see HISTORY).
+.TP
+.BR setpgrp "() (2 args)"
+.TQ
+.BR getpgrp "() (1 arg)"
+None.
+.SH HISTORY
+.TP
.BR getpgid ()
-and the version of
-.BR setpgrp ()
-that takes no arguments.
-(POSIX.1-2008 marks this
-.BR setpgrp ()
-specification as obsolete.)
-.PP
-The version of
-.BR getpgrp ()
-with one argument and the version of
-.BR setpgrp ()
-that takes two arguments derive from 4.2BSD,
-and are not specified by POSIX.1.
+.TQ
+.BR setpgid ()
+.TQ
+.BR getpgrp "() (no args)"
+POSIX.1-2001.
+.TP
+.BR setpgrp "() (no args)"
+POSIX.1-2001.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR setpgrp "() (2 args)"
+.TQ
+.BR getpgrp "() (1 arg)"
+4.2BSD.
.SH NOTES
A child created via
.BR fork (2)
it is
.BR CAP_SETGID .
.SH VERSIONS
-These calls are available under Linux since Linux 2.1.44.
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including those for
+.BR setresuid ()
+and
+.BR setresgid ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-These calls are nonstandard;
-they also appear on HP-UX and some of the BSDs.
-.SH NOTES
-Under HP-UX and FreeBSD, the prototype is found in
-.IR <unistd.h> .
-Under Linux, the prototype is provided since glibc 2.3.2.
+None.
+.SH HISTORY
+Linux 2.1.44,
+glibc 2.3.2.
+HP-UX, FreeBSD.
.PP
The original Linux
.BR setresuid ()
and
.BR setresgid ()
wrapper functions transparently deal with the variations across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including those for
-.BR setresuid ()
-and
-.BR setresgid ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getresuid (2),
.BR getuid (2),
or (ii) setting one to the value of the other or (iii) setting the
effective user (group) ID to the value of the
saved set-user-ID (saved set-group-ID) was specified.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD
-.RB ( setreuid ()
-and
-.BR setregid ()
-first appeared in 4.2BSD).
-.SH NOTES
-Setting the effective user (group) ID to the
-saved set-user-ID (saved set-group-ID) is
-possible since Linux 1.1.37 (1.1.38).
-.PP
+.SH VERSIONS
POSIX.1 does not specify all of the UID changes that Linux permits
for an unprivileged process.
For
.PP
POSIX.1 makes no specification about the effect of these calls
on the saved set-user-ID and saved set-group-ID.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD (first appeared in 4.2BSD).
+.PP
+Setting the effective user (group) ID to the
+saved set-user-ID (saved set-group-ID) is
+possible since Linux 1.1.37 (1.1.38).
.PP
The original Linux
.BR setreuid ()
.BR setsid ()
fails if the calling process is already a process group leader.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH NOTES
A child created via
.BR fork (2)
capability in its user namespace) and
.I uid
does not match the real UID or saved set-user-ID of the calling process.
+.SH VERSIONS
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including the one for
+.BR setuid ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
Not quite compatible with the 4.4BSD call, which
sets all of the real, saved, and effective user IDs.
.\" SVr4 documents an additional EINVAL error condition.
+.PP
+The original Linux
+.BR setuid ()
+system call supported only 16-bit user IDs.
+Subsequently, Linux 2.4 added
+.BR setuid32 ()
+supporting 32-bit IDs.
+The glibc
+.BR setuid ()
+wrapper function transparently deals with the variation across kernel versions.
.SH NOTES
Linux has the concept of the filesystem user ID, normally equal to the
effective user ID.
.I uid
is different from the old effective UID, the process will
be forbidden from leaving core dumps.
-.PP
-The original Linux
-.BR setuid ()
-system call supported only 16-bit user IDs.
-Subsequently, Linux 2.4 added
-.BR setuid32 ()
-supporting 32-bit IDs.
-The glibc
-.BR setuid ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including the one for
-.BR setuid ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getuid (2),
.BR seteuid (2),
.nf
.B #include <unistd.h>
.PP
-.B int setup(void);
+.B [[deprecated]] int setup(void);
.fi
.SH DESCRIPTION
.BR setup ()
.TP
.B EPERM
Always, for a user process.
-.SH VERSIONS
-Since Linux 2.1.121, no such function exists anymore.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable, or indeed in any programs at all.
-.SH NOTES
+Linux.
+.SH VERSIONS
+Removed in Linux 2.1.121.
+.PP
The calling sequence varied: at some times
.BR setup ()
has had a single argument
or
.I value
exceeds a filesystem-specific limit.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
always succeeds, and returns the previous signal mask.
.SH ERRORS
These system calls always succeed.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
Since Linux 3.16,
.\" f6187769dae48234f3877df3c4d99294cc2254fa
support for these system calls is optional,
depending on whether the kernel was built with the
.B CONFIG_SGETMASK_SYSCALL
option.
-.SH STANDARDS
-These system calls are Linux-specific.
.SH NOTES
These system calls are unaware of signal numbers greater than 31
(i.e., real-time signals).
(Since Linux 2.6.9, this error can also occur if the
.B RLIMIT_MEMLOCK
is 0 and the caller is not privileged.)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents additional error conditions EINVAL,
-.\" ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents
-.\" an EIDRM error condition.
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR SHM_STAT ,
-and
-.B SHM_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future, these may modified or moved to a
-.I /proc
-filesystem interface.
-.PP
+.SH VERSIONS
Linux permits a process to attach
.RB ( shmat (2))
a shared memory segment that has already been marked for deletion
.IR shmctl(IPC_RMID) .
This feature is not available on other UNIX implementations;
portable applications should avoid relying on it.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents additional error conditions EINVAL,
+.\" ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents
+.\" an EIDRM error condition.
.PP
Various fields in a \fIstruct shmid_ds\fP were typed as
.I short
.B IPC_64
flag in
.IR cmd .)
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR SHM_STAT ,
+and
+.B SHM_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future, these may modified or moved to a
+.I /proc
+filesystem interface.
.SH SEE ALSO
.BR mlock (2),
.BR setrlimit (2),
in
.BR proc (5).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents an additional error condition EEXIST.
+POSIX.1-2008.
.PP
.B SHM_HUGETLB
and
.B SHM_NORESERVE
are Linux extensions.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents an additional error condition EEXIST.
.SH NOTES
.B IPC_PRIVATE
isn't a flag field but a
.I shmaddr
is not aligned on a page boundary.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVr4 documents an additional error condition EMFILE.
.PP
In SVID 3 (or perhaps earlier),
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD
-.RB ( shutdown ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
The constants
.BR SHUT_RD ,
is made to change the action for
.BR SIGKILL " or " SIGSTOP ,
which cannot be caught or ignored.
+.SH VERSIONS
+.SS C library/kernel differences
+The glibc wrapper function for
+.BR sigaction ()
+gives an error
+.RB ( EINVAL )
+on attempts to change the disposition of the two real-time signals
+used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.PP
+On architectures where the signal trampoline resides in the C library,
+the glibc wrapper function for
+.BR sigaction ()
+places the address of the trampoline code in the
+.I act.sa_restorer
+field and sets the
+.B SA_RESTORER
+flag in the
+.I act.sa_flags
+field.
+See
+.BR sigreturn (2).
+.PP
+The original Linux system call was named
+.BR sigaction ().
+However, with the addition of real-time signals in Linux 2.2,
+the fixed-size, 32-bit
+.I sigset_t
+type supported by that system call was no longer fit for purpose.
+Consequently, a new system call,
+.BR rt_sigaction (),
+was added to support an enlarged
+.I sigset_t
+type.
+The new system call takes a fourth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the signal sets in
+.I act.sa_mask
+and
+.IR oldact.sa_mask .
+This argument is currently required to have the value
+.I sizeof(sigset_t)
+(or the error
+.B EINVAL
+results).
+The glibc
+.BR sigaction ()
+wrapper function hides these details from us, transparently calling
+.BR rt_sigaction ()
+when the kernel provides it.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVr4 does not document the EINTR condition.
-.SH NOTES
-A child created via
-.BR fork (2)
-inherits a copy of its parent's signal dispositions.
-During an
-.BR execve (2),
-the dispositions of handled signals are reset to the default;
-the dispositions of ignored signals are left unchanged.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
.PP
POSIX.1-1990 disallowed setting the action for
.B SIGCHLD
(effectively overriding any
.I sa_mask
settings).
+.SH NOTES
+A child created via
+.BR fork (2)
+inherits a copy of its parent's signal dispositions.
+During an
+.BR execve (2),
+the dispositions of handled signals are reset to the default;
+the dispositions of ignored signals are left unchanged.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
.PP
.BR sigaction ()
can be called with a NULL second argument to query the current signal
for a list of the async-signal-safe functions that can be
safely called inside from inside a signal handler.
.\"
-.SS C library/kernel differences
-The glibc wrapper function for
-.BR sigaction ()
-gives an error
-.RB ( EINVAL )
-on attempts to change the disposition of the two real-time signals
-used internally by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.PP
-On architectures where the signal trampoline resides in the C library,
-the glibc wrapper function for
-.BR sigaction ()
-places the address of the trampoline code in the
-.I act.sa_restorer
-field and sets the
-.B SA_RESTORER
-flag in the
-.I act.sa_flags
-field.
-See
-.BR sigreturn (2).
-.PP
-The original Linux system call was named
-.BR sigaction ().
-However, with the addition of real-time signals in Linux 2.2,
-the fixed-size, 32-bit
-.I sigset_t
-type supported by that system call was no longer fit for purpose.
-Consequently, a new system call,
-.BR rt_sigaction (),
-was added to support an enlarged
-.I sigset_t
-type.
-The new system call takes a fourth argument,
-.IR "size_t sigsetsize" ,
-which specifies the size in bytes of the signal sets in
-.I act.sa_mask
-and
-.IR oldact.sa_mask .
-This argument is currently required to have the value
-.I sizeof(sigset_t)
-(or the error
-.B EINVAL
-results).
-The glibc
-.BR sigaction ()
-wrapper function hides these details from us, transparently calling
-.BR rt_sigaction ()
-when the kernel provides it.
-.\"
.SS Undocumented
Before the introduction of
.BR SA_SIGINFO ,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2, SVr4.
+POSIX.1-2008.
.PP
-The
.B SS_AUTODISARM
-flag is a Linux extension.
+is a Linux extension.
+.SH HISTORY
+POSIX.1-2001, SUSv2, SVr4.
.SH NOTES
The most common usage of an alternate signal stack is to handle the
.B SIGSEGV
.B EINVAL
.I signum
is invalid.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.SH NOTES
-The effects of
-.BR signal ()
-in a multithreaded process are unspecified.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
-.PP
-See
-.BR sigaction (2)
-for details on what happens when the disposition
-.B SIGCHLD
-is set to
-.BR SIG_IGN .
-.PP
-See
-.BR signal\-safety (7)
-for a list of the async-signal-safe functions that can be
-safely called from inside a signal handler.
-.PP
+.SH VERSIONS
The use of
.I sighandler_t
is a GNU extension, exposed if
which provides explicit control of the semantics when a
signal handler is invoked; use that interface instead of
.BR signal ().
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
In the original UNIX systems, when a handler that was established using
.BR signal ()
.\" then
.\" .BR signal ()
.\" provides BSD semantics.
+.SH NOTES
+The effects of
+.BR signal ()
+in a multithreaded process are unspecified.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
+.PP
+See
+.BR sigaction (2)
+for details on what happens when the disposition
+.B SIGCHLD
+is set to
+.BR SIG_IGN .
+.PP
+See
+.BR signal\-safety (7)
+for a list of the async-signal-safe functions that can be
+safely called from inside a signal handler.
.SH SEE ALSO
.BR kill (1),
.BR alarm (2),
.B ENOMEM
There was insufficient memory to create a new signalfd file descriptor.
.SH VERSIONS
+.SS C library/kernel differences
+The underlying Linux system call requires an additional argument,
+.IR "size_t sizemask" ,
+which specifies the size of the
+.I mask
+argument.
+The glibc
.BR signalfd ()
-is available since Linux 2.6.22.
-Working support is provided since glibc 2.8.
-.\" signalfd() is in glibc 2.7, but reportedly does not build
-The
+wrapper function does not include this argument,
+since it provides the required value for the underlying system call.
+.PP
+There are two underlying Linux system calls:
+.BR signalfd ()
+and the more recent
+.BR signalfd4 ().
+The former system call does not implement a
+.I flags
+argument.
+The latter system call implements the
+.I flags
+values described above.
+Starting with glibc 2.9, the
+.BR signalfd ()
+wrapper function will use
.BR signalfd4 ()
-system call (see NOTES) is available since Linux 2.6.27.
+where it is available.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR signalfd ()
-and
+Linux 2.6.22,
+glibc 2.8.
+.\" signalfd() is in glibc 2.7, but reportedly does not build
+.TP
.BR signalfd4 ()
-are Linux-specific.
+Linux 2.6.27.
.SH NOTES
A process can create multiple signalfd file descriptors.
This makes it possible to accept different signals
.BR poll (2),
or
.BR epoll (7).
-.\"
-.SS C library/kernel differences
-The underlying Linux system call requires an additional argument,
-.IR "size_t sizemask" ,
-which specifies the size of the
-.I mask
-argument.
-The glibc
-.BR signalfd ()
-wrapper function does not include this argument,
-since it provides the required value for the underlying system call.
-.PP
-There are two underlying Linux system calls:
-.BR signalfd ()
-and the more recent
-.BR signalfd4 ().
-The former system call does not implement a
-.I flags
-argument.
-The latter system call implements the
-.I flags
-values described above.
-Starting with glibc 2.9, the
-.BR signalfd ()
-wrapper function will use
-.BR signalfd4 ()
-where it is available.
.SH BUGS
Before Linux 2.6.25, the
.I ssi_ptr
.I set
points to memory which is not a valid part of the process address space.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.PP
-If a signal is both blocked and has a disposition of "ignored", it is
-.I not
-added to the mask of pending signals when generated.
-.PP
-The set of signals that is pending for a thread
-is the union of the set of signals that is pending for that thread
-and the set of signals that is pending for the process as a whole; see
-.BR signal (7).
-.PP
-A child created via
-.BR fork (2)
-initially has an empty pending signal set;
-the pending signal set is preserved across an
-.BR execve (2).
-.\"
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SS C library/kernel differences
The original Linux system call was named
.BR sigpending ().
wrapper function hides these details from us, transparently calling
.BR rt_sigpending ()
when the kernel provides it.
-.\"
+.SH NOTES
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
+.PP
+If a signal is both blocked and has a disposition of "ignored", it is
+.I not
+added to the mask of pending signals when generated.
+.PP
+The set of signals that is pending for a thread
+is the union of the set of signals that is pending for that thread
+and the set of signals that is pending for the process as a whole; see
+.BR signal (7).
+.PP
+A child created via
+.BR fork (2)
+initially has an empty pending signal set;
+the pending signal set is preserved across an
+.BR execve (2).
.SH BUGS
Up to and including glibc 2.2.1,
there is a bug in the wrapper function for
.I how
was invalid or the kernel does not support the size passed in
.I sigsetsize.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-It is not possible to block
-.BR SIGKILL " or " SIGSTOP .
-Attempts to do so are silently ignored.
-.PP
-Each of the threads in a process has its own signal mask.
-.PP
-A child created via
-.BR fork (2)
-inherits a copy of its parent's signal mask;
-the signal mask is preserved across
-.BR execve (2).
-.PP
-If
-.BR SIGBUS ,
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-are generated
-while they are blocked, the result is undefined,
-unless the signal was generated by
-.BR kill (2),
-.BR sigqueue (3),
-or
-.BR raise (3).
-.PP
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.PP
-Note that it is permissible (although not very useful) to specify both
-.I set
-and
-.I oldset
-as NULL.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
The kernel's definition of
.I sigset_t
.BR rt_sigprocmask ()
when the kernel provides it.
.\"
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+It is not possible to block
+.BR SIGKILL " or " SIGSTOP .
+Attempts to do so are silently ignored.
+.PP
+Each of the threads in a process has its own signal mask.
+.PP
+A child created via
+.BR fork (2)
+inherits a copy of its parent's signal mask;
+the signal mask is preserved across
+.BR execve (2).
+.PP
+If
+.BR SIGBUS ,
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+are generated
+while they are blocked, the result is undefined,
+unless the signal was generated by
+.BR kill (2),
+.BR sigqueue (3),
+or
+.BR raise (3).
+.PP
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
+.PP
+Note that it is permissible (although not very useful) to specify both
+.I set
+and
+.I oldset
+as NULL.
.SH SEE ALSO
.BR kill (2),
.BR pause (2),
.SH RETURN VALUE
.BR sigreturn ()
never returns.
-.SH STANDARDS
+.SH VERSIONS
Many UNIX-type systems have a
.BR sigreturn ()
system call or near equivalent.
However, this call is not specified in POSIX,
and details of its behavior vary across systems.
+.SH STANDARDS
+None.
.SH NOTES
.BR sigreturn ()
exists only to allow the implementation of signal handlers.
The call was interrupted by a signal;
.BR signal (7).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-Normally,
-.BR sigsuspend ()
-is used in conjunction with
-.BR sigprocmask (2)
-in order to prevent delivery of a signal during the execution of a
-critical code section.
-The caller first blocks the signals with
-.BR sigprocmask (2).
-When the critical code has completed, the caller then waits for the
-signals by calling
-.BR sigsuspend ()
-with the signal mask that was returned by
-.BR sigprocmask (2)
-(in the
-.I oldset
-argument).
-.PP
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.\"
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SS C library/kernel differences
The original Linux system call was named
.BR sigsuspend ().
.BR rt_sigsuspend ()
when the kernel provides it.
.\"
+.SH NOTES
+Normally,
+.BR sigsuspend ()
+is used in conjunction with
+.BR sigprocmask (2)
+in order to prevent delivery of a signal during the execution of a
+critical code section.
+The caller first blocks the signals with
+.BR sigprocmask (2).
+When the critical code has completed, the caller then waits for the
+signals by calling
+.BR sigsuspend ()
+with the signal mask that was returned by
+.BR sigprocmask (2)
+(in the
+.I oldset
+argument).
+.PP
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
.SH SEE ALSO
.BR kill (2),
.BR pause (2),
.B EINVAL
.I timeout
was invalid.
+.SH VERSIONS
+.SS C library/kernel differences
+On Linux,
+.BR sigwaitinfo ()
+is a library function implemented on top of
+.BR sigtimedwait ().
+.PP
+The glibc wrapper functions for
+.BR sigwaitinfo ()
+and
+.BR sigtimedwait ()
+silently ignore attempts to wait for the two real-time signals that
+are used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.PP
+The original Linux system call was named
+.BR sigtimedwait ().
+However, with the addition of real-time signals in Linux 2.2,
+the fixed-size, 32-bit
+.I sigset_t
+type supported by that system call was no longer fit for purpose.
+Consequently, a new system call,
+.BR rt_sigtimedwait (),
+was added to support an enlarged
+.I sigset_t
+type.
+The new system call takes a fourth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the signal set in
+.IR set .
+This argument is currently required to have the value
+.I sizeof(sigset_t)
+(or the error
+.B EINVAL
+results).
+The glibc
+.BR sigtimedwait ()
+wrapper function hides these details from us, transparently calling
+.BR rt_sigtimedwait ()
+when the kernel provides it.
+.\"
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
In normal usage, the calling program blocks the signals in
.I set
as a call to
.BR sigwaitinfo (),
and indeed this is what is done on Linux.
-.\"
-.SS C library/kernel differences
-On Linux,
-.BR sigwaitinfo ()
-is a library function implemented on top of
-.BR sigtimedwait ().
-.PP
-The glibc wrapper functions for
-.BR sigwaitinfo ()
-and
-.BR sigtimedwait ()
-silently ignore attempts to wait for the two real-time signals that
-are used internally by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.PP
-The original Linux system call was named
-.BR sigtimedwait ().
-However, with the addition of real-time signals in Linux 2.2,
-the fixed-size, 32-bit
-.I sigset_t
-type supported by that system call was no longer fit for purpose.
-Consequently, a new system call,
-.BR rt_sigtimedwait (),
-was added to support an enlarged
-.I sigset_t
-type.
-The new system call takes a fourth argument,
-.IR "size_t sigsetsize" ,
-which specifies the size in bytes of the signal set in
-.IR set .
-This argument is currently required to have the value
-.I sizeof(sigset_t)
-(or the error
-.B EINVAL
-results).
-The glibc
-.BR sigtimedwait ()
-wrapper function hides these details from us, transparently calling
-.BR rt_sigtimedwait ()
-when the kernel provides it.
-.\"
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
.PP
Other errors may be generated by the underlying protocol modules.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD.
+POSIX.1-2008.
.PP
-The
.B SOCK_NONBLOCK
and
.B SOCK_CLOEXEC
-flags are Linux-specific.
+are Linux-specific.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD.
.PP
.BR socket ()
appeared in 4.2BSD.
It is generally portable to/from
non-BSD systems supporting clones of the BSD socket layer (including
System\ V variants).
-.SH NOTES
+.PP
The manifest constants used under 4.x BSD for protocol families
are
.BR PF_UNIX ,
.BR sendmmsg (2)
T}
.TE
-.SH STANDARDS
-This call is specific to Linux, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
On some architectures\[em]for example, x86-64 and ARM\[em]there is no
.BR socketcall ()
system call; instead
.BR accept (2),
.BR bind (2),
and so on really are implemented as separate system calls.
+.SH STANDARDS
+Linux.
.PP
On x86-32,
.BR socketcall ()
.TP
.B EPROTONOSUPPORT
The specified protocol is not supported on this machine.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD.
-.BR socketpair ()
-first appeared in 4.2BSD.
-It is generally portable to/from
-non-BSD systems supporting clones of the BSD socket layer (including
-System\ V variants).
-.SH NOTES
+.SH VERSIONS
On Linux, the only supported domains for this call are
.B AF_UNIX
(or synonymously,
.B AF_TIPC
.\" commit: 70b03759e9ecfae400605fa34f3d7154cccbbba3
(since Linux 4.12).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD.
+.PP
+.BR socketpair ()
+first appeared in 4.2BSD.
+It is generally portable to/from
+non-BSD systems supporting clones of the BSD socket layer (including
+System\ V variants).
.PP
Since Linux 2.6.27,
.BR socketpair ()
or
.I off_out
was not NULL, but the corresponding file descriptor refers to a pipe.
-.SH VERSIONS
-The
-.BR splice ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
+.PP
+In Linux 2.6.30 and earlier,
+exactly one of
+.I fd_in
+and
+.I fd_out
+was required to be a pipe.
+Since Linux 2.6.31,
+.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
+both arguments may refer to pipes.
.SH NOTES
The three system calls
.BR splice (),
.\" the data and choose to forward it to two or more different
.\" users - for things like logging etc.).
.\"
-.PP
-In Linux 2.6.30 and earlier,
-exactly one of
-.I fd_in
-and
-.I fd_out
-was required to be a pipe.
-Since Linux 2.6.31,
-.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
-both arguments may refer to pipes.
.SH EXAMPLES
See
.BR tee (2).
.BR spufs .
By convention, it gets mounted in
.IR /spu .
-.SH VERSIONS
-The
-.BR spu_create ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-This call is Linux-specific and implemented only on the PowerPC
-architecture.
-Programs using this system call are not portable.
-.SH NOTES
-.BR spu_create ()
-is meant to be used from libraries that implement a more abstract
-interface to SPUs, not to be used from regular applications.
-See
-.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
-.UE
-for the recommended libraries.
+Linux on PowerPC.
+.SH HISTORY
+Linux 2.6.16.
.PP
Prior to the addition of the
.B SPU_CREATE_AFFINITY_SPU
system call took only three arguments (i.e., there was no
.I neighbor_fd
argument).
+.SH NOTES
+.BR spu_create ()
+is meant to be used from libraries that implement a more abstract
+interface to SPUs, not to be used from regular applications.
+See
+.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
+.UE
+for the recommended libraries.
.SH EXAMPLES
See
.BR spu_run (2)
The functionality is not provided by the current system, because
either the hardware does not provide SPUs or the spufs module is not
loaded.
-.SH VERSIONS
-The
-.BR spu_run ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-This call is Linux-specific and implemented only by the PowerPC
-architecture.
-Programs using this system call are not portable.
+Linux on PowerPC.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
.BR spu_run ()
is meant to be used from libraries that implement a more abstract
on a file whose size exceeds
.I (1<<31)\-1
bytes.
-.SH VERSIONS
-.BR fstatat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR stat (),
-.BR fstat (),
-.BR lstat ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1.2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR stat ()
+.TQ
+.BR fstat ()
+.TQ
+.BR lstat ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional
.\" .BR fstat ()
.\" error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4
.\" and
.\" .BR lstat ()
.\" error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
-.PP
-.BR fstatat ():
+.TP
+.BR fstatat ()
POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.PP
According to POSIX.1-2001,
.BR lstat ()
(They were introduced in BSD.
The interpretation differs between systems,
and possibly on a single system when NFS mounts are involved.)
-.SH NOTES
.SS C library/kernel differences
Over time, increases in the size of the
.I stat
.TP
.B EOVERFLOW
Some values were too large to be represented in the returned struct.
-.SH STANDARDS
-Linux-specific.
-The Linux
-.BR statfs ()
-was inspired by the 4.4BSD one
-(but they do not use the same structure).
-.SH NOTES
-The
-.I __fsword_t
-type used for various fields in the
-.I statfs
-structure definition is a glibc internal type,
-not intended for public use.
-This leaves the programmer in a bit of a conundrum when trying to copy
-or compare these fields to local variables in a program.
-Using
-.I "unsigned\ int"
-for such variables suffices on most systems.
-.PP
-The original Linux
-.BR statfs ()
-and
-.BR fstatfs ()
-system calls were not designed with extremely large file sizes in mind.
-Subsequently, Linux 2.6
-added new
-.BR statfs64 ()
-and
-.BR fstatfs64 ()
-system calls that employ a new structure,
-.IR statfs64 .
-The new structure contains the same fields as the original
-.I statfs
-structure, but the sizes of various fields are increased,
-to accommodate large file sizes.
-The glibc
-.BR statfs ()
-and
-.BR fstatfs ()
-wrapper functions transparently deal with the kernel differences.
-.PP
-Some systems have only \fI<sys/vfs.h>\fP, other systems also have
-\fI<sys/statfs.h>\fP, where the former includes the latter.
-So it seems
-including the former is the best choice.
-.PP
-LSB has deprecated the library calls
-.BR statfs ()
-and
-.BR fstatfs ()
-and tells us to use
-.BR statvfs (3)
-and
-.BR fstatvfs (3)
-instead.
+.SH VERSIONS
.SS The f_fsid field
Solaris, Irix, and POSIX have a system call
.BR statvfs (2)
can be used as the second argument to the
.BR sysfs (2)
system call.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+The Linux
+.BR statfs ()
+was inspired by the 4.4BSD one
+(but they do not use the same structure).
+.PP
+The original Linux
+.BR statfs ()
+and
+.BR fstatfs ()
+system calls were not designed with extremely large file sizes in mind.
+Subsequently, Linux 2.6
+added new
+.BR statfs64 ()
+and
+.BR fstatfs64 ()
+system calls that employ a new structure,
+.IR statfs64 .
+The new structure contains the same fields as the original
+.I statfs
+structure, but the sizes of various fields are increased,
+to accommodate large file sizes.
+The glibc
+.BR statfs ()
+and
+.BR fstatfs ()
+wrapper functions transparently deal with the kernel differences.
+.PP
+LSB has deprecated the library calls
+.BR statfs ()
+and
+.BR fstatfs ()
+and tells us to use
+.BR statvfs (3)
+and
+.BR fstatvfs (3)
+instead.
+.SH NOTES
+The
+.I __fsword_t
+type used for various fields in the
+.I statfs
+structure definition is a glibc internal type,
+not intended for public use.
+This leaves the programmer in a bit of a conundrum when trying to copy
+or compare these fields to local variables in a program.
+Using
+.I "unsigned\ int"
+for such variables suffices on most systems.
+.PP
+Some systems have only \fI<sys/vfs.h>\fP, other systems also have
+\fI<sys/statfs.h>\fP, where the former includes the latter.
+So it seems
+including the former is the best choice.
.SH BUGS
From Linux 2.6.38 up to and including Linux 3.1,
.\" broken in commit ff0c7d15f9787b7e8c601533c015295cc68329f8
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR statx ()
-was added in Linux 4.11; library support was added in glibc 2.28.
.SH STANDARDS
-.BR statx ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 4.11,
+glibc 2.28.
.SH SEE ALSO
.BR ls (1),
.BR stat (1),
.B CAP_SYS_TIME
privilege is required.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
-.SH NOTES
+.PP
Starting with glibc 2.31,
this function is no longer available to newly linked applications
and is no longer declared in
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-This system call is provided on the PowerPC architecture
-since Linux 2.6.25.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.25 (PowerPC).
+.PP
The system call is provided only if the kernel is configured with
.BR CONFIG_PPC_64K_PAGES .
-No library support is provided.
-.SH STANDARDS
-This system call is Linux-specific.
.SH NOTES
Normal page protections (at the 64-kB page level) also apply;
the subpage protection mechanism is an additional constraint,
Alternatively, the maximum number of swap files are already in use;
see NOTES below.
.SH STANDARDS
-These functions are Linux-specific and should not be used in programs
-intended to be portable.
-The second
+Linux.
+.SH HISTORY
+The
.I swapflags
argument was introduced in Linux 1.3.2.
.SH NOTES
.B EROFS
.I linkpath
is on a read-only filesystem.
-.SH VERSIONS
-.BR symlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR symlink ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR symlink ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error codes EDQUOT and ENOSYS.
.\" See
.\" .BR open (2)
.\" re multiple files with the same name, and NFS.
-.PP
-.BR symlinkat ():
+.TP
+.BR symlinkat ()
POSIX.1-2008.
-.SH NOTES
-No checking of
-.I target
-is done.
-.PP
-Deleting the name referred to by a symbolic link will actually delete the
-file (unless it also has other hard links).
-If this behavior is not desired, use
-.BR link (2).
+Linux 2.6.16,
+glibc 2.4.
.SS glibc notes
On older kernels where
.BR symlinkat ()
that corresponds to the
.I newdirfd
argument.
+.SH NOTES
+No checking of
+.I target
+is done.
+.PP
+Deleting the name referred to by a symbolic link will actually delete the
+file (unless it also has other hard links).
+If this behavior is not desired, use
+.BR link (2).
.SH SEE ALSO
.BR ln (1),
.BR namei (1),
system call, and some previous write failed due to insufficient
storage space.
.SH VERSIONS
-.BR syncfs ()
-first appeared in Linux 2.6.39;
-library support was added in glibc 2.14.
-.SH STANDARDS
-.BR sync ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
-.BR syncfs ()
-is Linux-specific.
-.SH NOTES
-Since glibc 2.2.2, the Linux prototype for
-.BR sync ()
-is as listed above,
-following the various standards.
-In glibc 2.2.1 and earlier,
-it was "int sync(void)", and
-.BR sync ()
-always returned 0.
-.PP
According to the standard specification (e.g., POSIX.1-2001),
.BR sync ()
schedules the writes, but may return before the actual
.BR fsync ()
called on every file in
the system or filesystem respectively.
+.SH STANDARDS
+.TP
+.BR sync ()
+POSIX.1-2008.
+.TP
+.BR syncfs ()
+Linux.
+.SH HISTORY
+.TP
+.BR sync ()
+POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR syncfs ()
+Linux 2.6.39,
+glibc 2.14.
+.PP
+Since glibc 2.2.2, the Linux prototype for
+.BR sync ()
+is as listed above,
+following the various standards.
+In glibc 2.2.1 and earlier,
+it was "int sync(void)", and
+.BR sync ()
+always returned 0.
.PP
In mainline kernel versions prior to Linux 5.8,
.BR syncfs ()
refers to something other than a regular file, a block device, or
a directory.
.SH VERSIONS
-.BR sync_file_range ()
-appeared in Linux 2.6.17.
-.SH STANDARDS
-This system call is Linux-specific, and should be avoided
-in portable programs.
-.SH NOTES
.SS sync_file_range2()
Some architectures (e.g., PowerPC, ARM)
need 64-bit arguments to be aligned in a suitable pair of registers.
.PP
The behavior of this system call is otherwise exactly the same as
.BR sync_file_range ().
-.PP
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.17.
+.SS sync_file_range2()
A system call with this signature first appeared on the ARM architecture
in Linux 2.6.20, with the name
.BR arm_sync_file_range ().
.BR sync_file_range2 ()
under the name
.BR sync_file_range ().
+.SH NOTES
.SH SEE ALSO
.BR fdatasync (2),
.BR fsync (2),
.B ENOTDIR
.I name
was not found.
-.SH VERSIONS
-This system call first appeared in Linux 1.3.57.
-It was removed in Linux 5.5; glibc support was removed in glibc 2.32.
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Linux 1.3.57.
+Removed in Linux 5.5, glibc 2.32.
+.PP
It originated in
4.4BSD.
Only Linux has the
.I option
is invalid.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
-.SH NOTES
+.PP
This System-V derived system call is obsolete; don't use it.
On systems with
.IR /proc ,
.B EFAULT
.I info
is not a valid address.
-.SH VERSIONS
-.BR sysinfo ()
-first appeared in Linux 0.98.pl6.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Linux 0.98.pl6.
.SH NOTES
All of the information provided by this system call is also available via
.I /proc/meminfo
System call was interrupted by a signal; nothing was read.
(This can be seen only during a trace.)
.SH STANDARDS
-This system call is Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
From the very start, people noted that it is unfortunate that
a system call and a library routine of the same name are entirely
different animals.
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-The
-.BR tee ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
.SH NOTES
Conceptually,
.BR tee ()
an invalid address may instead trigger a
.B SIGSEGV
signal.
-.SH STANDARDS
-SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
-.\" Under 4.3BSD, this call is obsoleted by
-.\" .BR gettimeofday (2).
-POSIX does not specify any error conditions.
-.SH NOTES
+.SH VERSIONS
POSIX.1 defines
.I seconds since the Epoch
using a formula that approximates the number of seconds between a
Applications intended to run after 2038 should use ABIs with
.I time_t
wider than 32 bits.
+.SS C library/kernel differences
+On some architectures, an implementation of
+.BR time ()
+is provided in the
+.BR vdso (7).
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+.\" Under 4.3BSD, this call is obsoleted by
+.\" .BR gettimeofday (2).
.SH BUGS
Error returns from this system call are indistinguishable from
successful reports that the time is a few seconds
When
.I tloc
is NULL, the call cannot fail.
-.\"
-.SS C library/kernel differences
-On some architectures, an implementation of
-.BR time ()
-is provided in the
-.BR vdso (7).
.SH SEE ALSO
.BR date (1),
.BR gettimeofday (2),
.B CAP_WAKE_ALARM
capability.
.SH VERSIONS
-This system call is available since Linux 2.6.
+.SS C library/kernel differences
+Part of the implementation of the POSIX timers API is provided by glibc.
+.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
+In particular:
+.IP \[bu] 3
+Much of the functionality for
+.B SIGEV_THREAD
+is implemented within glibc, rather than the kernel.
+(This is necessarily so,
+since the thread involved in handling the notification is one
+that must be managed by the C library POSIX threads implementation.)
+Although the notification delivered to the process is via a thread,
+internally the NPTL implementation uses a
+.I sigev_notify
+value of
+.B SIGEV_THREAD_ID
+along with a real-time signal that is reserved by the implementation (see
+.BR nptl (7)).
+.IP \[bu]
+The implementation of the default case where
+.I evp
+is NULL is handled inside glibc,
+which invokes the underlying system call with a suitably populated
+.I sigevent
+structure.
+.IP \[bu]
+The timer IDs presented at user level are maintained by glibc,
+which maps these IDs to the timer IDs employed by the kernel.
+.\" See the glibc source file kernel-posix-timers.h for the structure
+.\" that glibc uses to map user-space timer IDs to kernel timer IDs
+.\" The kernel-level timer ID is exposed via siginfo.si_tid.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
+.PP
+Prior to Linux 2.6,
+glibc provided an incomplete user-space implementation
+.RB ( CLOCK_REALTIME
+timers only) using POSIX threads,
+and before glibc 2.17,
+.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
+the implementation falls back to this technique on systems
+running kernels older than Linux 2.6.
.SH NOTES
A program may create multiple interval timers using
.BR timer_create ().
Kernel support can be disabled via the
.B CONFIG_POSIX_TIMERS
option.
-.\"
-.SS C library/kernel differences
-Part of the implementation of the POSIX timers API is provided by glibc.
-.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
-In particular:
-.IP \[bu] 3
-Much of the functionality for
-.B SIGEV_THREAD
-is implemented within glibc, rather than the kernel.
-(This is necessarily so,
-since the thread involved in handling the notification is one
-that must be managed by the C library POSIX threads implementation.)
-Although the notification delivered to the process is via a thread,
-internally the NPTL implementation uses a
-.I sigev_notify
-value of
-.B SIGEV_THREAD_ID
-along with a real-time signal that is reserved by the implementation (see
-.BR nptl (7)).
-.IP \[bu]
-The implementation of the default case where
-.I evp
-is NULL is handled inside glibc,
-which invokes the underlying system call with a suitably populated
-.I sigevent
-structure.
-.IP \[bu]
-The timer IDs presented at user level are maintained by glibc,
-which maps these IDs to the timer IDs employed by the kernel.
-.\" See the glibc source file kernel-posix-timers.h for the structure
-.\" that glibc uses to map user-space timer IDs to kernel timer IDs
-.\" The kernel-level timer ID is exposed via siginfo.si_tid.
-.PP
-The POSIX timers system calls first appeared in Linux 2.6.
-Prior to this,
-glibc provided an incomplete user-space implementation
-.RB ( CLOCK_REALTIME
-timers only) using POSIX threads,
-and before glibc 2.17,
-.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
-the implementation falls back to this technique on systems
-running kernels older than Linux 2.6.
.SH EXAMPLES
The program below takes two arguments: a sleep period in seconds,
and a timer frequency in nanoseconds.
.B EINVAL
.I timerid
is not a valid timer ID.
-.SH VERSIONS
-This system call is available since Linux 2.6.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH SEE ALSO
.BR clock_gettime (2),
.BR timer_create (2),
.I timerid
is not a valid timer ID.
.SH VERSIONS
-This system call is available since Linux 2.6.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
When timer notifications are delivered via signals
.RB ( SIGEV_SIGNAL ),
on Linux it is also possible to obtain the overrun count via the
timer notifications using signals.
.\" FIXME . Austin bug filed, 11 Feb 09
.\" https://www.austingroupbugs.net/view.php?id=95
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH BUGS
POSIX.1 specifies that if the timer overrun count
is equal to or greater than an implementation-defined maximum,
is negative; or
.I new_value.it_value.tv_nsec
is negative or greater than 999,999,999.
-.SH VERSIONS
-These system calls are available since Linux 2.6.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR timer_create (2).
.\" In older kernel versions, no check was made for invalid flags.
.I flags
is invalid.
-.SH VERSIONS
-These system calls are available since Linux 2.6.25.
-Library support is provided since glibc 2.8.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.25,
+glibc 2.8.
.SH NOTES
Suppose the following scenario for
.B CLOCK_REALTIME
.B EFAULT
.I tms
points outside the process's address space.
+.SH VERSIONS
+On Linux,
+the
+.I buf
+argument can be specified as NULL,
+with the result that
+.BR times ()
+just returns a function result.
+However,
+POSIX does not specify this behavior,
+and most
+other UNIX implementations require a non-NULL value for
+.IR buf .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001,
-POSIX.1-2008,
SVr4,
4.3BSD.
-.SH NOTES
-The number of clock ticks per second can be obtained using:
-.PP
-.in +4n
-.EX
-sysconf(_SC_CLK_TCK);
-.EE
-.in
.PP
In POSIX.1-1996 the symbol \fBCLK_TCK\fP (defined in
.IR <time.h> )
.\" or waitpid() returns the process ID of this terminated child.
.PP
On Linux,
-the
-.I buf
-argument can be specified as NULL,
-with the result that
-.BR times ()
-just returns a function result.
-However,
-POSIX does not specify this behavior,
-and most
-other UNIX implementations require a non-NULL value for
-.IR buf .
-.PP
-Note that
-.BR clock (3)
-also returns a value of type
-.IR clock_t ,
-but this value is measured in units of
-.BR CLOCKS_PER_SEC ,
-not the clock ticks used by
-.BR times ().
-.PP
-On Linux,
the \[lq]arbitrary point in the past\[rq]
from which the return value of
.BR times ()
.\" .PP
.\" On older systems the number of clock ticks per second is given
.\" by the variable HZ.
-.SS Historical
+.PP
SVr1-3 returns
.I long
and the struct members are of type
because it had no type
.I time_t
yet.
+.SH NOTES
+The number of clock ticks per second can be obtained using:
+.PP
+.in +4n
+.EX
+sysconf(_SC_CLK_TCK);
+.EE
+.in
+.PP
+Note that
+.BR clock (3)
+also returns a value of type
+.IR clock_t ,
+but this value is measured in units of
+.BR CLOCKS_PER_SEC ,
+not the clock ticks used by
+.BR times ().
.SH BUGS
A limitation of the Linux system call conventions on some architectures
(notably i386) means that on Linux 2.6 there is a small time window
.TP
.B ESRCH
No process with the specified thread ID (and thread group ID) exists.
-.SH VERSIONS
-.BR tkill ()
-is supported since Linux 2.4.19 / 2.5.4.
-.BR tgkill ()
-was added in Linux 2.5.75.
-.PP
-Library support for
-.BR tgkill ()
-was added in glibc 2.30.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR tkill ()
-and
+Linux 2.4.19 / 2.5.4.
+.TP
.BR tgkill ()
-are Linux-specific and should not be used
-in programs that are intended to be portable.
+Linux 2.5.75,
+glibc 2.30.
.SH NOTES
See the description of
.B CLONE_THREAD
in
.BR clone (2)
for an explanation of thread groups.
-.PP
-Before glibc 2.30, there was also no wrapper function for
-.BR tgkill ().
.SH SEE ALSO
.BR clone (2),
.BR gettid (2),
either error for this case.
(Linux produces
.BR EINVAL .)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD, SVr4 (these calls first appeared in 4.2BSD).
-.\" POSIX.1-1996 has
-.\" .BR ftruncate ().
-.\" POSIX.1-2001 also has
-.\" .BR truncate (),
-.\" as an XSI extension.
-.\" .LP
-.\" SVr4 documents additional
-.\" .BR truncate ()
-.\" error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
-.\" .BR ftruncate ()
-.\" an additional EAGAIN error condition.
-.SH NOTES
-.BR ftruncate ()
-can also be used to set the size of a POSIX shared memory object; see
-.BR shm_open (3).
-.PP
+.SH VERSIONS
The details in DESCRIPTION are for XSI-compliant systems.
For non-XSI-compliant systems, the POSIX standard allows
two behaviors for
a notable example on Linux is VFAT.
.\" At the very least: OSF/1, Solaris 7, and FreeBSD conform, mtk, Jan 2002
.PP
+On some 32-bit architectures,
+the calling signature for these system calls differ,
+for the reasons described in
+.BR syscall (2).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+4.4BSD, SVr4 (first appeared in 4.2BSD).
+.\" POSIX.1-1996 has
+.\" .BR ftruncate ().
+.\" POSIX.1-2001 also has
+.\" .BR truncate (),
+.\" as an XSI extension.
+.\" .LP
+.\" SVr4 documents additional
+.\" .BR truncate ()
+.\" error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
+.\" .BR ftruncate ()
+.\" an additional EAGAIN error condition.
+.PP
The original Linux
.BR truncate ()
and
However, these details can be ignored by applications using glibc, whose
wrapper functions transparently employ the more recent system calls
where they are available.
-.PP
-On some 32-bit architectures,
-the calling signature for these system calls differ,
-for the reasons described in
-.BR syscall (2).
+.SH NOTES
+.BR ftruncate ()
+can also be used to set the size of a POSIX shared memory object; see
+.BR shm_open (3).
.SH BUGS
A header file bug in glibc 2.12 meant that the minimum value of
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12037
This system call always succeeds and the previous value of the mask
is returned.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
A child process created via
.BR fork (2)
.TP
.B EPERM
The caller does not have the required privileges.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
.B MNT_DETACH
and
.B MNT_EXPIRE
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092
are available since glibc 2.11.
-.SH STANDARDS
-These functions are Linux-specific and should not be used in
-programs intended to be portable.
+.PP
+The original
+.BR umount ()
+function was called as \fIumount(device)\fP and would return
+.B ENOTBLK
+when called with something other than a block device.
+In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
+support anonymous devices.
+In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
+leaving only \fIumount(dir)\fP (since now devices can be mounted
+in more than one place, so specifying the device does not suffice).
.SH NOTES
.SS umount() and shared mounts
Shared mounts cause any mount activity on a mount, including
prior to
.BR umount ()
being called.
-.SS Historical details
-The original
-.BR umount ()
-function was called as \fIumount(device)\fP and would return
-.B ENOTBLK
-when called with something other than a block device.
-In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
-support anonymous devices.
-In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
-leaving only \fIumount(dir)\fP (since now devices can be mounted
-in more than one place, so specifying the device does not suffice).
.SH SEE ALSO
.BR mount (2),
.BR mount_namespaces (7),
.B EFAULT
.I buf
is not valid.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
-.PP
+.SH VERSIONS
The
.I domainname
member (the NIS or YP domain name) is a GNU extension.
-.SH NOTES
-The kernel has the name, release, version, and supported machine type built in.
-Conversely, the
-.I nodename
-field is configured by the administrator to match the network
-(this is what the BSD historically calls the "hostname",
-and is set via
-.BR sethostname (2)).
-Similarly, the
-.I domainname
-field is set via
-.BR setdomainname (2).
.PP
The length of the fields in the struct varies.
Some operating systems
idea to use any of these constants; just use sizeof(...).
SVr4 uses 257, "to support Internet hostnames"
\[em] this is the largest value likely to be encountered in the wild.
-.PP
-Part of the utsname information is also accessible via
-.IR /proc/sys/kernel/ { ostype ,
-.IR hostname ,
-.IR osrelease ,
-.IR version ,
-.IR domainname }.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
.SS C library/kernel differences
Over time, increases in the size of the
.I utsname
.BR uname ()
wrapper function hides these details from applications,
invoking the most recent version of the system call provided by the kernel.
+.SH NOTES
+The kernel has the name, release, version, and supported machine type built in.
+Conversely, the
+.I nodename
+field is configured by the administrator to match the network
+(this is what the BSD historically calls the "hostname",
+and is set via
+.BR sethostname (2)).
+Similarly, the
+.I domainname
+field is set via
+.BR setdomainname (2).
+.PP
+Part of the utsname information is also accessible via
+.IR /proc/sys/kernel/ { ostype ,
+.IR hostname ,
+.IR osrelease ,
+.IR version ,
+.IR domainname }.
.SH SEE ALSO
.BR uname (1),
.BR getdomainname (2),
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR unlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR unlink ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR unlink ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
-.PP
-.BR unlinkat ():
+.TP
+.BR unlinkat ()
POSIX.1-2008.
-.SH NOTES
-.SS glibc notes
+Linux 2.6.16,
+glibc 2.4.
+.SS glibc
On older kernels where
.BR unlinkat ()
is unavailable, the glibc wrapper function falls back to the use of
See the discussion of the
.B ENOSPC
error above.
-.SH VERSIONS
-The
-.BR unshare ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-The
-.BR unshare ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
Not all of the process attributes that can be shared when
a new process is created using
is not an executable of a known type;
for example, it does not have the correct magic numbers.
.SH STANDARDS
-.BR uselib ()
-is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc before glibc 2.23 did export an ABI for this system call.
capability in the initial user namespace), and
.I /proc/sys/vm/unprivileged_userfaultfd
has the value 0.
-.SH VERSIONS
-The
-.BR userfaultfd ()
-system call first appeared in Linux 4.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.3.
.PP
-The support for hugetlbfs and shared memory areas and
+Support for hugetlbfs and shared memory areas and
non-page-fault events was added in Linux 4.11
-.SH STANDARDS
-.BR userfaultfd ()
-is Linux-specific and should not be used in programs intended to be
-portable.
.SH NOTES
The userfaultfd mechanism can be used as an alternative to
traditional user-space paging techniques based on the use of the
.I dev
does not support this operation,
or any version of Linux before Linux 1.3.16.
-.SH VERSIONS
-Since glibc 2.28, glibc no longer provides a wrapper for this system call.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
+Removed in glibc 2.28.
.\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
.\" but has no ENOSYS condition.
-.SH NOTES
+.PP
.BR ustat ()
is deprecated and has been provided only for compatibility.
All new programs should use
.I path
resides on a read-only filesystem.
.SH STANDARDS
-.BR utime ():
-SVr4, POSIX.1-2001.
-POSIX.1-2008 marks
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR utime ()
-as obsolete.
-.PP
-.BR utimes ():
+SVr4, POSIX.1-2001.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR utimes ()
4.3BSD, POSIX.1-2001.
.SH NOTES
Linux does not allow changing the timestamps on an immutable file,
.ad
.sp 1
.SH VERSIONS
-.BR utimensat ()
-was added in Linux 2.6.22;
-glibc support was added with glibc 2.6.
-.PP
-Support for
-.BR futimens ()
-first appeared in glibc 2.6.
-.SH STANDARDS
-.BR futimens ()
-and
-.BR utimensat ()
-are specified in POSIX.1-2008.
-.SH NOTES
-.BR utimensat ()
-obsoletes
-.BR futimesat (2).
-.PP
-On Linux, timestamps cannot be changed for a file marked immutable,
-and the only change permitted for files marked append-only is to
-set the timestamps to the current time.
-(This is consistent with the historical behavior of
-.BR utime (2)
-and
-.BR utimes (2)
-on Linux.)
-.PP
-If both
-.I tv_nsec
-fields are specified as
-.BR UTIME_OMIT ,
-then the Linux implementation of
-.BR utimensat ()
-succeeds even if the file referred to by
-.I dirfd
-and
-.I pathname
-does not exist.
.SS C library/kernel ABI differences
On Linux,
.BR futimens ()
the wrapper function returns the error
.B EINVAL
in this case.
+.SH STANDARDS
+POSIX.1-2008.
+.SH VERSIONS
+.TP
+.BR utimensat ()
+Linux 2.6.22,
+glibc 2.6.
+POSIX.1-2008.
+.TP
+.BR futimens ()
+glibc 2.6.
+POSIX.1-2008.
+.SH NOTES
+.BR utimensat ()
+obsoletes
+.BR futimesat (2).
+.PP
+On Linux, timestamps cannot be changed for a file marked immutable,
+and the only change permitted for files marked append-only is to
+set the timestamps to the current time.
+(This is consistent with the historical behavior of
+.BR utime (2)
+and
+.BR utimes (2)
+on Linux.)
+.PP
+If both
+.I tv_nsec
+fields are specified as
+.BR UTIME_OMIT ,
+then the Linux implementation of
+.BR utimensat ()
+succeeds even if the file referred to by
+.I dirfd
+and
+.I pathname
+does not exist.
.SH BUGS
Several bugs afflict
.BR utimensat ()
was tricky: for example, not modifying data
in the parent process depended on knowing which variables were
held in a register.
-.SH STANDARDS
-4.3BSD; POSIX.1-2001 (but marked OBSOLETE).
-POSIX.1-2008 removes the specification of
-.BR vfork ().
-.PP
+.SH VERSIONS
The requirements put on
.BR vfork ()
by the standards are weaker than those put on
.BR execve (2),
and cannot rely on any specific behavior with respect to shared memory.
.\" In AIXv3.1 vfork is equivalent to fork.
-.SH NOTES
+.PP
Some consider the semantics of
.BR vfork ()
to be an architectural blemish, and the 4.2BSD man page stated:
to the size of the parent process (if strict overcommitting is in force)
or overcommitting memory with the risk that a process is terminated
by the out-of-memory (OOM) killer.
-.\"
-.SS Caveats
-The child process should take care not to modify the memory in unintended ways,
-since such changes will be seen by the parent process once
-the child terminates or executes another program.
-In this regard, signal handlers can be especially problematic:
-if a signal handler that is invoked in the child of
-.BR vfork ()
-changes memory, those changes may result in an inconsistent process state
-from the perspective of the parent process
-(e.g., memory changes would be visible in the parent,
-but changes to the state of open file descriptors would not be visible).
-.PP
-When
-.BR vfork ()
-is called in a multithreaded process,
-only the calling thread is suspended until the child terminates
-or executes a new program.
-This means that the child is sharing an address space with other running code.
-This can be dangerous if another thread in the parent process
-changes credentials (using
-.BR setuid (2)
-or similar),
-since there are now two processes with different privilege levels
-running in the same address space.
-As an example of the dangers,
-suppose that a multithreaded program running as root creates a child using
-.BR vfork ().
-After the
-.BR vfork (),
-a thread in the parent process drops the process to an unprivileged user
-in order to run some untrusted code
-(e.g., perhaps via plug-in opened with
-.BR dlopen (3)).
-In this case, attacks are possible where the parent process uses
-.BR mmap (2)
-to map in code that will be executed by the privileged child process.
-.\"
.SS Linux notes
Fork handlers established using
.BR pthread_atfork (3)
CLONE_VM | CLONE_VFORK | SIGCHLD
.EE
.in
-.SS History
+.SH STANDARDS
+None.
+.SH HISTORY
+4.3BSD; POSIX.1-2001 (but marked OBSOLETE).
+POSIX.1-2008 removes the specification of
+.BR vfork ().
+.PP
The
.BR vfork ()
system call appeared in 3.0BSD.
Since Linux 2.2.0-pre9 (on i386, somewhat later on
other architectures) it is an independent system call.
Support was added in glibc 2.0.112.
+.\"
+.SH CAVEATS
+The child process should take care not to modify the memory in unintended ways,
+since such changes will be seen by the parent process once
+the child terminates or executes another program.
+In this regard, signal handlers can be especially problematic:
+if a signal handler that is invoked in the child of
+.BR vfork ()
+changes memory, those changes may result in an inconsistent process state
+from the perspective of the parent process
+(e.g., memory changes would be visible in the parent,
+but changes to the state of open file descriptors would not be visible).
+.PP
+When
+.BR vfork ()
+is called in a multithreaded process,
+only the calling thread is suspended until the child terminates
+or executes a new program.
+This means that the child is sharing an address space with other running code.
+This can be dangerous if another thread in the parent process
+changes credentials (using
+.BR setuid (2)
+or similar),
+since there are now two processes with different privilege levels
+running in the same address space.
+As an example of the dangers,
+suppose that a multithreaded program running as root creates a child using
+.BR vfork ().
+After the
+.BR vfork (),
+a thread in the parent process drops the process to an unprivileged user
+in order to run some untrusted code
+(e.g., perhaps via plug-in opened with
+.BR dlopen (3)).
+In this case, attacks are possible where the parent process uses
+.BR mmap (2)
+to map in code that will be executed by the privileged child process.
+.\"
.SH BUGS
Details of the signal handling are obscure and differ between systems.
The BSD man page states:
.B CAP_SYS_TTY_CONFIG
capability is required.
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
.SH SEE ALSO
.BR init (1),
.BR capabilities (7)
(This is a kernel sanity check; the saved
stack should exist only within vm86 mode itself.)
.SH STANDARDS
-This call is specific to Linux on 32-bit Intel processors,
-and should not be used in programs intended to be portable.
+Linux on 32-bit Intel processors.
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-The
-.BR vmsplice ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
.SH NOTES
.BR vmsplice ()
follows the other vectorized read/write type functions when it comes to
.I pid
is equal to
.BR INT_MIN .
+.SH VERSIONS
+.SS C library/kernel differences
+.BR wait ()
+is actually a library function that (in glibc) is implemented as a call to
+.BR wait4 (2).
+.PP
+On some architectures, there is no
+.BR waitpid ()
+system call;
+.\" e.g., i386 has the system call, but not x86-64
+instead, this interface is implemented via a C library
+wrapper function that calls
+.BR wait4 (2).
+.PP
+The raw
+.BR waitid ()
+system call takes a fifth argument, of type
+.IR "struct rusage\ *" .
+If this argument is non-NULL,
+then it is used to return resource usage information about the child,
+in the same manner as
+.BR wait4 (2).
+See
+.BR getrusage (2)
+for details.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES
A child that terminates, but has not been waited for becomes a "zombie".
the
.B __WALL
flag is automatically implied if the child is being ptraced.
-.SS C library/kernel differences
-.BR wait ()
-is actually a library function that (in glibc) is implemented as a call to
-.BR wait4 (2).
-.PP
-On some architectures, there is no
-.BR waitpid ()
-system call;
-.\" e.g., i386 has the system call, but not x86-64
-instead, this interface is implemented via a C library
-wrapper function that calls
-.BR wait4 (2).
-.PP
-The raw
-.BR waitid ()
-system call takes a fifth argument, of type
-.IR "struct rusage\ *" .
-If this argument is non-NULL,
-then it is used to return resource usage information about the child,
-in the same manner as
-.BR wait4 (2).
-See
-.BR getrusage (2)
-for details.
.SH BUGS
According to POSIX.1-2008, an application calling
.BR waitid ()
As for
.BR waitpid (2).
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.PP
SUSv1 included a specification of
.BR wait3 (),
but marked it LEGACY;
SUSv3 removed it.
-.SH NOTES
+.PP
Including
.I <sys/time.h>
is not required these days, but increases portability.
Other errors may occur, depending on the object connected to
.IR fd .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
.I must
zero-fill this structure on initialization.
.SH STANDARDS
-This type is Linux-specific.
+Linux.
.SH SEE ALSO
.BR openat2 (2)
CPU set of the specified cardinality.
.PP
The other functions do not return a value.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
The
.BR CPU_ZERO (),
.BR CPU_SET (),
and
.BR CPU_EQUAL_S ()
first appeared in glibc 2.7.
-.SH STANDARDS
-These interfaces are Linux-specific.
.SH NOTES
To duplicate a CPU set, use
.BR memcpy (3).
respectively,
that represent a large positive value, possibly positive infinity.
.SH STANDARDS
+C11.
+.SH HISTORY
C99.
.PP
On a glibc system, the macro
These macros may raise the "invalid" floating-point exception
when any of the arguments is NaN.
.SH STANDARDS
-These nonstandard macros are present in glibc and the BSDs.
+GNU, BSD.
.SH NOTES
If either of the arguments is of a floating-point type,
you might prefer to use
.BR MB_LEN_MAX ].
The value 1 denotes traditional 8-bit encoded characters.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR MB_LEN_MAX (3),
.BR mblen (3),
.SH RETURN VALUE
A constant integer greater than zero.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The entities
.B MB_LEN_MAX
This is especially useful for writing type-generic macros,
that will behave differently depending on the type of the argument.
.SH STANDARDS
-C11 and later.
+C11.
+.SH HISTORY
+C11.
.SH EXAMPLES
The following program demonstrates how to write
a replacement for the standard
.BR __ppc_get_timebase_freq ()
returns a 64-bit unsigned integer that represents the frequency at
which the Time Base Register is updated.
-.SH VERSIONS
-GNU C Library support for
-.\" commit d9dc34cd569bcfe714fe8c708e58c028106e8b2e
+.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
.BR __ppc_get_timebase ()
-has been provided since glibc 2.16 and
-.\" commit 8ad11b9a9cf1de82bd7771306b42070b91417c11
+.\" commit d9dc34cd569bcfe714fe8c708e58c028106e8b2e
+glibc 2.16.
+.TP
.BR __ppc_get_timebase_freq ()
-has been available since glibc 2.17.
-.SH STANDARDS
-Both functions are nonstandard GNU extensions.
+.\" commit 8ad11b9a9cf1de82bd7771306b42070b91417c11
+glibc 2.17.
.SH EXAMPLES
The following program will calculate the time, in microseconds, spent
between two calls to
.hy
.ad
.sp 1
-.SH VERSIONS
-The functions
-.BR __ppc_set_ppr_med (),
-.BR __ppc_set_ppr_low (),
-and
+.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
+.BR __ppc_set_ppr_med ()
+.TQ
+.BR __ppc_set_ppr_low ()
+.TQ
.BR __ppc_set_ppr_med_low ()
-are provided since glibc 2.18.
-The functions
+glibc 2.18.
+.TP
.BR __ppc_set_ppr_very_low ()
-and
+.TQ
.BR __ppc_set_ppr_med_high ()
-first appeared in glibc 2.23.
-.SH STANDARDS
-These functions are nonstandard GNU extensions.
+glibc 2.23.
.SH NOTES
The functions
.BR __ppc_set_ppr_very_low ()
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions first appeared in glibc 2.18.
.SH STANDARDS
-These functions are nonstandard GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.18.
.SH SEE ALSO
.BR __ppc_set_ppr_med (3)
.PP
This was used to control floating-point precision,
rounding and floating-point exceptions.
.SH STANDARDS
-This function was a nonstandard GNU extension.
+GNU.
+.SH HISTORY
+Removed in glibc 2.1.
.SH NOTES
-As of glibc 2.1 this function does not exist anymore.
There are new functions from C99, with prototypes in
.IR <fenv.h> ,
to control FPU rounding modes, like
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The value returned by
.BR l64a ()
.ad
.sp 1
.SH STANDARDS
-SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C89, C99.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+SVr4, POSIX.1-2001, 4.3BSD, C89.
+.PP
Up until glibc 2.26,
if the
.BR abort ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99, SVr4, 4.3BSD.
.\" POSIX.1 (1996 edition) requires only the
.\" .BR abs ()
.\" function.
+.PP
C89 only
includes the
.BR abs ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD, C89.
+C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR asin (3),
.BR atan (3),
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR addseverity ()
-is provided since glibc 2.1.
.SH STANDARDS
-This function is not specified in the X/Open Portability Guide
-although the
-.BR fmtmsg (3)
-function is.
-It is available on System V
-systems.
+GNU.
+.SH HISTORY
+glibc 2.1.
+System V.
.SH NOTES
New severity classes can also be added by setting the environment variable
.BR SEV_LEVEL .
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, System V.
.SH NOTES
The adjustment that
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_cancel ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_error ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_fsync ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR aio_cancel (3),
.BR aio_error (3),
worker thread should wait for further requests before terminating,
after having completed a previous request.
The default value is 1.
-.SH VERSIONS
-The
-.BR aio_init ()
-function is available since glibc 2.1.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR aio (7)
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_read ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control block before use.
The control block must not be changed while the read operation
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_return ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_suspend ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.PP
POSIX doesn't specify the parameters to be
.IR restrict ;
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR aio_write ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control block before use.
The control block must not be changed while the write operation
.ad
.sp 1
.SH STANDARDS
-This function is not in POSIX.1.
-.PP
-.BR alloca ()
-originates from PWB and 32V, and appears in all their derivatives.
+None.
+.SH HISTORY
+PWB, 32V.
.SH NOTES
The
.BR alloca ()
.ad
.sp 1
.SH STANDARDS
-These functions are a GNU extension.
+GNU.
.SH BUGS
Argz vectors without a terminating null byte may lead to
Segmentation Faults.
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions, not in C or POSIX.
-They are also available under *BSD.
+.SH VERSIONS
The FreeBSD implementation sets
.I strp
to NULL on error.
+.SH STANDARDS
+GNU, BSD.
.SH SEE ALSO
.BR free (3),
.BR malloc (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, C99, POSIX.1-2001.
+.PP
In C89,
.I expression
is required to be of type
.ad
.sp 1
.SH STANDARDS
-This is a GNU extension.
+GNU.
.SH BUGS
The purpose of the assert macros is to help programmers find bugs in
their programs, things that cannot happen unless there was a coding mistake.
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.SH NOTES
-Functions registered using
-.BR atexit ()
-(and
-.BR on_exit (3))
-are not called if a process terminates abnormally because
-of the delivery of a signal.
-.PP
-If one of the registered functions calls
-.BR _exit (2),
-then any remaining functions are not invoked,
-and the other process termination steps performed by
-.BR exit (3)
-are not performed.
-.PP
+.SH VERSIONS
POSIX.1 says that the result of calling
.\" POSIX.1-2001, POSIX.1-2008
.BR exit (3)
.BR exit (3)
inside a function registered using
.BR atexit ().
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.SH NOTES
+Functions registered using
+.BR atexit ()
+(and
+.BR on_exit (3))
+are not called if a process terminates abnormally because
+of the delivery of a signal.
+.PP
+If one of the registered functions calls
+.BR _exit (2),
+then any remaining functions are not invoked,
+and the other process termination steps performed by
+.BR exit (3)
+are not performed.
.PP
The
.BR atexit ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
.SH SEE ALSO
.BR atoi (3),
.BR atol (3),
.hy
.ad
.sp 1
+.SH VERSIONS
+POSIX.1 leaves the return value of
+.BR atoi ()
+on error unspecified.
+On glibc, musl libc, and uClibc, 0 is returned on error.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001, SVr4, 4.3BSD.
+.PP
C89 and
POSIX.1-1996 include the functions
.BR atoi ()
.\" .BR atoll ()
.\" function is present since glibc 2.0.2, but
.\" not in libc4 or libc5.
-.SH NOTES
-POSIX.1 leaves the return value of
-.BR atoi ()
-on error unspecified.
-On glibc, musl libc, and uClibc, 0 is returned on error.
.SH BUGS
.I errno
is not set on error so there is no way to distinguish between 0 as an
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR backtrace (),
-.BR backtrace_symbols (),
-and
-.BR backtrace_symbols_fd ()
-are provided since glibc 2.1.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
These functions make some assumptions about how a function's return
address is stored on the stack.
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
There are two different versions of
.BR basename ()
- the POSIX version described above, and the GNU version, which one gets
when
.I <libgen.h>
is included, and the GNU version otherwise.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
In the glibc implementation,
the POSIX versions of these functions modify the
.BR memcmp (3);
use it instead.
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-This function is deprecated (marked as LEGACY in POSIX.1-2001);
-POSIX.1-2008 removes the specification of
-.BR bcmp ().
+Marked as LEGACY in POSIX.1-2001;
+removed in POSIX.1-2008.
.SH SEE ALSO
.BR memcmp (3)
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-This function is deprecated (marked as LEGACY in POSIX.1-2001): use
+.PP
+Marked as LEGACY in POSIX.1-2001: use
.BR memcpy (3)
or
.BR memmove (3)
.BR bindresvport ()
function uses a static variable that was not protected by a lock
before glibc 2.17, rendering the function MT-Unsafe.
-.SH STANDARDS
-Not in POSIX.1.
+.SH VERSIONS
Present on the BSDs, Solaris, and many other systems.
.SH NOTES
Unlike some
implementations,
the glibc implementation ignores any value that the caller supplies in
.IR sin\->sin_port .
+.SH STANDARDS
+BSD.
.SH SEE ALSO
.BR bind (2),
.BR getsockname (2)
.hy
.ad
.sp 1
-.SH STANDARDS
-4.2BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR bsd_signal (),
-recommending the use of
-.BR sigaction (2)
-instead.
-.SH NOTES
+.SH VERSIONS
Use of
.BR bsd_signal ()
should be avoided; use
this type is defined only if the
.B _GNU_SOURCE
feature test macro is defined.
+.SH STANDARDS
+None.
+.SH HISTORY
+4.2BSD, POSIX.1-2001.
+Removed in POSIX.1-2008,
+recommending the use of
+.BR sigaction (2)
+instead.
.SH SEE ALSO
.BR sigaction (2),
.BR signal (2),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
.SH EXAMPLES
The example below first sorts an array of structures using
.BR qsort (3),
.SH ERRORS
These functions always succeed.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH EXAMPLES
The program below swaps the bytes of the 8-byte integer supplied as
its command-line argument.
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR btowc ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR bswap (3),
.BR endian (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR explicit_bzero ()
-first appeared in glibc 2.25.
.SH STANDARDS
-The
-.BR bzero ()
-function is deprecated (marked as LEGACY in POSIX.1-2001); use
-.BR memset (3)
-in new programs.
-POSIX.1-2008 removes the specification of
-.BR bzero ().
-The
-.BR bzero ()
-function first appeared in 4.3BSD.
-.PP
+None.
+.SH HISTORY
+.TP
+.BR explicit_bzero ()
+glibc 2.25.
+.IP
The
.BR explicit_bzero ()
function is a nonstandard extension that is also present on some of the BSDs.
.BR memset_explicit ()
or
.BR memset_s ().
+.TP
+.BR bzero ()
+4.3BSD.
+.IP
+Marked as LEGACY in POSIX.1-2001.
+Removed in POSIX.1-2008.
.SH NOTES
The
.BR explicit_bzero ()
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
The function is actually an alias for
.I "hypot(a,\ b)"
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (cacos.c)
.EX
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+glibc 2.1.
.SH EXAMPLES
.\" SRC BEGIN (cacosh.c)
.EX
.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR readlink (2),
.BR realpath (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR complex (7)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR clog (3),
.BR csin (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR asinh (3),
.BR cabs (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (catan.c)
.EX
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (catanh.c)
.EX
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
The
.BR catgets ()
function is available only in libc.so.4.4.4c and above.
+.PP
The Jan 1987 X/Open Portability Guide specifies a more subtle
error return:
.I message
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.\" In XPG 1987, Vol. 3 it says:
-.\" .I "The flag argument of catopen is reserved for future use"
-.\" .IR "and should be set to 0" .
-.\"
-.\" It is unclear what the source was for the constants
-.\" .B MCLoadBySet
-.\" and
-.\" .B MCLoadAll
-.\" (see below).
-.SH NOTES
+.SH VERSIONS
The above is the POSIX.1 description.
The glibc value for
.B NL_CAT_LOCALE
.\" .I /etc/locale
.\" and
.\" .IR /usr/lib/locale .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.\" In XPG 1987, Vol. 3 it says:
+.\" .I "The flag argument of catopen is reserved for future use"
+.\" .IR "and should be set to 0" .
+.\"
+.\" It is unclear what the source was for the constants
+.\" .B MCLoadBySet
+.\" and
+.\" .B MCLoadAll
+.\" (see below).
.SH SEE ALSO
.BR catgets (3),
.BR setlocale (3)
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.\" .BR cbrt ()
.\" was a GNU extension. It is now a C99 requirement.
.SH SEE ALSO
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cacos (3),
ccosh(z) = (exp(z)+exp(\-z))/2
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cacosh (3),
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp2 (3),
.ad
.sp 1
.SH VERSIONS
-The
-.BR cfree ()
-function was removed
-.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112
-in glibc 2.26.
-.SH STANDARDS
The 3-argument version of
.BR cfree ()
as used by SCO conforms to the iBCSe2 standard:
Intel386 Binary Compatibility Specification, Edition 2.
+.SH STANDARDS
+None.
+.SH HISTORY
+.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112
+Removed in glibc 2.26.
.SH SEE ALSO
.BR malloc (3)
.ad
.sp 1
.SH VERSIONS
-These functions were added in glibc 2.1.
-.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-gcc also supports __imag__.
+GCC also supports __imag__.
That is a GNU extension.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR creal (3),
returns an initializer that can be assigned to the queue
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(CIRCLEQ macros first appeared in 4.4BSD).
+BSD.
.SH BUGS
.BR CIRCLEQ_FOREACH ()
and
.hy
.ad
.sp 1
-.SH VERSIONS
-Available since glibc 2.0.
.SH STANDARDS
+.TP
+.BR putenv ()
+POSIX.1-2008.
+.TP
+.BR clearenv ()
+None.
+.SH HISTORY
+.TP
+.BR putenv ()
+glibc 2.0.
+POSIX.1-2001.
+.TP
+.BR clearenv ()
+glibc 2.0.
+.PP
Various UNIX variants (DG/UX, HP-UX, QNX, ...).
POSIX.9 (bindings for FORTRAN77).
POSIX.1-1996 did not accept
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+.SH VERSIONS
XSI requires that
.B CLOCKS_PER_SEC
equals 1000000 independent
of the actual resolution.
-.SH NOTES
-The C standard allows for arbitrary values at the start of the program;
-subtract the value returned from a call to
-.BR clock ()
-at the start of the program to get maximum portability.
-.PP
-Note that the time can wrap around.
-On a 32-bit system where
-.B CLOCKS_PER_SEC
-equals 1000000 this function will return the same
-value approximately every 72 minutes.
.PP
On several other implementations,
the value returned by
.BR times (2)
function, which explicitly returns (separate) information about the
caller and its children, may be preferable.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.PP
In glibc 2.17 and earlier,
.BR clock ()
(using the
.B CLOCK_PROCESS_CPUTIME_ID
clock).
+.SH NOTES
+The C standard allows for arbitrary values at the start of the program;
+subtract the value returned from a call to
+.BR clock ()
+at the start of the program to get maximum portability.
+.PP
+Note that the time can wrap around.
+On a 32-bit system where
+.B CLOCKS_PER_SEC
+equals 1000000 this function will return the same
+value approximately every 72 minutes.
.SH SEE ALSO
.BR clock_gettime (2),
.BR getrusage (2),
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR clock_getcpuclockid ()
-function is available since glibc 2.2.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
Calling
.BR clock_gettime (2)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
+.PP
The identifiers are reserved for future use in C99 and C11.
.SH SEE ALSO
.BR cabs (3),
.I z
close to zero will cause an overflow.
.SH STANDARDS
+None.
+.SH HISTORY
These function names are reserved for future use in C99.
.PP
Not yet in glibc, as at glibc 2.19.
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR close (2),
.BR opendir (3),
.IR msghdr ,
see
.BR recvmsg (2).
-.SH STANDARDS
-This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite,
-the IPv6 advanced API described in RFC\ 2292 and SUSv2.
-.BR CMSG_FIRSTHDR (),
-.BR CMSG_NXTHDR (),
-and
-.BR CMSG_DATA ()
-are specified in POSIX.1-2008.
-.BR CMSG_SPACE ()
-and
-.BR CMSG_LEN ()
-.\" https://www.austingroupbugs.net/view.php?id=978#c3242
-will be included in the next POSIX release (Issue 8).
-.PP
-.BR CMSG_ALIGN ()
-is a Linux extension.
-.SH NOTES
+.SH VERSIONS
For portability, ancillary data should be accessed using only the macros
described here.
-.BR CMSG_ALIGN ()
-is a Linux extension and should not be used in portable programs.
.PP
In Linux,
.BR CMSG_LEN (),
are constant expressions (assuming their argument is constant),
meaning that these values can be used to declare the size of global variables.
This may not be portable, however.
+.SH STANDARDS
+.TP
+.BR CMSG_FIRSTHDR ()
+.TQ
+.BR CMSG_NXTHDR ()
+.TQ
+.BR CMSG_DATA ()
+POSIX.1-2008.
+.TP
+.BR CMSG_SPACE ()
+.TQ
+.BR CMSG_LEN ()
+.TQ
+.BR CMSG_ALIGN ()
+Linux.
+.SH HISTORY
+This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite,
+the IPv6 advanced API described in RFC\ 2292 and SUSv2.
+.PP
+.BR CMSG_SPACE ()
+and
+.BR CMSG_LEN ()
+.\" https://www.austingroupbugs.net/view.php?id=978#c3242
+will be included in the next POSIX release (Issue 8).
.SH EXAMPLES
This code looks for the
.B IP_TTL
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The following code fragment determines the path where to find
the POSIX.2 system utilities:
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR csqrt (3),
.hy
.ad
.sp 1
+.SH VERSIONS
+On architectures where the floating-point formats are not IEEE 754 compliant,
+these functions may treat a negative zero as positive.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.\" 4.3BSD.
+C11, POSIX.1-2008.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
-.SH NOTES
-On architectures where the floating-point formats are not IEEE 754 compliant,
-these
-functions may treat a negative zero as positive.
+.SH HISTORY
+C99, POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR signbit (3)
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR pow (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
+.PP
In glibc 2.11 and earlier, the implementation does something different
(a
.I stereographic
.ad
.sp 1
.SH VERSIONS
-These functions were added in glibc 2.1.
-.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-The gcc supports also __real__.
+GCC supports also __real__.
That is a GNU extension.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cimag (3),
.ad
.sp 1
.SH STANDARDS
-.BR crypt ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.TP
+.BR crypt ()
+POSIX.1-2008.
+.TP
.BR crypt_r ()
-is a GNU extension.
-.SH NOTES
+GNU.
+.SH HISTORY
+.TP
+.BR crypt ()
+POSIX.1-2001, SVr4, 4.3BSD.
.SS Availability in glibc
The
.BR crypt (),
otherwise
.I libxcrypt
is an ABI-compatible drop-in replacement.
+.SH NOTES
.SS Features in glibc
The glibc version of this function supports additional
encryption algorithms.
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR casin (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR casinh (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR catan (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR catanh (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, Svr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, Svr4.
.SH BUGS
The returned pathname may not uniquely identify the controlling
terminal; it may, for example, be
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001.
-C89 and C99 specify
-.BR asctime (),
-.BR ctime (),
-.BR gmtime (),
-.BR localtime (),
-and
-.BR mktime ().
-POSIX.1-2008 marks
-.BR asctime (),
-.BR asctime_r (),
-.BR ctime (),
-and
-.BR ctime_r ()
-as obsolete,
-recommending the use of
-.BR strftime (3)
-instead.
-.PP
+.SH VERSIONS
POSIX doesn't specify the parameters of
.BR ctime_r ()
to be
.IR restrict ;
that is specific to glibc.
+.PP
+In many implementations, including glibc, a 0 in
+.I tm_mday
+is interpreted as meaning the last day of the preceding month.
+.PP
+According to POSIX.1-2001,
+.BR localtime ()
+is required to behave as though
+.BR tzset (3)
+was called, while
+.BR localtime_r ()
+does not have this requirement.
+.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
+For portable code,
+.BR tzset (3)
+should be called before
+.BR localtime_r ().
+.SH STANDARDS
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+.TQ
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C11, POSIX.1-2008.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+.TQ
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C89, POSIX.1-2001.
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+C89, POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
+.TP
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2001.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
.SH NOTES
The four functions
.BR asctime (),
Execution of any of the functions may overwrite the information returned
in either of these objects by any of the other functions."
This can occur in the glibc implementation.
-.PP
-In many implementations, including glibc, a 0 in
-.I tm_mday
-is interpreted as meaning the last day of the preceding month.
-.PP
-According to POSIX.1-2001,
-.BR localtime ()
-is required to behave as though
-.BR tzset (3)
-was called, while
-.BR localtime_r ()
-does not have this requirement.
-.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
-For portable code,
-.BR tzset (3)
-should be called before
-.BR localtime_r ().
.SH SEE ALSO
.BR date (1),
.BR gettimeofday (2),
.hy
.ad
.sp 1
-.SH STANDARDS
-Not in POSIX.1.
+.SH VERSIONS
A similar function appears on the BSDs.
-The
-.BR daemon ()
-function first appeared in 4.4BSD.
-.SH NOTES
+.PP
The glibc implementation can also return \-1 when
.I /dev/null
exists but is not a character device with the expected
In this case,
.I errno
need not be set.
+.SH STANDARDS
+None.
+.SH HISTORY
+4.4BSD.
.SH BUGS
The GNU C library implementation of this function was taken from BSD,
and does not employ the double-fork technique (i.e.,
.\" .B #include <des_crypt.h>
.B #include <rpc/des_crypt.h>
.PP
-.BI "int ecb_crypt(char *" key ", char " data [. datalen "], \
-unsigned int " datalen ,
-.BI " unsigned int " mode );
-.BI "int cbc_crypt(char *" key ", char " data [. datalen "], \
-unsigned int " datalen ,
-.BI " unsigned int " mode ", char *" ivec );
+.BI "[[deprecated]] int ecb_crypt(char *" key ", char " data [. datalen ],
+.BI " unsigned int " datalen ", \
+unsigned int " mode );
+.BI "[[deprecated]] int cbc_crypt(char *" key ", char " data [. datalen ],
+.BI " unsigned int " datalen ", \
+unsigned int " mode ,
+.BI " char *" ivec );
.PP
-.BI "void des_setparity(char *" key );
+.BI "[[deprecated]] void des_setparity(char *" key );
.PP
-.BI "int DES_FAILED(int " status );
+.BI "[[deprecated]] int DES_FAILED(int " status );
.fi
.SH DESCRIPTION
.BR ecb_crypt ()
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
+.SH STANDARDS
+None.
+.SH HISTORY
+4.3BSD.
+glibc 2.1.
+Removed in glibc 2.28.
.PP
Because they employ the DES block cipher,
which is no longer considered secure,
-.BR ecb_crypt (),
-.BR ecb_crypt (),
-.BR crypt_r (),
-and
-.BR des_setparity ()
-were removed in glibc 2.28.
+these functions were removed.
Applications should switch to a modern cryptography library, such as
.BR libgcrypt .
-.SH STANDARDS
-4.3BSD.
-Not in POSIX.1.
.SH SEE ALSO
.BR des (1),
.BR crypt (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
On a POSIX system,
.I time_t
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function was a BSD extension, present in 4.3BSD-Reno, not in 4.2BSD.
+.SH HISTORY
+4.3BSD-Reno (not in 4.2BSD).
.\" It is present in libc5 (since 5.1.2) and in glibc 2.
.SH SEE ALSO
.BR open (2),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-The functions
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.PP
.BR lldiv ()
and
.BR imaxdiv ()
.ad
.sp 1
.SH VERSIONS
-.BR dl_iterate_phdr ()
-has been supported since glibc 2.2.4.
-.SH STANDARDS
-The
-.BR dl_iterate_phdr ()
-function is not specified in any standard.
Various other systems provide a version of this function,
although details of the returned
.I dl_phdr_info
and
.I dlpi_phnum
in addition to other implementation-specific fields.
-.SH NOTES
+.PP
Future versions of the C library may add further fields to the
.I dl_phdr_info
structure; in that event, the
.I size
argument provides a mechanism for the callback function to discover
whether it is running on a system with added fields.
-.PP
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.2.4.
+.SH NOTES
The first object visited by
.I callback
is the main program.
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
.BR dladdr ()
-is present in glibc 2.0 and later.
+glibc 2.0.
+.TP
.BR dladdr1 ()
-first appeared in glibc 2.3.3.
-.SH STANDARDS
-These functions are nonstandard GNU extensions
-that are also present on Solaris.
+glibc 2.3.3.
+.PP
+Solaris.
.SH BUGS
Sometimes, the function pointers you pass to
.BR dladdr ()
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR dlerror ()
-is present in glibc 2.0 and later.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
POSIX.1-2001.
+.PP
+SunOS.
.SH NOTES
The message returned by
.BR dlerror ()
.\" .in +5
.\" .B "const char *dlerror(void);"
.\" .in
-.SS History
-This function is part of the dlopen API, derived from SunOS.
.SH EXAMPLES
See
.BR dlopen (3).
.ad
.sp 1
.SH VERSIONS
-.BR dlinfo ()
-first appeared in glibc 2.3.3.
-.SH STANDARDS
-This function is a nonstandard GNU extension.
-.SH NOTES
-This function derives from the Solaris function of the same name
-and also appears on some other systems.
The sets of requests supported by the various implementations
overlaps only partially.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.3.3.
+Solaris.
.SH EXAMPLES
The program below opens a shared objects using
.BR dlopen (3)
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
.BR dlopen ()
-and
+.TQ
.BR dlclose ()
-are present in glibc 2.0 and later.
+POSIX.1-2008.
+.TP
.BR dlmopen ()
-first appeared in glibc 2.3.4.
-.SH STANDARDS
-POSIX.1-2001 describes
+.TQ
+.B RTLD_NOLOAD
+.TQ
+.B RTLD_NODELETE
+GNU.
+.TP
+.B RTLD_DEEPBIND
+Solaris.
+.SH HISTORY
+.TP
+.BR dlopen ()
+.TQ
.BR dlclose ()
-and
-.BR dlopen ().
-The
+glibc 2.0.
+POSIX.1-2001.
+.TP
.BR dlmopen ()
-function is a GNU extension.
-.PP
-The
-.BR RTLD_NOLOAD ,
-.BR RTLD_NODELETE ,
-and
-.B RTLD_DEEPBIND
-flags are GNU extensions;
-the first two of these flags are also present on Solaris.
+glibc 2.3.4.
.SH NOTES
.SS dlmopen() and namespaces
A link-map list defines an isolated namespace for the
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
.BR dlsym ()
-is present in glibc 2.0 and later.
+POSIX.1-2008.
+.TP
.BR dlvsym ()
-first appeared in glibc 2.1.
-.SH STANDARDS
-POSIX.1-2001 describes
-.BR dlsym ().
-The
+GNU.
+.SH HISTORY
+.TP
+.BR dlsym ()
+glibc 2.0.
+POSIX.1-2001.
+.TP
.BR dlvsym ()
-function is a GNU extension.
+glibc 2.1.
.SH NOTES
There are several scenarios when the address of a global symbol is NULL.
For example, a symbol can be placed at zero address by the linker, via
functions record global state information for the random number generator,
so they are not thread-safe.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH SEE ALSO
.BR rand (3),
.BR random (3)
.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions and are not portable.
+GNU.
.SH SEE ALSO
.BR drand48 (3),
.BR rand (3),
.TP
.B ENOMEM
Insufficient memory to create the duplicate locale object.
-.SH VERSIONS
-The
-.BR duplocale ()
-function were added in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
.SH NOTES
Duplicating a locale can serve the following purposes:
.IP \[bu] 3
.ad
.sp 1
.SH STANDARDS
-This function occurs in SunOS 4.x.
-.SH NOTES
+None.
+.SH HISTORY
+SunOS 4.x.
+.PP
This is a compatibility function only.
Don't use it in new programs.
.\" The SCO version of this function had a year-2000 problem.
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr2;
marked as LEGACY in POSIX.1-2001.
POSIX.1-2008 removes the specifications of
.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
These functions are obsolete.
Instead,
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.BR encrypt ()
+.TQ
+.BR setkey ()
+POSIX.1-2008.
+.TP
+.BR encrypt_r ()
+.TQ
+.BR setkey_r ()
+None.
+.SH HISTORY
+Removed in glibc 2.28.
+.PP
Because they employ the DES block cipher,
which is no longer considered secure,
-.BR encrypt (),
-.BR encrypt_r (),
-.BR setkey (),
-and
-.BR setkey_r ()
-were removed in glibc 2.28.
+these functions were removed from glibc.
Applications should switch to a modern cryptography library, such as
.BR libgcrypt .
-.SH STANDARDS
-.BR encrypt (),
-.BR setkey ():
-POSIX.1-2001, POSIX.1-2008, SUS, SVr4.
-.PP
-The functions
-.BR encrypt_r ()
-and
-.BR setkey_r ()
-are GNU extensions.
-.SH NOTES
+.TP
+.BR encrypt ()
+.TQ
+.BR setkey ()
+POSIX.1-2001, SUS, SVr4.
.SS Availability in glibc
See
.BR crypt (3).
This is the first address past the end of the
uninitialized data segment (also known as the BSS segment).
.SH STANDARDS
+None.
+.SH HISTORY
Although these symbols have long been provided on most UNIX systems,
they are not standardized; use with caution.
.SH NOTES
The functions with names of the form "le\fInn\fPtoh" convert
from little-endian order to host byte order.
.SH VERSIONS
-These functions were added in glibc 2.9.
-.SH STANDARDS
-These functions are nonstandard.
Similar functions are present on the BSDs,
where the required header file is
.I <sys/endian.h>
component always appears at the end of the function name
(thus, for example, in NetBSD, FreeBSD, and glibc,
the equivalent of OpenBSDs "betoh32" is "be32toh").
-.SH NOTES
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.9.
+.PP
These functions are similar to the older
.BR byteorder (3)
family of functions.
.ad
.sp 1
.SH STANDARDS
-These functions are a GNU extension.
+GNU.
.SH EXAMPLES
.\" SRC BEGIN (envz_add.c)
.EX
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard BSD extensions.
-.\" .SH HISTORY
-.\" The
-.\" .BR err ()
-.\" and
-.\" .BR warn ()
-.\" functions first appeared in
-.\" 4.4BSD.
+BSD.
+.SH HISTORY
+.TP
+.BR err ()
+.TQ
+.BR warn ()
+4.4BSD.
.SH EXAMPLES
Display the current
.I errno
is very much like
.BR error ().
.SH STANDARDS
-These functions and variables are GNU extensions, and should not be
-used in programs intended to be portable.
+GNU.
.SH SEE ALSO
.BR err (3),
.BR errno (3),
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, SunOS.
.SH BUGS
In glibc 2.2.5 and earlier, the implementation of
.ad
.sp 1
.SH VERSIONS
-The
-.BR eaccess ()
-function was added in glibc 2.4.
-.SH STANDARDS
-These functions are nonstandard.
Some other systems have an
.\" e.g., FreeBSD 6.1.
.BR eaccess ()
function.
+.SH STANDARDS
+None.
+.SH HISTORY
+.TP
+.BR eaccess ()
+glibc 2.4.
.SH NOTES
.IR Warning :
Using this function to check a process's permissions on a file before
.ad
.sp 1
.SH VERSIONS
-The
-.BR execvpe ()
-function first appeared in glibc 2.11.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-The
-.BR execvpe ()
-function is a GNU extension.
-.SH NOTES
The default search path (used when the environment
does not contain the variable \fBPATH\fR)
shows some variation across systems.
upon which they returned.
They now return if any error other than the ones
described above occurs.
+.SH STANDARDS
+.TP
+.B environ
+.TQ
+.BR execl ()
+.TQ
+.BR execlp ()
+.TQ
+.BR execle ()
+.TQ
+.BR execv ()
+.TQ
+.BR execvp ()
+POSIX.1-2008.
+.TP
+.BR execvpe ()
+GNU.
+.SH HISTORY
+.TP
+.B environ
+.TQ
+.BR execl ()
+.TQ
+.BR execlp ()
+.TQ
+.BR execle ()
+.TQ
+.BR execv ()
+.TQ
+.BR execvp ()
+POSIX.1-2001.
+.TP
+.BR execvpe ()
+glibc 2.11.
.SH BUGS
Before glibc 2.24,
.BR execl ()
function uses a global variable that is not protected,
so it is not thread-safe.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
The behavior is undefined if one of the functions registered using
.BR atexit (3)
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH BUGS
Before glibc 2.19, the glibc implementation of these functions did not set
.I errno
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.\" BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+BSD.
.SH BUGS
Before glibc 2.17,
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6778
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
Note that
.BR fclose ()
.BR fcloseall ()
function does not lock the streams, so it is not thread-safe.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR close (2),
.BR fclose (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH BUGS
Before glibc 2.24
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6796
.ad
.sp 1
.hy
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-IEC 60559 (IEC 559:1989), ANSI/IEEE 854, C99, POSIX.1-2001.
+C11, POSIX.1-2008, IEC 60559 (IEC 559:1989), ANSI/IEEE 854.
+.SH HISTORY
+C99, POSIX.1-2001.
+glibc 2.1.
.SH NOTES
.SS glibc notes
If possible, the GNU C Library defines a macro
.ad
.sp 1
.SH STANDARDS
-The functions
-.BR clearerr (),
-.BR feof (),
-and
-.BR ferror ()
-conform to C89, C99, POSIX.1-2001, and POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
POSIX.1-2008 specifies
.\"https://www.austingroupbugs.net/view.php?id=401
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR fexecve ()
-is implemented since glibc 2.3.2.
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
-It is specified in POSIX.1-2008.
-.SH NOTES
+.SH HISTORY
+glibc 2.3.2.
+.PP
On Linux with glibc versions 2.26 and earlier,
.BR fexecve ()
is implemented using the
is implemented using that system call, with the benefit that
.I /proc
does not need to be mounted.
-.PP
+.SH NOTES
The idea behind
.BR fexecve ()
is to allow the caller to verify (checksum) the contents of
.ad
.sp 1
.SH STANDARDS
-C89, C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001, POSIX.1-2008.
.PP
POSIX.1-2001 did not specify the behavior for flushing of input streams,
but the behavior is specified in POSIX.1-2008.
.hy
.ad
.sp 1
+.SH VERSIONS
+BSD systems have a prototype in
+.IR <string.h> .
.SH STANDARDS
-.BR ffs ():
+.TP
+.BR ffs ()
POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
-The
+.TP
.BR ffsl ()
-and
+.TQ
.BR ffsll ()
-functions are glibc extensions.
-.SH NOTES
-BSD systems have a prototype in
-.IR <string.h> .
+GNU.
.SH SEE ALSO
.BR memchr (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
+.SH NOTES
It is not advisable to mix calls to input functions from the
.I stdio
library with low-level calls to
.\" race:fgetgrent, however, something about the copyright impeded the
.\" progress.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endgrent (3),
.\" race:fgetpwent, however, something about the copyright impeded the
.\" progress.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endpwent (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fgetwc ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fgetws ()
.ad
.sp 1
.SH STANDARDS
-The function
-.BR fileno ()
-conforms to POSIX.1-2001 and POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR open (2),
.BR fdopen (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.PP
These functions are available when
.B _POSIX_THREAD_SAFE_FUNCTIONS
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
SVr4, 4.3BSD, C89.
-.SH NOTES
+.PP
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
to
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR remainder (3),
.BR remquo (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fdim (3),
.BR fmin (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR fmemopen ()
-was already available in glibc 1.0.x.
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 1.0.x.
+POSIX.1-2008.
.PP
POSIX.1-2008 specifies that \[aq]b\[aq] in
.I mode
.\" http://austingroupbugs.net/view.php?id=396
adjusts the standard to allow implementation-specific treatment for this case,
thus permitting the glibc treatment of \[aq]b\[aq].
-.SH NOTES
-There is no file descriptor associated with the file stream
-returned by this function
-(i.e.,
-.BR fileno (3)
-will return an error if called on the returned stream).
.PP
With glibc 2.22, binary mode (see below) was removed,
many longstanding bugs in the implementation of
Binary mode was removed in glibc 2.22; a \[aq]b\[aq] specified in
.I mode
has no effect.
+.SH NOTES
+There is no file descriptor associated with the file stream
+returned by this function
+(i.e.,
+.BR fileno (3)
+will return an error if called on the returned stream).
.SH BUGS
Before glibc 2.22, if
.I size
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fdim (3),
.BR fmax (3)
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
the
.BR fmtmsg ()
function uses a lock to protect the static variable, so it is thread-safe.
-.SH VERSIONS
-.BR fmtmsg ()
-is provided since glibc 2.1.
.SH STANDARDS
-The functions
+.TP
.BR fmtmsg ()
-and
-.BR addseverity (3),
-and environment variables
+.TQ
.B MSGVERB
-and
-.B SEV_LEVEL
-come from System V.
-.PP
-The function
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR fmtmsg ()
-and the environment variable
+System V.
+POSIX.1-2001 and POSIX.1-2008.
+glibc 2.1.
+.TP
.B MSGVERB
-are described in POSIX.1-2001 and POSIX.1-2008.
-.SH NOTES
+System V.
+POSIX.1-2001 and POSIX.1-2008.
+.TP
+.B SEV_LEVEL
+System V.
+.PP
System V and UnixWare man pages tell us that these functions
have been replaced by "pfmt() and addsev()" or by "pfmt(),
vpfmt(), lfmt(), and vlfmt()", and will be removed later.
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, POSIX.2.
-The
-.BR FNM_FILE_NAME ", " FNM_LEADING_DIR ", and " FNM_CASEFOLD
-flags are GNU extensions.
+.TP
+.BR fnmatch ()
+POSIX.1-2008.
+.TP
+.B FNM_FILE_NAME
+.TQ
+.B FNM_LEADING_DIR
+.TQ
+.B FNM_CASEFOLD
+GNU.
+.SH HISTORY
+.TP
+.BR fnmatch ()
+POSIX.1-2001, POSIX.2.
.SH SEE ALSO
.BR sh (1),
.BR glob (3),
.ad
.sp 1
.SH STANDARDS
-.BR fopen (),
-.BR freopen ():
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
-.BR fdopen ():
-POSIX.1-2001, POSIX.1-2008.
+.TP
+.BR fopen ()
+.TQ
+.BR freopen ()
+C11, POSIX.1-2008.
+.TP
+.BR fdopen ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR fopen ()
+.TQ
+.BR freopen ()
+POSIX.1-2001, C89.
+.TP
+.BR fdopen ()
+POSIX.1-2001.
.SH NOTES
.SS glibc notes
The GNU C library allows the following extensions for the string specified in
.ad
.sp 1
.SH STANDARDS
-This function is a nonstandard GNU extension.
+GNU.
.SH EXAMPLES
The program below implements a custom stream whose functionality
is similar (but not identical) to that available via
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Files with name lengths longer than the value returned for
.I name
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.PP
-For
-.BR isinf (),
-the standards merely say that the return value is nonzero
-if and only if the argument has an infinite value.
-.SH NOTES
In glibc 2.01 and earlier,
.BR isinf ()
returns a nonzero value (actually: 1) if
.I x
is positive infinity or negative infinity.
(This is all that C99 requires.)
+.SH NOTES
+For
+.BR isinf (),
+the standards merely say that the return value is nonzero
+if and only if the argument has an infinite value.
.SH SEE ALSO
.BR finite (3),
.BR INFINITY (3),
.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard and not portable.
-The function
+None.
+.SH HISTORY
+.TP
.BR fpurge ()
-was introduced in 4.4BSD and is not available under Linux.
-The function
+4.4BSD.
+Not available under Linux.
+.TP
.BR __fpurge ()
-was introduced in Solaris, and is present in glibc 2.1.95 and later.
+Solaris, glibc 2.1.95.
.SH NOTES
Usually it is a mistake to want to discard input buffers.
.SH SEE ALSO
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR fputwc ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fputws ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH EXAMPLES
The program below demonstrates the use of
.BR fread ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH SEE ALSO
.BR lseek (2),
.BR fseeko (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001, SUSv2.
.SH NOTES
The declarations of these functions can also be obtained by defining
the obsolete
.hy
.ad
.sp 1
-.SH VERSIONS
-Starting with glibc 2.33, the
-.BR ftime ()
-function and the
-.I <sys/timeb.h>
-header have been removed.
-To support old binaries,
-glibc continues to provide a compatibility symbol for
-applications linked against glibc 2.32 and earlier.
.SH STANDARDS
+None.
+.SH HISTORY
+Removed in glibc 2.33.
4.2BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR ftime ().
+Removed in POSIX.1-2008.
.PP
This function is obsolete.
Don't use it.
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
On some ancient systems, the prototype was:
.PP
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are available in Linux since glibc2.
.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.
4.4BSD.
.SH BUGS
Before glibc 2.23,
.ad
.sp 1
.SH VERSIONS
-.BR nftw ()
-is available since glibc 2.1.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, SUSv1.
-POSIX.1-2008 marks
-.BR ftw ()
-as obsolete.
-.SH NOTES
-POSIX.1-2008 notes that the results are unspecified if
-.I fn
-does not preserve the current working directory.
-.PP
-The function
-.BR nftw ()
-and the use of \fBFTW_SL\fP with
-.BR ftw ()
-were introduced in SUSv1.
-.PP
In some implementations (e.g., glibc),
.BR ftw ()
-will never use \fBFTW_SL\fP, on other systems \fBFTW_SL\fP occurs only
-for symbolic links that do not point to an existing file,
+will never use \fBFTW_SL\fP; on other systems \fBFTW_SL\fP occurs only
+for symbolic links that do not point to an existing file;
and again on other systems
.BR ftw ()
will use \fBFTW_SL\fP for each symbolic link.
.IR typeflag .
For predictable results, use
.BR nftw ().
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR ftw ()
+POSIX.1-2001, SVr4, SUSv1.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR nftw ()
+glibc 2.1.
+POSIX.1-2001, SUSv1.
+.TP
+.B FTW_SL
+POSIX.1-2001, SUSv1.
+.SH NOTES
+POSIX.1-2008 notes that the results are unspecified if
+.I fn
+does not preserve the current working directory.
.SH BUGS
According to POSIX.1-2008, when the
.I typeflag
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+Linux, BSD.
+.SH HISTORY
+.TP
.BR futimes ()
-is available since glibc 2.3.
+glibc 2.3.
+.TP
.BR lutimes ()
-is available since glibc 2.6, and is implemented using the
+glibc 2.6.
+.SH NOTES
+.BR lutimes ()
+is implemented using the
.BR utimensat (2)
-system call, which is supported since Linux 2.6.22.
-.SH STANDARDS
-These functions are not specified in any standard.
-Other than Linux, they are available only on the BSDs.
+system call.
.SH SEE ALSO
.BR utime (2),
.BR utimensat (2),
A negative return value means byte oriented.
A return value of zero means undecided.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
Wide-character output to a byte oriented stream can be performed through the
.BR fprintf (3)
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+SVID 2.
+.PP
Because of historical variations in behavior across systems,
this function is not specified in any recent standard.
-It was documented in SVID 2.
-.SH NOTES
-.SS History
+.PP
4.2BSD had a
.BR gamma ()
that computed
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
Marked as LEGACY in POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR gcvt (),
+POSIX.1-2008 removed it,
recommending the use of
.BR sprintf (3)
instead (though
.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
The current
.\" glibc 2.15
.I /proc
filesystem was not mounted).
.SH STANDARDS
-These functions are GNU extensions.
-.SH NOTES
+GNU.
+.SH HISTORY
Before glibc 2.23,
these functions obtained the required information by scanning the
.I MemTotal
Since glibc 2.23,
these functions obtain the required information by calling
.BR sysinfo (2).
-.PP
+.SH NOTES
The following
.BR sysconf (3)
calls provide a portable means of obtaining the same information as the
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-The
-.BR getaddrinfo ()
-function is documented in RFC\ 2553.
-.SH NOTES
-.BR getaddrinfo ()
-supports the
-.IB address % scope-id
-notation for specifying the IPv6 scope-ID.
-.PP
-.BR AI_ADDRCONFIG ,
-.BR AI_ALL ,
-and
-.B AI_V4MAPPED
-are available since glibc 2.3.3.
-.B AI_NUMERICSERV
-is available since glibc 2.3.4.
-.PP
+.SH VERSIONS
According to POSIX.1, specifying
.\" POSIX.1-2001, POSIX.1-2008
.I hints
.B (AI_V4MAPPED\~|\~AI_ADDRCONFIG)
for this case,
since this value is considered an improvement on the specification.
+.SH STANDARDS
+POSIX.1-2008.
+.TP
+.BR getaddrinfo ()
+RFC\ 2553.
+.SH HISTORY
+POSIX.1-2001.
+.TP
+.B AI_ADDRCONFIG
+.TQ
+.B AI_ALL
+.TQ
+.B AI_V4MAPPED
+glibc 2.3.3.
+.TP
+.B AI_NUMERICSERV
+glibc 2.3.4.
+.SH NOTES
+.BR getaddrinfo ()
+supports the
+.IB address % scope-id
+notation for specifying the IPv6 scope-ID.
.SH EXAMPLES
.\" getnameinfo.3 refers to this example
.\" socket.2 refers to this example
.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions;
-they first appeared in glibc 2.2.3.
-.SH NOTES
+GNU.
+.SH HISTORY
+glibc 2.2.3.
+.PP
The interface of
.BR getaddrinfo_a ()
was modeled after the
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR getauxval ()
-function was added in glibc 2.16.
.SH STANDARDS
-This function is a nonstandard glibc extension.
+GNU.
+.SH HISTORY
+glibc 2.16.
.SH NOTES
The primary consumer of the information in the auxiliary vector
is the dynamic linker,
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SUSv2, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR getcontext (),
+.PP
+POSIX.1-2008 removes these functions,
citing portability issues, and
recommending that applications be rewritten to use POSIX threads instead.
.SH NOTES
.hy
.ad
.sp 1
-.SH STANDARDS
-.BR getcwd ()
-conforms to POSIX.1-2001.
-Note however that POSIX.1-2001 leaves the behavior of
+.SH VERSIONS
+POSIX.1-2001 leaves the behavior of
.BR getcwd ()
unspecified if
.I buf
is NULL.
.PP
-.BR getwd ()
-is present in POSIX.1-2001, but marked LEGACY.
-POSIX.1-2008 removes the specification of
-.BR getwd ().
-Use
-.BR getcwd ()
-instead.
POSIX.1-2001
does not define any errors for
.BR getwd ().
-.PP
-.BR get_current_dir_name ()
-is a GNU extension.
-.SH NOTES
-Under Linux, these functions make use of the
-.BR getcwd ()
-system call (available since Linux 2.1.92).
-On older systems they would query
-.IR /proc/self/cwd .
-If both system call and proc filesystem are missing, a
-generic implementation is called.
-Only in that case can
-these calls fail under Linux with
-.BR EACCES .
-.PP
-These functions are often used to save the location of the current working
-directory for the purpose of returning to it later.
-Opening the current
-directory (".") and calling
-.BR fchdir (2)
-to return is usually a faster and more reliable alternative when sufficiently
-many file descriptors are available, especially on platforms other than Linux.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
On Linux, the kernel provides a
.BR getcwd ()
should consider checking whether the returned pathname starts
with '/' or '(' to avoid misinterpreting an unreachable path
as a relative pathname.
+.SH STANDARDS
+.TP
+.BR getcwd ()
+POSIX.1-2008.
+.TP
+.BR get_current_dir_name ()
+GNU.
+.TP
+.BR getwd ()
+None.
+.SH HISTORY
+.TP
+.BR getcwd ()
+POSIX.1-2001.
+.TP
+.BR getwd ()
+POSIX.1-2001, but marked LEGACY.
+Removed in POSIX.1-2008.
+Use
+.BR getcwd ()
+instead.
+.PP
+Under Linux, these functions make use of the
+.BR getcwd ()
+system call (available since Linux 2.1.92).
+On older systems they would query
+.IR /proc/self/cwd .
+If both system call and proc filesystem are missing, a
+generic implementation is called.
+Only in that case can
+these calls fail under Linux with
+.BR EACCES .
+.SH NOTES
+These functions are often used to save the location of the current working
+directory for the purpose of returning to it later.
+Opening the current
+directory (".") and calling
+.BR fchdir (2)
+to return is usually a faster and more reliable alternative when sufficiently
+many file descriptors are available, especially on platforms other than Linux.
.SH BUGS
Since the Linux 2.6.36 change that added "(unreachable)" in the
circumstances described above, the glibc implementation of
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
The POSIX.1 specification for
.BR strptime (3)
contains conversion specifications using the
is implemented using
.BR strptime (3),
so that precisely the same conversions are supported by both.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The program below calls
.BR getdate ()
.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, and a few other systems.
+BSD.
+.SH NOTES
Use
.BR opendir (3)
and
.hy
.ad
.sp 1
-.SH STANDARDS
-SVr4, 4.4BSD (the
-.BR getdtablesize ()
-function first appeared in 4.2BSD).
-It is not specified in POSIX.1;
-portable applications should employ
-.I sysconf(_SC_OPEN_MAX)
-instead of this call.
-.SH NOTES
+.SH VERSIONS
The glibc version of
.BR getdtablesize ()
calls
.\" The libc4 and libc5 versions return
.\" .B OPEN_MAX
.\" (set to 256 since Linux 0.98.4).
+.PP
+Portable applications should employ
+.I sysconf(_SC_OPEN_MAX)
+instead of this call.
+.SH STANDARDS
+None.
+.SH HISTORY
+SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.SH SEE ALSO
.BR close (2),
.BR dup (2),
This kernel version does not implement the
.BR getrandom (2)
system call required to implement this function.
-.SH VERSIONS
-The
-.BR getentropy ()
-function first appeared in glibc 2.25.
.SH STANDARDS
-This function is nonstandard.
-It is also present on OpenBSD.
+None.
+.SH HISTORY
+glibc 2.25.
+OpenBSD.
.SH NOTES
The
.BR getentropy ()
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR secure_getenv ()
-first appeared in glibc 2.17.
.SH STANDARDS
-.BR getenv ():
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.PP
+.TP
+.BR getenv ()
+C11, POSIX.1-2008.
+.TP
+.BR secure_getenv ()
+GNU.
+.SH HISTORY
+.TP
+.BR getenv ()
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.TP
.BR secure_getenv ()
-is a GNU extension.
+glibc 2.17.
.SH NOTES
The strings in the environment list are of the form \fIname=value\fP.
.PP
.BR setfsent ()
returns 1.
Upon failure or end-of-file, these functions return NULL and 0, respectively.
-.\" .SH HISTORY
-.\" The
-.\" .BR getfsent ()
-.\" function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are not in POSIX.1.
-Several operating systems have them, for example,
+.SH VERSIONS
+Several operating systems have these functions, for example,
*BSD, SunOS, Digital UNIX, AIX (which also has a
.BR getfstype ()).
HP-UX has functions of the same names,
.IR "struct fstab" ,
and calls these functions obsolete, superseded by
.BR getmntent (3).
+.SH STANDARDS
+None.
+.SH HISTORY
+The
+.BR getfsent ()
+function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
.SH NOTES
These functions are not thread-safe.
.PP
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fgetgrent (3),
.BR getgrent_r (3),
.BR getgrent_r ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-These functions are GNU extensions, done in a style resembling
-the POSIX version of functions like
-.BR getpwnam_r (3).
+.SH VERSIONS
Other systems use the prototype
.PP
.in +4n
FILE **gr_fp);
.EE
.in
+.SH STANDARDS
+GNU.
+.SH HISTORY
+These functions are done in a style resembling
+the POSIX version of functions like
+.BR getpwnam_r (3).
.SH NOTES
The function
.BR getgrent_r ()
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
The formulation given above under "RETURN VALUE" is from POSIX.1.
.\" POSIX.1-2001, POSIX.1-2008
It does not call "not found" an error, hence does not specify what value
.\" FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
.\" SunOS 5.8 - gives EBADF
.\" Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR endgrent (3),
.BR fgetgrent (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is present since glibc 2.2.4.
.SH STANDARDS
-This function is nonstandard; it appears on most BSDs.
+None.
+.SH HISTORY
+glibc 2.2.4.
.SH BUGS
Before glibc 2.3.3,
the implementation of this function contains a buffer-overrun bug:
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001 specifies
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-.BR sethostent (),
-.BR endhostent (),
-.BR gethostent (),
-and
-.IR h_errno ;
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-and
+.TP
+.BR sethostent ()
+.TQ
+.BR endhostent ()
+.TQ
+.BR gethostent ()
+POSIX.1-2008.
+.TP
+.BR gethostent_r ()
+GNU.
+.TP
+Others:
+None.
+.SH HISTORY
+.TP
+.BR sethostent ()
+.TQ
+.BR endhostent ()
+.TQ
+.BR gethostent ()
+POSIX.1-2001.
+.TP
+.BR gethostbyname ()
+.TQ
+.BR gethostbyaddr ()
+.TQ
.I h_errno
-are marked obsolescent in that standard.
-POSIX.1-2008 removes the specifications of
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-and
-.IR h_errno ,
+Marked obsolescent in POSIX.1-2001.
+Removed in POSIX.1-2008,
recommending the use of
.BR getaddrinfo (3)
and
.hy
.ad
.sp 1
-.SH STANDARDS
-4.2BSD; these functions were dropped in 4.4BSD.
-SVr4 includes
-.BR gethostid ()
-but not
-.BR sethostid ().
-.PP
-POSIX.1-2001 and POSIX.1-2008 specify
-.BR gethostid ()
-but not
-.BR sethostid ().
-.SH NOTES
+.SH VERSIONS
In the glibc implementation, the
.I hostid
is stored in the file
in order to obtain the host's IPv4 address,
and returns a value obtained by bit-twiddling the IPv4 address.
(This value may not be unique.)
+.SH STANDARDS
+.TP
+.BR gethostid ()
+POSIX.1-2008.
+.TP
+.BR sethostid ()
+None.
+.SH HISTORY
+4.2BSD; dropped in 4.4BSD.
+SVr4 and POSIX.1-2001 include
+.BR gethostid ()
+but not
+.BR sethostid ().
.SH BUGS
It is impossible to ensure that the identifier is globally unique.
.SH SEE ALSO
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR getifaddrs ()
-function first appeared in glibc 2.3, but before glibc 2.3.3,
-the implementation supported only IPv4 addresses;
-IPv6 support was added in glibc 2.3.3.
-Support of address families other than IPv4 is available only
-on kernels that support netlink.
.SH STANDARDS
-Not in POSIX.1.
+None.
+.SH HISTORY
This function first appeared in BSDi and is
present on the BSD systems, but with slightly different
semantics documented\[em]returning one entry per interface,
.\" appears to be confused and obsolete on this point.
.\" i.e., commonly it still says one of them will be NULL, even if
.\" the ifa_ifu union is already present
+.PP
+.BR getifaddrs ()
+first appeared in glibc 2.3, but before glibc 2.3.3,
+the implementation supported only IPv4 addresses;
+IPv6 support was added in glibc 2.3.3.
+Support of address families other than IPv4 is available only
+on kernels that support netlink.
.SH NOTES
The addresses returned on Linux will usually be the IPv4 and IPv6 addresses
assigned to the interface, but also one
network host.
The array is terminated by a null pointer.
.SH STANDARDS
-RFC\ 2553.
+None.
+.SH HISTORY
.\" Not in POSIX.1-2001.
-.SH NOTES
-These functions were present in glibc 2.1.91-95, but were
-removed again.
+RFC\ 2553.
+.PP
+Present in glibc 2.1.91-95, but removed again.
Several UNIX-like systems support them, but all
call them deprecated.
.SH SEE ALSO
.ad
.sp 1
.SH STANDARDS
-Both
-.BR getline ()
-and
-.BR getdelim ()
-were originally GNU extensions.
-They were standardized in POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+GNU, POSIX.1-2008.
.SH EXAMPLES
.\" SRC BEGIN (getline.c)
.EX
.SH RETURN VALUE
If the load average was unobtainable, \-1 is returned; otherwise,
the number of samples actually retrieved is returned.
-.\" .SH HISTORY
-.\" The
-.\" BR getloadavg ()
-.\" function appeared in
-.\" 4.3BSD Reno .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.2.
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs and Solaris.
-.\" mdoc seems to have a bug - there must be no newline here
+BSD.
+.SH HISTORY
+4.3BSD-Reno, Solaris.
+glibc 2.2.
.SH SEE ALSO
.BR uptime (1),
.BR proc (5)
.BR getlogin_r ()
call those functions,
so we use race:utent to remind users.
-.SH STANDARDS
+.SH VERSIONS
+OpenBSD has
.BR getlogin ()
and
+.BR setlogin (),
+and a username
+associated with a session, even if it has no controlling terminal.
+.SH STANDARDS
+.TP
+.BR getlogin ()
+.TQ
+.BR getlogin_r ()
+POSIX.1-2008.
+.TP
+.BR cuserid ()
+None.
+.SH STANDARDS
+.TP
+.BR getlogin ()
+.TQ
.BR getlogin_r ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
+POSIX.1-2001.
+OpenBSD.
+.TP
+.BR cuserid ()
+System V, POSIX.1-1988.
+Removed in POSIX.1-1990.
+SUSv2.
+Removed in POSIX.1-2001.
+.IP
System V has a
.BR cuserid ()
function which uses the real
user ID rather than the effective user ID.
-The
-.BR cuserid ()
-function
-was included in the 1988 version of POSIX,
-but removed from the 1990 version.
-It was present in SUSv2, but removed in POSIX.1-2001.
-.PP
-OpenBSD has
-.BR getlogin ()
-and
-.BR setlogin (),
-and a username
-associated with a session, even if it has no controlling terminal.
.SH BUGS
Unfortunately, it is often rather easy to fool
.BR getlogin ().
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
The nonreentrant functions are from SunOS 4.1.3.
A routine
.BR getmntent_r ()
was introduced in HP-UX 10, but it returns an
.IR int .
The prototype shown above is glibc-only.
-.SH NOTES
+.PP
System V also has a
.BR getmntent ()
function but the calling sequence
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR getnameinfo ()
-is provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 2553.
+POSIX.1-2008.
+RFC\ 2553.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
+Before glibc 2.2, the
+.I hostlen
+and
+.I servlen
+arguments were typed as
+.IR size_t .
.SH NOTES
In order to assist the programmer in choosing reasonable sizes
for the supplied buffers,
header file.
The latter is a guess based on the services listed
in the current Assigned Numbers RFC.
-.PP
-Before glibc 2.2, the
-.I hostlen
-and
-.I servlen
-arguments were typed as
-.IR size_t .
.SH EXAMPLES
The following code tries to get the numeric hostname and service name,
for a given socket address.
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
Before glibc 2.2, the
.I net
argument of
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR getnetent (3),
.BR networks (5)
.hy
.ad
.sp 1
-.SH STANDARDS
-.TP
-.BR getopt ():
-POSIX.1-2001, POSIX.1-2008, and POSIX.2,
-provided the environment variable
+.SH VERSIONS
+.BR getopt ()
+conforms to POSIX provided the environment variable
.B POSIXLY_CORRECT
is set.
Otherwise, the elements of \fIargv\fP aren't really
Nevertheless,
.I const
is used in the prototype to be compatible with other systems.
+.SH STANDARDS
+.TP
+.BR getopt ()
+POSIX.1-2008.
+.TP
+.BR getopt_long ()
+.TQ
+.BR getopt_long_only ()
+GNU.
.IP
The use of \[aq]+\[aq] and \[aq]\-\[aq] in
.I optstring
is a GNU extension.
-.IP
+.SH HISTORY
+.TP
+.BR getopt ()
+POSIX.1-2001, and POSIX.2.
+.PP
On some older implementations,
.BR getopt ()
was declared in
for this purpose as LEGACY.
POSIX.1-2001 does not require the declaration to appear in
.IR <stdio.h> .
-.TP
-.BR getopt_long "() and " getopt_long_only ():
-These functions are GNU extensions.
.SH NOTES
A program that scans multiple argument vectors,
or rescans the same vector more than once,
The process does not have a controlling terminal.
.SH FILES
.I /dev/tty
-.\" .SH HISTORY
-.\" A
-.\" .BR getpass ()
-.\" function appeared in Version 7 AT&T UNIX.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+Version 7 AT&T UNIX.
Present in SUSv2, but marked LEGACY.
Removed in POSIX.1-2001.
.SH NOTES
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR getnetent (3),
.BR getprotoent_r (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH EXAMPLES
The program below uses
.BR getprotobyname_r ()
.ad
.sp 1
.SH VERSIONS
-.BR getpt ()
-is provided since glibc 2.1.
-.SH STANDARDS
-.BR getpt ()
-is glibc-specific;
-use
+Use
.BR posix_openpt (3)
instead.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr2.
.SH BUGS
The
.BR endpwent ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
The
.I pw_gecos
field is not specified in POSIX, but is present on most implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fgetpwent (3),
.BR getpw (3),
.BR getpwent_r ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-These functions are GNU extensions, done in a style resembling
-the POSIX version of functions like
-.BR getpwnam_r (3).
+.SH VERSIONS
Other systems use the prototype
.PP
.in +4n
FILE **pw_fp);
.EE
.in
+.SH STANDARDS
+None.
+.SH HISTORY
+These functions are done in a style resembling
+the POSIX version of functions like
+.BR getpwnam_r (3).
.SH NOTES
The function
.BR getpwent_r ()
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
The
.I pw_gecos
field is not specified in POSIX, but is present on most implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
The formulation given above under "RETURN VALUE" is from POSIX.1-2001.
It does not call "not found" an error, and hence does not specify what value
.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
+BSD.
+.SH HISTORY
+BSD, Solaris.
.SH BUGS
All information
is contained in a static area
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR getrpcent (3),
.BR rpc (5)
.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
+BSD.
+.SH HISTORY
+BSD, Solaris.
.ad
.sp 1
.SH STANDARDS
-C89, C99, POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
LSB deprecates
.BR gets ().
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR getnetent (3),
.BR getprotoent (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH EXAMPLES
The program below uses
.BR getservbyport_r ()
.BR endspent ()
are used in parallel in different threads of a program,
then data races could occur.
+.SH VERSIONS
+Many other systems provide a similar API.
.SH STANDARDS
-The shadow password database and its associated API are
-not specified in POSIX.1.
-However, many other systems provide a similar API.
+None.
.SH SEE ALSO
.BR getgrnam (3),
.BR getpwnam (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Since
.BR getsubopt ()
.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, and perhaps other systems.
+BSD.
.SH NOTES
Under Linux, the file
.IR /etc/ttys ,
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.SH SEE ALSO
.BR shells (5)
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
+None.
+.SH HISTORY
XPG2, SVr4.
.PP
In XPG2 and SVID 2 the function
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.1.
.SH STANDARDS
-These functions are nonstandard, but appear on a few other systems,
-such as Solaris and NetBSD.
+None.
+.SH HISTORY
+glibc 2.1.1.
+Solaris, NetBSD.
.SH NOTES
These functions exist primarily for compatibility with other
systems where the
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, SUSv2.
-Not present in POSIX.1.
.SH BUGS
The value returned on error is also a legitimate data value.
.BR ferror (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR getwchar ()
calls those functions,
so we use race:utent to remind users.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, POSIX.2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, POSIX.2.
.SH NOTES
The structure elements
.I gl_pathc
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH STANDARDS
-These functions are glibc-specific.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH EXAMPLES
When run, the program below will produce output such as the following:
.PP
.ad
.sp 1
.SH VERSIONS
-.BR grantpt ()
-is provided since glibc 2.1.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-This is part of the UNIX 98 pseudoterminal support, see
-.BR pts (4).
-.PP
Many systems implement this function via a set-user-ID helper binary
called "pt_chown".
On Linux systems with a devpts filesystem (present since Linux 2.2),
Thus, no such helper binary is required
(and indeed it is configured to be absent during the
glibc build that is typical on many systems).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
+This is part of the UNIX 98 pseudoterminal support, see
+.BR pts (4).
.SH SEE ALSO
.BR open (2),
.BR posix_openpt (3),
.IR gid ,
and zero otherwise.
.SH STANDARDS
-This function is a nonstandard GNU extension.
+GNU.
.SH SEE ALSO
.BR getgid (2),
.BR getgroups (2),
.ad
.sp 1
.SH STANDARDS
-These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
+None.
+.SH HISTORY
+AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
They are called obsolete under most of these systems, and are
broken under
.\" Linux libc and
.ad
.sp 1
.SH STANDARDS
-The functions
-.BR hcreate (),
-.BR hsearch (),
-and
+.TP
+.BR hcreate ()
+.TQ
+.BR hsearch ()
+.TQ
.BR hdestroy ()
-are from SVr4, and are described in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The functions
-.BR hcreate_r (),
-.BR hsearch_r (),
-and
+POSIX.1-2008.
+.TP
+.BR hcreate_r ()
+.TQ
+.BR hsearch_r ()
+.TQ
+.BR hdestroy_r ()
+GNU.
+.SH HISTORY
+.TP
+.BR hcreate ()
+.TQ
+.BR hsearch ()
+.TQ
+.BR hdestroy ()
+SVr4, POSIX.1-2001.
+.TP
+.BR hcreate_r ()
+.TQ
+.BR hsearch_r ()
+.TQ
.BR hdestroy_r ()
-are GNU extensions.
+GNU.
.SH NOTES
Hash table implementations are usually more efficient when the
table contains enough free space to minimize collisions.
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
mutual exclusion on the
.I cd
argument.
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
In each series of calls to
.BR iconv (),
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR iconv (3),
.BR iconv_open (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001, SUSv2.
.SH SEE ALSO
.BR iconv (1),
.BR iconv (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR if_nameindex ()
-function first appeared in glibc 2.1, but before glibc 2.3.4,
+.SH STANDARDS
+POSIX.1-2008, RFC\ 3493.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+BSDi.
+.PP
+Before glibc 2.3.4,
the implementation supported only interfaces with IPv4 addresses.
Support of interfaces that don't have IPv4 addresses is available only
on kernels that support netlink.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 3493.
-.PP
-This function first appeared in BSDi.
.SH EXAMPLES
The program below demonstrates the use of the functions described
on this page.
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 3493.
-.PP
-This function first appeared in BSDi.
+POSIX.1-2008, RFC\ 3493.
+.SH HISTORY
+POSIX.1-2001.
+BSDi.
.SH SEE ALSO
.BR getifaddrs (3),
.BR if_nameindex (3),
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH BUGS
.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6794
Before glibc 2.16, the following bugs existed in the
.BR strrchr (3)
instead of these functions.
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD; marked as LEGACY in POSIX.1-2001.
-POSIX.1-2008 removes the specifications of
-.BR index ()
-and
-.BR rindex (),
+Removed in POSIX.1-2008,
recommending
.BR strchr (3)
and
.PP
.BI "[[deprecated]] char *inet_ntoa(struct in_addr " in );
.PP
-.BI "struct in_addr inet_makeaddr(in_addr_t " net ", in_addr_t " host );
+.BI "[[deprecated]] struct in_addr inet_makeaddr(in_addr_t " net ,
+.BI " in_addr_t " host );
.PP
-.BI "in_addr_t inet_lnaof(struct in_addr " in );
-.BI "in_addr_t inet_netof(struct in_addr " in );
+.BI "[[deprecated]] in_addr_t inet_lnaof(struct in_addr " in );
+.BI "[[deprecated]] in_addr_t inet_netof(struct in_addr " in );
.fi
.PP
.RS -4
.ad
.sp 1
.SH STANDARDS
-.BR inet_addr (),
-.BR inet_ntoa ():
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
+.TP
+.BR inet_addr ()
+.TQ
+.BR inet_ntoa ()
+POSIX.1-2008.
+.TP
.BR inet_aton ()
-is not specified in POSIX.1, but is available on most systems.
-.SH NOTES
-On x86 architectures, the host byte order is Least Significant Byte
-first (little endian), whereas the network byte order, as used on the
-Internet, is Most Significant Byte first (big endian).
+None.
+.SH STANDARDS
+.TP
+.BR inet_addr ()
+.TQ
+.BR inet_ntoa ()
+POSIX.1-2001, 4.3BSD.
.PP
.BR inet_lnaof (),
.BR inet_netof (),
having been superseded by Classless Inter-Domain Routing (CIDR),
which divides addresses into network and host components at
arbitrary bit (rather than byte) boundaries.
+.SH NOTES
+On x86 architectures, the host byte order is Least Significant Byte
+first (little endian), whereas the network byte order, as used on the
+Internet, is Most Significant Byte first (big endian).
.SH EXAMPLES
An example of the use of
.BR inet_aton ()
.I pres
was not in correct presentation format.
.SH STANDARDS
-The
-.BR inet_net_pton ()
-and
-.BR inet_net_ntop ()
-functions are nonstandard, but widely available.
+None.
.SH NOTES
.SS Input presentation format for inet_net_pton()
The network number may be specified either
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
Note that RFC\ 2553 defines a prototype where the last argument
.I size
is of type
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
Unlike
.BR inet_aton (3)
and
For an interface that handles both IPv6 addresses, and IPv4
addresses in numbers-and-dots notation, see
.BR getaddrinfo (3).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
.B AF_INET6
does not recognize IPv4 addresses.
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.3BSD.
.SH SEE ALSO
.BR getgroups (2),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On ancient systems,
.\" e.g., SunOS, Linux libc4 and libc5
the arguments of these functions were of type \fIstruct qelem *\fP,
Some systems place them in \fI<string.h>\fP.
.\" Linux libc4 and libc 5 placed them
.\" in \fI<stdlib.h>\fP.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
In glibc 2.4 and earlier, it was not possible to specify
.I prev
.ad
.sp 1
.\" FIXME: need a thread-safety statement about the *_l functions
-.SH VERSIONS
-.BR isalnum_l (),
-.BR isalpha_l (),
-.BR isblank_l (),
-.BR iscntrl_l (),
-.BR isdigit_l (),
-.BR isgraph_l (),
-.BR islower_l (),
-.BR isprint_l (),
-.BR ispunct_l (),
-.BR isspace_l (),
-.BR isupper_l (),
-.BR isxdigit_l (),
-and
-.BR isascii_l ()
-are available since glibc 2.3.
.SH STANDARDS
-C89 specifies
-.BR isalnum (),
-.BR isalpha (),
-.BR iscntrl (),
-.BR isdigit (),
-.BR isgraph (),
-.BR islower (),
-.BR isprint (),
-.BR ispunct (),
-.BR isspace (),
-.BR isupper (),
-and
-.BR isxdigit (),
-but not
-.BR isascii ()
-and
-.BR isblank ().
-POSIX.1-2001
-also specifies those functions, and also
+.TP
+.BR isalnum ()
+.TQ
+.BR isalpha ()
+.TQ
+.BR iscntrl ()
+.TQ
+.BR isdigit ()
+.TQ
+.BR isgraph ()
+.TQ
+.BR islower ()
+.TQ
+.BR isprint ()
+.TQ
+.BR ispunct ()
+.TQ
+.BR isspace ()
+.TQ
+.BR isupper ()
+.TQ
+.BR isxdigit ()
+.TQ
+.BR isblank ()
+C11, POSIX.1-2008.
+.TP
.BR isascii ()
-(as an XSI extension)
-and
-.BR isblank ().
-C99 specifies all of the preceding functions, except
-.BR isascii ().
-.PP
-POSIX.1-2008 marks
+.TQ
+.BR isalnum_l ()
+.TQ
+.BR isalpha_l ()
+.TQ
+.BR isblank_l ()
+.TQ
+.BR iscntrl_l ()
+.TQ
+.BR isdigit_l ()
+.TQ
+.BR isgraph_l ()
+.TQ
+.BR islower_l ()
+.TQ
+.BR isprint_l ()
+.TQ
+.BR ispunct_l ()
+.TQ
+.BR isspace_l ()
+.TQ
+.BR isupper_l ()
+.TQ
+.BR isxdigit_l ()
+POSIX.1-2008.
+.TP
+.BR isascii_l ()
+GNU.
+.SH HISTORY
+.TP
+.BR isalnum ()
+.TQ
+.BR isalpha ()
+.TQ
+.BR iscntrl ()
+.TQ
+.BR isdigit ()
+.TQ
+.BR isgraph ()
+.TQ
+.BR islower ()
+.TQ
+.BR isprint ()
+.TQ
+.BR ispunct ()
+.TQ
+.BR isspace ()
+.TQ
+.BR isupper ()
+.TQ
+.BR isxdigit ()
+C89, POSIX.1-2001.
+.TP
+.BR isblank ()
+C99, POSIX.1-2001.
+.TP
.BR isascii ()
-as obsolete,
+POSIX.1-2001 (XSI).
+.IP
+POSIX.1-2008 marks it as obsolete,
noting that it cannot be used portably in a localized application.
-.PP
-POSIX.1-2008 specifies
-.BR isalnum_l (),
-.BR isalpha_l (),
-.BR isblank_l (),
-.BR iscntrl_l (),
-.BR isdigit_l (),
-.BR isgraph_l (),
-.BR islower_l (),
-.BR isprint_l (),
-.BR ispunct_l (),
-.BR isspace_l (),
-.BR isupper_l (),
-and
-.BR isxdigit_l ().
-.PP
+.TP
+.BR isalnum_l ()
+.TQ
+.BR isalpha_l ()
+.TQ
+.BR isblank_l ()
+.TQ
+.BR iscntrl_l ()
+.TQ
+.BR isdigit_l ()
+.TQ
+.BR isgraph_l ()
+.TQ
+.BR islower_l ()
+.TQ
+.BR isprint_l ()
+.TQ
+.BR ispunct_l ()
+.TQ
+.BR isspace_l ()
+.TQ
+.BR isupper_l ()
+.TQ
+.BR isxdigit_l ()
+glibc 2.3.
+POSIX.1-2008.
+.TP
.BR isascii_l ()
-is a GNU extension.
+glibc 2.3.
.SH NOTES
The standards require that the argument
.I c
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fstat (2),
.BR ttyname (3)
.BR isfdtype ()
function can fail with any of the same errors as
.BR fstat (2).
+.SH VERSIONS
+Portable applications should use
+.BR fstat (2)
+instead.
.SH STANDARDS
-The
-.BR isfdtype ()
-function is not specified in any standard,
-but did appear in the draft POSIX.1g standard.
+None.
+.SH HISTORY
+It appeared in the draft POSIX.1g standard.
It is present on OpenBSD and Tru64 UNIX
(where the required header file in both cases is just
.IR <sys/stat.h> ,
-as shown in the POSIX.1g draft),
-and possibly other systems.
-.SH NOTES
-Portable applications should use
-.BR fstat (2)
-instead.
+as shown in the POSIX.1g draft).
.SH SEE ALSO
.BR fstat (2)
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.SH NOTES
+.SH VERSIONS
Not all hardware supports these functions,
and where hardware support isn't provided, they will be emulated by macros.
This will result in a performance penalty.
Don't use these functions if NaN is of no concern for you.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR fpclassify (3),
.BR isnan (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswalnum ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswalpha ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The behavior of
.BR iswblank ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswcntrl ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswctype ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswdigit ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswgraph ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswlower ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswprint ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswpunct ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswspace ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswupper ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswxdigit ()
.ad
.sp 1
.SH STANDARDS
-The functions returning
-.I double
-conform to SVr4, 4.3BSD,
-POSIX.1-2001, and POSIX.1-2008.
-The others are nonstandard functions that also exist on the BSDs.
+.TP
+.BR j0 ()
+.TQ
+.BR j1 ()
+.TQ
+.BR jn ()
+POSIX.1-2008.
+.TP
+Others:
+BSD.
+.SH HISTORY
+.TP
+.BR j0 ()
+.TQ
+.BR j1 ()
+.TQ
+.BR jn ()
+SVr4, 4.3BSD,
+POSIX.1-2001, POSIX.1-2008.
+.TP
+Others:
+BSD.
.SH BUGS
There are errors of up to 2e\-16 in the values returned by
.BR j0 (),
.B ESRCH
The process group was given as 0 but the sending process does not
have a process group.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( killpg ()
-first appeared in 4BSD).
-.SH NOTES
+.SH VERSIONS
There are various differences between the permission checking
in BSD-type systems and System\ V-type systems.
See the POSIX rationale for
.BR killpg ()
is implemented as a library function that makes the call
.IR "kill(\-pgrp,\ sig)" .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4BSD).
.SH SEE ALSO
.BR getpgrp (2),
.BR kill (2),
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.\" glibc (as at 2.8) also supports an inexact
.\" exception for various cases.
.SH STANDARDS
-The
+.TP
.BR lgamma ()
-functions are specified in C99, POSIX.1-2001, and POSIX.1-2008.
+.TQ
+.BR lgammaf ()
+.TQ
+.BR lgammal ()
+C11, POSIX.1-2008.
+.TP
.I signgam
-is specified in POSIX.1-2001 and POSIX.1-2008, but not in C99.
-The
+POSIX.1-2008.
+.TP
.BR lgamma_r ()
-functions are nonstandard, but present on several other systems.
+.TQ
+.BR lgammaf_r ()
+.TQ
+.BR lgammal_r ()
+None.
+.SH HISTORY
+.TP
+.BR lgamma ()
+.TQ
+.BR lgammaf ()
+.TQ
+.BR lgammal ()
+C99, POSIX.1-2001.
+.TP
+.I signgam
+POSIX.1-2001.
+.TP
+.BR lgamma_r ()
+.TQ
+.BR lgammaf_r ()
+.TQ
+.BR lgammal_r ()
+None.
.SH BUGS
In glibc 2.9 and earlier,
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6777
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR lio_listio ()
-function is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control blocks before use.
The control blocks must not be changed while the I/O operations
returns an initializer that can be assigned to the list
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(LIST macros first appeared in 4.4BSD).
+BSD.
+.SH HISTORY
+4.4BSD.
.SH BUGS
.BR LIST_FOREACH ()
doesn't allow
.ad
.sp 1
.SH STANDARDS
-C89, C99.
+C11.
+.SH HISTORY
+C89.
.SH BUGS
The
.BR printf (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH SEE ALSO
.BR fcntl (2),
.BR flock (2)
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.\" BSD
.SH BUGS
Before glibc 2.22, the glibc implementation did not set
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.\" log(), log2(), log10() do set errno
.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6793
.\"
-.\" .SH HISTORY
-.\" The
-.\" .BR logb ()
-.\" function occurs in 4.3BSD.
-.\" see IEEE.3 in the 4.3BSD manual
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+.TP
+.BR logb ()
+4.3BSD
+(see IEEE.3 in the 4.3BSD manual).
.SH SEE ALSO
.BR ilogb (3),
.BR log (3)
.BR logout ()
calls those functions,
so we use race:utent to remind users.
-.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
-.SH NOTES
-Note that the
-member
+.SH VERSIONS
+The member
.I ut_user
of
.I struct utmp
.I ut_user
in
.IR <utmp.h> .
+.SH STANDARDS
+BSD.
.SH SEE ALSO
.BR getutent (3),
.BR utmp (5)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR ceil (3),
.BR floor (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR ceil (3),
.BR floor (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-Present in libc since libc-4.6.27.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+libc-4.6.27.
.SH BUGS
The naming is unfortunate.
.SH SEE ALSO
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR makecontext ()
-and
-.BR swapcontext ()
-are provided since glibc 2.1.
.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.1.
SUSv2, POSIX.1-2001.
-POSIX.1-2008 removes the specifications of
-.BR makecontext ()
-and
-.BR swapcontext (),
+Removed in POSIX.1-2008,
citing portability issues, and
recommending that applications be rewritten to use POSIX threads instead.
.SH NOTES
.hy
.ad
.sp 1
+.SH VERSIONS
+The BSDs expose the definitions for these macros via
+.IR <sys/types.h> .
.SH STANDARDS
-The
-.BR makedev (),
-.BR major (),
-and
-.BR minor ()
-functions are not specified in POSIX.1,
-but are present on many other systems.
-.\" The BSDs, HP-UX, Solaris, AIX, Irix.
+None.
+.SH HISTORY
+BSD, HP-UX, Solaris, AIX, Irix.
.\" The header location is inconsistent:
.\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h.
-.SH NOTES
+.PP
These interfaces are defined as macros.
Since glibc 2.3.3,
they have been aliases for three GNU-specific functions:
.BR gnu_dev_minor ().
The latter names are exported, but the traditional names are more portable.
.PP
-The BSDs expose the definitions for these macros via
-.IR <sys/types.h> .
Depending on the version,
-glibc also exposes definitions for these macros from that
-header file if suitable feature test macros are defined.
+glibc also exposes definitions for these macros from
+.IR <sys/types.h>
+if suitable feature test macros are defined.
However, this behavior was deprecated in glibc 2.25,
.\" glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f
and since glibc 2.28,
.BR mallinfo ()/
.BR mallinfo2 ()
is safe enough, others modify with non-atomically maybe not.
-.SH VERSIONS
-.\" mallinfo(): Available already in glibc 2.0, possibly earlier
-The
-.BR mallinfo2 ()
-function was added
-.\" commit e3960d1c57e57f33e0e846d615788f4ede73b945
-in glibc 2.33.
.SH STANDARDS
-These functions are not specified by POSIX or the C standards.
-A
+None.
+.SH HISTORY
+.TP
.BR mallinfo ()
-function exists on many System V derivatives,
-and was specified in the SVID.
+glibc 2.0.
+SVID.
+.TP
+.BR mallinfo2 ()
+.\" commit e3960d1c57e57f33e0e846d615788f4ede73b945
+glibc 2.33.
.SH BUGS
.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
.\" See the 24 Aug 2011 mail by Paul Pluzhnikov:
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.BR malloc ()
+.TQ
+.BR free ()
+.TQ
+.BR calloc ()
+.TQ
+.BR realloc ()
+C11, POSIX.1-2008.
+.TP
+.BR reallocarray ()
+None.
+.SH HISTORY
+.TP
+.BR malloc ()
+.TQ
+.BR free ()
+.TQ
+.BR calloc ()
+.TQ
+.BR realloc ()
+POSIX.1-2001, C89.
+.TP
.BR reallocarray ()
-was added in glibc 2.26.
+glibc 2.26.
+OpenBSD 5.6, FreeBSD 11.0.
.PP
.BR malloc ()
and related functions rejected sizes greater than
preserved
.I errno
starting in glibc 2.33.
-.SH STANDARDS
-.BR malloc (),
-.BR free (),
-.BR calloc (),
-.BR realloc ():
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
-.BR reallocarray ()
-is a nonstandard extension that first appeared in OpenBSD 5.6 and FreeBSD 11.0.
.SH NOTES
By default, Linux follows an optimistic memory allocation strategy.
This means that when
.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
These functions are useful when using this
.BR malloc (3)
.BR sbrk (2)
was asked for more memory.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
The use of these hook functions is not safe in multithreaded programs,
and they are now deprecated.
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR malloc_info ()
-was added in glibc 2.10.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.10.
.SH NOTES
The memory-allocation information is provided as an XML string
(rather than a C structure)
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.0.
.SH NOTES
More detailed information about memory allocations in the main arena
can be obtained using
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH VERSIONS
+glibc 2.0.
.SH NOTES
Only the main heap (using
.BR sbrk (2))
.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH NOTES
The value returned by
.BR malloc_usable_size ()
is
.I not
set.
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
-.SH STANDARDS
-This function is not specified by POSIX or the C standards.
+.SH VERSIONS
A similar function exists on many System V derivatives,
but the range of values for
.I param
and
.BR M_KEEP ,
but only the first of these is implemented in glibc.
-.\" .SH NOTES
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.0.
.SH BUGS
Specifying an invalid value for
.I param
.hy
.ad
.sp 1
+.SH VERSIONS
+The function
+.BR mbrlen (3)
+provides a better interface to the same
+functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mblen ()
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR mbrlen (3)
-provides a better interface to the same
-functionality.
.SH SEE ALSO
.BR mbrlen (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbrlen ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbrtowc ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbsinit ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbsrtowcs ()
.hy
.ad
.sp 1
+.SH VERSIONS
+The function
+.BR mbsrtowcs (3)
+provides a better interface to the same
+functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbstowcs ()
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR mbsrtowcs (3)
-provides a better interface to the same
-functionality.
.SH EXAMPLES
The program below illustrates the use of
.BR mbstowcs (),
.hy
.ad
.sp 1
+.SH VERSIONS
+This function is not multithread safe.
+The function
+.BR mbrtowc (3)
+provides
+a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbtowc ()
.B LC_CTYPE
category of the
current locale.
-.PP
-This function is not multithread safe.
-The function
-.BR mbrtowc (3)
-provides
-a better interface to the same functionality.
.SH SEE ALSO
.BR MB_CUR_MAX (3),
.BR mblen (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-The
+.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
.BR mcheck_pedantic ()
-and
+.TQ
.BR mcheck_check_all ()
-functions are available since glibc 2.2.
-The
+glibc 2.2.
+.TP
.BR mcheck ()
-and
+.TQ
.BR mprobe ()
-functions are present since at least glibc 2.0
-.SH STANDARDS
-These functions are GNU extensions.
+glibc 2.0.
.SH NOTES
Linking a program with
.I \-lmcheck
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bcopy (3),
.BR bstring (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR rawmemchr ()
-first appeared in glibc 2.1.
-.PP
-.BR memrchr ()
-first appeared in glibc 2.2.
.SH STANDARDS
-.BR memchr ():
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.PP
-The
+.TP
+.BR memchr ()
+C11, POSIX.1-2008.
+.TP
.BR memrchr ()
-function is a GNU extension, available since glibc 2.1.91.
-.PP
-The
+.TQ
+.BR rawmemchr ()
+GNU.
+.SH HISTORY
+.TP
+.BR memchr ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR memrchr ()
+glibc 2.2.
+.TP
.BR rawmemchr ()
-function is a GNU extension, available since glibc 2.1.
+glibc 2.1.
.SH SEE ALSO
.BR bstring (3),
.BR ffs (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.SH CAVEATS
Do not use
.BR memcmp ()
to compare security critical data, such as cryptographic secrets,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.SH CAVEATS
Failure to observe the requirement that the memory areas
do not overlap has been the source of significant bugs.
(POSIX and the C standards are explicit that employing
.ad
.sp 1
.SH STANDARDS
-The
-.BR memfrob ()
-function is unique to the
-GNU C Library.
+GNU.
.SH SEE ALSO
.BR bstring (3),
.BR strfry (3)
.ad
.sp 1
.SH STANDARDS
-This function is not specified in POSIX.1,
-but is present on a number of other systems,
-including:
+None.
+.SH HISTORY
musl libc 0.9.7;
-FreeBSD 6.0, OpenBSD 5.4, NetBSD, and Illumos.
+FreeBSD 6.0, OpenBSD 5.4, NetBSD, Illumos.
.SH BUGS
.\" This function was broken in Linux libraries up to and including libc 5.0.9;
.\" there the
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bcopy (3),
.BR bstring (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR mempcpy ()
-first appeared in glibc 2.1.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH EXAMPLES
.EX
void *
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bstring (3),
.BR bzero (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-Available since glibc 2.1.91.
.SH STANDARDS
POSIX.1-2008.
-This function is present on the BSDs.
-.\" As at 2006, this function is being considered for a revision of POSIX.1
-.\" Also in NetBSD 1.4.
+.SH HISTORY
+glibc 2.1.91.
+NetBSD 1.4.
+POSIX.1-2008.
.SH SEE ALSO
.BR mktemp (1),
.BR mkdir (2),
.ad
.sp 1
.SH VERSIONS
-.BR mkfifoat ()
-was added in glibc 2.4.
It is implemented using
-.BR mknodat (2),
-available since Linux 2.6.16.
+.BR mknodat (2).
.SH STANDARDS
-.BR mkfifo ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR mkfifoat ():
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mkfifo ()
+POSIX.1-2001.
+.TP
+.BR mkfifoat ()
+glibc 2.4.
POSIX.1-2008.
.SH SEE ALSO
.BR mkfifo (1),
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR mkostemp ()
-is available since glibc 2.7.
-.BR mkstemps ()
-and
-.BR mkostemps ()
-are available since glibc 2.11.
.SH STANDARDS
-.BR mkstemp ():
-4.3BSD, POSIX.1-2001.
-.PP
-.BR mkstemps ():
-unstandardized, but appears on several other systems.
+.TP
+.BR mkstemp ()
+POSIX.1-2001.
+.TP
+.BR mkstemps ()
+BSD.
.\" mkstemps() appears to be at least on the BSDs, Mac OS X, Solaris,
.\" and Tru64.
-.PP
+.TP
.BR mkostemp ()
-and
-.BR mkostemps ():
-are glibc extensions.
-.SH NOTES
+.TQ
+.BR mkostemps ()
+GNU.
+.SH HISTORY
+.TP
+.BR mkstemp ()
+4.3BSD, POSIX.1-2001.
+.TP
+.BR mkstemps ()
+glibc 2.11.
+BSD, Mac OS X, Solaris, Tru64.
+.TP
+.BR mkostemp ()
+glibc 2.7.
+.TP
+.BR mkostemps ()
+glibc 2.11.
+.PP
In glibc versions 2.06 and earlier, the file is created with permissions 0666,
that is, read and write for all users.
This old behavior may be
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR mktemp ().
+Removed in POSIX.1-2008.
.\" .SH NOTES
.\" The prototype is in
.\" .I <unistd.h>
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
for any of the errors specified for the library routine
.BR free (3).
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
+BSD.
.SH SEE ALSO
.BR btree (3),
.BR dbopen (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
All open message queues are automatically closed on process termination,
or upon
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_getattr ()
and
are library functions layered on top of the
.BR mq_getsetattr (2)
system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The program below can be used to show the default
.I mq_maxmsg
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001.
-.SH NOTES
-.\"
+.SH VERSIONS
.SS C library/kernel differences
In the glibc implementation, the
.BR mq_notify ()
.BR netlink (7)
socket and creates a new thread for each notification that is
delivered to the process.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The following program registers a notification request for the
message queue named in its command-line argument.
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
.SS C library/kernel differences
The
.BR mq_open ()
without the preceding slash (i.e.,
.IR name+1 )
to the system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
Before Linux 2.6.14,
the process umask was not applied to the permissions specified in
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_timedreceive ()
is a system call, and
.BR mq_receive ()
is a library function layered on top of that system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_timedsend ()
is a system call, and
.BR mq_send ()
is a library function layered on top of that system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
.\" glibc manual says muntrace should have marking locale because it calls
.\" fprintf(), but muntrace does not execute area which cause locale problem.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
In normal usage,
.BR mtrace ()
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.PP
See also IEC 559 and the appendix with
recommended functions in IEEE 754/IEEE 854.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR isnan (3),
.BR strtod (3),
.BR NLMSG_PAYLOAD ()
Return the length of the payload associated with the
.IR nlmsghdr .
-.SH STANDARDS
-These macros are nonstandard Linux extensions.
-.SH NOTES
+.SH VERSIONS
It is often better to use netlink via
.I libnetlink
than via the low-level kernel interface.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR libnetlink (3),
.BR netlink (7)
.TP
.B ENOMEM
Insufficient memory to create a locale object.
-.SH VERSIONS
-The
-.BR newlocale ()
-and
-.BR freelocale ()
-functions first appeared in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
.SH NOTES
Each locale object created by
.BR newlocale ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
+.SH HISTORY
+C99, POSIX.1-2001.
.SH BUGS
In glibc 2.5 and earlier, these functions do not raise an underflow
floating-point
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.24.
.SH STANDARDS
These functions are described in
.I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic
and
.IR "ISO/IEC TS 18661".
+.SH HISTORY
+glibc 2.24.
.SH SEE ALSO
.BR nearbyint (3),
.BR nextafter (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
.SH NOTES
The behavior of
.BR nl_langinfo_l ()
.hy
.ad
.sp 1
-.SH VERSIONS
-The
+.SH STANDARDS
+.TP
.BR ntp_gettime ()
-function is available since glibc 2.1.
-The
+NTP Kernel Application Program Interface.
+.TP
.BR ntp_gettimex ()
-function is available since glibc 2.12.
-.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
.BR ntp_gettime ()
-is described in the NTP Kernel Application Program Interface.
+glibc 2.1.
+.TP
.BR ntp_gettimex ()
-is a GNU extension.
+glibc 2.12.
.SH SEE ALSO
.BR adjtimex (2),
.BR ntp_adjtime (3),
.IR type ,
in units of bytes.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH EXAMPLES
On a Linux/i386 system, when compiled using the default
.BR gcc (1)
.ad
.sp 1
.SH STANDARDS
-This function comes from SunOS 4, but is also present in glibc.
-It no longer occurs in Solaris (SunOS 5).
-Portable application should avoid this function, and use the standard
+None.
+.SH HISTORY
+SunOS 4, glibc.
+Removed in Solaris (SunOS 5).
+Use the standard
.BR atexit (3)
instead.
-.SH NOTES
+.SH CAVEATS
By the time
.I function
is executed, stack
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR open_memstream ()
-was already available in glibc 1.0.x.
-.BR open_wmemstream ()
-is available since glibc 2.4.
.SH STANDARDS
POSIX.1-2008.
-These functions are not specified in POSIX.1-2001,
-and are not widely available on other systems.
+.SH HISTORY
+.TP
+.BR open_memstream ()
+glibc 1.0.x.
+.TP
+.BR open_wmemstream ()
+glibc 2.4.
.SH NOTES
There is no file descriptor associated with the file stream
returned by these functions
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR fdopendir ()
-is available since glibc 2.4.
.SH STANDARDS
+POSIX.1-2008.
+.SH STANDARDS
+.TP
.BR opendir ()
-is present on SVr4, 4.3BSD, and specified in POSIX.1-2001.
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
.BR fdopendir ()
-is specified in POSIX.1-2008.
+POSIX.1-2008.
+glibc 2.4.
.SH NOTES
Filename entries can be read from a directory stream using
.BR readdir (3).
.ad
.sp 1
.SH STANDARDS
-These are BSD functions, present in glibc.
-They are not standardized in POSIX.
-.SH NOTES
+BSD.
+.SH HISTORY
The
.B const
modifiers were added to the structure pointer arguments of
.hy
.ad
.sp 1
-.SH VERSIONS
-Since glibc 2.32, the declarations of
-.I sys_errlist
-and
-.I sys_nerr
-are no longer exposed by
-.IR <stdio.h> .
.SH STANDARDS
-.BR perror (),
-.IR errno :
-POSIX.1-2001, POSIX.1-2008, C89, C99, 4.3BSD.
-.PP
-The externals
+.TP
+.I errno
+.TQ
+.BR perror ()
+C11, POSIX.1-2008.
+.TP
.I sys_nerr
-and
+.TQ
.I sys_errlist
-derive from BSD, but are not specified in POSIX.1.
-.SH NOTES
-The externals
+BSD.
+.SH HISTORY
+.TP
+.I errno
+.TQ
+.BR perror ()
+POSIX.1-2001, C89, 4.3BSD.
+.TP
.I sys_nerr
-and
+.TQ
.I sys_errlist
-are defined by glibc, but in
-.IR <stdio.h> .
-.\" and only when _BSD_SOURCE is defined.
-.\" When
-.\" .B _GNU_SOURCE
-.\" is defined, the symbols
-.\" .I _sys_nerr
-.\" and
-.\" .I _sys_errlist
-.\" are provided.
+Removed in glibc 2.32.
.SH SEE ALSO
.BR err (3),
.BR errno (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
+.SH VERSIONS
The \[aq]e\[aq] value for
.I type
is a Linux extension.
-.SH NOTES
-.BR Note :
-carefully read Caveats in
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH CAVEATS
+Carefully read Caveats in
.BR system (3).
.SH BUGS
Since the standard input of a command opened for reading shares its seek
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR posix_fallocate ()
-is available since glibc 2.1.94.
.SH STANDARDS
-POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.94.
+POSIX.1-2001
.PP
POSIX.1-2008 says that an implementation
.I shall
give the error if
.I len
equals zero.
-.SH NOTES
+.SH CAVEATS
In the glibc implementation,
.BR posix_fallocate ()
is implemented using the
Addresses in the specified range are partially or completely outside
the caller's address space.
.SH VERSIONS
-Support for
-.BR posix_madvise ()
-was added in glibc 2.2.
-.SH STANDARDS
-POSIX.1-2001.
-.SH NOTES
POSIX.1 permits an implementation to generate an error if
.I len
is 0.
value,
.BR MADV_DONTNEED ,
has destructive semantics.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH SEE ALSO
.BR madvise (2),
.BR posix_fadvise (2)
.hy
.ad
.sp 1
-.SH VERSIONS
-The functions
-.BR memalign (),
-.BR valloc (),
-and
+.SH STANDARDS
+.TP
+.BR aligned_alloc ()
+C11.
+.TP
+.BR posix_memalign ()
+POSIX.1-2008.
+.TP
+.BR memalign ()
+.TQ
+.BR valloc ()
+None.
+.TP
.BR pvalloc ()
-have been available since at least glibc 2.0.
-.PP
-The function
+GNU.
+.SH HISTORY
+.TP
.BR aligned_alloc ()
-was added in glibc 2.16.
-.PP
-The function
+glibc 2.16.
+C11.
+.TP
.BR posix_memalign ()
-is available since glibc 2.1.91.
-.SH STANDARDS
-The function
+glibc 2.1.91.
+POSIX.1d, POSIX.1-2001.
+.TP
+.BR memalign ()
+glibc 2.0.
+SunOS 4.1.3.
+.TP
.BR valloc ()
-appeared in 3.0BSD.
-It is documented as being obsolete in 4.3BSD,
+glibc 2.0.
+3.0BSD.
+Documented as obsolete in 4.3BSD,
and as legacy in SUSv2.
-It does not appear in POSIX.1.
-.PP
-The function
+.TP
.BR pvalloc ()
-is a GNU extension.
-.PP
-The function
-.BR memalign ()
-appears in SunOS 4.1.3 but not in 4.4BSD.
-.PP
-The function
-.BR posix_memalign ()
-comes from POSIX.1d and is specified in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The function
-.BR aligned_alloc ()
-is specified in the C11 standard.
+glibc 2.0.
.\"
.SS Headers
Everybody agrees that
.hy
.ad
.sp 1
-.SH VERSIONS
-glibc support for
-.BR posix_openpt ()
-has been provided since glibc 2.2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.1.
+POSIX.1-2001.
.PP
-.BR posix_openpt ()
-is part of the UNIX 98 pseudoterminal support (see
+It is part of the UNIX 98 pseudoterminal support (see
.BR pts (4)).
.SH NOTES
Some older UNIX implementations that support System V
.TP
.B ENOSYS
Function not supported on this system.
-.SH VERSIONS
-The
-.BR posix_spawn ()
-and
-.BR posix_spawnp ()
-functions are available since glibc 2.2.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.\" FIXME . This piece belongs in spawnattr_setflags(3)
.\" The
.\" .B POSIX_SPAWN_USEVFORK
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
+.SH STANDARDS
+GNU.
.SH VERSIONS
-These functions were added in glibc 2.1.
-Since glibc 2.27,
+glibc 2.1.
+Removed in glibc 2.27.
.\" glibc commit 5a80d39d0d2587e9bd8e72f19e92eeb2a66fbe9e
-the use of these functions in new programs is no longer supported.
-.SH STANDARDS
-This functions are nonstandard GNU extensions.
.SH SEE ALSO
.BR exp10 (3),
.BR pow (3)
is a power of 2 or not,
respectively.
.SH STANDARDS
-This nonstandard macro is present in glibc and the BSDs.
+BSD.
.SH CAVEATS
The arguments may be evaluated more than once.
.PP
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.BR fprintf ()
+.TQ
+.BR printf ()
+.TQ
+.BR sprintf ()
+.TQ
+.BR vprintf ()
+.TQ
+.BR vfprintf ()
+.TQ
+.BR vsprintf ()
+.TQ
+.BR snprintf ()
+.TQ
+.BR vsnprintf ()
+C11, POSIX.1-2008.
+.TP
+.BR dprintf ()
+.TQ
+.BR vdprintf ()
+GNU, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR fprintf ()
+.TQ
+.BR printf ()
+.TQ
+.BR sprintf ()
+.TQ
+.BR vprintf ()
+.TQ
+.BR vfprintf ()
+.TQ
+.BR vsprintf ()
+C89, POSIX.1-2001.
+.TP
+.BR snprintf ()
+.TQ
+.BR vsnprintf ()
+SUSv2, C99, POSIX.1-2001.
+.IP
+Concerning the return value of
+.BR snprintf (),
+SUSv2 and C99 contradict each other: when
+.BR snprintf ()
+is called with
+.IR size =0
+then SUSv2 stipulates an unspecified return value less than 1,
+while C99 allows
+.I str
+to be NULL in this case, and gives the return value (as always)
+as the number of characters that would have been written in case
+the output string has been large enough.
+POSIX.1-2001 and later align their specification of
+.BR snprintf ()
+with C99.
+.TP
+.BR dprintf ()
+.TQ
+.BR vdprintf ()
+GNU, POSIX.1-2008.
+.PP
.\" Linux libc4 knows about the five C standard flags.
.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
.\" and the conversions
.B m
conversion specifier, that is
.IR %#m .
-.SH STANDARDS
-.BR fprintf (),
-.BR printf (),
-.BR sprintf (),
-.BR vprintf (),
-.BR vfprintf (),
-.BR vsprintf ():
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
-.BR snprintf (),
-.BR vsnprintf ():
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-The
-.BR dprintf ()
-and
-.BR vdprintf ()
-functions were originally GNU extensions that were later standardized
-in POSIX.1-2008.
-.PP
-Concerning the return value of
-.BR snprintf (),
-SUSv2 and C99 contradict each other: when
-.BR snprintf ()
-is called with
-.IR size =0
-then SUSv2 stipulates an unspecified return value less than 1,
-while C99 allows
-.I str
-to be NULL in this case, and gives the return value (as always)
-as the number of characters that would have been written in case
-the output string has been large enough.
-POSIX.1-2001 and later align their specification of
-.BR snprintf ()
-with C99.
-.SH NOTES
+.SH CAVEATS
Some programs imprudently rely on code such as the following
.PP
.in +4n
.ad
.sp 1
.SH STANDARDS
-Similar to a call in SVr4 (but not POSIX.1).
+None.
+.SH HISTORY
+Similar to a call in SVr4.
.SH BUGS
.BR profil ()
cannot be used on a program that also uses
.PP
These variables are automatically initialized by the glibc run-time
startup code.
-.SH STANDARDS
-These variables are GNU extensions, and should not be
-used in programs intended to be portable.
-.SH NOTES
+.SH VERSIONS
The Linux-specific
-.I /proc/[number]/cmdline
+.IR /proc/ pid /cmdline
file provides access to similar information.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR proc (5)
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR psiginfo ()
-function was added in glibc 2.10.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.10.
POSIX.1-2008, 4.3BSD.
.SH BUGS
Up to glibc 2.12,
.B ENOMEM
Could not allocate memory to record the fork handler list entry.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
When
.BR fork (2)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.I pthread_attr_t
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.3.4.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.4.
.SH NOTES
In glibc 2.3.3 only,
versions of these functions were provided that did not have a
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
See
.BR pthread_create (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
A guard area consists of virtual memory pages that are protected
to prevent read and write access.
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH BUGS
As at glibc 2.8, if a thread attributes object is initialized using
.BR pthread_attr_init (3),
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.0.
.SH NOTES
See
.BR pthread_attr_setschedpolicy (3)
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_setschedparam (3).
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.B PTHREAD_SCOPE_SYSTEM
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.32.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.32.
.SH NOTES
The signal mask attribute determines the signal mask that will be assigned to
a thread created using the thread attributes object
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.2.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
These functions are provided for applications that must ensure that
a thread's stack is placed in a particular location.
.nf
.B #include <pthread.h>
.PP
+.B [[deprecated]]
.BI "int pthread_attr_setstackaddr(pthread_attr_t *" attr \
", void *" stackaddr );
+.B [[deprecated]]
.BI "int pthread_attr_getstackaddr(const pthread_attr_t *restrict " attr ,
.BI " void **restrict " stackaddr );
.fi
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001 specifies these functions but marks them as obsolete.
-POSIX.1-2008 removes the specification of these functions.
+None.
+.SH HISTORY
+glibc 2.1.
+Marked obsolete in POSIX.1-2001.
+Removed in POSIX.1-2008.
.SH NOTES
.I Do not use these functions!
They cannot be portably used, since they provide no way of specifying
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux, cancelation is implemented using signals.
Under the NPTL threading implementation,
the first real-time signal (i.e., signal 32) is used for this purpose.
if real-time signals are available, otherwise
.B SIGUSR2
is used.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH EXAMPLES
The program below creates a thread and then cancels it.
The main thread joins with the canceled thread to check
.hy
.ad
.sp 1
-.\" SH VERSIONS
-.\" Available since glibc 2.0
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-On Linux, the
+.SH VERSIONS
+On glibc, the
.BR pthread_cleanup_push ()
and
.BR pthread_cleanup_pop ()
.BR pthread_cleanup_pop ()
is undefined.
Portable applications should avoid doing this.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.0.
.SH EXAMPLES
The program below provides a simple example of the use of the functions
described in this page.
pthread_cleanup_pop(execute);
.EE
.in
-.\" SH VERSIONS
-.\" Available since glibc 2.0
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.0
.SH SEE ALSO
.BR pthread_cancel (3),
.BR pthread_cleanup_push (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
See
.BR pthread_self (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Once a thread has been detached, it can't be joined with
.BR pthread_join (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.BR pthread_equal ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Performing a return from the start function of any thread other
than the main thread results in an implicit call to
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are available since glibc 2.18.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in their names.
+.SH HISTORY
+glibc 2.18.
.SH EXAMPLES
The program below uses
.BR pthread_getattr_default_np ()
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.2.3.
.SH STANDARDS
-This function is a nonstandard GNU extension;
+GNU;
hence the suffix "_np" (nonportable) in the name.
+.SH HISTORY
+glibc 2.2.3.
.SH EXAMPLES
The program below demonstrates the use of
.BR pthread_getattr_np ().
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.2.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
When
.I thread
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
After a successful call to
.BR pthread_join (),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-Signal dispositions are process-wide:
-if a signal handler is installed,
-the handler will be invoked in the thread
-.IR thread ,
-but if the disposition of the signal is "stop", "continue", or "terminate",
-this action will affect the whole process.
-.PP
+.SH VERSIONS
The glibc implementation of
.BR pthread_kill ()
gives an error
and an attempt to use an invalid thread ID in a call to
.BR pthread_kill ()
can, for example, cause a segmentation fault.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+Signal dispositions are process-wide:
+if a signal handler is installed,
+the handler will be invoked in the thread
+.IR thread ,
+but if the disposition of the signal is "stop", "continue", or "terminate",
+this action will affect the whole process.
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
+.SH VERSIONS
+In the NPTL threading implementation,
+.BR pthread_kill_other_threads_np ()
+exists, but does nothing.
+(Nothing needs to be done,
+because the implementation does the right thing during an
+.BR execve (2).)
.SH STANDARDS
-This function is a nonstandard GNU extension;
+GNU;
hence the suffix "_np" (nonportable) in the name.
+.SH HISTORY
+glibc 2.0
.SH NOTES
.BR pthread_kill_other_threads_np ()
is intended to be called just before a thread calls
LinuxThreads implementation whereby the other threads of an application
are not automatically terminated (as POSIX.1-2001 requires) during
.BR execve (2).
-.PP
-In the NPTL threading implementation,
-.BR pthread_kill_other_threads_np ()
-exists, but does nothing.
-(Nothing needs to be done,
-because the implementation does the right thing during an
-.BR execve (2).)
.SH SEE ALSO
.BR execve (2),
.BR pthread_cancel (3),
.TP
.B EINVAL
The mutex is either not robust or is not in an inconsistent state.
-.SH VERSIONS
-.BR pthread_mutex_consistent ()
-was added in glibc 2.12.
.SH STANDARDS
POSIX.1-2008.
-.SH NOTES
-.BR pthread_mutex_consistent ()
-simply informs the implementation that the state (shared data)
-guarded by the mutex has been restored to a consistent state and that
-normal operations can now be performed with the mutex.
-It is the application's responsibility to ensure that the
-shared data has been restored to a consistent state before calling
-.BR pthread_mutex_consistent ().
+.SH HISTORY
+glibc 2.12.
+POSIX.1-2008.
.PP
Before the addition of
.BR pthread_mutex_consistent ()
This GNU-specific API, which first appeared in glibc 2.4,
is nowadays obsolete and should not be used in new programs;
since glibc 2.34 it has been marked as deprecated.
+.SH NOTES
+.BR pthread_mutex_consistent ()
+simply informs the implementation that the state (shared data)
+guarded by the mutex has been restored to a consistent state and that
+normal operations can now be performed with the mutex.
+It is the application's responsibility to ensure that the
+shared data has been restored to a consistent state before calling
+.BR pthread_mutex_consistent ().
.SH EXAMPLES
See
.BR pthread_mutexattr_setrobust (3).
.B PTHREAD_PROCESS_SHARED
but the implementation does not support process-shared mutexes.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
On success, these functions return 0.
On error, they return a positive error number.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Subsequent changes to a mutex attributes object do not affect mutex that
have already been initialized using that object.
was passed to
.BR pthread_mutexattr_setrobust ().
.SH VERSIONS
-.BR pthread_mutexattr_getrobust ()
-and
-.BR pthread_mutexattr_setrobust ()
-were added in glibc 2.12.
-.SH STANDARDS
-POSIX.1-2008.
-.SH NOTES
In the Linux implementation,
when using process-shared robust mutexes, a waiting thread also receives the
.B EOWNERDEAD
but the same behavior also occurs in at least some
.\" E.g., Solaris, according to its manual page
other implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.12.
+POSIX.1-2008.
.PP
Before the addition of
.BR pthread_mutexattr_getrobust ()
.B EINVAL
.I pref
specifies an unsupported value.
-.SH VERSIONS
-The
-.BR pthread_rwlockattr_getkind_np ()
-and
-.BR pthread_rwlockattr_setkind_np ()
-functions first appeared in glibc 2.1.
.SH STANDARDS
-These functions are non-standard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR pthreads (7)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
POSIX.1 allows an implementation wide freedom in choosing
the type used to represent a thread ID;
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are provided since glibc 2.3.4.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.4.
+.PP
+In glibc 2.3.3 only,
+versions of these functions were provided that did not have a
+.I cpusetsize
+argument.
+Instead the CPU set size given to the underlying system calls was always
+.IR sizeof(cpu_set_t) .
.SH NOTES
After a call to
.BR pthread_setaffinity_np (),
.BR sched_getaffinity (2)
system calls.
.PP
-In glibc 2.3.3 only,
-versions of these functions were provided that did not have a
-.I cpusetsize
-argument.
-Instead the CPU set size given to the underlying system calls was always
-.IR sizeof(cpu_set_t) .
-.PP
A new thread created by
.BR pthread_create (3)
inherits a copy of its creator's CPU affinity mask.
.ad
.sp 1
.hy
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH NOTES
For details of what happens when a thread is canceled, see
.BR pthread_cancel (3).
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions are available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
The default concurrency level is 0.
.PP
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.12.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.12.
.SH NOTES
.BR pthread_setname_np ()
internally writes to the thread-specific
.hy
.ad
.sp 1
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH NOTES
For a description of the permissions required to, and the effect of,
changing a thread's scheduling policy and priority,
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.3.4.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.4.
+POSIX.1-2001.
.SH NOTES
For a description of the permissions required to, and the effect of,
changing a thread's scheduling priority,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
A new thread inherits a copy of its creator's signal mask.
.PP
.ad
.sp 1
.SH VERSIONS
-The
-.BR pthread_sigqueue ()
-function first appeared in glibc 2.11.
-.SH STANDARDS
-This function is a GNU extension.
-.SH NOTES
The glibc implementation of
.BR pthread_sigqueue ()
gives an error
See
.BR nptl (7)
for details.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.11.
.SH SEE ALSO
.BR rt_tgsigqueueinfo (2),
.BR sigaction (2),
.TP
.B ENOMEM
Insufficient memory to initialize the spin lock.
-.SH VERSIONS
-These functions were added in glibc 2.2.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
POSIX.1-2001.
.PP
Support for process-shared spin locks is a POSIX option.
.TP
.B EBUSY
The spin lock is currently locked by another thread.
-.SH VERSIONS
-These functions were added in glibc 2.2.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
POSIX.1-2001.
-.SH NOTES
+.SH CAVEATS
Applying any of the functions described on this page to
an uninitialized spin lock results in undefined behavior.
.PP
.hy
.ad
.sp 1
-.\" SH VERSIONS
-.\" Available since glibc 2.0
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_cleanup_push (3).
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.3.3.
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.3.
.SH BUGS
The
.BR pthread_timedjoin_np ()
.ad
.sp 1
.SH VERSIONS
-Since glibc 2.34, this function is marked as deprecated.
+On Linux, this function is implemented as a call to
+.BR sched_yield (2).
.SH STANDARDS
-This call is nonstandard, but present on several other systems.
+None.
+.SH HISTORY
+.\" BSD, Tru64, AIX, and Irix.
+Deprecated since glibc 2.34.
Use the standardized
.BR sched_yield (2)
instead.
-.\" e.g., the BSDs, Tru64, AIX, and Irix.
.SH NOTES
-On Linux, this function is implemented as a call to
-.BR sched_yield (2).
-.PP
.BR pthread_yield ()
is intended for use with real-time scheduling policies (i.e.,
.B SCHED_FIFO
.ad
.sp 1
.SH VERSIONS
-.BR ptsname ()
-is provided since glibc 2.1.
+A version of
+.BR ptsname_r ()
+is documented on Tru64 and HP-UX,
+but on those implementations,
+\-1 is returned on error, with
+.I errno
+set to indicate the error.
+Avoid using this function in portable programs.
.SH STANDARDS
.TP
.BR ptsname ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR ptsname ()
-is part of the UNIX 98 pseudoterminal support (see
-.BR pts (4)).
+POSIX.1-2008.
.PP
.BR ptsname_r ()
is a Linux extension, that is proposed for inclusion
.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
.\" http://austingroupbugs.net/view.php?id=508
in the next major revision of POSIX.1 (Issue 8).
-A version of this function is documented on Tru64 and HP-UX, but
-on those implementations, \-1 is returned on error, with
-.I errno
-set to indicate the error.
-Avoid using this function in portable programs.
+.SH HISTORY
+.TP
+.BR ptsname ():
+POSIX.1-2001.
+glibc 2.1.
+.PP
+.BR ptsname ()
+is part of the UNIX 98 pseudoterminal support (see
+.BR pts (4)).
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.PP
The
.BR putenv ()
function is not required to be reentrant, and the
.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR fgetgrent (3),
.BR getgrent (3),
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endpwent (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99.
.SH BUGS
It is not advisable to mix calls to output functions from the
.I stdio
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR putwchar ()
.ad
.sp 1
.SH STANDARDS
-SVr4.
-Not seen in most common UNIX implementations,
-but occurs in SunOS.
+None.
+.SH HISTORY
+SVr4, SunOS, GNU.
.\" Not supported by libc4 and libc5.
-Supported by glibc.
-.SH NOTES
+.PP
These functions are obsolete.
Instead,
.BR snprintf (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR qsort_r ()
-was added in glibc 2.8.
.SH STANDARDS
-.BR qsort ():
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+.TP
+.BR qsort ()
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR qsort ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR qsort_r ()
+glibc 2.8.
.SH NOTES
To compare C strings, the comparison function can call
.BR strcmp (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
+.PP
Since glibc 2.3.3,
.BR raise ()
is implemented by calling
.hy
.ad
.sp 1
-.SH STANDARDS
-The functions
-.BR rand ()
-and
-.BR srand ()
-conform to SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
-The function
-.BR rand_r ()
-is from POSIX.1-2001.
-POSIX.1-2008 marks
-.BR rand_r ()
-as obsolete.
-.SH NOTES
+.SH VERSIONS
The versions of
.BR rand ()
and
(Use
.BR random (3)
instead.)
+.SH STANDARDS
+.TP
+.BR rand ()
+.TQ
+.BR srand ()
+C11, POSIX.1-2008.
+.TP
+.BR rand_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR rand ()
+.TQ
+.BR srand ()
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+.TP
+.BR rand_r ()
+POSIX.1-2001.
+Obsolete in POSIX.1-2008.
.SH EXAMPLES
POSIX.1-2001 gives the following example of an implementation of
.BR rand ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH NOTES
-The
-.BR random ()
-function should not be used in multithreaded programs
-where reproducible behavior is required.
-Use
-.BR random_r (3)
-for that purpose.
-.PP
Random-number generation is a complex topic.
.I Numerical Recipes in C: The Art of Scientific Computing
(William H.\& Press, Brian P.\& Flannery, Saul A.\& Teukolsky,
.IR "The Art of Computer Programming" ,
volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts:
Addison-Wesley Publishing Company, 1981.
+.SH CAVEATS
+The
+.BR random ()
+function should not be used in multithreaded programs
+where reproducible behavior is required.
+Use
+.BR random_r (3)
+for that purpose.
.SH BUGS
According to POSIX,
.BR initstate ()
.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard glibc extensions.
+GNU.
.\" These functions appear to be on Tru64, but don't seem to be on
.\" Solaris, HP-UX, or FreeBSD.
.SH BUGS
.hy
.ad
.sp 1
-.SH VERSIONS
-The functions
-.BR iruserok_af (),
-.BR rcmd_af (),
-.BR rresvport_af (),
-and
-.BR ruserok_af ()
-functions are provided since glibc 2.2.
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
-These
-functions appeared in
-4.2BSD.
+BSD.
+.SH HISTORY
+.TP
+.BR iruserok_af ()
+.TQ
+.BR rcmd_af ()
+.TQ
+.BR rresvport_af ()
+.TQ
+.BR ruserok_af ()
+glibc 2.2.
+.PP
+Solaris, 4.2BSD.
The "_af" variants are more recent additions,
and are not present on as wide a range of systems.
.SH BUGS
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-.SH NOTES
+.PP
These functions are obsolete; the functions documented in
.BR regcomp (3)
should be used instead.
will require that
.BR readdir ()
be thread-safe when concurrently employed on different directory streams.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
-A directory stream is opened using
-.BR opendir (3).
-.PP
-The order in which filenames are read by successive calls to
-.BR readdir ()
-depends on the filesystem implementation;
-it is unlikely that the names will be sorted in any fashion.
-.PP
+.SH VERSIONS
Only the fields
.I d_name
and (as an XSI extension)
field will contain a value that exceeds the size of the glibc
.I dirent
structure shown above.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SH NOTES
+A directory stream is opened using
+.BR opendir (3).
+.PP
+The order in which filenames are read by successive calls to
+.BR readdir ()
+depends on the filesystem implementation;
+it is unlikely that the names will be sorted in any fashion.
.SH SEE ALSO
.BR getdents (2),
.BR read (2),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR readdir (3)
.\" Even if we use resolved_path == NULL, then realpath() will still
.\" return ENAMETOOLONG if the resolved pathname would exceed PATH_MAX
.\" bytes -- MTK, Dec 04
-.\" .SH HISTORY
-.\" The
-.\" .BR realpath ()
-.\" function first appeared in 4.4BSD, contributed by Jan-Simon Pendry.
.SH RETURN VALUE
If there is no error,
.BR realpath ()
.hy
.ad
.sp 1
+.SH VERSIONS
+.SS GNU extensions
+If the call fails with either
+.B EACCES
+or
+.B ENOENT
+and
+.I resolved_path
+is not NULL, then the prefix of
+.I path
+that is not readable or does not exist is returned in
+.IR resolved_path .
.SH STANDARDS
-4.4BSD, POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+4.4BSD, POSIX.1-2001, Solaris.
.PP
POSIX.1-2001 says that the behavior if
.I resolved_path
is NULL is implementation-defined.
POSIX.1-2008 specifies the behavior described in this page.
-.SH NOTES
+.PP
In 4.4BSD and Solaris, the limit on the pathname length is
.B MAXPATHLEN
(found in \fI<sys/param.h>\fP).
.\" .BR realpath ()
.\" is given in \fI<unistd.h>\fP in libc4 and libc5,
.\" but in \fI<stdlib.h>\fP everywhere else.
-.SS GNU extensions
-If the call fails with either
-.B EACCES
-or
-.B ENOENT
-and
-.I resolved_path
-is not NULL, then the prefix of
-.I path
-that is not readable or does not exist is returned in
-.IR resolved_path .
.SH BUGS
The POSIX.1-2001 standard version of this function is broken by design,
since it is impossible to determine a suitable size for the output buffer,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
.EX
#include <stdint.h>
.nf
.B #include <math.h>
.PP
-/* The C99 versions */
.BI "double remainder(double " x ", double " y );
.BI "float remainderf(float " x ", float " y );
.BI "long double remainderl(long double " x ", long double " y );
.PP
/* Obsolete synonyms */
-.BI "double drem(double " x ", double " y );
-.BI "float dremf(float " x ", float " y );
-.BI "long double dreml(long double " x ", long double " y );
+.BI "[[deprecated]] double drem(double " x ", double " y );
+.BI "[[deprecated]] float dremf(float " x ", float " y );
+.BI "[[deprecated]] long double dreml(long double " x ", long double " y );
.fi
.PP
.RS -4
.sp 1
.SH STANDARDS
.\" IEC 60559.
-The functions
-.BR remainder (),
-.BR remainderf (),
-and
+.TP
+.BR remainder ()
+.TQ
+.BR remainderf ()
+.TQ
.BR remainderl ()
-are specified in C99, POSIX.1-2001, and POSIX.1-2008.
-.PP
-The function
+C11, POSIX.1-2008.
+.TP
.BR drem ()
-is from 4.3BSD.
-The
-.I float
-and
-.I "long double"
-variants
+.TQ
.BR dremf ()
-and
+.TQ
.BR dreml ()
-exist on some systems, such as Tru64 and glibc2.
-Avoid the use of these functions in favor of
+None.
+.SH HISTORY
+.\" IEC 60559.
+.TP
.BR remainder ()
-etc.
+.TQ
+.BR remainderf ()
+.TQ
+.BR remainderl ()
+C99, POSIX.1-2001.
+.TP
+.BR drem ()
+4.3BSD.
+.TP
+.BR dremf ()
+.TQ
+.BR dreml ()
+Tru64, glibc2.
.SH BUGS
Before glibc 2.15,
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, 4.3BSD.
.\" .SH NOTES
.\" Under libc4 and libc5,
.\" .BR remove ()
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fmod (3),
.BR logb (3),
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.SH SEE ALSO
.BR gethostbyname (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR closedir (3),
.BR opendir (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR rexec_af ()
-function was added in glibc 2.2.
.SH STANDARDS
-These functions are not in POSIX.1.
-The
+None.
+.SH HISTORY
+.TP
.BR rexec ()
-function first appeared in
-4.2BSD, and is present on the BSDs, Solaris, and many other systems.
-The
+4.2BSD, BSD, Solaris.
+.TP
.BR rexec_af ()
-function is more recent, and less widespread.
+glibc 2.2.
.SH BUGS
The
.BR rexec ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
POSIX.1-2001 contains text about overflow (which might set
.I errno
.SH RETURN VALUE
This macro returns the rounded value.
.SH STANDARDS
-This nonstandard macro is present in glibc and some BSDs.
+None.
.SH CAVEATS
The arguments may be evaluated more than once.
.PP
.ad
.sp 1
.SH STANDARDS
-.BR rpmatch ()
-is not required by any standard,
-but available under the GNU C library, FreeBSD, and AIX.
+None.
+.SH HISTORY
+GNU, FreeBSD, AIX.
.SH BUGS
The
.BR YESEXPR " and " NOEXPR
.I len
bytes of data.
.SH STANDARDS
-These macros are nonstandard Linux extensions.
+Linux.
.SH BUGS
This manual page is incomplete.
.SH EXAMPLES
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+.TP
.BR scalb ()
-is specified in POSIX.1-2001, but marked obsolescent.
-POSIX.1-2008 removes the specification of
-.BR scalb (),
+4.3BSD.
+Obsolescent in POSIX.1-2001;
+Removed in POSIX.1-2008,
recommending the use of
.BR scalbln (3),
.BR scalblnf (3),
or
.BR scalblnl (3)
instead.
-The
-.BR scalb ()
-function is from 4.3BSD.
-.PP
-.BR scalbf ()
-and
-.BR scalbl ()
-are unstandardized;
-.BR scalbf ()
-is nevertheless present on several other systems
.\" Looking at header files: scalbf() is present on the
.\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64.
.SH BUGS
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
+.SH HISTORY
These functions differ from the obsolete functions described in
.BR scalb (3)
in the type of their second argument.
.BR scalb (3)
have a second argument of type
.IR double .
-.PP
+.SH NOTES
If
.B FLT_RADIX
equals 2 (which is usual), then
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.BR alphasort ()
+.TQ
+.BR scandir ()
+POSIX.1-2008.
+.TP
.BR versionsort ()
-was added in glibc 2.1.
-.PP
+.TQ
.BR scandirat ()
-was added in glibc 2.15.
-.SH STANDARDS
-.BR alphasort (),
-.BR scandir ():
+GNU.
+.SH HISTORY
+.TP
+.BR alphasort ()
+.TQ
+.BR scandir ()
4.3BSD, POSIX.1-2008.
-.PP
+.TP
.BR versionsort ()
-and
+glibc 2.1.
+.TP
.BR scandirat ()
-are GNU extensions.
+glibc 2.15.
.\" .LP
.\" The functions
.\" .BR scandir ()
.ad
.sp 1
.SH STANDARDS
-These functions conform to C99 and POSIX.1-2001.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fgets (3),
.BR getline (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-This function is available since glibc 2.6.
.SH STANDARDS
-.BR sched_getcpu ()
-is glibc-specific.
+GNU.
+.SH HISTORY
+glibc 2.6.
.SH NOTES
The call
.PP
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.SH CAVEATS
Up to glibc 2.1.1, the type of the
.I loc
argument was
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
All open named semaphores are automatically closed on process
termination, or upon
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
An unnamed semaphore should be destroyed with
.BR sem_destroy ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The value of the semaphore may already have changed by the time
.BR sem_getvalue ()
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
-.SH NOTES
+.PP
Bizarrely, POSIX.1-2001 does not specify the value that should
be returned by a successful call to
.BR sem_init ().
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR sem_close (3),
.BR sem_getvalue (3),
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
.SH NOTES
.BR sem_post ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR sem_getvalue (3),
.BR sem_open (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The (somewhat trivial) program shown below operates on an
unnamed semaphore.
.ad
.sp 1
.SH STANDARDS
-These routines are glibc-specific.
+GNU.
+.SH HISTORY
The NeXT system has similar routines:
.PP
.in +4n
.ad
.sp 1
.SH STANDARDS
-The
+.TP
+.BR setbuf ()
+.TQ
+.BR setvbuf ()
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
.BR setbuf ()
-and
+.TQ
.BR setvbuf ()
-functions conform to C89 and C99.
-.SH NOTES
+C89, POSIX.1-2001.
+.SH CAVEATS
POSIX notes
.\" https://www.austingroupbugs.net/view.php?id=397#c799
.\" 0000397: setbuf and errno
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
-POSIX.1 does not require
-.BR setenv ()
-or
-.BR unsetenv ()
-to be reentrant.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.PP
Prior to glibc 2.2.2,
.BR unsetenv ()
.IR void ;
more recent glibc versions follow the
POSIX.1-compliant prototype shown in the SYNOPSIS.
+.SH CAVEATS
+POSIX.1 does not require
+.BR setenv ()
+or
+.BR unsetenv ()
+to be reentrant.
.SH BUGS
POSIX.1 specifies that if
.I name
.ad
.sp 1
.SH STANDARDS
-.BR setjmp (),
-.BR longjmp ():
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+.TP
+.BR setjmp ()
+.TQ
+.BR longjmp ()
+C11, POSIX.1-2008.
+.TP
+.BR sigsetjmp ()
+.TQ
+.BR siglongjmp ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR setjmp ()
+.TQ
+.BR longjmp ()
+POSIX.1-2001, C89.
+.TP
+.BR sigsetjmp ()
+.TQ
+.BR siglongjmp ()
+POSIX.1-2001.
.PP
-.BR sigsetjmp (),
-.BR siglongjmp ():
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
POSIX does not specify whether
.BR setjmp ()
will save the signal mask
with a nonzero
.I savesigs
argument.
-.PP
+.SH NOTES
.BR setjmp ()
and
.BR longjmp ()
and
.BR siglongjmp ().
See also the discussion of program readability below.
-.PP
+.SH CAVEATS
The compiler may optimize variables into registers, and
.BR longjmp ()
may restore the values of other registers in addition to the
In summary, nonlocal gotos can make programs harder to understand
and maintain, and an alternative should be used if possible.
.\"
-.SS Caveats
+.SS Undefined Behavior
If the function which called
.BR setjmp ()
returns before
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
-The C standards specify only the categories
-.BR LC_ALL ,
-.BR LC_COLLATE ,
-.BR LC_CTYPE ,
-.BR LC_MONETARY ,
-.BR LC_NUMERIC ,
-and
-.BR LC_TIME .
-POSIX.1 adds
-.BR LC_MESSAGES .
-The remaining categories are GNU extensions.
+C11, POSIX.1-2008.
+.SS Categories
+.TP
+.B LC_ALL
+.TQ
+.B LC_COLLATE
+.TQ
+.B LC_CTYPE
+.TQ
+.B LC_MONETARY
+.TQ
+.B LC_NUMERIC
+.TQ
+.B LC_TIME
+C11, POSIX.1-2008.
+.TP
+.BR LC_MESSAGES
+POSIX.1-2008.
+.TP
+Others:
+GNU.
+.SH HISTORY
+POSIX.1-2001, C89.
+.SS Categories
+.TP
+.B LC_ALL
+.TQ
+.B LC_COLLATE
+.TQ
+.B LC_CTYPE
+.TQ
+.B LC_MONETARY
+.TQ
+.B LC_NUMERIC
+.TQ
+.B LC_TIME
+C89, POSIX.1-2001.
+.TP
+.BR LC_MESSAGES
+POSIX.1-2001.
+.TP
+Others:
+GNU.
.SH SEE ALSO
.BR locale (1),
.BR localedef (1),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.\" Note that the description in POSIX.1-2001 is flawed.
.PP
.BR LOG_UPTO ()
.BR endnetgrent ()
are used in parallel in different threads of a program,
then data races could occur.
+.SH VERSIONS
+In the BSD implementation,
+.BR setnetgrent ()
+returns void.
.SH STANDARDS
-These functions are not in POSIX.1, but
+None.
+.SH HISTORY
.BR setnetgrent (),
.BR endnetgrent (),
.BR getnetgrent (),
.BR getnetgrent_r ()
is not widely available on other systems.
.\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
-.SH NOTES
-In the BSD implementation,
-.BR setnetgrent ()
-returns void.
.SH SEE ALSO
.BR sethostent (3),
.BR setprotoent (3),
.ad
.sp 1
.SH VERSIONS
-These functions are provided in glibc 2.2 and later.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-POSIX.1-2001 says that the group ownership of a newly created shared
-memory object is set to either the calling process's effective group ID
-or "a system default group ID".
-POSIX.1-2008 says that the group ownership
-may be set to either the calling process's effective group ID
-or, if the object is visible in the filesystem,
-the group ID of the parent directory.
-.SH NOTES
POSIX leaves the behavior of the combination of
.B O_RDONLY
and
.BR tmpfs (5)
filesystem that is normally mounted under
.IR /dev/shm .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
+.PP
+POSIX.1-2001 says that the group ownership of a newly created shared
+memory object is set to either the calling process's effective group ID
+or "a system default group ID".
+POSIX.1-2008 says that the group ownership
+may be set to either the calling process's effective group ID
+or, if the object is visible in the filesystem,
+the group ID of the parent directory.
.SH EXAMPLES
The programs below employ POSIX shared memory and POSIX unnamed semaphores
to exchange a piece of data.
.nf
.B #include <signal.h>
.PP
-.BI "int siginterrupt(int " sig ", int " flag );
+.BI "[[deprecated]] int siginterrupt(int " sig ", int " flag );
.fi
.PP
.RS -4
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR siginterrupt ()
-as obsolete, recommending the use of
+Obsolete in POSIX.1-2008,
+recommending the use of
.BR sigaction (2)
with the
.B SA_RESTART
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
.SH SEE ALSO
.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard; the
-.I double
-version is available on a number of other systems.
-.\" .SH HISTORY
-.\" This function came from BSD.
+None.
+.TP
+.BR significand ()
+BSD.
+.SH HISTORY
+.TP
+.BR significand ()
+BSD.
.SH SEE ALSO
.BR ilogb (3),
.BR scalb (3)
.nf
.B #include <signal.h>
.PP
-.BI "int sigpause(int " sigmask "); /* BSD (but see NOTES) */"
+.BI "[[deprecated]] int sigpause(int " sigmask "); /* BSD (but see NOTES) */"
.PP
-.BI "int sigpause(int " sig "); /* System V / UNIX 95 */"
+.BI "[[deprecated]] int sigpause(int " sig "); /* POSIX.1 / SysV / UNIX 95 */"
.fi
.SH DESCRIPTION
Don't use this function.
.\" glibc manual says /!linux!bsd indicate the preceding marker only applies
.\" when the underlying kernel is neither Linux nor a BSD kernel.
.\" So, it is safe in Linux kernel.
-.SH STANDARDS
-The System V version of
-.BR sigpause ()
-is standardized in POSIX.1-2001.
-It is also specified in POSIX.1-2008, where it is marked obsolete.
-.SH NOTES
-.SS History
-The classical BSD version of this function appeared in 4.2BSD.
-It sets the process's signal mask to
-.IR sigmask .
-UNIX 95 standardized the incompatible System V version of
-this function, which removes only the specified signal
-.I sig
-from the process's signal mask.
-.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
-The unfortunate situation with two incompatible functions with the
-same name was solved by the
-.BR \%sigsuspend (2)
-function, that takes a
-.I "sigset_t\ *"
-argument (instead of an
-.IR int ).
-.SS Linux notes
+.SH VERSIONS
On Linux, this routine is a system call only on the Sparc (sparc64)
architecture.
.PP
.\" For the BSD version, one usually uses a zero
.\" .I sigmask
.\" to indicate that no signals are to be blocked.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+Obsoleted in POSIX.1-2008.
+.PP
+The classical BSD version of this function appeared in 4.2BSD.
+It sets the process's signal mask to
+.IR sigmask .
+UNIX 95 standardized the incompatible System V version of
+this function, which removes only the specified signal
+.I sig
+from the process's signal mask.
+.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
+The unfortunate situation with two incompatible functions with the
+same name was solved by the
+.BR \%sigsuspend (2)
+function, that takes a
+.I "sigset_t\ *"
+argument (instead of an
+.IR int ).
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
.ad
.sp 1
.SH VERSIONS
-.BR sigqueue ()
-and the underlying
-.BR rt_sigqueueinfo (2)
-system call first appeared in Linux 2.2.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-If this function results in the sending of a signal to the process
-that invoked it, and that signal was not blocked by the calling thread,
-and no other threads were willing to handle this signal (either by
-having it unblocked, or by waiting for it using
-.BR sigwait (3)),
-then at least some signal must be delivered to this thread before this
-function returns.
.SS C library/kernel differences
On Linux,
.BR sigqueue ()
uinfo.si_value = val; /* Argument supplied to sigqueue() */
.EE
.in
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.2.
+POSIX.1-2001.
+.SH NOTES
+If this function results in the sending of a signal to the process
+that invoked it, and that signal was not blocked by the calling thread,
+and no other threads were willing to handle this signal (either by
+having it unblocked, or by waiting for it using
+.BR sigwait (3)),
+then at least some signal must be delivered to this thread before this
+function returns.
.SH SEE ALSO
.BR kill (2),
.BR rt_sigqueueinfo (2),
.PP
.B typedef void (*sighandler_t)(int);
.PP
-.BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
+.BI "[[deprecated]] sighandler_t sigset(int " sig ", sighandler_t " disp );
.PP
-.BI "int sighold(int " sig );
-.BI "int sigrelse(int " sig );
-.BI "int sigignore(int " sig );
+.BI "[[deprecated]] int sighold(int " sig );
+.BI "[[deprecated]] int sigrelse(int " sig );
+.BI "[[deprecated]] int sigignore(int " sig );
.fi
.PP
.RS -4
.ad
.sp 1
.SH STANDARDS
-SVr4, POSIX.1-2001, POSIX.1-2008.
-These functions are obsolete: do not use them in new programs.
-POSIX.1-2008 marks
-.BR sighold (),
-.BR sigignore (),
-.BR sigpause (3),
-.BR sigrelse (),
-and
-.BR sigset ()
+POSIX.1-2008.
+.TP
+.I sighandler_t
+GNU.
+POSIX.1 uses the same type but without a
+.IR typedef .
+.SH HISTORY
+glibc 2.1.
+SVr4, POSIX.1-2001.
+POSIX.1-2008 marks these functions
as obsolete, recommending the use of
.BR sigaction (2),
.BR sigprocmask (2),
.BR sigsuspend (2)
instead.
.SH NOTES
-These functions appeared in glibc 2.1.
-.PP
-The
-.I sighandler_t
-type is a GNU extension; it is used on this page only to make the
-.BR sigset ()
-prototype more easily readable.
-.PP
The
.BR sigset ()
function provides reliable signal handling semantics (as when calling
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-When creating a filled signal set, the glibc
-.BR sigfillset ()
-function does not include the two real-time signals used internally
-by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.\"
-.SS glibc extensions
+.SH VERSIONS
+.SS GNU
If the
.B _GNU_SOURCE
feature test macro is defined, then \fI<signal.h>\fP
.PP
These functions are nonstandard (a few other systems provide similar
functions) and their use should be avoided in portable applications.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+When creating a filled signal set, the glibc
+.BR sigfillset ()
+function does not include the two real-time signals used internally
+by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
.SH SEE ALSO
.BR sigaction (2),
.BR sigpending (2),
.nf
.B #include <signal.h>
.PP
-.BI "int sigvec(int " sig ", const struct sigvec *" vec ", struct sigvec *" ovec );
+.BI "[[deprecated]] int sigvec(int " sig ", const struct sigvec *" vec ,
+.BI " struct sigvec *" ovec );
.PP
-.BI "int sigmask(int " signum );
+.BI "[[deprecated]] int sigmask(int " signum );
.PP
-.BI "int sigblock(int " mask );
-.BI "int sigsetmask(int " mask );
-.B int siggetmask(void);
+.BI "[[deprecated]] int sigblock(int " mask );
+.BI "[[deprecated]] int sigsetmask(int " mask );
+.B [[deprecated]] int siggetmask(void);
.fi
.PP
.RS -4
.hy
.ad
.sp 1
-.SH VERSIONS
-Starting with glibc 2.21, the GNU C library no longer exports the
-.BR sigvec ()
-function as part of the ABI.
-(To ensure backward compatibility,
-the glibc symbol versioning scheme continues to export the interface
-to binaries linked against older versions of the library.)
.SH STANDARDS
-All of these functions were in
-4.3BSD, except
-.BR siggetmask (),
-whose origin is unclear.
-These functions are obsolete: do not use them in new programs.
+None.
+.SH HISTORY
+.TP
+.BR sigvec ()
+.TQ
+.BR sigblock ()
+.TQ
+.BR sigmask ()
+.TQ
+.BR sigsetmask ()
+4.3BSD.
+.TP
+.BR siggetmask ()
+Unclear origin.
+.TP
+.BR sigvec ()
+Removed in glibc 2.21.
.SH NOTES
On 4.3BSD, the
.BR signal ()
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
.BR sigwait ()
is implemented using
.BR sigtimedwait (2).
See
.BR nptl (7)
for details.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_sigmask (3).
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
To see the performance advantage of
.BR sincos (),
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR sleep ()
is implemented via
See the
.BR nanosleep (2)
man page for a discussion of the clock used.
-.SS Portability notes
+.PP
On some systems,
.BR sleep ()
may be implemented using
and
.BR sleep ()
is a bad idea.
-.PP
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH CAVEATS
Using
.BR longjmp (3)
from a signal handler or modifying the handling of
returns an initializer that can be assigned to the list
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(SLIST macros first appeared in 4.4BSD).
+BSD.
+.SH HISTORY
+4.4BSD.
.SH BUGS
.BR SLIST_FOREACH ()
doesn't allow
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR sockatmark ()
-was added in glibc 2.2.4.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.4.
+POSIX.1-2001.
.SH NOTES
If
.BR sockatmark ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-These functions conform to C99 and POSIX.1-2001.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
The
.B q
.BR STAILQ_HEAD_INITIALIZER ()
returns an initializer that can be assigned to the queue
.IR head .
-.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(STAILQ macros first appeared in 4.4BSD).
-.SH NOTES
+.SH VERSIONS
Some BSDs provide SIMPLEQ instead of STAILQ.
They are identical, but for historical reasons
they were named differently on different BSDs.
.I var
to safely be removed from the list and freed from within the loop
without interfering with the traversal.
+.SH STANDARDS
+BSD.
+.SH HISTORY
+4.4BSD.
.SH EXAMPLES
.\" SRC BEGIN (stailq.c)
.EX
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
+.SH VERSIONS
Only the
.B ST_NOSUID
and
.BR fstatfs (2)
to support this library call.
.PP
-Before glibc 2.13,
-.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d
-.BR statvfs ()
-populated the bits of the
-.I f_flag
-field by scanning the mount options shown in
-.IR /proc/mounts .
-However, starting with Linux 2.6.36, the underlying
-.BR statfs (2)
-system call provides the necessary information via the
-.I f_flags
-field, and since glibc 2.13, the
-.BR statvfs ()
-function will use information from that field rather than scanning
-.IR /proc/mounts .
-.PP
The glibc implementations of
.PP
.in +4n
.BR statvfs ()
with the argument
.IR path .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Before glibc 2.13,
+.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d
+.BR statvfs ()
+populated the bits of the
+.I f_flag
+field by scanning the mount options shown in
+.IR /proc/mounts .
+However, starting with Linux 2.6.36, the underlying
+.BR statfs (2)
+system call provides the necessary information via the
+.I f_flags
+field, and since glibc 2.13, the
+.BR statvfs ()
+function will use information from that field rather than scanning
+.IR /proc/mounts .
.SH SEE ALSO
.BR statfs (2)
.ad
.sp 1
.SH STANDARDS
-The
-.BR va_start (),
-.BR va_arg (),
-and
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR va_start ()
+.TQ
+.BR va_arg ()
+.TQ
.BR va_end ()
-macros conform to C89.
-C99 defines the
+C89, POSIX.1-2001.
+.TP
.BR va_copy ()
-macro.
-.SH BUGS
+C99, POSIX.1-2001.
+.SH CAVEATS
Unlike the historical
.B varargs
macros, the
.BR exit (3)
and by normal program termination.
.SH STANDARDS
-The
-.IR stdin ,
-.IR stdout ,
-and
-.I stderr
-macros conform to C89
-and this standard also stipulates that these three
+C11, POSIX.1-2008.
+.PP
+The standards also stipulate that these three
streams shall be open at program startup.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The stream
.I stderr
.ad
.hy
.SH STANDARDS
-The
-.I stdio
-library conforms to C89.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR close (2),
.BR open (2),
.nf
.B #include <string.h>
.PP
-.BI "char *stpncpy(char " dst "[restrict ." sz "], \
+.BI "char *strncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );
-.BI "char *strncpy(char " dst "[restrict ." sz "], \
+.BI "char *stpncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );
.fi
.in +4n
.EX
char *
-stpncpy(char *restrict dst, const char *restrict src, size_t sz)
+strncpy(char *restrict dst, const char *restrict src, size_t sz)
{
- bzero(dst, sz);
- return mempcpy(dst, src, strnlen(src, sz));
+ stpncpy(dst, src, sz);
+ return dst;
}
char *
-strncpy(char *restrict dst, const char *restrict src, size_t sz)
+stpncpy(char *restrict dst, const char *restrict src, size_t sz)
{
- stpncpy(dst, src, sz);
- return dst;
+ bzero(dst, sz);
+ return mempcpy(dst, src, strnlen(src, sz));
}
.EE
.in
.SH RETURN VALUE
.TP
-.BR stpncpy ()
-returns a pointer to
-one after the last character in the destination character sequence.
-.TP
.BR strncpy ()
returns
.IR dst .
+.TP
+.BR stpncpy ()
+returns a pointer to
+one after the last character in the destination character sequence.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.sp 1
.SH STANDARDS
.TP
+.BR strncpy ()
+C11, POSIX.1-2008.
+.TP
.BR stpncpy ()
POSIX.1-2008.
-.\" Before that, it was a GNU extension.
-.\" It first appeared in glibc 1.07 in 1993.
+.SH STANDARDS
.TP
.BR strncpy ()
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C89, POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR stpncpy ()
+glibc 1.07.
+POSIX.1-2008.
.SH CAVEATS
The name of these functions is confusing.
These functions produce a null-padded character sequence,
char buf2[20];
size_t len;
- if (sizeof(buf1) < strlen("Hello world!"))
- warnx("stpncpy: truncating character sequence");
- p = stpncpy(buf1, "Hello world!", sizeof(buf1));
- len = p \- buf1;
-
- printf("[len = %zu]: ", len);
- printf("%.*s\en", (int) len, buf1); // "Hello world!"
-
if (sizeof(buf2) < strlen("Hello world!"))
warnx("strncpy: truncating character sequence");
strncpy(buf2, "Hello world!", sizeof(buf2));
printf("[len = %zu]: ", len);
printf("%.*s\en", (int) len, buf2); // "Hello world!"
+ if (sizeof(buf1) < strlen("Hello world!"))
+ warnx("stpncpy: truncating character sequence");
+ p = stpncpy(buf1, "Hello world!", sizeof(buf1));
+ len = p \- buf1;
+
+ printf("[len = %zu]: ", len);
+ printf("%.*s\en", (int) len, buf1); // "Hello world!"
+
exit(EXIT_SUCCESS);
}
.EE
.ad
.sp 1
.SH STANDARDS
-4.4BSD, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+4.4BSD, POSIX.1-2001.
+.PP
The
.BR strcasecmp ()
and
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR strchrnul ()
-was added in glibc 2.1.1.
.SH STANDARDS
-.BR strchr (),
-.BR strrchr ():
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.PP
+.TP
+.BR strchr ()
+.TQ
+.BR strrchr ()
+C11, POSIX.1-2008.
+.TP
+.BR strchrnul ()
+GNU.
+.SH HISTORY
+.TP
+.BR strchr ()
+.TQ
+.BR strrchr ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
.BR strchrnul ()
-is a GNU extension.
+glibc 2.1.1.
.SH SEE ALSO
.BR memchr (3),
.BR string (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
POSIX.1 specifies only that:
.RS
.PP
from the last compared byte in
.IR s1 .
(If the two characters are equal, this difference is 0.)
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH EXAMPLES
The program below can be used to demonstrate the operation of
.BR strcmp ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
In the
.I "POSIX"
.BR strcpy ()
.TQ
.BR strcat ()
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH STANDARDS
+.TP
+.BR stpcpy ()
+POSIX.1-2008.
+.TP
+.BR strcpy ()
+.TQ
+.BR strcat ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH CAVEATS
The strings
.I src
.ad
.sp 1
.SH STANDARDS
-.\" 4.3BSD-Reno, not (first) 4.3BSD.
+.TP
.BR strdup ()
-conforms to SVr4, 4.3BSD, POSIX.1-2001.
+.TQ
.BR strndup ()
-conforms to POSIX.1-2008.
+POSIX.1-2008.
+.TP
.BR strdupa ()
-and
+.TQ
+.BR strndupa ()
+GNU.
+.SH HISTORY
+.TP
+.BR strdup ()
+SVr4, 4.3BSD-Reno, POSIX.1-2001.
+.TP
+.BR strndup ()
+POSIX.1-2008.
+.TP
+.BR strdupa ()
+.TQ
.BR strndupa ()
-are GNU extensions.
+GNU.
.SH SEE ALSO
.BR alloca (3),
.BR calloc (3),
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR strerror_l ()
-function first appeared in glibc 2.6.
-.PP
-The
-.BR strerrorname_np ()
-and
-.BR strerrordesc_np ()
-functions first appeared in glibc 2.32.
.SH STANDARDS
+.TP
.BR strerror ()
-is specified by POSIX.1-2001, POSIX.1-2008, C89, and C99.
+C11, POSIX.1-2008.
+.TP
.BR strerror_r ()
-is specified by POSIX.1-2001 and POSIX.1-2008.
.\" FIXME . for later review when Issue 8 is one day released...
.\" A future POSIX.1 may remove strerror_r()
.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
.\" http://austingroupbugs.net/view.php?id=508
-.PP
+.TQ
.BR strerror_l ()
-is specified in POSIX.1-2008.
-.PP
-The GNU-specific functions
-.BR strerror_r (),
-.BR strerrorname_np (),
-and
+POSIX.1-2008.
+.TP
+.BR strerrorname_np ()
+.TQ
.BR strerrordesc_np ()
-are nonstandard extensions.
+GNU.
.PP
POSIX.1-2001 permits
.BR strerror ()
.B EINVAL
if the error number is unknown.
C99 and POSIX.1-2008 require the return value to be non-NULL.
+.SH HISTORY
+.TP
+.BR strerror ()
+POSIX.1-2001, C89.
+.TP
+.BR strerror_r ()
+POSIX.1-2001.
+.TP
+.BR strerror_l ()
+glibc 2.6.
+POSIX.1-2008.
+.TP
+.BR strerrorname_np ()
+.TQ
+.BR strerrordesc_np ()
+glibc 2.32.
.SH NOTES
The GNU C Library uses a buffer of 1024 characters for
.BR strerror ().
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The call
.PP
.ad
.sp 1
Note: these attributes are preliminary.
+.SH STANDARDS
+ISO/IEC TS 18661-1.
.SH VERSIONS
-The
-.BR strfromd (),
-.BR strfromf (),
-and
+.TP
+.BR strfromd ()
+.TQ
+.BR strfromf ()
+.TQ
.BR strfroml ()
-functions are available since glibc 2.25.
-.SH STANDARDS
-C99, ISO/IEC TS 18661-1.
+glibc 2.25.
.SH NOTES
-The
-.BR strfromd (),
-.BR strfromf (),
-and
-.BR strfroml ()
-functions take account of the
+These functions take account of the
.B LC_NUMERIC
category of the current locale.
.SH EXAMPLES
.ad
.sp 1
.SH STANDARDS
-The
-.BR strfry ()
-function is unique to the
-GNU C Library.
+GNU.
.SH SEE ALSO
.BR memfrob (3),
.BR string (3)
.ad
.sp 1
.SH STANDARDS
-.BR strftime ():
-SVr4, C89, C99.
-.PD 0
-.PP
-.PD
-.BR strftime_l ():
+.TP
+.BR strftime ()
+C11, POSIX.1-2008.
+.TP
+.BR strftime_l ()
POSIX.1-2008.
-.PP
+.SH HISTORY
+.TP
+.BR strftime ()
+SVr4, C89.
.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
.\" in the standards changed across versions. Investigate and
.\" write up.
+.TP
+.BR strftime_l ()
+POSIX.1-2008.
+.PP
There are strict inclusions between the set of conversions
given in ANSI C (unmarked), those given in the Single UNIX Specification
(marked SU), those given in Olson's timezone package (marked TZ),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
In cases where the input buffer may not contain
a terminating null byte,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH CAVEATS
The name of this function is confusing.
This function has no relation to
.sp 1
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2008.
.SH SEE ALSO
.BR strlen (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memchr (3),
.BR strchr (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
.SH NOTES
In principle, this function does not initialize
.I tm
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.4BSD.
-.SH NOTES
+.PP
The
.BR strsep ()
function was introduced as a replacement for
.hy
.ad
.sp 1
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.BR strsignal ()
+POSIX.1-2008.
+.TP
.BR sigdescr_np ()
-and
+.TQ
.BR sigabbrev_np ()
-first appeared in glibc 2.32.
-.PP
-Starting with glibc 2.32,
-.\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
-the
+GNU.
+.TP
.I sys_siglist
-symbol is no longer exported by glibc.
-.SH STANDARDS
-.BR strsignal ():
+None.
+.\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
+.SH HISTORY
+.TP
+.BR strsignal ()
POSIX.1-2008.
-Present on Solaris and the BSDs.
-.PP
+Solaris, BSD.
+.TP
.BR sigdescr_np ()
-and
+.TQ
.BR sigabbrev_np ()
-are GNU extensions.
-.PP
+glibc 2.32.
+.TP
.I sys_siglist
-is nonstandard, but present on many other systems.
+Removed in glibc 2.32.
.SH NOTES
.BR sigdescr_np ()
and
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memchr (3),
.BR strchr (3),
.ad
.sp 1
.SH STANDARDS
-.BR strstr ():
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.PP
-The
+.TP
+.BR strstr ()
+C11, POSIX.1-2008.
+.TP
+.BR strcasestr ()
+GNU.
+.SH HISTORY
+.TP
+.BR strstr ()
+POSIX.1-2001, C89.
+.TP
.BR strcasestr ()
-function is a nonstandard extension.
+GNU.
.SH SEE ALSO
.BR memchr (3),
.BR memmem (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-.BR strtod ()
-was also described in C89.
-.SH NOTES
-Since
-0 can legitimately be returned
-on both success and failure, the calling program should set
-.I errno
-to 0 before the call,
-and then determine if an error occurred by checking whether
-.I errno
-has a nonzero value after the call.
-.PP
+.SH VERSIONS
In the glibc implementation, the
.I n-char-sequence
that optionally follows "NAN"
.\" something similar.
.\" C11 says: "An implementation may use the n-char sequence to determine
.\" extra information to be represented in the NaN's significant."
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtod ()
+C89, POSIX.1-2001.
+.TP
+.BR strtof ()
+.TQ
+.BR strtold ()
+C99, POSIX.1-2001.
+.SH NOTES
+Since
+0 can legitimately be returned
+on both success and failure, the calling program should set
+.I errno
+to 0 before the call,
+and then determine if an error occurred by checking whether
+.I errno
+has a nonzero value after the call.
.SH EXAMPLES
See the example on the
.BR strtol (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR imaxabs (3),
.BR imaxdiv (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-.TP
-.BR strtok ()
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
-.TP
-.BR strtok_r ()
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On some implementations,
.\" Tru64, according to its manual page
.I *saveptr
.BR strtok_r ()
that is being used to parse
.IR str .
+.SH STANDARDS
+.TP
+.BR strtok ()
+C11, POSIX.1-2008.
+.TP
+.BR strtok_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtok ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR strtok_r ()
+POSIX.1-2001.
.SH BUGS
Be cautious when using these functions.
If you do use them, note that:
.ad
.sp 1
.SH STANDARDS
-.BR strtol ():
-POSIX.1-2001, POSIX.1-2008, C89, C99 SVr4, 4.3BSD.
-.PP
-.BR strtoll ():
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtol ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR strtoll ()
+POSIX.1-2001, C99.
.SH NOTES
Since
.BR strtol ()
.ad
.sp 1
.SH STANDARDS
-.BR strtoul ():
-POSIX.1-2001, POSIX.1-2008, C89, C99 SVr4.
-.PP
-.BR strtoull ():
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtoul ()
+POSIX.1-2001, C89, SVr4.
+.TP
+.BR strtoull ()
+POSIX.1-2001, C99.
.SH NOTES
Since
.BR strtoul ()
.\" we may call isdigit() in macro, then strverscmp() should not have locale
.\" problem.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH EXAMPLES
The program below can be used to demonstrate the behavior of
.BR strverscmp ().
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memcmp (3),
.BR setlocale (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bstring (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
It is difficult to use
.B ARG_MAX
.ad
.sp 1
.SH STANDARDS
-The functions
-.BR openlog (),
-.BR closelog (),
-and
+.TP
+.BR syslog ()
+.TQ
+.BR openlog ()
+.TQ
+.BR closelog ()
+POSIX.1-2008.
+.TP
+.BR vsyslog ()
+None.
+.SH HISTORY
+.TP
.BR syslog ()
-(but not
-.BR vsyslog ())
-are specified in SUSv2, POSIX.1-2001, and POSIX.1-2008.
+4.2BSD, SUSv2, POSIX.1-2001.
+.TP
+.BR openlog ()
+.TQ
+.BR closelog ()
+4.3BSD, SUSv2, POSIX.1-2001.
+.\" .SH HISTORY
+.\" 4.3BSD documents
+.\" .BR setlogmask ().
+.TP
+.BR vsyslog ()
+4.3BSD-Reno.
+.\" Of course early v* functions used the
+.\" .I <varargs.h>
+.\" mechanism, which is not compatible with
+.\" .IR <stdarg.h> .
.PP
POSIX.1-2001 specifies only the
.B LOG_USER
.I option
is not specified by POSIX.1-2001 or POSIX.1-2008, but is available
in most versions of UNIX.
-.\" .SH HISTORY
-.\" A
-.\" .BR syslog ()
-.\" function call appeared in 4.2BSD.
-.\" 4.3BSD documents
-.\" .BR openlog (),
-.\" .BR syslog (),
-.\" .BR closelog (),
-.\" and
-.\" .BR setlogmask ().
-.\" 4.3BSD-Reno also documents
-.\" .BR vsyslog ().
-.\" Of course early v* functions used the
-.\" .I <varargs.h>
-.\" mechanism, which is not compatible with
-.\" .IR <stdarg.h> .
.SH NOTES
The argument
.I ident
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH NOTES
.BR system ()
provides simplicity and convenience:
.hy
.ad
.sp 1
-.SH STANDARDS
-This function is nonstandard.
-.SH NOTES
+.SH VERSIONS
Use of
.BR sysv_signal ()
should be avoided; use
the
.B _GNU_SOURCE
feature test macro is defined.
+.SH STANDARDS
+None.
.SH SEE ALSO
.BR sigaction (2),
.BR signal (2),
returns an initializer that can be assigned to the queue
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs.
-(TAILQ functions first appeared in 4.4BSD).
-.SH BUGS
+BSD.
+.SH HISTORY
+4.4BSD.
+.SH CAVEATS
.BR TAILQ_FOREACH ()
and
.BR TAILQ_FOREACH_REVERSE ()
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
These functions are implemented via the
.B TIOCGPGRP
and
.B TIOCSPGRP
ioctls.
-.SS History
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
The ioctls appeared in 4.2BSD.
The functions are POSIX inventions.
.SH SEE ALSO
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR tcgetsid ()
-is provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
This function is implemented via the
.B TIOCGSID
.BR ioctl (2),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
Up to glibc 2.1.1, the return type of
.BR telldir ()
was
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR tempnam ()
-as obsolete.
+Obsoleted in POSIX.1-2008.
.SH NOTES
Although
.BR tempnam ()
.\" So, it is safety in Linux kernel.
.hy
.SH STANDARDS
-.BR tcgetattr (),
-.BR tcsetattr (),
-.BR tcsendbreak (),
-.BR tcdrain (),
-.BR tcflush (),
-.BR tcflow (),
-.BR cfgetispeed (),
-.BR cfgetospeed (),
-.BR cfsetispeed (),
-and
+.TP
+.BR tcgetattr ()
+.TQ
+.BR tcsetattr ()
+.TQ
+.BR tcsendbreak ()
+.TQ
+.BR tcdrain ()
+.TQ
+.BR tcflush ()
+.TQ
+.BR tcflow ()
+.TQ
+.BR cfgetispeed ()
+.TQ
+.BR cfgetospeed ()
+.TQ
+.BR cfsetispeed ()
+.TQ
.BR cfsetospeed ()
-are specified in POSIX.1-2001.
-.PP
+POSIX.1-2008.
+.TP
.BR cfmakeraw ()
-and
+.TQ
+.BR cfsetspeed ()
+BSD.
+.SH HISTORY
+.TP
+.BR tcgetattr ()
+.TQ
+.BR tcsetattr ()
+.TQ
+.BR tcsendbreak ()
+.TQ
+.BR tcdrain ()
+.TQ
+.BR tcflush ()
+.TQ
+.BR tcflow ()
+.TQ
+.BR cfgetispeed ()
+.TQ
+.BR cfgetospeed ()
+.TQ
+.BR cfsetispeed ()
+.TQ
+.BR cfsetospeed ()
+POSIX.1-2001.
+.TP
+.BR cfmakeraw ()
+.TQ
.BR cfsetspeed ()
-are nonstandard, but available on the BSDs.
+BSD.
.SH NOTES
UNIX\ V7 and several later systems have a list of baud rates
where after the values
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
This function had to be called "true gamma function"
since there is already a function
.nf
.B #include <time.h>
.PP
-.BI "time_t timelocal(struct tm *" tm );
+.BI "[[deprecated]] time_t timelocal(struct tm *" tm );
.BI "time_t timegm(struct tm *" tm );
.PP
.fi
.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions
-that are also present on the BSDs.
-.SH NOTES
+BSD.
+.SH HISTORY
+GNU, BSD.
+.PP
The
.BR timelocal ()
function is equivalent to the POSIX standard function
.SH ERRORS
No errors are defined.
.SH STANDARDS
-Not in POSIX.1.
-Present on most BSD derivatives.
+None.
+.SH HISTORY
+BSD.
.SH SEE ALSO
.BR gettimeofday (2),
.BR time (7)
.hy
.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD, SUSv2.
-.SH NOTES
-POSIX.1-2001 specifies:
-an error message may be written to
-.I stdout
-if the stream
-cannot be opened.
-.PP
+.SH VERSIONS
The standard does not specify the directory that
.BR tmpfile ()
will use.
.IR <stdio.h> ,
and if that fails, then the directory
.IR /tmp .
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD, SUSv2.
+.SH NOTES
+POSIX.1-2001 specifies:
+an error message may be written to
+.I stdout
+if the stream
+cannot be opened.
.SH SEE ALSO
.BR exit (3),
.BR mkstemp (3),
.nf
.B #include <stdio.h>
.PP
-.BI "char *tmpnam(char *" s );
-.BI "char *tmpnam_r(char *" s );
+.BI "[[deprecated]] char *tmpnam(char *" s );
+.BI "[[deprecated]] char *tmpnam_r(char *" s );
.fi
.PP
.RS -4
.ad
.sp 1
.SH STANDARDS
-.BR tmpnam ():
-SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
-POSIX.1-2008 marks
+.TP
.BR tmpnam ()
-as obsolete.
-.PP
+C11, POSIX.1-2008.
+.TP
+.BR tmpnam_r ()
+None.
+.SH HISTORY
+.TP
+.BR tmpnam ()
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+Obsolete in POSIX.1-2008.
+.TP
.BR tmpnam_r ()
-is a nonstandard extension that is also available
-.\" Appears to be on Solaris
-on a few other systems.
+Solaris.
.SH NOTES
The
.BR tmpnam ()
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR toascii ()
-as obsolete,
+Obsolete in POSIX.1-2008,
noting that it cannot be used portably in a localized application.
.SH BUGS
Many people will be unhappy if you use this function.
.ad
.sp 1
.SH STANDARDS
-.BR toupper (),
-.BR tolower ():
-C89, C99, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR toupper_l (),
-.BR tolower_l ():
+.TP
+.BR toupper ()
+.TQ
+.BR tolower ()
+C11, POSIX.1-2008.
+.TP
+.BR toupper_l ()
+.TQ
+.BR tolower_l ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR toupper ()
+.TQ
+.BR tolower ()
+C89, 4.3BSD, POSIX.1-2001.
+.TP
+.BR toupper_l ()
+.TQ
+.BR tolower_l ()
POSIX.1-2008.
.SH NOTES
The standards require that the argument
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR towctrans ()
.hy
.ad
.sp 1
-.SH VERSIONS
-The
+.SH STANDARDS
+.TP
+.BR towlower ()
+C11, POSIX.1-2008 (XSI).
+.TP
.BR towlower_l ()
-function first appeared in glibc 2.3.
+POSIX.1-2008.
.SH STANDARDS
-.BR towlower ():
-C99, POSIX.1-2001 (XSI);
-present as an XSI extension in POSIX.1-2008, but marked obsolete.
-.PP
-.BR towlower_l ():
+.TP
+.BR towlower ()
+C99, POSIX.1-2001 (XSI).
+Obsolete in POSIX.1-2008 (XSI).
+.TP
+.BR towlower_l ()
+glibc 2.3.
POSIX.1-2008.
.SH NOTES
The behavior of these functions depends on the
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR towupper_l ()
-function first appeared in glibc 2.3.
.SH STANDARDS
-.BR towupper ():
-C99, POSIX.1-2001 (XSI);
-present as an XSI extension in POSIX.1-2008, but marked obsolete.
-.PP
-.BR towupper_l ():
+.TP
+.BR towupper ()
+C11, POSIX.1-2008 (XSI).
+.TP
+.BR towupper_l ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR towupper ()
+C99, POSIX.1-2001 (XSI).
+Obsolete in POSIX.1-2008 (XSI).
+.TP
+.BR towupper_l ()
POSIX.1-2008.
+glibc 2.3.
.SH NOTES
The behavior of these functions depends on the
.B LC_CTYPE
.hy
.ad
.sp 1
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
The integral value returned by these functions may be too large
to store in an integer type
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR twalk_r ()
-is available since glibc 2.30.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-The functions
+.TP
+.BR tsearch ()
+.TQ
+.BR tfind ()
+.TQ
+.BR tdelete ()
+.TQ
+.BR twalk ()
+POSIX.1-2008.
+.TP
.BR tdestroy ()
-and
+.TQ
+.BR twalk_r ()
+GNU.
+.SH HISTORY
+.TP
+.BR tsearch ()
+.TQ
+.BR tfind ()
+.TQ
+.BR tdelete ()
+.TQ
+.BR twalk ()
+POSIX.1-2001, POSIX.1-2008, SVr4.
+.TP
.BR twalk_r ()
-are GNU extensions.
+glibc 2.30.
.SH NOTES
.BR twalk ()
takes a pointer to the root, while the other functions
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.2BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.2BSD.
.SH NOTES
A process that keeps a file descriptor that refers to a
.BR pts (4)
.hy
.ad
.sp 1
-.SH STANDARDS
-SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001.
-SUSv2 requires \-1 on error.
-.SH NOTES
+.SH VERSIONS
The utmp file is found in various places on various systems, such as
.IR /etc/utmp ,
.IR /var/adm/utmp ,
.IR /var/run/utmp .
+.SH STANDARDS
+None.
+.SH HISTORY
+SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001.
+SUSv2 requires \-1 on error.
.PP
The glibc2 implementation of this function reads the file
.BR _PATH_TTYS ,
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.PP
4.3BSD had a function
.BI "char *timezone(" zone ", " dst )
that returned the
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2001 marks
-.BR ualarm ()
-as obsolete.
-POSIX.1-2008 removes the specification of
-.BR ualarm ().
+POSIX.1-2001 marks it as obsolete.
+Removed in POSIX.1-2008.
+.PP
4.3BSD, SUSv2, and POSIX do not define any errors.
-.SH NOTES
+.PP
POSIX.1-2001 does not specify what happens if the
.I usecs
argument is 0.
.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR ulimit ()
-as obsolete.
+POSIX.1-2008 marks it as obsolete.
.SH SEE ALSO
.BR bash (1),
.BR getrlimit (2),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR ungetwc ()
.ad
.sp 1
.SH STANDARDS
-The four functions
-.BR getc_unlocked (),
-.BR getchar_unlocked (),
-.BR putc_unlocked (),
+.TP
+.BR getc_unlocked ()
+.TQ
+.BR getchar_unlocked ()
+.TQ
+.BR putc_unlocked ()
+.TQ
.BR putchar_unlocked ()
-are in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The nonstandard
-.BR *_unlocked ()
-variants occur on a few UNIX systems, and are available in recent glibc.
+POSIX.1-2008.
+.TP
+Others:
+None.
+.SH HISTORY
+.TP
+.BR getc_unlocked ()
+.TQ
+.BR getchar_unlocked ()
+.TQ
+.BR putc_unlocked ()
+.TQ
+.BR putchar_unlocked ()
+POSIX.1-2001.
.\" E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
.\" moved to a compatibility library.
.\" Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
.\" putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
.\" putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
.\" ungetc_unlocked, ungetwc_unlocked.
-They should probably not be used.
.SH SEE ALSO
.BR flockfile (3),
.BR stdio (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-.BR unlockpt ()
-is provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
.hy
.ad
.sp 1
-.SH STANDARDS
-Not in POSIX.1.
-Present on Solaris, NetBSD, and perhaps other systems.
-.SH NOTES
+.SH VERSIONS
For consistency with the other "utmpx" functions (see
.BR getutxent (3)),
glibc provides (since glibc 2.1):
but differs in that it takes a
.I utmpx
structure as its last argument.
+.SH STANDARDS
+None.
+.SH HISTORY
+Solaris, NetBSD.
.SH SEE ALSO
.BR getutxent (3),
.BR wtmp (5)
.B EINVAL
.I newloc
does not refer to a valid locale object.
-.SH VERSIONS
-The
-.BR uselocale ()
-function first appeared in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
+POSIX.1-2008.
.SH NOTES
Unlike
.BR setlocale (3),
.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2001 declares this function obsolete; use
+POSIX.1-2001 declares it obsolete, suggesting
.BR nanosleep (2)
instead.
-POSIX.1-2008 removes the specification of
-.BR usleep ().
+Removed in POSIX.1-2008.
.PP
On the original BSD implementation,
and before glibc 2.2.2, the return type of this function is
Only the
.B EINVAL
error return is documented by SUSv2 and POSIX.1-2001.
-.SH NOTES
+.SH CAVEATS
The interaction of this function with the
.B SIGALRM
signal, and with other timer functions such as
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcrtomb ()
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR wcscasecmp ()
-function is provided since glibc 2.1.
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
The behavior of
.BR wcscasecmp ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcat (3),
.BR wcpcpy (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strchr (3),
.BR wcspbrk (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcmp (3),
.BR wcscasecmp (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcpy (3),
.BR wcpcpy (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcspn (3),
.BR wcspbrk (3),
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
-.\" present in libc5 and glibc 2.0 and later
+.SH HISTORY
+libc5, glibc 2.0.
.SH SEE ALSO
.BR strdup (3),
.BR wcscpy (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
In cases where the input buffer may not contain
a terminating null wide character,
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR wcsncasecmp ()
-function is provided since glibc 2.1.
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
The behavior of
.BR wcsncasecmp ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncat (3),
.BR wcscat (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncmp (3),
.BR wcsncasecmp (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncpy (3)
.hy
.ad
.sp 1
-.SH VERSIONS
-The
-.BR wcsnlen ()
-function is provided since glibc 2.1.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR strnlen (3),
.BR wcslen (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strpbrk (3),
.BR wcschr (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strrchr (3),
.BR wcschr (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcsrtombs ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strspn (3),
.BR wcscspn (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strstr (3),
.BR wcschr (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR imaxabs (3),
.BR imaxdiv (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The original
.I wcs
.hy
.ad
.sp 1
+.SH VERSIONS
+The function
+.BR wcsrtombs (3)
+provides a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcstombs ()
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR wcsrtombs (3)
-provides a better interface to the same functionality.
.SH SEE ALSO
.BR mblen (3),
.BR mbstowcs (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The behavior of
.BR wcswidth ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctob ()
.hy
.ad
.sp 1
+.SH VERSIONS
+The function
+.BR wcrtomb (3)
+provides
+a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctomb ()
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR wcrtomb (3)
-provides
-a better interface to the same functionality.
.SH SEE ALSO
.BR MB_CUR_MAX (3),
.BR mblen (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctrans ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctype ()
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.PP
Note that before glibc 2.2.5, glibc used the prototype
.PP
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memchr (3),
.BR wcschr (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memcmp (3),
.BR wcscmp (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memcpy (3),
.BR wcscpy (3),
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memmove (3),
.BR wmemcpy (3)
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memset (3)
.BR wordexp ()
calls those functions,
so we use race:utent to remind users.
-.SH VERSIONS
-.BR wordexp ()
-and
-.BR wordfree ()
-are provided since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.1.
.SH EXAMPLES
The output of the following example program
is approximately that of "ls [a-c]*.c".
.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wprintf ()
.ad
.sp 1
.SH STANDARDS
-The functions returning
-.I double
-conform to SVr4, 4.3BSD,
-POSIX.1-2001, POSIX.1-2008.
-The others are nonstandard functions that also exist on the BSDs.
+.TP
+.BR y0 ()
+.TQ
+.BR y1 ()
+.TQ
+.BR yn ()
+POSIX.1-2008.
+.TP
+Others:
+BSD.
+.SH HISTORY
+.TP
+.BR y0 ()
+.TQ
+.BR y1 ()
+.TQ
+.BR yn ()
+SVr4, 4.3BSD,
+POSIX.1-2001.
+.TP
+Others:
+BSD.
.SH BUGS
Before glibc 2.19,
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807
.TP
.B EINVAL
The specifier was not a valid character.
-.SH VERSIONS
+.SH STANDARDS
+GNU.
+.SH HISTORY
.BR \%register_printf_function (3)
is an older function similar to
.BR \%register_printf_specifier (),
.BR \%register_printf_specifier ()
superseeds
.BR \%register_printf_function (3).
-.SH STANDARDS
-These nonstandard functions are present in glibc.
.SH EXAMPLES
The following example program registers the 'b' and 'B' specifiers
to print integers in binary format,
The numerical values corresponding to the symbolical ones
are given in parenthesis for easy reference.
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
+BSD.
+.SH HISTORY
The
.I <sysexits.h>
file appeared in 4.0BSD for use by the deliverymail utility,
later renamed to
.BR sendmail (8).
-.SH BUGS
+.SH CAVEATS
The choice of an appropriate exit value is often ambiguous.
.SH SEE ALSO
.BR err (3),
.SH DESCRIPTION
An object type used for streams.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <wchar.h> .
For further information about this structure, see
.BR aio (7).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR aio_cancel (3),
.BR aio_error (3),
Used for file block counts.
It is a signed integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
Used for file block sizes.
It is a signed integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
.PP
All are unsigned integer types.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR termios (3)
According to POSIX,
it is an integer type or a real-floating type.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.I <sys/types.h>
Used for clock ID type in the clock and timer functions.
It is defined as an arithmetic type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <time.h> .
For further details of this type, see
.BR makedev (3).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
.BR imaxdiv (3)
function.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR div (3),
.BR imaxdiv (3),
.I double_t
are implementation-defined.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR float.h (0p),
.BR math.h (0p)
.I epoll_event
structure specifies data that the kernel should save and
return when the corresponding file descriptor becomes ready.
-.SH STANDARDS
-This type is Linux-specific.
-.SH NOTES
+.SH VERSIONS
.SS C library/kernel differences
The Linux kernel headers also provide this type,
with a slightly different definition:
};
.EE
.in
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR epoll_wait (2),
.BR epoll_ctl (7)
For further details see
.BR fenv (3).
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fenv (3)
or
.IR gid_t .
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide
.IR pid_t :
.I uint8_t
values.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+.PP
+The
+.RB [ U ] INT \fIN\fP _WIDTH
+macros were added in C23.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
.RI [ u ] intmax_t
values.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
.I uintptr_t
values.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
or accessible via the call
.IR sysconf(_SC_IOV_MAX) ).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/socket.h> .
and its interval,
in seconds and nanoseconds.
.SH STANDARDS
-Linux-specific.
+Linux.
.SH NOTES
The following header also provides this type:
.IR <sys/timerfd.h> .
In the "C" locale, its members have the values
shown in the comments above.
.SH STANDARDS
-C11 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR setlocale (3),
.BR localeconv (3),
Used for some file attributes (e.g., file mode).
It is an integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <fcntl.h> ,
.I loff_t
is a 64-bit version of the type,
introduced by the Linux kernel.
+.SH STANDARDS
+.TP
+.I off_t
+POSIX.1-2008.
+.TP
+.I off64_t
+GNU and some BSDs.
+.TP
+.I loff_t
+Linux.
.SH VERSIONS
+.TP
+.I off_t
+POSIX.1-2001.
+.PP
.I <aio.h>
and
.I <stdio.h>
define
.I off_t
since POSIX.1-2008.
-.SH STANDARDS
-.PD 0
-.IR off_t :
-POSIX.1-2001 and later.
-.PP
-.IR off64_t :
-Present in glibc and some BSDs.
-.PP
-.IR loff_t :
-Linux-specific.
-.PD
.SH NOTES
On some architectures,
the width of
.I ptrdiff_t
values.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR size_t (3type)
type or a
.I ssize_t
type.
-.SH VERSIONS
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
Prior to POSIX.1-2008,
the type was
capable of storing the largest value that can be stored in either an
type or a
.I ssize_t
type.
-.SH STANDARDS
-POSIX.1-2001 and later.
.SH SEE ALSO
.BR regex (3)
.I intmax_t
and using its length modifier
.RB ( j ).
-.SH VERSIONS
+.SH STANDARDS
.TP
.I size_t
+C11, POSIX.1-2008.
+.TP
+.I ssize_t
+POSIX.1-2008.
+.PD
+.SH HISTORY
+.TP
+.I size_t
+C89, POSIX.1-2001.
+.TP
+.I ssize_t
+POSIX.1-2001.
+.PP
.IR <aio.h> ,
.IR <glob.h> ,
.IR <grp.h> ,
define
.I size_t
since POSIX.1-2008.
-.TP
-.I ssize_t
+.PP
.IR <aio.h> ,
.IR <mqueue.h> ,
and
define
.I ssize_t
since POSIX.1-2008.
-.SH STANDARDS
-.PD 0
-.IR size_t :
-C99 and later;
-POSIX.1-2001 and later.
-.PP
-.IR ssize_t :
-POSIX.1-2001 and later.
-.PD
.SH NOTES
.TP
.I size_t
.I sockaddr_un
Describes a UNIX domain socket address.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
.I socklen_t
is also defined in
.PP
For further information on the above fields, see
.BR inode (7).
-.SH VERSIONS
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
Old kernels and old standards did not support nanosecond timestamp fields.
Instead, there were three timestamp
.RI fields\[em] st_atime ,
If none of the aforementioned macros are defined,
then the nanosecond values are exposed with names of the form
.IR st_atimensec .
-.SH STANDARDS
-POSIX.1-2001 and later.
.SH NOTES
The following header also provides this type:
.IR <ftw.h> .
capable of storing values al least in the range
.RB [ 0 ,
.BR 1000000 ].
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.I time_t
+C11, POSIX.1-2008.
+.TP
+.I suseconds_t
+.TQ
+.I useconds_t
+POSIX.1-2008.
+.PD
+.SH HISTORY
.TP
.I time_t
+C89, POSIX.1-2001.
+.TP
+.I suseconds_t
+.TQ
+.I useconds_t
+POSIX.1-2001.
+.PP
.I <sched.h>
defines
.I time_t
since POSIX.1-2008.
-.TP
-.I suseconds_t
+.PP
POSIX.1-2001 defined
.I useconds_t
in
.I <unistd.h>
too.
-.SH STANDARDS
-.PD 0
-.IR time_t :
-C99 and later;
-POSIX.1-2001 and later.
-.PP
-.IR suseconds_t ,
-.IR useconds_t :
-POSIX.1-2001 and later.
-.PD
.SH NOTES
On some architectures,
the width of
.I time_t
can be controlled with the feature test macro
.BR _TIME_BITS .
-.TP
-.I time_t
+.PP
The following headers also provide
.IR time_t :
.IR <sched.h> ,
.IR <sys/types.h> ,
and
.IR <utime.h> .
-.TP
-.I suseconds_t
+.PP
The following headers also provide
.IR suseconds_t :
.I <sys/select.h>
Used for timer ID returned by
.BR timer_create (2).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides
.IR timer_t :
.I long long
on X32.
It can be safely down-cast to any concrete 32-bit integer type for processing.
-.SH STANDARDS
-C11 and later;
-POSIX.1-2001 and later.
.SH VERSIONS
Prior to C23,
.I tv_nsec
was
.IR long .
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <aio.h> ,
.SH DESCRIPTION
Describes times in seconds and microseconds.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <sys/resource.h> ,
so it was limited to
.B 60
in C99.
-.SH STANDARDS
-C90 and later;
-POSIX.1-2001 and later.
-.PP
-.I tm_gmtoff
-and
-.I tm_zone
-originate from 4.3BSD-Tahoe (where
-.I tm_zone
-is a
-.IR "char *" ).
-.SH NOTES
-.I tm_sec
-can represent a leap second with the value
-.BR 60 .
.PP
.BR timezone (3),
as a variable, is an XSI extension: some systems provide the V7-compatible
points to static storage and may be overridden on subsequent calls to
.BR localtime (3)
and similar functions (however, this never happens under glibc).
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
+.PP
+.I tm_gmtoff
+and
+.I tm_zone
+originate from 4.3BSD-Tahoe (where
+.I tm_zone
+is a
+.IR "char *" ).
+.SH NOTES
+.I tm_sec
+can represent a leap second with the value
+.BR 60 .
.SH SEE ALSO
.BR ctime (3),
.BR strftime (3),
.BR va_end (3)
to traverse the list of arguments.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following headers also provide
.IR va_list :
and function pointers was added in
POSIX.1-2008 Technical Corrigendum 1 (2013).
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR malloc (3),
.BR memcmp (3),
.I /dev/fuse
file descriptor that has not been mounted.
.SH STANDARDS
-The FUSE filesystem is Linux-specific.
+Linux.
.SH NOTES
The following messages are not yet documented in this manual page:
.PP
.EE
.in
.SH VERSIONS
-The
-.I acct_v3
-structure is defined since glibc 2.6.
-.SH STANDARDS
-Process accounting originated on BSD.
Although it is present on most systems, it is not standardized,
and the details vary somewhat between systems.
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.6.
+.PP
+Process accounting originated on BSD.
.SH NOTES
Records in the accounting file are ordered by termination time of
the process.
.TP
.I /sys/power
[To be documented]
-.SH VERSIONS
-The
-.B sysfs
-filesystem first appeared in Linux 2.6.0.
.SH STANDARDS
-The
-.B sysfs
-filesystem is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.0.
.SH NOTES
This manual page is incomplete, possibly inaccurate, and is the kind
of thing that needs to be updated very often.
.I /var/run/utmp
.br
.I /var/log/wtmp
-.SH STANDARDS
+.SH VERSIONS
POSIX.1 does not specify a
.I utmp
structure, but rather one named
structure to be the same as the
.I utmp
structure.
-.SS Comparison with historical systems
+.SH STANDARDS
+Linux.
+.SH HISTORY
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
mix of the two.
.PP
structure was less than 0,
or was greater than the limit returned by the call
.IR sysconf(_SC_AIO_PRIO_DELTA_MAX) .
-.SH VERSIONS
-The POSIX AIO interfaces are provided by glibc since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.1.
.SH NOTES
It is a good idea to zero out the control block buffer before use (see
.BR memset (3)).
.in
.\"
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.SH NOTES
Use of cgroup namespaces requires a kernel that is configured with the
.B CONFIG_CGROUPS
are specified in POSIX.1.
The real, effective, and saved set user and groups IDs,
and the supplementary group IDs, are specified in POSIX.1.
+.PP
The filesystem user and group IDs are a Linux extension.
.SH NOTES
Various fields in the
you will discover the file descriptor had been
previously removed and there will be no confusion.
.SH VERSIONS
-The
-.B epoll
-API was introduced in Linux kernel 2.5.44.
-.\" Its interface should be finalized in Linux kernel 2.5.66.
-Support was added in glibc 2.3.2.
-.SH STANDARDS
-The
-.B epoll
-API is Linux-specific.
-Some other systems provide similar
-mechanisms, for example, FreeBSD has
+Some other systems provide similar mechanisms;
+for example,
+FreeBSD has
.IR kqueue ,
and Solaris has
.IR /dev/poll .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.44.
+.\" Its interface should be finalized in Linux 2.5.66.
+glibc 2.3.2.
.SH NOTES
The set of file descriptors that is being monitored via
an epoll file descriptor can be viewed via the entry for
in the response structure is not valid.
This may occur when a response for the permission event has already been
written.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
The fanotify API was introduced in Linux 2.6.36 and
enabled in Linux 2.6.37.
-Fdinfo support was added in Linux 3.8.
-.SH STANDARDS
-The fanotify API is Linux-specific.
+fdinfo support was added in Linux 3.8.
.SH NOTES
The fanotify API is available only if the kernel was built with the
.B CONFIG_FANOTIFY
and
.BR _XOPEN_SOURCE .
.PP
-.B _XOPEN_SOURCE_EXTENDED
-was specified by XPG4v2 (aka SUSv1), but is not present in SUSv2 and later.
.B _FILE_OFFSET_BITS
is not specified by any standard,
but is employed on some other implementations.
and
.B _THREAD_SAFE
are specific to glibc.
+.SH HISTORY
+.PP
+.B _XOPEN_SOURCE_EXTENDED
+was specified by XPG4v2 (aka SUSv1), but is not present in SUSv2 and later.
.SH NOTES
.I <features.h>
is a Linux/glibc-specific header file.
of the file, by the owner of the directory, and by a privileged
process.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
POSIX.1-1990 did not describe the
.BR S_IFMT ,
.BR S_IFSOCK ,
the macros
.BR S_ISDIR ()
and so on.
-The
-.B S_IF*
-constants are present in POSIX.1-2001 and later.
.PP
The
.BR S_ISLNK ()
and
.BR S_ISSOCK ()
macros were not in
-POSIX.1-1996, but both are present in POSIX.1-2001;
+POSIX.1-1996;
the former is from SVID 4, the latter from SUSv2.
.PP
UNIX\ V7 (and later systems) had
.I /proc/sys/fs/inotify/max_user_watches
This specifies an upper limit on the number of watches
that can be created per real user ID.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
Inotify was merged into Linux 2.6.13.
The required library interfaces were added in glibc 2.4.
.RB ( IN_DONT_FOLLOW ,
and
.B IN_ONLYDIR
were added in glibc 2.5.)
-.SH STANDARDS
-The inotify API is Linux-specific.
.SH NOTES
Inotify file descriptors can be monitored using
.BR select (2),
ATTRIBUTES [Normally only in Sections 2, 3]
VERSIONS [Normally only in Sections 2, 3]
STANDARDS
+HISTORY
NOTES
CAVEATS
BUGS
for further details.
.TP
.B VERSIONS
+A summary of systems where the API performs differently,
+or where there's a similar API.
+.TP
+.B STANDARDS
+A description of any standards or conventions that relate to the function
+or command described by the manual page.
+.IP
+The preferred terms to use for the various standards are listed as
+headings in
+.BR standards (7).
+.IP
+This section should note the current standards to which the API conforms to.
+.IP
+If the API is not governed by any standards but commonly
+exists on other systems, note them.
+If the call is Linux-specific or GNU-specific, note this.
+If it's available in the BSDs, note that.
+.IP
+If this section consists of just a list of standards
+(which it commonly does),
+terminate the list with a period (\[aq].\[aq]).
+.TP
+.B HISTORY
A brief summary of the Linux kernel or glibc versions where a
system call or library function appeared,
or changed significantly in its operation.
.IP
As a general rule, every new interface should
-include a VERSIONS section in its manual page.
+include a HISTORY section in its manual page.
Unfortunately,
many existing manual pages don't include this information
(since there was no policy to do so when they were written).
.BR syscalls (2)
manual page also provides information about kernel versions
in which various system calls first appeared.
-.TP
-.B STANDARDS
-A description of any standards or conventions that relate to the function
-or command described by the manual page.
-.IP
-The preferred terms to use for the various standards are listed as
-headings in
-.BR standards (7).
-.IP
-For a page in Section 2 or 3,
-this section should note the POSIX.1
-version(s) that the call conforms to,
-and also whether the call is specified in C99.
-(Don't worry too much about other standards like SUS, SUSv2, and XPG,
-or the SVr4 and 4.xBSD implementation standards,
-unless the call was specified in those standards,
-but isn't in the current version of POSIX.1.)
-.IP
-If the call is not governed by any standards but commonly
-exists on other systems, note them.
-If the call is Linux-specific, note this.
-.IP
-If this section consists of just a list of standards
-(which it commonly does),
-terminate the list with a period (\[aq].\[aq]).
+.PP
+Old versions of standards should be mentioned here,
+rather than in STANDARDS,
+for example,
+SUS, SUSv2, and XPG, or the SVr4 and 4.xBSD implementation standards.
.TP
.B NOTES
Miscellaneous notes.
.BR chroot (1)
was performed).
.\"
-.SH VERSIONS
-Mount namespaces first appeared in Linux 2.4.19.
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
+.SH HISTORY
+Linux 2.4.19.
.\"
.SH NOTES
The propagation type assigned to a new mount depends
.I writeback=<pages>
Number of pages that are currently being written out to disk.
.SH STANDARDS
-No standards govern NUMA interfaces.
+None.
.SH NOTES
The Linux NUMA system calls and
.I /proc
it is translated into the corresponding PID value in
the receiving process's PID namespace.
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.SH EXAMPLES
See
.BR user_namespaces (7).
.IP \[bu] 3
The termination condition for traversal is more complex.
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs.
+BSD.
+.SH HISTORY
.I <sys/queue.h>
macros first appeared in 4.4BSD.
.SH NOTES
.\" symbol binding should return the value of the 'retval' argument
.\" (not provided by GNU, but equivalent to returning outregs->lrv_eax
.\" on (say) x86-32).
-.SH STANDARDS
-This API is nonstandard, but very similar to the Solaris API,
+.SH VERSIONS
+This API is very similar to the Solaris API
described in the Solaris
.IR "Linker and Libraries Guide" ,
in the chapter
.IR "Runtime Linker Auditing Interface" .
+.SH STANDARDS
+None.
.SH NOTES
Note the following differences from the Solaris dynamic linker
auditing API:
.B INET_DIAG_SKMEMINFO
were introduced in Linux 3.6.
.SH STANDARDS
-The NETLINK_SOCK_DIAG API is Linux-specific.
+Linux.
.SH EXAMPLES
The following example program prints inode number, peer's inode number,
and name of all UNIX domain sockets in the current namespace.
receiving process's user and group ID mappings.
.\"
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.\"
.SH NOTES
Over the years, there have been a lot of features that have been added