summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-12-24 11:38:40 +0000
committerRoland McGrath <roland@gnu.org>1994-12-24 11:38:40 +0000
commit61c89bdd8e6960e161929a91643526daa42b0219 (patch)
tree25f90ea4538ddbd46dac2a52fb00cf65986ae479
parent33309d7c3469d5ad2d714d1a8fdfed6a8e888338 (diff)
Miscellaneous edits.
-rw-r--r--manual/conf.texi2
-rw-r--r--manual/errno.texi187
-rw-r--r--manual/filesys.texi82
-rw-r--r--manual/intro.texi17
-rw-r--r--manual/io.texi29
-rw-r--r--manual/llio.texi197
-rw-r--r--manual/pipe.texi5
-rw-r--r--manual/process.texi2
-rw-r--r--manual/setjmp.texi2
-rw-r--r--manual/socket.texi7
-rw-r--r--manual/startup.texi4
-rw-r--r--manual/stdio.texi189
-rw-r--r--manual/terminal.texi2
-rw-r--r--manual/time.texi2
14 files changed, 495 insertions, 232 deletions
diff --git a/manual/conf.texi b/manual/conf.texi
index a75366f3f5..86afeca597 100644
--- a/manual/conf.texi
+++ b/manual/conf.texi
@@ -805,7 +805,7 @@ to indicate the cause of the problem. So the only way to use this
function robustly is to store @code{0} into @code{errno} just before
calling it.
-Besides the usual file name syntax errors (@pxref{File Name Errors}),
+Besides the usual file name errors (@pxref{File Name Errors}),
the following error condition is defined for this function:
@table @code
diff --git a/manual/errno.texi b/manual/errno.texi
index 87ac278dc0..836fff3bf2 100644
--- a/manual/errno.texi
+++ b/manual/errno.texi
@@ -65,7 +65,7 @@ function returns an error.
@strong{Portability Note:} ANSI C specifies @code{errno} as a
``modifiable lvalue'' rather than as a variable, permitting it to be
implemented as a macro. For example, its expansion might involve a
-function call, like @code{*_errno ()}. In fact, that is what it is
+function call, like @w{@code{*_errno ()}}. In fact, that is what it is
on the GNU system itself. The GNU library, on non-GNU systems, does
whatever is right for the particular system.
@@ -119,6 +119,7 @@ library on other systems.
@comment errno.h
@comment POSIX.1: Operation not permitted
@deftypevr Macro int EPERM
+@comment errno 1 @c DO NOT REMOVE
Operation not permitted; only the owner of the file (or other resource)
or processes with special privileges can perform the operation.
@end deftypevr
@@ -126,6 +127,7 @@ or processes with special privileges can perform the operation.
@comment errno.h
@comment POSIX.1: No such file or directory
@deftypevr Macro int ENOENT
+@comment errno 2 @c DO NOT REMOVE
No such file or directory. This is a ``file doesn't exist'' error
for ordinary files that are referenced in contexts where they are
expected to already exist.
@@ -134,12 +136,14 @@ expected to already exist.
@comment errno.h
@comment POSIX.1: No such process
@deftypevr Macro int ESRCH
+@comment errno 3 @c DO NOT REMOVE
No process matches the specified process ID.
@end deftypevr
@comment errno.h
@comment POSIX.1: Interrupted system call
@deftypevr Macro int EINTR
+@comment errno 4 @c DO NOT REMOVE
Interrupted function call; an asynchronous signal occured and prevented
completion of the call. When this happens, you should try the call
again.
@@ -152,12 +156,14 @@ Primitives}.
@comment errno.h
@comment POSIX.1: Input/output error
@deftypevr Macro int EIO
+@comment errno 5 @c DO NOT REMOVE
Input/output error; usually used for physical read or write errors.
@end deftypevr
@comment errno.h
@comment POSIX.1: Device not configured
@deftypevr Macro int ENXIO
+@comment errno 6 @c DO NOT REMOVE
No such device or address. The system tried to use the device
represented by a file you specified, and it couldn't find the device.
This can mean that the device file was installed incorrectly, or that
@@ -168,6 +174,7 @@ computer.
@comment errno.h
@comment POSIX.1: Argument list too long
@deftypevr Macro int E2BIG
+@comment errno 7 @c DO NOT REMOVE
Argument list too long; used when the arguments passed to a new program
being executed with one of the @code{exec} functions (@pxref{Executing a
File}) occupy too much memory space. This condition never arises in the
@@ -177,6 +184,7 @@ GNU system.
@comment errno.h
@comment POSIX.1: Exec format error
@deftypevr Macro int ENOEXEC
+@comment errno 8 @c DO NOT REMOVE
Invalid executable file format. This condition is detected by the
@code{exec} functions; see @ref{Executing a File}.
@end deftypevr
@@ -184,6 +192,7 @@ Invalid executable file format. This condition is detected by the
@comment errno.h
@comment POSIX.1: Bad file descriptor
@deftypevr Macro int EBADF
+@comment errno 9 @c DO NOT REMOVE
Bad file descriptor; for example, I/O on a descriptor that has been
closed or reading from a descriptor open only for writing (or vice
versa).
@@ -192,6 +201,7 @@ versa).
@comment errno.h
@comment POSIX.1: No child processes
@deftypevr Macro int ECHILD
+@comment errno 10 @c DO NOT REMOVE
There are no child processes. This error happens on operations that are
supposed to manipulate child processes, when there aren't any processes
to manipulate.
@@ -200,6 +210,7 @@ to manipulate.
@comment errno.h
@comment POSIX.1: Resource deadlock avoided
@deftypevr Macro int EDEADLK
+@comment errno 11 @c DO NOT REMOVE
Deadlock avoided; allocating a system resource would have resulted in a
deadlock situation. The system does not guarantee that it will notice
all such situations. This error means you got lucky and the system
@@ -209,6 +220,7 @@ noticed; it might just hang. @xref{File Locks}, for an example.
@comment errno.h
@comment POSIX.1: Cannot allocate memory
@deftypevr Macro int ENOMEM
+@comment errno 12 @c DO NOT REMOVE
No memory available. The system cannot allocate more virtual memory
because its capacity is full.
@end deftypevr
@@ -216,18 +228,22 @@ because its capacity is full.
@comment errno.h
@comment POSIX.1: Permission denied
@deftypevr Macro int EACCES
+@comment errno 13 @c DO NOT REMOVE
Permission denied; the file permissions do not allow the attempted operation.
@end deftypevr
@comment errno.h
@comment POSIX.1: Bad address
@deftypevr Macro int EFAULT
+@comment errno 14 @c DO NOT REMOVE
Bad address; an invalid pointer was detected.
+In the GNU system, this error never happens; you get a signal instead.
@end deftypevr
@comment errno.h
@comment BSD: Block device required
@deftypevr Macro int ENOTBLK
+@comment errno 15 @c DO NOT REMOVE
A file that isn't a block special file was given in a situation that
requires one. For example, trying to mount an ordinary file as a file
system in Unix gives this error.
@@ -236,6 +252,7 @@ system in Unix gives this error.
@comment errno.h
@comment POSIX.1: Device busy
@deftypevr Macro int EBUSY
+@comment errno 16 @c DO NOT REMOVE
Resource busy; a system resource that can't be shared is already in use.
For example, if you try to delete a file that is the root of a currently
mounted filesystem, you get this error.
@@ -244,6 +261,7 @@ mounted filesystem, you get this error.
@comment errno.h
@comment POSIX.1: File exists
@deftypevr Macro int EEXIST
+@comment errno 17 @c DO NOT REMOVE
File exists; an existing file was specified in a context where it only
makes sense to specify a new file.
@end deftypevr
@@ -251,6 +269,7 @@ makes sense to specify a new file.
@comment errno.h
@comment POSIX.1: Invalid cross-device link
@deftypevr Macro int EXDEV
+@comment errno 18 @c DO NOT REMOVE
An attempt to make an improper link across file systems was detected.
This happens not only when you use @code{link} (@pxref{Hard Links}) but
also when you rename a file with @code{rename} (@pxref{Renaming Files}).
@@ -259,6 +278,7 @@ also when you rename a file with @code{rename} (@pxref{Renaming Files}).
@comment errno.h
@comment POSIX.1: Operation not supported by device
@deftypevr Macro int ENODEV
+@comment errno 19 @c DO NOT REMOVE
The wrong type of device was given to a function that expects a
particular sort of device.
@end deftypevr
@@ -266,19 +286,22 @@ particular sort of device.
@comment errno.h
@comment POSIX.1: Not a directory
@deftypevr Macro int ENOTDIR
+@comment errno 20 @c DO NOT REMOVE
A file that isn't a directory was specified when a directory is required.
@end deftypevr
@comment errno.h
@comment POSIX.1: Is a directory
@deftypevr Macro int EISDIR
-File is a directory; attempting to open a directory for writing gives
-this error.
+@comment errno 21 @c DO NOT REMOVE
+File is a directory; you cannot open a directory for writing,
+or create or remove hard links to it.
@end deftypevr
@comment errno.h
@comment POSIX.1: Invalid argument
@deftypevr Macro int EINVAL
+@comment errno 22 @c DO NOT REMOVE
Invalid argument. This is used to indicate various kinds of problems
with passing the wrong argument to a library function.
@end deftypevr
@@ -286,6 +309,7 @@ with passing the wrong argument to a library function.
@comment errno.h
@comment POSIX.1: Too many open files
@deftypevr Macro int EMFILE
+@comment errno 24 @c DO NOT REMOVE
The current process has too many files open and can't open any more.
Duplicate descriptors do count toward this limit.
@@ -298,6 +322,7 @@ want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
@comment errno.h
@comment POSIX.1: Too many open files in system
@deftypevr Macro int ENFILE
+@comment errno 23 @c DO NOT REMOVE
There are too many distinct file openings in the entire system. Note
that any number of linked channels count as just one file opening; see
@ref{Linked Channels}. This error never occurs in the GNU system.
@@ -306,6 +331,7 @@ that any number of linked channels count as just one file opening; see
@comment errno.h
@comment POSIX.1: Inappropriate ioctl for device
@deftypevr Macro int ENOTTY
+@comment errno 25 @c DO NOT REMOVE
Inappropriate I/O control operation, such as trying to set terminal
modes on an ordinary file.
@end deftypevr
@@ -313,21 +339,25 @@ modes on an ordinary file.
@comment errno.h
@comment BSD: Text file busy
@deftypevr Macro int ETXTBSY
+@comment errno 26 @c DO NOT REMOVE
An attempt to execute a file that is currently open for writing, or
-write to a file that is currently being executed. (The name stands
-for ``text file busy''.) This is not an error in the GNU system; the
-text is copied as necessary.
+write to a file that is currently being executed. Often using a
+debugger to run a program is considered having it open for writing and
+will cause this error. (The name stands for ``text file busy''.) This
+is not an error in the GNU system; the text is copied as necessary.
@end deftypevr
@comment errno.h
@comment POSIX.1: File too large
@deftypevr Macro int EFBIG
+@comment errno 27 @c DO NOT REMOVE
File too big; the size of a file would be larger than allowed by the system.
@end deftypevr
@comment errno.h
@comment POSIX.1: No space left on device
@deftypevr Macro int ENOSPC
+@comment errno 28 @c DO NOT REMOVE
No space left on device; write operation on a file failed because the
disk is full.
@end deftypevr
@@ -335,19 +365,22 @@ disk is full.
@comment errno.h
@comment POSIX.1: Illegal seek
@deftypevr Macro int ESPIPE
+@comment errno 29 @c DO NOT REMOVE
Invalid seek operation (such as on a pipe).
@end deftypevr
@comment errno.h
@comment POSIX.1: Read-only file system
@deftypevr Macro int EROFS
+@comment errno 30 @c DO NOT REMOVE
An attempt was made to modify something on a read-only file system.
@end deftypevr
@comment errno.h
@comment POSIX.1: Too many links
@deftypevr Macro int EMLINK
-Too many links; the link count of a single file is too large.
+@comment errno 31 @c DO NOT REMOVE
+Too many links; the link count of a single file would become too large.
@code{rename} can cause this error if the file being renamed already has
as many links as it can take (@pxref{Renaming Files}).
@end deftypevr
@@ -355,6 +388,7 @@ as many links as it can take (@pxref{Renaming Files}).
@comment errno.h
@comment POSIX.1: Broken pipe
@deftypevr Macro int EPIPE
+@comment errno 32 @c DO NOT REMOVE
Broken pipe; there is no process reading from the other end of a pipe.
Every library function that returns this error code also generates a
@code{SIGPIPE} signal; this signal terminates the program if not handled
@@ -365,6 +399,7 @@ unless it has handled or blocked @code{SIGPIPE}.
@comment errno.h
@comment ANSI: Numerical argument out of domain
@deftypevr Macro int EDOM
+@comment errno 33 @c DO NOT REMOVE
Domain error; used by mathematical functions when an argument value does
not fall into the domain over which the function is defined.
@end deftypevr
@@ -372,6 +407,7 @@ not fall into the domain over which the function is defined.
@comment errno.h
@comment ANSI: Numerical result out of range
@deftypevr Macro int ERANGE
+@comment errno 34 @c DO NOT REMOVE
Range error; used by mathematical functions when the result value is
not representable because of overflow or underflow.
@end deftypevr
@@ -379,6 +415,7 @@ not representable because of overflow or underflow.
@comment errno.h
@comment POSIX.1: Resource temporarily unavailable
@deftypevr Macro int EAGAIN
+@comment errno 35 @c DO NOT REMOVE
Resource temporarily unavailable; the call might work if you try again
later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
they are always the same in the GNU C library.
@@ -413,6 +450,7 @@ and return to its command loop.
@comment errno.h
@comment BSD: Operation would block
@deftypevr Macro int EWOULDBLOCK
+@comment errno EAGAIN @c DO NOT REMOVE
In the GNU C library, this is another name for @code{EAGAIN} (above).
The values are always the same, on every operating system.
@@ -423,18 +461,21 @@ separate error code.
@comment errno.h
@comment BSD: Operation now in progress
@deftypevr Macro int EINPROGRESS
+@comment errno 36 @c DO NOT REMOVE
An operation that cannot complete immediately was initiated on an object
that has non-blocking mode selected. Some functions that must always
block (such as @code{connect}; @pxref{Connecting}) never return
-@code{EAGAIN}.
-Instead, they return @code{EINPROGRESS} to indicate that the operation
-has begun and will take some time. Attempts to manipulate the object
-before the call completes return @code{EALREADY}.
+@code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that
+the operation has begun and will take some time. Attempts to manipulate
+the object before the call completes return @code{EALREADY}. You can
+use the @code{select} function to find out when the pending operation
+has completed; @pxref{Waiting for I/O}.
@end deftypevr
@comment errno.h
@comment BSD: Operation already in progress
@deftypevr Macro int EALREADY
+@comment errno 37 @c DO NOT REMOVE
An operation is already in progress on an object that has non-blocking
mode selected.
@end deftypevr
@@ -442,12 +483,14 @@ mode selected.
@comment errno.h
@comment BSD: Socket operation on non-socket
@deftypevr Macro int ENOTSOCK
+@comment errno 38 @c DO NOT REMOVE
A file that isn't a socket was specified when a socket is required.
@end deftypevr
@comment errno.h
@comment BSD: Message too long
@deftypevr Macro int EMSGSIZE
+@comment errno 40 @c DO NOT REMOVE
The size of a message sent on a socket was larger than the supported
maximum size.
@end deftypevr
@@ -455,12 +498,14 @@ maximum size.
@comment errno.h
@comment BSD: Protocol wrong type for socket
@deftypevr Macro int EPROTOTYPE
+@comment errno 41 @c DO NOT REMOVE
The socket type does not support the requested communications protocol.
@end deftypevr
@comment errno.h
@comment BSD: Protocol not available
@deftypevr Macro int ENOPROTOOPT
+@comment errno 42 @c DO NOT REMOVE
You specified a socket option that doesn't make sense for the
particular protocol being used by the socket. @xref{Socket Options}.
@end deftypevr
@@ -468,6 +513,7 @@ particular protocol being used by the socket. @xref{Socket Options}.
@comment errno.h
@comment BSD: Protocol not supported
@deftypevr Macro int EPROTONOSUPPORT
+@comment errno 43 @c DO NOT REMOVE
The socket domain does not support the requested communications protocol
(perhaps because the requested protocol is completely invalid.)
@xref{Creating a Socket}.
@@ -476,26 +522,33 @@ The socket domain does not support the requested communications protocol
@comment errno.h
@comment BSD: Socket type not supported
@deftypevr Macro int ESOCKTNOSUPPORT
+@comment errno 44 @c DO NOT REMOVE
The socket type is not supported.
@end deftypevr
@comment errno.h
@comment BSD: Operation not supported
@deftypevr Macro int EOPNOTSUPP
+@comment errno 45 @c DO NOT REMOVE
The operation you requested is not supported. Some socket functions
-don't make sense for all types of sockets, and others may not be implemented
-for all communications protocols.
+don't make sense for all types of sockets, and others may not be
+implemented for all communications protocols. In the GNU system, this
+error can happen for many calls when the object does not support the
+particular operation; it is a generic indication that the server knows
+nothing to do for that call.
@end deftypevr
@comment errno.h
@comment BSD: Protocol family not supported
@deftypevr Macro int EPFNOSUPPORT
+@comment errno 46 @c DO NOT REMOVE
The socket communications protocol family you requested is not supported.
@end deftypevr
@comment errno.h
@comment BSD: Address family not supported by protocol family
@deftypevr Macro int EAFNOSUPPORT
+@comment errno 47 @c DO NOT REMOVE
The address family specified for a socket is not supported; it is
inconsistent with the protocol being used on the socket. @xref{Sockets}.
@end deftypevr
@@ -503,12 +556,14 @@ inconsistent with the protocol being used on the socket. @xref{Sockets}.
@comment errno.h
@comment BSD: Address already in use
@deftypevr Macro int EADDRINUSE
+@comment errno 48 @c DO NOT REMOVE
The requested socket address is already in use. @xref{Socket Addresses}.
@end deftypevr
@comment errno.h
@comment BSD: Can't assign requested address
@deftypevr Macro int EADDRNOTAVAIL
+@comment errno 49 @c DO NOT REMOVE
The requested socket address is not available; for example, you tried
to give a socket a name that doesn't match the local host name.
@xref{Socket Addresses}.
@@ -517,31 +572,36 @@ to give a socket a name that doesn't match the local host name.
@comment errno.h
@comment BSD: Network is down
@deftypevr Macro int ENETDOWN
+@comment errno 50 @c DO NOT REMOVE
A socket operation failed because the network was down.
@end deftypevr
@comment errno.h
@comment BSD: Network is unreachable
@deftypevr Macro int ENETUNREACH
-A socket operation failed because the subnet containing the remost host
+@comment errno 51 @c DO NOT REMOVE
+A socket operation failed because the subnet containing the remote host
was unreachable.
@end deftypevr
@comment errno.h
@comment BSD: Network dropped connection on reset
@deftypevr Macro int ENETRESET
+@comment errno 52 @c DO NOT REMOVE
A network connection was reset because the remote host crashed.
@end deftypevr
@comment errno.h
@comment BSD: Software caused connection abort
@deftypevr Macro int ECONNABORTED
+@comment errno 53 @c DO NOT REMOVE
A network connection was aborted locally.
@end deftypevr
@comment errno.h
@comment BSD: Connection reset by peer
@deftypevr Macro int ECONNRESET
+@comment errno 54 @c DO NOT REMOVE
A network connection was closed for reasons outside the control of the
local host, such as by the remote machine rebooting or an unrecoverable
protocol violation.
@@ -550,6 +610,7 @@ protocol violation.
@comment errno.h
@comment BSD: No buffer space available
@deftypevr Macro int ENOBUFS
+@comment errno 55 @c DO NOT REMOVE
The kernel's buffers for I/O operations are all in use. In GNU, this
error is always synonymous with @code{ENOMEM}; you may get one or the
other from network operations.
@@ -558,6 +619,7 @@ other from network operations.
@comment errno.h
@comment BSD: Socket is already connected
@deftypevr Macro int EISCONN
+@comment errno 56 @c DO NOT REMOVE
You tried to connect a socket that is already connected.
@xref{Connecting}.
@end deftypevr
@@ -565,6 +627,7 @@ You tried to connect a socket that is already connected.
@comment errno.h
@comment BSD: Socket is not connected
@deftypevr Macro int ENOTCONN
+@comment errno 57 @c DO NOT REMOVE
The socket is not connected to anything. You get this error when you
try to transmit data over a socket, without first specifying a
destination for the data. For a connectionless socket (for datagram
@@ -574,6 +637,7 @@ protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
@comment errno.h
@comment BSD: Destination address required
@deftypevr Macro int EDESTADDRREQ
+@comment errno 39 @c DO NOT REMOVE
No default destination address was set for the socket. You get this
error when you try to transmit data over a connectionless socket,
without first specifying a destination for the data with @code{connect}.
@@ -582,12 +646,21 @@ without first specifying a destination for the data with @code{connect}.
@comment errno.h
@comment BSD: Can't send after socket shutdown
@deftypevr Macro int ESHUTDOWN
+@comment errno 58 @c DO NOT REMOVE
The socket has already been shut down.
@end deftypevr
@comment errno.h
+@comment BSD: Too many references: can't splice
+@deftypevr Macro int ETOOMANYREFS
+@comment errno 59 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
@comment BSD: Connection timed out
@deftypevr Macro int ETIMEDOUT
+@comment errno 60 @c DO NOT REMOVE
A socket operation with a specified timeout received no response during
the timeout period.
@end deftypevr
@@ -595,6 +668,7 @@ the timeout period.
@comment errno.h
@comment BSD: Connection refused
@deftypevr Macro int ECONNREFUSED
+@comment errno 61 @c DO NOT REMOVE
A remote host refused to allow the network connection (typically because
it is not running the requested service).
@end deftypevr
@@ -602,6 +676,7 @@ it is not running the requested service).
@comment errno.h
@comment BSD: Too many levels of symbolic links
@deftypevr Macro int ELOOP
+@comment errno 62 @c DO NOT REMOVE
Too many levels of symbolic links were encountered in looking up a file name.
This often indicates a cycle of symbolic links.
@end deftypevr
@@ -609,6 +684,7 @@ This often indicates a cycle of symbolic links.
@comment errno.h
@comment POSIX.1: File name too long
@deftypevr Macro int ENAMETOOLONG
+@comment errno 63 @c DO NOT REMOVE
Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
Files}) or host name too long (in @code{gethostname} or
@code{sethostname}; @pxref{Host Identification}).
@@ -617,25 +693,38 @@ Files}) or host name too long (in @code{gethostname} or
@comment errno.h
@comment BSD: Host is down
@deftypevr Macro int EHOSTDOWN
+@comment errno 64 @c DO NOT REMOVE
The remote host for a requested network connection is down.
@end deftypevr
@comment errno.h
@comment BSD: No route to host
@deftypevr Macro int EHOSTUNREACH
+@comment errno 65 @c DO NOT REMOVE
The remote host for a requested network connection is not reachable.
@end deftypevr
@comment errno.h
@comment POSIX.1: Directory not empty
@deftypevr Macro int ENOTEMPTY
+@comment errno 66 @c DO NOT REMOVE
Directory not empty, where an empty directory was expected. Typically,
this error occurs when you are trying to delete a directory.
@end deftypevr
@comment errno.h
+@comment BSD: Too many processes
+@deftypevr Macro int EPROCLIM
+@comment errno 67 @c DO NOT REMOVE
+This means that the per-user limit on new process would be exceeded by
+an attempted @code{fork}. @xref{Limits on Resources}, for details on
+the @code{RLIMIT_NPROC} limit.
+@end deftypevr
+
+@comment errno.h
@comment BSD: Too many users
@deftypevr Macro int EUSERS
+@comment errno 68 @c DO NOT REMOVE
The file quota system is confused because there are too many users.
@c This can probably happen in a GNU system when using NFS.
@end deftypevr
@@ -643,12 +732,14 @@ The file quota system is confused because there are too many users.
@comment errno.h
@comment BSD: Disc quota exceeded
@deftypevr Macro int EDQUOT
+@comment errno 69 @c DO NOT REMOVE
The user's disk quota was exceeded.
@end deftypevr
@comment errno.h
@comment BSD: Stale NFS file handle
@deftypevr Macro int ESTALE
+@comment errno 70 @c DO NOT REMOVE
Stale NFS file handle. This indicates an internal confusion in the NFS
system which is due to file system rearrangements on the server host.
Repairing this condition usually requires unmounting and remounting
@@ -658,6 +749,7 @@ the NFS file system on the local host.
@comment errno.h
@comment BSD: Too many levels of remote in path
@deftypevr Macro int EREMOTE
+@comment errno 71 @c DO NOT REMOVE
An attempt was made to NFS-mount a remote file system with a file name that
already specifies an NFS-mounted file.
(This is an error on some operating systems, but we expect it to work
@@ -665,16 +757,54 @@ properly on the GNU system, making this error code impossible.)
@end deftypevr
@comment errno.h
+@comment BSD: RPC struct is bad
+@deftypevr Macro int EBADRPC
+@comment errno 72 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
+@comment BSD: RPC version wrong
+@deftypevr Macro int ERPCMISMATCH
+@comment errno 73 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
+@comment BSD: RPC program not available
+@deftypevr Macro int EPROGUNAVAIL
+@comment errno 74 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
+@comment BSD: RPC program version wrong
+@deftypevr Macro int EPROGMISMATCH
+@comment errno 75 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
+@comment BSD: RPC bad procedure for program
+@deftypevr Macro int EPROCUNAVAIL
+@comment errno 76 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
@comment POSIX.1: No locks available
@deftypevr Macro int ENOLCK
-No locks available. This is used by the file locking facilities;
-see @ref{File Locks}.
-This error never occurs in the GNU system.
+@comment errno 77 @c DO NOT REMOVE
+No locks available. This is used by the file locking facilities; see
+@ref{File Locks}. This error is never generated by the GNU system, but
+it can result from an operation to an NFS server running another
+operating system.
@end deftypevr
@comment errno.h
@comment BSD: Inappropriate file type or format
@deftypevr Macro int EFTYPE
+@comment errno 79 @c DO NOT REMOVE
Inappropriate file type or format. The file was the wrong type for the
operation, or a data file had the wrong format.
@@ -683,8 +813,23 @@ sticky bit on a non-directory file; @pxref{Setting Permissions}.
@end deftypevr
@comment errno.h
+@comment BSD: Authentication error
+@deftypevr Macro int EAUTH
+@comment errno 80 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
+@comment BSD: Need authenticator
+@deftypevr Macro int ENEEDAUTH
+@comment errno 81 @c DO NOT REMOVE
+???
+@end deftypevr
+
+@comment errno.h
@comment POSIX.1: Function not implemented
@deftypevr Macro int ENOSYS
+@comment errno 78 @c DO NOT REMOVE
Function not implemented. Some functions have commands or options defined
that might not be supported in all implementations, and this is the kind
of error you get if you request them and they are not supported.
@@ -693,6 +838,7 @@ of error you get if you request them and they are not supported.
@comment errno.h
@comment GNU: Inappropriate operation for background process
@deftypevr Macro int EBACKGROUND
+@comment errno 100 @c DO NOT REMOVE
In the GNU system, servers supporting the @code{term} protocol return
this error for certain operations when the caller is not in the
foreground process group of the terminal. Users do not usually see this
@@ -704,6 +850,7 @@ for information on process groups and these signals.
@comment errno.h
@comment GNU: Translator died
@deftypevr Macro int EDIED
+@comment errno 101 @c DO NOT REMOVE
In the GNU system, opening a file returns this error when the file is
translated by a program and the translator program dies while starting
up, before it has connected to the file.
@@ -712,24 +859,28 @@ up, before it has connected to the file.
@comment errno.h
@comment GNU: ?
@deftypevr Macro int ED
+@comment errno 102 @c DO NOT REMOVE
The experienced user will know what is wrong.
@end deftypevr
@comment errno.h
@comment GNU: You really blew it this time
@deftypevr Macro int EGREGIOUS
+@comment errno 103 @c DO NOT REMOVE
You did @strong{what}?
@end deftypevr
@comment errno.h
@comment GNU: Computer bought the farm
@deftypevr Macro int EIEIO
+@comment errno 104 @c DO NOT REMOVE
Go home and have a glass of warm, dairy-fresh milk.
@end deftypevr
@comment errno.h
@comment GNU: Gratuitous error
@deftypevr Macro int EGRATUITOUS
+@comment errno 105 @c DO NOT REMOVE
This error code has no purpose.
@end deftypevr
@@ -742,7 +893,7 @@ your program to report informative error messages in the customary
format about the failure of a library call. The functions
@code{strerror} and @code{perror} give you the standard error message
for a given error code; the variable
-@code{program_invocation_short_name} gives you convenient access to the
+@w{@code{program_invocation_short_name}} gives you convenient access to the
name of the program that encountered the error.
@comment string.h
diff --git a/manual/filesys.texi b/manual/filesys.texi
index 571e3e9d0a..d2afe8623f 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -277,7 +277,7 @@ reading the directory whose file name is @var{dirname}. The stream has
type @code{DIR *}.
If unsuccessful, @code{opendir} returns a null pointer. In addition to
-the usual file name syntax errors (@pxref{File Name Errors}), the
+the usual file name errors (@pxref{File Name Errors}), the
following @code{errno} error conditions are defined for this function:
@table @code
@@ -435,13 +435,14 @@ The @code{link} function makes a new link to the existing file named by
@var{oldname}, under the new name @var{newname}.
This function returns a value of @code{0} if it is successful and
-@code{-1} on failure. In addition to the usual file name syntax errors
+@code{-1} on failure. In addition to the usual file name errors
(@pxref{File Name Errors}) for both @var{oldname} and @var{newname}, the
following @code{errno} error conditions are defined for this function:
@table @code
@item EACCES
-The directory in which the new link is to be written is not writable.
+You are not allowed to write the directory in which the new link is to
+be written.
@ignore
Some implementations also require that the existing file be accessible
by the caller, and use this error to report failure for that reason.
@@ -453,25 +454,20 @@ this link with a new link, you must remove the old link explicitly first.
@item EMLINK
There are already too many links to the file named by @var{oldname}.
-(The maximum number of links to a file is @code{LINK_MAX}; see
+(The maximum number of links to a file is @w{@code{LINK_MAX}}; see
@ref{Limits for Files}.)
-Well-designed file systems never report this error, because they permit
-more links than your disk could possibly hold. However, you must still
-take account of the possibility of this error, as it could result from
-network access to a file system on another machine.
-
@item ENOENT
The file named by @var{oldname} doesn't exist. You can't make a link to
a file that doesn't exist.
@item ENOSPC
-The directory or file system that would contain the new link is ``full''
+The directory or file system that would contain the new link is full
and cannot be extended.
@item EPERM
In the GNU system and some others, you cannot make links to directories.
-many systems allow only privileged users to do so. This error
+Many systems allow only privileged users to do so. This error
is used to report the problem.
@item EROFS
@@ -481,6 +477,9 @@ a read-only file system.
@item EXDEV
The directory specified in @var{newname} is on a different file system
than the existing file.
+
+@item EIO
+A hardware error occurred while trying to read or write the to filesystem.
@end table
@end deftypefun
@@ -512,7 +511,7 @@ By contrast, other operations such as deleting or renaming the file
operate on the link itself. The functions @code{readlink} and
@code{lstat} also refrain from following symbolic links, because their
purpose is to obtain information about the link. So does @code{link},
-the function that makes a hard link--it makes a hard link to the
+the function that makes a hard link---it makes a hard link to the
symbolic link, which one rarely wants.
Prototypes for the functions listed in this section are in
@@ -590,7 +589,7 @@ readlink_malloc (char *filename)
@c @group Invalid outside example.
A value of @code{-1} is returned in case of error. In addition to the
-usual file name syntax errors (@pxref{File Name Errors}), the following
+usual file name errors (@pxref{File Name Errors}), the following
@code{errno} error conditions are defined for this function:
@table @code
@@ -627,14 +626,14 @@ postponed until all processes have closed the file.)
The function @code{unlink} is declared in the header file @file{unistd.h}.
This function returns @code{0} on successful completion, and @code{-1}
-on error. In addition to the usual file name syntax errors
+on error. In addition to the usual file name errors
(@pxref{File Name Errors}), the following @code{errno} error conditions are
defined for this function:
@table @code
@item EACCES
Write permission is denied for the directory from which the file is to be
-removed.
+removed, or the directory has the sticky bit set and you do not own the file.
@item EBUSY
This error indicates that the file is being used by the system in such a
@@ -649,7 +648,7 @@ The file name to be deleted doesn't exist.
On some systems, @code{unlink} cannot be used to delete the name of a
directory, or can only be used this way by a privileged user.
To avoid such problems, use @code{rmdir} to delete directories.
-The GNU system
+(In the GNU system @code{unlink} can never delete the name of a directory.)
@item EROFS
The directory in which the file name is to be deleted is on a read-only
@@ -738,7 +737,7 @@ names to still exist; but @var{newname} will always be intact if it
exists at all.
If @code{rename} fails, it returns @code{-1}. In addition to the usual
-file name syntax errors (@pxref{File Name Errors}), the following
+file name errors (@pxref{File Name Errors}), the following
@code{errno} error conditions are defined for this function:
@table @code
@@ -767,11 +766,6 @@ The @var{newname} names a directory, but the @var{oldname} doesn't.
@item EMLINK
The parent directory of @var{newname} would have too many links.
-Well-designed file systems never report this error, because they permit
-more links than your disk could possibly hold. However, you must still
-take account of the possibility of this error, as it could result from
-network access to a file system on another machine.
-
@item ENOENT
The file named by @var{oldname} doesn't exist.
@@ -797,6 +791,7 @@ file systems.
@pindex mkdir
Directories are created with the @code{mkdir} function. (There is also
a shell command @code{mkdir} which does the same thing.)
+@c !!! umask
@comment sys/stat.h
@comment POSIX.1
@@ -911,10 +906,11 @@ Identifies the device containing the file. The @code{st_ino} and
system crashes, however.
@item nlink_t st_nlink
-The number of hard links to the file. This count keeps track of how many
-directories have entries for this file. If the count is ever
-decremented to zero, then the file itself is discarded. Symbolic links
-are not counted in the total.
+The number of hard links to the file. This count keeps track of how
+many directories have entries for this file. If the count is ever
+decremented to zero, then the file itself is discarded as soon as no
+process still holds it open. Symbolic links are not counted in the
+total.
@item uid_t st_uid
The user ID of the file's owner. @xref{File Owner}.
@@ -925,6 +921,8 @@ The group ID of the file. @xref{File Owner}.
@item off_t st_size
This specifies the size of a regular file in bytes. For files that
are really devices and the like, this field isn't usually meaningful.
+For symbolic links, this specifies the length of the file name the link
+refers to.
@item time_t st_atime
This is the last access time for the file. @xref{File Times}.
@@ -949,7 +947,8 @@ This is the time of the last modification to the attributes of the file.
This is the fractional part of the time of last modification to the
attributes of the file. @xref{File Times}.
-@item unsigned int st_nblocks
+@c !!! st_rdev
+@item unsigned int st_blocks
This is the amount of disk space that the file occupies, measured in
units of 512-byte blocks.
@@ -1033,7 +1032,7 @@ nonexistent file name, then @code{stat} fails, reporting a nonexistent
file.
The return value is @code{0} if the operation is successful, and @code{-1}
-on failure. In addition to the usual file name syntax errors
+on failure. In addition to the usual file name errors
(@pxref{File Name Errors}, the following @code{errno} error conditions
are defined for this function:
@@ -1261,7 +1260,7 @@ bits may not be appropriate for the new owner.) The other file
permission bits are not changed.
The return value is @code{0} on success and @code{-1} on failure.
-In addition to the usual file name syntax errors (@pxref{File Name Errors}),
+In addition to the usual file name errors (@pxref{File Name Errors}),
the following @code{errno} error conditions are defined for this function:
@table @code
@@ -1349,7 +1348,7 @@ compatibility.
@itemx S_IWRITE
@vindex S_IWRITE
Write permission bit for the owner of the file. Usually 0200.
-@code{S_IWRITE} is an obsolete synonym provided for BSD compatibility.
+@w{@code{S_IWRITE}} is an obsolete synonym provided for BSD compatibility.
@comment sys/stat.h
@comment POSIX.1
@@ -1604,7 +1603,7 @@ permission of the file pointed to by the link, not those of the link
itself.
This function returns @code{0} if successful and @code{-1} if not. In
-addition to the usual file name syntax errors (@pxref{File Name
+addition to the usual file name errors (@pxref{File Name
Errors}), the following @code{errno} error conditions are defined for
this function:
@@ -1723,7 +1722,7 @@ The return value is @code{0} if the access is permitted, and @code{-1}
otherwise. (In other words, treated as a predicate function,
@code{access} returns true if the requested access is @emph{denied}.)
-In addition to the usual file name syntax errors (@pxref{File Name
+In addition to the usual file name errors (@pxref{File Name
Errors}), the following @code{errno} error conditions are defined for
this function:
@@ -1785,14 +1784,11 @@ For more information about representation and manipulation of time
values, see @ref{Calendar Time}.
@pindex time.h
-When an existing file is opened, its attribute change time and
-modification time fields are updated. Reading from a file updates its
-access time attribute, and writing updates its modification time.
-
-When a file is created, all three timestamps for that file are set to
-the current time. In addition, the attribute change time and
-modification time fields of the directory that contains the new entry
-are updated.
+Reading from a file updates its access time attribute, and writing
+updates its modification time. When a file is created, all three
+timestamps for that file are set to the current time. In addition, the
+attribute change time and modification time fields of the directory that
+contains the new entry are updated.
Adding a new name for a file with the @code{link} function updates the
attribute change time field of the file being linked, and both the
@@ -1843,7 +1839,7 @@ in either case (since changing the timestamps is itself a modification
of the file attributes).
The @code{utime} function returns @code{0} if successful and @code{-1}
-on failure. In addition to the usual file name syntax errors
+on failure. In addition to the usual file name errors
(@pxref{File Name Errors}), the following @code{errno} error conditions
are defined for this function:
@@ -1915,7 +1911,7 @@ The @var{dev} argument specifies which device the special file refers to.
Its exact interpretation depends on the kind of special file being created.
The return value is @code{0} on success and @code{-1} on error. In addition
-to the usual file name syntax errors (@pxref{File Name Errors}), the
+to the usual file name errors (@pxref{File Name Errors}), the
following @code{errno} error conditions are defined for this function:
@table @code
@@ -1924,7 +1920,7 @@ The calling process is not privileged. Only the superuser can create
special files.
@item ENOSPC
-The directory or file system that would contain the new file is ``full''
+The directory or file system that would contain the new file is full
and cannot be extended.
@item EROFS
diff --git a/manual/intro.texi b/manual/intro.texi
index 9ca2ade9f8..19f04a1474 100644
--- a/manual/intro.texi
+++ b/manual/intro.texi
@@ -423,10 +423,10 @@ header files can define functions, variables, and macros for internal
purposes without risk of conflict with names in user programs.
Some additional classes of identifier names are reserved for future
-extensions to the C language. While using these names for your own
-purposes right now might not cause a problem, they do raise the
-possibility of conflict with future versions of the C standard, so you
-should avoid these names.
+extensions to the C language or the POSIX.1 environment. While using these
+names for your own purposes right now might not cause a problem, they do
+raise the possibility of conflict with future versions of the C
+or POSIX standards, so you should avoid these names.
@itemize @bullet
@item
@@ -581,7 +581,8 @@ modes.
@ref{Pipes and FIFOs}, contains information about simple interprocess
communication mechanisms. Pipes allow communication between two related
processes (such as between a parent and child), while FIFOs allow
-communication between processes sharing a common file system.
+communication between processes sharing a common file system on the same
+machine.
@item
@ref{Sockets}, describes a more complicated interprocess communication
@@ -649,8 +650,10 @@ command-line arguments and environment variables.
and run programs.
@item
-@ref{Job Control}, describes functions for manipulating process groups.
-This material is probably only of interest if you are writing a shell.
+@ref{Job Control}, describes functions for manipulating process groups
+and the controlling terminal. This material is probably only of
+interest if you are writing a shell or other program which handles job
+control specially.
@item
@ref{User Database}, and @ref{Group Database}, tell you how to access
diff --git a/manual/io.texi b/manual/io.texi
index a228125eca..84fd0a9e44 100644
--- a/manual/io.texi
+++ b/manual/io.texi
@@ -154,7 +154,7 @@ position on a file that doesn't support random access, you get the
Streams and descriptors that are opened for @dfn{append access} are
treated specially for output: output to such files is @emph{always}
appended sequentially to the @emph{end} of the file, regardless of the
-file position. But, the file position is still used to control where in
+file position. However, the file position is still used to control where in
the file reading is done.
@cindex append-access files
@@ -217,13 +217,16 @@ directory. A file name with multiple components names a directory, and
then a file in that directory, and so on.
Some other documents, such as the POSIX standard, use the term
-@dfn{pathname} for what we call a file name, and either
-@dfn{filename} or @dfn{pathname component} for what this manual calls a
-file name component. We don't use this terminology because a ``path''
-is something completely different (a list of directories to search), and
-we think that ``pathname'' used for something else will confuse users.
-We always use ``file name'' and ``file name component'' (or sometimes
-just ``component'', where the context is obvious) in GNU documentation.
+@dfn{pathname} for what we call a file name, and either @dfn{filename}
+or @dfn{pathname component} for what this manual calls a file name
+component. We don't use this terminology because a ``path'' is
+something completely different (a list of directories to search), and we
+think that ``pathname'' used for something else will confuse users. We
+always use ``file name'' and ``file name component'' (or sometimes just
+``component'', where the context is obvious) in GNU documentation. Some
+macros use the POSIX terminology in their names, such as
+@code{PATH_MAX}. These macros are defined by the POSIX standard, so we
+cannot change their names.
You can find more detailed information about operations on directories
in @ref{File System Interface}.
@@ -310,13 +313,13 @@ system itself that enforces this kind of convention.
@node File Name Errors, File Name Portability, File Name Resolution, File Names
@subsection File Name Errors
-@cindex file name syntax errors
-@cindex usual file name syntax errors
+@cindex file name errors
+@cindex usual file name errors
Functions that accept file name arguments usually detect these
-@code{errno} error conditions relating to file name syntax. These
-errors are referred to throughout this manual as the @dfn{usual file
-name syntax errors}.
+@code{errno} error conditions relating to the file name syntax or
+trouble finding the named file. These errors are referred to throughout
+this manual as the @dfn{usual file name errors}.
@table @code
@item EACCES
diff --git a/manual/llio.texi b/manual/llio.texi
index 3e6567b3ef..6a5a5d27e0 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -85,14 +85,15 @@ parameters (using the @samp{|} operator in C).
The normal return value from @code{open} is a non-negative integer file
descriptor. In the case of an error, a value of @code{-1} is returned
-instead. In addition to the usual file name syntax errors (@pxref{File
+instead. In addition to the usual file name errors (@pxref{File
Name Errors}), the following @code{errno} error conditions are defined
for this function:
@table @code
@item EACCES
The file exists but is not readable/writable as requested by the @var{flags}
-argument.
+argument, the file does not exist and the directory is unwritable so
+it cannot be created.
@item EEXIST
Both @code{O_CREAT} and @code{O_EXCL} are set, and the named file already
@@ -107,6 +108,8 @@ The @var{flags} argument specified write access, and the file is a directory.
@item EMFILE
The process has too many files open.
+The maximum number of file descriptors is controlled by the
+@code{RLIMIT_NOFILE} resource limit; @pxref{Limits on Resources}.
@item ENFILE
The entire system, or perhaps the file system which contains the
@@ -126,11 +129,13 @@ argument, the file named by @var{filename} is a FIFO (@pxref{Pipes and
FIFOs}), and no process has the file open for reading.
@item EROFS
-The file resides on a read-only file system and any of @code{O_WRONLY},
+The file resides on a read-only file system and any of @w{@code{O_WRONLY}},
@code{O_RDWR}, and @code{O_TRUNC} are set in the @var{flags} argument,
or @code{O_CREAT} is set and the file does not already exist.
@end table
+@c !!! umask
+
The @code{open} function is the underlying primitive for the @code{fopen}
and @code{freopen} functions, that create streams.
@end deftypefun
@@ -186,6 +191,13 @@ Here is an example of how to handle @code{EINTR} properly:
@smallexample
TEMP_FAILURE_RETRY (close (desc));
@end smallexample
+
+@item ENOSPC
+@itemx EIO
+@itemx EDQUOT
+When the file is accessed by NFS, these errors from @code{write} can sometimes
+not be detected until @code{close}. @xref{I/O Primitives}, for details
+on their meaning.
@end table
@end deftypefun
@@ -256,18 +268,22 @@ file can also fail with @code{EAGAIN} if the kernel cannot find enough
physical memory to lock down the user's pages. This is limited to
devices that transfer with direct memory access into the user's memory,
which means it does not include terminals, since they always use
-separate buffers inside the kernel.
+separate buffers inside the kernel. This problem never happens in the
+GNU system.
Any condition that could result in @code{EAGAIN} can instead result in a
successful @code{read} which returns fewer bytes than requested.
Calling @code{read} again immediately would result in @code{EAGAIN}.
@item EBADF
-The @var{filedes} argument is not a valid file descriptor.
+The @var{filedes} argument is not a valid file descriptor,
+or is not open for reading.
@item EINTR
@code{read} was interrupted by a signal while it was waiting for input.
-@xref{Interrupted Primitives}.
+@xref{Interrupted Primitives}. A signal will not necessary cause
+@code{read} to return @code{EINTR}; it may instead result in a
+successful @code{read} which returns fewer bytes than requested.
@item EIO
For many devices, and for disk files, this error code indicates
@@ -294,9 +310,20 @@ The @code{write} function writes up to @var{size} bytes from
@var{buffer} is not necessarily a character string and a null character is
output like any other character.
-The return value is the number of bytes actually written. This is
-normally the same as @var{size}, but might be less (for example, if the
-physical media being written to fills up).
+The return value is the number of bytes actually written. This may be
+@var{size}, but can always be smaller. Your program should always call
+@code{write} in a loop, iterating until all the data is written.
+
+Once @code{write} returns, the data is enqueued to be written and can be
+read back right away, but it is not necessarily written out to permanent
+storage immediately. You can use @code{fsync} when you need to be sure
+your data has been permanently stored before continuing. (It is more
+efficient for the system to batch up consecutive writes and do them all
+at once when convenient. Normally they will always be written to disk
+within a minute or less.)
+@c !!! xref fsync
+You can use the @code{O_FSYNC} open mode to make @code{write} always
+store the data to disk before returning; @pxref{Operating Modes}.
In the case of an error, @code{write} returns @code{-1}. The following
@code{errno} error conditions are defined for this function:
@@ -321,24 +348,29 @@ file can also fail with @code{EAGAIN} if the kernel cannot find enough
physical memory to lock down the user's pages. This is limited to
devices that transfer with direct memory access into the user's memory,
which means it does not include terminals, since they always use
-separate buffers inside the kernel.
+separate buffers inside the kernel. This problem does not arise in the
+GNU system.
@item EBADF
-The @var{filedes} argument is not a valid file descriptor.
+The @var{filedes} argument is not a valid file descriptor,
+or is not open for writing.
@item EFBIG
-The size of the file is larger than the implementation can support.
+The size of the file would become larger than the implementation can support.
@item EINTR
The @code{write} operation was interrupted by a signal while it was
-blocked waiting for completion. @xref{Interrupted Primitives}.
+blocked waiting for completion. A signal will not necessary cause
+@code{write} to return @code{EINTR}; it may instead result in a
+successful @code{write} which writes fewer bytes than requested.
+@xref{Interrupted Primitives}.
@item EIO
For many devices, and for disk files, this error code indicates
a hardware error.
@item ENOSPC
-The device is full.
+The device containing the file is full.
@item EPIPE
This error is returned when you try to write to a pipe or FIFO that
@@ -382,7 +414,7 @@ The @code{lseek} function is used to change the file position of the
file with descriptor @var{filedes}.
The @var{whence} argument specifies how the @var{offset} should be
-interpreted in the same way as for the @code{fseek} function, and can be
+interpreted in the same way as for the @code{fseek} function, and must be
one of the symbolic constants @code{SEEK_SET}, @code{SEEK_CUR}, or
@code{SEEK_END}.
@@ -401,19 +433,29 @@ the file. A negative count specifies a position within the current
extent of the file; a positive count specifies a position past the
current end. If you set the position past the current end, and
actually write data, you will extend the file with zeros up to that
-position.
-@end table
+position.@end table
The return value from @code{lseek} is normally the resulting file
position, measured in bytes from the beginning of the file.
You can use this feature together with @code{SEEK_CUR} to read the
current file position.
+If you want to append to the file, setting the file position to the
+current end of file with @code{SEEK_END} is not sufficient. Another
+process may write more data after you seek but before you write,
+extending the file so the position you write onto clobbers their data.
+Instead, use the @code{O_APPEND} operating mode; @pxref{Operating Modes}.
+
You can set the file position past the current end of the file. This
does not by itself make the file longer; @code{lseek} never changes the
file. But subsequent output at that position will extend the file.
-Characters between the previous end of file and the new position
-are filled with zeros.
+Characters between the previous end of file and the new position are
+filled with zeros. Extending the file in this way can create a
+``hole'': the blocks of zeros are not actually allocated on disk, so the
+file takes up less space than it appears so; it is then called a
+``sparse file''.
+@cindex sparse files
+@cindex holes in files
If the file position cannot be changed, or the operation is in some way
invalid, @code{lseek} returns a value of @code{-1}. The following
@@ -425,12 +467,13 @@ The @var{filedes} is not a valid file descriptor.
@item EINVAL
The @var{whence} argument value is not valid, or the resulting
-file offset is not valid.
+file offset is not valid. A file offset is invalid.
@item ESPIPE
-The @var{filedes} corresponds to a pipe or FIFO, which cannot be positioned.
-(There may be other kinds of files that cannot be positioned either, but
-the behavior is not specified in those cases.)
+The @var{filedes} corresponds to an object that cannot be positioned,
+such as a pipe, FIFO or terminal device. (POSIX.1 specifies this error
+only for pipes and FIFOs, but in the GNU system, you always get
+@code{ESPIPE} if the object is not seekable.)
@end table
The @code{lseek} function is the underlying primitive for the
@@ -538,6 +581,10 @@ The return value is the new stream. If the stream cannot be created
(for example, if the modes for the file indicated by the file descriptor
do not permit the access specified by the @var{opentype} argument), a
null pointer is returned instead.
+
+In some other systems, @code{fdopen} may fail to detect that the modes
+for file descriptor do not permit the access specified by
+@code{opentype}. The GNU C library always checks for this.
@end deftypefun
For an example showing the use of the @code{fdopen} function,
@@ -620,11 +667,12 @@ the stream.
Channels that come from a single opening share the same file position;
we call them @dfn{linked} channels. Linked channels result when you
make a stream from a descriptor using @code{fdopen}, when you get a
-descriptor from a stream with @code{fileno}, and when you copy a
-descriptor with @code{dup} or @code{dup2}. For files that don't support
-random access, such as terminals and pipes, @emph{all} channels are
-effectively linked. On random-access files, all append-type output
-streams are effectively linked to each other.
+descriptor from a stream with @code{fileno}, when you copy a descriptor
+with @code{dup} or @code{dup2}, and when descriptors are inherited
+during @code{fork}. For files that don't support random access, such as
+terminals and pipes, @emph{all} channels are effectively linked. On
+random-access files, all append-type output streams are effectively
+linked to each other.
@cindex cleaning up a stream
If you have been using a stream for I/O, and you want to do I/O using
@@ -664,13 +712,13 @@ obsolete data that had been in the stream's buffer.
If you do output to one channel at the end of the file, this will
certainly leave the other independent channels positioned somewhere
-before the new end. If you want them to output at the end, you must set
-their file positions to end of file, first. (This is not necessary if
-you use an append-type descriptor or stream; they always output at the
-current end of the file.) In order to make the end-of-file position
-accurate, you must clean the output channel you were using, if it is a
-stream. (This is necessary even if you plan to use an append-type
-channel next.)
+before the new end. You cannot reliably set their file positions to the
+new end of file before writing, because the file can always be extended
+by another process between when you set the file position and when you
+write the data. Instead, use an append-type descriptor or stream; they
+always output at the current end of the file. In order to make the
+end-of-file position accurate, you must clean the output channel you
+were using, if it is a stream.
It's impossible for two channels to have separate file pointers for a
file that doesn't support random access. Thus, channels for reading or
@@ -778,7 +826,9 @@ The value of this macro is the maximum number of file descriptors that a
fixed maximum number, @code{FD_SETSIZE} is at least that number. On
some systems, including GNU, there is no absolute limit on the number of
descriptors open, but this macro still has a constant value which
-controls the number of bits in an @code{fd_set}.
+controls the number of bits in an @code{fd_set}; if you get a file
+descriptor with a value as high as @code{FD_SETSIZE}, you cannot put
+that descriptor into an @code{fd_set}.
@end deftypevr
@comment sys/types.h
@@ -817,12 +867,18 @@ activity on any of the specified sets of file descriptors, or until the
timeout period has expired.
The file descriptors specified by the @var{read-fds} argument are
-checked to see if they are ready for reading (or if a server socket, for
-accepting a connection); the @var{write-fds} file descriptors are
-checked to see if they are ready for writing; and the @var{except-fds}
-file descriptors are checked for exceptional conditions. You can pass a
-null pointer for any of these arguments if you are not interested in
-checking for that kind of condition.
+checked to see if they are ready for reading; the @var{write-fds} file
+descriptors are checked to see if they are ready for writing; and the
+@var{except-fds} file descriptors are checked for exceptional
+conditions. You can pass a null pointer for any of these arguments if
+you are not interested in checking for that kind of condition.
+
+A file descriptor is considered ready for reading if it is at end of
+file. A server socket is considered ready for reading if there is a
+pending connection which can be accepted with @code{accept};
+@pxref{Accepting Connections}. A client socket is ready for writing when
+its connection is fully established; @pxref{Connecting}.
+
``Exceptional conditions'' does not mean errors---errors are reported
immediately when an erroneous system call is executed, and do not
constitute a state of the descriptor. Rather, they include conditions
@@ -903,8 +959,8 @@ like. All of these operations are performed by the function @code{fcntl}.
The second argument to the @code{fcntl} function is a command that
specifies which operation to perform. The function and macros that name
various flags that are used with it are declared in the header file
-@file{fcntl.h}. (Many of these flags are also used by the @code{open}
-function; see @ref{Opening and Closing Files}.)
+@file{fcntl.h}. Many of these flags are also used by the @code{open}
+function; see @ref{Opening and Closing Files}.
@pindex fcntl.h
@comment fcntl.h
@@ -1296,7 +1352,8 @@ extract the file access mode bits is with @code{O_ACCMODE}.
This macro stands for a mask that can be bitwise-ANDed with the file
status flag value to produce a value representing the file access mode.
The mode will be @code{O_RDONLY}, @code{O_WRONLY}, or @code{O_RDWR}.
-(In the GNU system it could also be zero.)
+(In the GNU system it could also be zero, and it never includes the
+@code{O_EXEC} bit.)
@end deftypevr
@node Open-time Flags
@@ -1330,6 +1387,7 @@ Here are the file name translation flags.
@comment POSIX.1
@deftypevr Macro int O_CREAT
If set, the file will be created if it doesn't already exist.
+@c !!! mode arg, umask
@cindex create on open (file status flag)
@end deftypevr
@@ -1347,9 +1405,10 @@ clobber an existing file.
@cindex non-blocking open
This prevents @code{open} from blocking for a ``long time'' to open the
file. This is only meaningful for some kinds of files, usually devices
-such as serial ports. Often opening a port to a modem blocks until the
-modem reports carrier detection; if @code{O_NONBLOCK} is specified,
-@code{open} will return immediately without a carrier.
+such as serial ports; when it is not meaningful, it is harmless and
+ignored. Often opening a port to a modem blocks until the modem reports
+carrier detection; if @code{O_NONBLOCK} is specified, @code{open} will
+return immediately without a carrier.
Note that the @code{O_NONBLOCK} flag is overloaded as both an I/O operating
mode and a file name translation flag. This means that specifying
@@ -1364,13 +1423,17 @@ then call @code{fcntl} to turn the bit off.
@deftypevr Macro int O_NOCTTY
If the named file is a terminal device, don't make it the controlling
terminal for the process. @xref{Job Control}, for information about
-what it means to be the controlling terminal. In the GNU system and 4.4
-BSD, opening a file never makes it the controlling terminal and
-@code{O_NOCTTY} is zero.
+what it means to be the controlling terminal.
+
+In the GNU system and 4.4 BSD, opening a file never makes it the
+controlling terminal and @code{O_NOCTTY} is zero. However, other
+systems may use a nonzero value for @code{O_NOCTTY} and set the
+controlling terminal when you open a file that is a terminal device; so
+to be portable, use @code{O_NOCTTY} when it is important to avoid this.
@cindex controlling terminal, setting
@end deftypevr
-These three file name translation flags exist only in the GNU system.
+The following three file name translation flags exist only in the GNU system.
@comment fcntl.h
@comment GNU
@@ -1449,7 +1512,13 @@ and changed with @code{fcntl}.
@deftypevr Macro int O_APPEND
The bit that enables append mode for the file. If set, then all
@code{write} operations write the data at the end of the file, extending
-it, regardless of the current file position.
+it, regardless of the current file position. This is the only reliable
+way to append to a file. In append mode, you are guaranteed that the
+data you write will always go to the current end of the file, regardless
+of other processes writing to the file. Conversely, if you simply set
+the file position to the end of file and write, then another process can
+extend the file after you set the file position but before you write,
+resulting in your data appearing someplace before the real end of file.
@end deftypevr
@comment fcntl.h
@@ -1506,6 +1575,7 @@ This is another name for @code{O_FSYNC}. They have the same value.
If this bit is set, @code{read} will not update the access time of the
file. @xref{File Times}. This is used by programs that do backups, so
that backing a file up does not count as reading it.
+Only the owner of the file or the superuser may use this bit.
This is a GNU extension.
@end deftypevr
@@ -1731,12 +1801,12 @@ The following @code{errno} error conditions are defined for this
function:
@table @code
-@item EACCES
-@itemx EAGAIN
+@item EAGAIN
+@itemx EACCES
The lock cannot be set because it is blocked by an existing lock on the
file. Some systems use @code{EAGAIN} in this case, and other systems
use @code{EACCES}; your program should treat them alike, after
-@code{F_SETLK}.
+@code{F_SETLK}. (The GNU system always uses @code{EAGAIN}.)
@item EBADF
Either: the @var{filedes} argument is invalid; you requested a read lock
@@ -1755,13 +1825,6 @@ Well-designed file systems never report this error, because they have no
limitation on the number of locks. However, you must still take account
of the possibility of this error, as it could result from network access
to a file system on another machine.
-
-@item EDEADLK
-The specified region is being locked by another process. But that
-process is waiting to lock a region which the current process has
-locked, so waiting for the lock would result in deadlock. The system
-does not guarantee that it will detect all such conditions, but it lets
-you know if it notices one.
@end table
@end deftypevr
@@ -1786,9 +1849,11 @@ The function was interrupted by a signal while it was waiting.
@xref{Interrupted Primitives}.
@item EDEADLK
-A deadlock condition was detected. This can happen if two processes
-each already controlling a locked region request a lock on the same
-region locked by the other process.
+The specified region is being locked by another process. But that
+process is waiting to lock a region which the current process has
+locked, so waiting for the lock would result in deadlock. The system
+does not guarantee that it will detect all such conditions, but it lets
+you know if it notices one.
@end table
@end deftypevr
diff --git a/manual/pipe.texi b/manual/pipe.texi
index 64247f17c1..773dc4aac8 100644
--- a/manual/pipe.texi
+++ b/manual/pipe.texi
@@ -73,7 +73,8 @@ The process has too many files open.
@item ENFILE
There are too many open files in the entire system. @xref{Error Codes},
-for more information about @code{ENFILE}.
+for more information about @code{ENFILE}. This error never occurs in
+the GNU system.
@end table
@end deftypefun
@@ -172,7 +173,7 @@ permissions; see @ref{Setting Permissions}.
The normal, successful return value from @code{mkfifo} is @code{0}. In
the case of an error, @code{-1} is returned. In addition to the usual
-file name syntax errors (@pxref{File Name Errors}), the following
+file name errors (@pxref{File Name Errors}), the following
@code{errno} error conditions are defined for this function:
@table @code
diff --git a/manual/process.texi b/manual/process.texi
index 4b76f9d72c..2f5ba65af5 100644
--- a/manual/process.texi
+++ b/manual/process.texi
@@ -345,7 +345,7 @@ rules for counting.
These functions normally don't return, since execution of a new program
causes the currently executing program to go away completely. A value
of @code{-1} is returned in the event of a failure. In addition to the
-usual file name syntax errors (@pxref{File Name Errors}), the following
+usual file name errors (@pxref{File Name Errors}), the following
@code{errno} error conditions are defined for these functions:
@table @code
diff --git a/manual/setjmp.texi b/manual/setjmp.texi
index 6fee67186e..dfdac1c4cd 100644
--- a/manual/setjmp.texi
+++ b/manual/setjmp.texi
@@ -48,7 +48,7 @@ You identify return points for non-local exits calling the function
environment in which the call to @code{setjmp} appears in an object of
type @code{jmp_buf}. Execution of the program continues normally after
the call to @code{setjmp}, but if a exit is later made to this return
-point by calling @code{longjmp} with the corresponding @code{jmp_buf}
+point by calling @code{longjmp} with the corresponding @w{@code{jmp_buf}}
object, control is transferred back to the point where @code{setjmp} was
called. The return value from @code{setjmp} is used to distinguish
between an ordinary return and a return made by a call to
diff --git a/manual/socket.texi b/manual/socket.texi
index 439236bf98..0b338fca82 100644
--- a/manual/socket.texi
+++ b/manual/socket.texi
@@ -1640,11 +1640,14 @@ The socket address of the given @var{addr} is already in use.
@item EINPROGRESS
The socket @var{socket} is non-blocking and the connection could not be
-established immediately.
+established immediately. You can determine when the connection is
+completely established with @code{select}; @pxref{Waiting for I/O}.
+Another @code{connect} call on the same socket, before the connection is
+completely established, will fail with @code{EALREADY}.
@item EALREADY
The socket @var{socket} is non-blocking and already has a pending
-connection in progress.
+connection in progress (see @code{EINPROGRESS} above).
@end table
@end deftypefun
diff --git a/manual/startup.texi b/manual/startup.texi
index 455e1abc0c..c4f2b2f03f 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -120,7 +120,7 @@ of the @code{ld} command requires an argument---an output file name.
@item
An option and its argument may or may not appear as separate tokens. (In
other words, the whitespace separating them is optional.) Thus,
-@samp{-o foo} and @samp{-ofoo} are equivalent.
+@w{@samp{-o foo}} and @samp{-ofoo} are equivalent.
@item
Options typically precede other non-option arguments.
@@ -336,7 +336,7 @@ This field is the name of the option. It is a string.
@item int has_arg
This field says whether the option takes an argument. It is an integer,
-and there are three legitimate values: @code{no_argument},
+and there are three legitimate values: @w{@code{no_argument}},
@code{required_argument} and @code{optional_argument}.
@item int *flag
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 14b8dc2c8c..53eb57e5d4 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -16,11 +16,11 @@ representing a communications channel to a file, device, or process.
* Character Input:: Unformatted input by characters and words.
* Line Input:: Reading a line or a record from a stream.
* Unreading:: Peeking ahead/pushing back input just read.
+* Block Input/Output:: Input and output operations on blocks of data.
* Formatted Output:: @code{printf} and related functions.
* Customizing Printf:: You can define new conversion specifiers for
@code{printf} and friends.
* Formatted Input:: @code{scanf} and related functions.
-* Block Input/Output:: Input and output operations on blocks of data.
* EOF and Errors:: How you can tell if an I/O error happens.
* Binary Streams:: Some systems distinguish between text files
and binary files.
@@ -182,6 +182,10 @@ might not be emptied properly. The GNU C library does not have this
limitation; you can do arbitrary reading and writing operations on a
stream in whatever order.
+Additional characters may appear after these to specify flags for the
+call. Always put the mode (@samp{r}, @samp{w+}, etc.) first; that is
+the only part you are guaranteed will be understood by all systems.
+
The GNU C library defines one additional character for use in
@var{opentype}: the character @samp{x} insists on creating a new
file---if a file @var{filename} already exists, @code{fopen} fails
@@ -308,8 +312,9 @@ character @var{c} is returned.
@deftypefun int putc (int @var{c}, FILE *@var{stream})
This is just like @code{fputc}, except that most systems implement it as
a macro, making it faster. One consequence is that it may evaluate the
-@var{stream} argument more than once. @code{putc} is usually the best
-function to use for writing a single character.
+@var{stream} argument more than once, which is an exception to the
+general rule for macros. @code{putc} is usually the best function to
+use for writing a single character.
@end deftypefun
@comment stdio.h
@@ -325,7 +330,7 @@ The @code{putchar} function is equivalent to @code{putc} with
The function @code{fputs} writes the string @var{s} to the stream
@var{stream}. The terminating null character is not written.
This function does @emph{not} add a newline character, either.
-It outputs only the chars in the string.
+It outputs only the characters in the string.
This function returns @code{EOF} if a write error occurs, and otherwise
a non-negative value.
@@ -347,7 +352,8 @@ outputs the text @samp{Are you hungry?} followed by a newline.
@deftypefun int puts (const char *@var{s})
The @code{puts} function writes the string @var{s} to the stream
@code{stdout} followed by a newline. The terminating null character of
-the string is not written.
+the string is not written. (Note that @code{fputs} does @emph{not}
+write a newline as this function does.)
@code{puts} is the most convenient function for printing simple
messages. For example:
@@ -369,18 +375,29 @@ recommend you use @code{fwrite} instead (@pxref{Block Input/Output}).
@section Character Input
@cindex reading from a stream, by characters
-This section describes functions for performing character- and
-line-oriented input.
+This section describes functions for performing character-oriented input.
These functions are declared in the header file @file{stdio.h}.
@pindex stdio.h
+These functions return an @code{int} value that is either a character of
+input, or the special value @code{EOF} (usually -1). It is important to
+store the result of these functions in a variable of type @code{int}
+instead of @code{char}, even when you plan to use it only as a
+character. Storing @code{EOF} in a @code{char} variable truncates its
+value to the size of a character, so that it is no longer
+distinguishable from the valid character @samp{(char) -1}. So always
+use an @code{int} for the result of @code{getc} and friends, and check
+for @code{EOF} after the call; once you've verified that the result is
+not @code{EOF}, you can be sure that it will fit in a @samp{char}
+variable without loss of information.
+
@comment stdio.h
@comment ANSI
@deftypefun int fgetc (FILE *@var{stream})
This function reads the next character as an @code{unsigned char} from
the stream @var{stream} and returns its value, converted to an
@code{int}. If an end-of-file condition or read error occurs,
-@code{EOF} is returned instead.
+@code{EOF} is returned instead.
@end deftypefun
@comment stdio.h
@@ -419,7 +436,7 @@ y_or_n_p (const char *question)
c = tolower (fgetc (stdin));
answer = c;
/* @r{Discard rest of input line.} */
- while (c != '\n')
+ while (c != '\n' && c != EOF)
c = fgetc (stdin);
/* @r{Obey the answer if it was valid.} */
if (answer == 'y')
@@ -437,7 +454,10 @@ y_or_n_p (const char *question)
@deftypefun int getw (FILE *@var{stream})
This function reads a word (that is, an @code{int}) from @var{stream}.
It's provided for compatibility with SVID. We recommend you use
-@code{fread} instead (@pxref{Block Input/Output}).
+@code{fread} instead (@pxref{Block Input/Output}). Unlike @code{getc},
+any @code{int} value could be a valid result. @code{getw} returns
+@code{EOF} when it encounters end-of-file or an error, but there is no
+way to distinguish this from an input word with value -1.
@end deftypefun
@node Line Input
@@ -686,6 +706,59 @@ skip_whitespace (FILE *stream)
@}
@end smallexample
+@node Block Input/Output
+@section Block Input/Output
+
+This section describes how to do input and output operations on blocks
+of data. You can use these functions to read and write binary data, as
+well as to read and write text in fixed-size blocks instead of by
+characters or lines.
+@cindex binary I/O to a stream
+@cindex block I/O to a stream
+@cindex reading from a stream, by blocks
+@cindex writing to a stream, by blocks
+
+Binary files are typically used to read and write blocks of data in the
+same format as is used to represent the data in a running program. In
+other words, arbitrary blocks of memory---not just character or string
+objects---can be written to a binary file, and meaningfully read in
+again by the same program.
+
+Storing data in binary form is often considerably more efficient than
+using the formatted I/O functions. Also, for floating-point numbers,
+the binary form avoids possible loss of precision in the conversion
+process. On the other hand, binary files can't be examined or modified
+easily using many standard file utilities (such as text editors), and
+are not portable between different implementations of the language, or
+different kinds of computers.
+
+These functions are declared in @file{stdio.h}.
+@pindex stdio.h
+
+@comment stdio.h
+@comment ANSI
+@deftypefun size_t fread (void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream})
+This function reads up to @var{count} objects of size @var{size} into
+the array @var{data}, from the stream @var{stream}. It returns the
+number of objects actually read, which might be less than @var{count} if
+a read error occurs or the end of the file is reached. This function
+returns a value of zero (and doesn't read anything) if either @var{size}
+or @var{count} is zero.
+
+If @code{fread} encounters end of file in the middle of an object, it
+returns the number of complete objects read, and discards the partial
+object. Therefore, the stream remains at the actual end of the file.
+@end deftypefun
+
+@comment stdio.h
+@comment ANSI
+@deftypefun size_t fwrite (const void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream})
+This function writes up to @var{count} objects of size @var{size} from
+the array @var{data}, to the stream @var{stream}. The return value is
+normally @var{count}, if the call succeeds. Any other value indicates
+some sort of error, such as running out of space.
+@end deftypefun
+
@node Formatted Output
@section Formatted Output
@@ -1438,6 +1511,19 @@ Since that method is impossible, we provide alternative functions, the
@code{vprintf} series, which lets you pass a @code{va_list} to describe
``all of my arguments after the first five.''
+When it is sufficient to define a macro rather than a real function,
+the GNU C compiler provides a way to do this much more easily with macros.
+For example:
+
+@smallexample
+#define myprintf(a, b, c, d, e, rest...) printf (mytemplate , ## rest...)
+@end smallexample
+
+@noindent
+@xref{Macro Varargs, , Macros with Variable Numbers of Arguments,
+gcc.info, Using GNU CC}, for details. But this is limited to macros,
+and does not apply to real functions at all.
+
Before calling @code{vprintf} or the other functions listed in this
section, you @emph{must} call @code{va_start} (@pxref{Variadic
Functions}) to initialize a pointer to the variable arguments. Then you
@@ -1830,7 +1916,11 @@ The function to register a new output conversion is
@comment GNU
@deftypefun int register_printf_function (int @var{spec}, printf_function @var{handler-function}, printf_arginfo_function @var{arginfo-function})
This function defines the conversion specifier character @var{spec}.
-Thus, if @var{spec} is @code{'q'}, it defines the conversion @samp{%q}.
+Thus, if @var{spec} is @code{'z'}, it defines the conversion @samp{%z}.
+You can redefine the built-in conversions like @samp{%s}, but flag
+characters like @samp{#} and type modifiers like @samp{l} can never be
+used as conversions; calling @code{register_printf_function} for those
+characters has no effect.
The @var{handler-function} is the function called by @code{printf} and
friends when this conversion appears in a template string.
@@ -1864,7 +1954,7 @@ the handler when called needs to be able to get the options specified in
the template.
Both the @var{handler-function} and @var{arginfo-function} arguments
-to @code{register_printf_function} accept an argument of type
+to @code{register_printf_function} accept an argument that points to a
@code{struct printf_info}, which contains information about the options
appearing in an instance of the conversion specifier. This data type
is declared in the header file @file{printf.h}.
@@ -1902,7 +1992,10 @@ multiple characters, but still have a way to tell them apart when the
handler function is called.
@item unsigned int is_long_double
-This is a boolean that is true if the @samp{L} type modifier was specified.
+This is a boolean that is true if the @samp{L}, @samp{ll}, or @samp{q}
+type modifier was specified. For integer conversions, this indicates
+@code{long long int}, as opposed to @code{long double} for floating
+point conversions.
@item unsigned int is_short
This is a boolean that is true if the @samp{h} type modifier was specified.
@@ -1973,7 +2066,7 @@ negative value to indicate an error.
This is the data type that a handler function should have.
@end deftp
-If you are going to use @code{parse_printf_format} in your
+If you are going to use @w{@code{parse_printf_format}} in your
application, you should also define a function to pass as the
@var{arginfo-function} argument for each new conversion you install with
@code{register_printf_function}.
@@ -2102,9 +2195,9 @@ from a matching error.
If you are trying to read input that doesn't match a single, fixed
pattern, you may be better off using a tool such as Flex to generate a
lexical scanner, or Bison to generate a parser, rather than using
-@code{scanf}. For more information about this, see @ref{Top, Flex,
-Flex, flex.info, Flex: The Lexical Scanner Generator}, and @ref{Top,
-Bison, Bison, bison.info, The Bison Reference Manual}.
+@code{scanf}. For more information about these tools, see @ref{, , ,
+flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
+bison.info, The Bison Reference Manual}.
@node Input Conversion Syntax
@subsection Input Conversion Syntax
@@ -2298,6 +2391,7 @@ short int *}.
Specifies that the argument is a @code{long int *} or @code{unsigned
long int *}. Two @samp{l} characters is like the @samp{L} modifier, below.
+@need 100
@item ll
@itemx L
@itemx q
@@ -2589,59 +2683,6 @@ function, and warn you when they do not match the format string.
@xref{Function Attributes, , Declaring Attributes of Functions,
gcc.info, Using GNU CC}, for details.
-@node Block Input/Output
-@section Block Input/Output
-
-This section describes how to do input and output operations on blocks
-of data. You can use these functions to read and write binary data, as
-well as to read and write text in fixed-size blocks instead of by
-characters or lines.
-@cindex binary I/O to a stream
-@cindex block I/O to a stream
-@cindex reading from a stream, by blocks
-@cindex writing to a stream, by blocks
-
-Binary files are typically used to read and write blocks of data in the
-same format as is used to represent the data in a running program. In
-other words, arbitrary blocks of memory---not just character or string
-objects---can be written to a binary file, and meaningfully read in
-again by the same program.
-
-Storing data in binary form is often considerably more efficient than
-using the formatted I/O functions. Also, for floating-point numbers,
-the binary form avoids possible loss of precision in the conversion
-process. On the other hand, binary files can't be examined or modified
-easily using many standard file utilities (such as text editors), and
-are not portable between different implementations of the language, or
-different kinds of computers.
-
-These functions are declared in @file{stdio.h}.
-@pindex stdio.h
-
-@comment stdio.h
-@comment ANSI
-@deftypefun size_t fread (void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream})
-This function reads up to @var{count} objects of size @var{size} into
-the array @var{data}, from the stream @var{stream}. It returns the
-number of objects actually read, which might be less than @var{count} if
-a read error occurs or the end of the file is reached. This function
-returns a value of zero (and doesn't read anything) if either @var{size}
-or @var{count} is zero.
-
-If @code{fread} encounters end of file in the middle of an object, it
-returns the number of complete objects read, and discards the partial
-object. Therefore, the stream remains at the actual end of the file.
-@end deftypefun
-
-@comment stdio.h
-@comment ANSI
-@deftypefun size_t fwrite (const void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream})
-This function writes up to @var{count} objects of size @var{size} from
-the array @var{data}, to the stream @var{stream}. The return value is
-normally @var{count}, if the call succeeds. Any other value indicates
-some sort of error, such as running out of space.
-@end deftypefun
-
@node EOF and Errors
@section End-Of-File and Errors
@@ -2661,10 +2702,10 @@ These symbols are declared in the header file @file{stdio.h}.
@comment stdio.h
@comment ANSI
@deftypevr Macro int EOF
-This macro is an integer value that is returned
-by a number of functions to indicate an end-of-file condition, or some
-other error situation. With the GNU library, @code{EOF} is @code{-1}.
-In other libraries, its value may be some other negative number.
+This macro is an integer value that is returned by a number of functions
+to indicate an end-of-file condition, or some other error situation.
+With the GNU library, @code{EOF} is @code{-1}. In other libraries, its
+value may be some other negative number.
@end deftypevr
@comment stdio.h
diff --git a/manual/terminal.texi b/manual/terminal.texi
index 2f459721b3..0742851381 100644
--- a/manual/terminal.texi
+++ b/manual/terminal.texi
@@ -74,7 +74,7 @@ The @dfn{terminal input queue} is also sometimes referred to as its
from the terminal but not yet read by any process.
The size of the terminal's input queue is described by the
-@code{_POSIX_MAX_INPUT} and @code{MAX_INPUT} parameters; see @ref{Limits
+@w{@code{_POSIX_MAX_INPUT}} and @code{MAX_INPUT} parameters; see @ref{Limits
for Files}. You are guaranteed a queue size of at least
@code{MAX_INPUT}, but the queue might be larger, and might even
dynamically change size. If input flow control is enabled by setting
diff --git a/manual/time.texi b/manual/time.texi
index 5cc512b7d2..767c318a42 100644
--- a/manual/time.texi
+++ b/manual/time.texi
@@ -270,7 +270,7 @@ where subtraction doesn't work directly.
The @code{time} function returns the current time as a value of type
@code{time_t}. If the argument @var{result} is not a null pointer, the
time value is also stored in @code{*@var{result}}. If the calendar
-time is not available, the value @code{(time_t)(-1)} is returned.
+time is not available, the value @w{@code{(time_t)(-1)}} is returned.
@end deftypefun