Fix exponents in manual.

* manual/macros.texi: Add twoexp macro.
	* manual/filesys.texi: Fix exponents.
	* manual/llio.texi: Likewise.
	* manual/stdio.texi: Likewise.
This commit is contained in:
Ondřej Bílka 2015-07-12 11:32:56 +02:00
parent cd4e69ed3e
commit 9ceeb27931
6 changed files with 45 additions and 26 deletions

View File

@ -1,3 +1,11 @@
2015-08-20 Ondřej Bílka <neleai@seznam.cz>
[BZ #17787]
* manual/macros.texi: Add twoexp macro.
* manual/filesys.texi: Fix exponents.
* manual/llio.texi: Likewise.
* manual/stdio.texi: Likewise.
2015-08-20 Florian Weimer <fweimer@redhat.com> 2015-08-20 Florian Weimer <fweimer@redhat.com>
* sysdeps/x86/elide.h (ELIDE_UNLOCK): Document crash due to * sysdeps/x86/elide.h (ELIDE_UNLOCK): Document crash due to

6
NEWS
View File

@ -9,9 +9,9 @@ Version 2.23
* The following bugs are resolved with this release: * The following bugs are resolved with this release:
14341, 16517, 16519, 16520, 16734, 16973, 17905, 18084, 18086, 18265, 14341, 16517, 16519, 16520, 16734, 16973, 17787, 17905, 18084, 18086,
18370, 18421, 18480, 18525, 18618, 18647, 18661, 18681, 18674, 18778, 18265, 18370, 18421, 18480, 18525, 18618, 18647, 18661, 18674, 18681,
18781, 18787, 18789, 18790, 18795, 18796, 18820, 18823, 18824. 18778, 18781, 18787, 18789, 18790, 18795, 18796, 18820, 18823, 18824.
* The obsolete header <regexp.h> has been removed. Programs that require * The obsolete header <regexp.h> has been removed. Programs that require
this header must be updated to use <regex.h> instead. this header must be updated to use <regex.h> instead.

View File

@ -1834,7 +1834,7 @@ writing the file. (This is unrelated to @code{st_blocks}.)
@end deftp @end deftp
The extensions for the Large File Support (LFS) require, even on 32-bit The extensions for the Large File Support (LFS) require, even on 32-bit
machines, types which can handle file sizes up to @math{2^63}. machines, types which can handle file sizes up to @twoexp{63}.
Therefore a new definition of @code{struct stat} is necessary. Therefore a new definition of @code{struct stat} is necessary.
@comment sys/stat.h @comment sys/stat.h
@ -2024,7 +2024,7 @@ replaces the normal implementation.
@deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf}) @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{stat} but it is also able to work on This function is similar to @code{stat} but it is also able to work on
files larger than @math{2^31} bytes on 32-bit systems. To be able to do files larger than @twoexp{31} bytes on 32-bit systems. To be able to do
this the result is stored in a variable of type @code{struct stat64} to this the result is stored in a variable of type @code{struct stat64} to
which @var{buf} must point. which @var{buf} must point.
@ -2097,7 +2097,7 @@ replaces the normal implementation.
@c Direct system call through lxstat64, sometimes with an xstat conv @c Direct system call through lxstat64, sometimes with an xstat conv
@c call afterwards. @c call afterwards.
This function is similar to @code{lstat} but it is also able to work on This function is similar to @code{lstat} but it is also able to work on
files larger than @math{2^31} bytes on 32-bit systems. To be able to do files larger than @twoexp{31} bytes on 32-bit systems. To be able to do
this the result is stored in a variable of type @code{struct stat64} to this the result is stored in a variable of type @code{struct stat64} to
which @var{buf} must point. which @var{buf} must point.
@ -3073,7 +3073,7 @@ systems do not support this feature and will leave the file unchanged.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
@code{truncate} function is in fact @code{truncate64} and the type @code{truncate} function is in fact @code{truncate64} and the type
@code{off_t} has 64 bits which makes it possible to handle files up to @code{off_t} has 64 bits which makes it possible to handle files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
The return value is @math{0} for success, or @math{-1} for an error. In The return value is @math{0} for success, or @math{-1} for an error. In
addition to the usual file name errors, the following errors may occur: addition to the usual file name errors, the following errors may occur:
@ -3110,7 +3110,7 @@ The operation was interrupted by a signal.
This function is similar to the @code{truncate} function. The This function is similar to the @code{truncate} function. The
difference is that the @var{length} argument is 64 bits wide even on 32 difference is that the @var{length} argument is 64 bits wide even on 32
bits machines, which allows the handling of files with sizes up to bits machines, which allows the handling of files with sizes up to
@math{2^63} bytes. @twoexp{63} bytes.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
32 bits machine this function is actually available under the name 32 bits machine this function is actually available under the name
@ -3144,7 +3144,7 @@ The example below shows how this works.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
@code{ftruncate} function is in fact @code{ftruncate64} and the type @code{ftruncate} function is in fact @code{ftruncate64} and the type
@code{off_t} has 64 bits which makes it possible to handle files up to @code{off_t} has 64 bits which makes it possible to handle files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
The return value is @math{0} for success, or @math{-1} for an error. The The return value is @math{0} for success, or @math{-1} for an error. The
following errors may occur: following errors may occur:
@ -3190,7 +3190,7 @@ The operation was interrupted by a signal.
This function is similar to the @code{ftruncate} function. The This function is similar to the @code{ftruncate} function. The
difference is that the @var{length} argument is 64 bits wide even on 32 difference is that the @var{length} argument is 64 bits wide even on 32
bits machines which allows the handling of files with sizes up to bits machines which allows the handling of files with sizes up to
@math{2^63} bytes. @twoexp{63} bytes.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
32 bits machine this function is actually available under the name 32 bits machine this function is actually available under the name
@ -3430,7 +3430,7 @@ interface transparently replaces the old interface.
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
This function is similar to @code{tmpfile}, but the stream it returns a This function is similar to @code{tmpfile}, but the stream it returns a
pointer to was opened using @code{tmpfile64}. Therefore this stream can pointer to was opened using @code{tmpfile64}. Therefore this stream can
be used for files larger than @math{2^31} bytes on 32-bit machines. be used for files larger than @twoexp{31} bytes on 32-bit machines.
Please note that the return type is still @code{FILE *}. There is no Please note that the return type is still @code{FILE *}. There is no
special @code{FILE} type for the LFS interface. special @code{FILE} type for the LFS interface.

View File

@ -150,8 +150,8 @@ or @code{O_CREAT} is set and the file does not already exist.
If on a 32 bit machine the sources are translated with If on a 32 bit machine the sources are translated with
@code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
descriptor opened in the large file mode which enables the file handling descriptor opened in the large file mode which enables the file handling
functions to use files up to @math{2^63} bytes in size and offset from functions to use files up to @twoexp{63} bytes in size and offset from
@math{-2^63} to @math{2^63}. This happens transparently for the user @minus{}@twoexp{63} to @twoexp{63}. This happens transparently for the user
since all of the lowlevel file handling functions are equally replaced. since all of the lowlevel file handling functions are equally replaced.
This function is a cancellation point in multi-threaded programs. This This function is a cancellation point in multi-threaded programs. This
@ -201,8 +201,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
If on a 32 bit machine the sources are translated with If on a 32 bit machine the sources are translated with
@code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
descriptor opened in the large file mode which enables the file handling descriptor opened in the large file mode which enables the file handling
functions to use files up to @math{2^63} in size and offset from functions to use files up to @twoexp{63} in size and offset from
@math{-2^63} to @math{2^63}. This happens transparently for the user @minus{}@twoexp{63} to @twoexp{63}. This happens transparently for the user
since all of the lowlevel file handling functions are equally replaced. since all of the lowlevel file handling functions are equally replaced.
@end deftypefn @end deftypefn
@ -422,7 +422,7 @@ not affected by the operation. The value is the same as before the call.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
@code{pread} function is in fact @code{pread64} and the type @code{pread} function is in fact @code{pread64} and the type
@code{off_t} has 64 bits, which makes it possible to handle files up to @code{off_t} has 64 bits, which makes it possible to handle files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
The return value of @code{pread} describes the number of bytes read. The return value of @code{pread} describes the number of bytes read.
In the error case it returns @math{-1} like @code{read} does and the In the error case it returns @math{-1} like @code{read} does and the
@ -451,7 +451,7 @@ version 2.
This function is similar to the @code{pread} function. The difference This function is similar to the @code{pread} function. The difference
is that the @var{offset} parameter is of type @code{off64_t} instead of is that the @var{offset} parameter is of type @code{off64_t} instead of
@code{off_t} which makes it possible on 32 bit machines to address @code{off_t} which makes it possible on 32 bit machines to address
files larger than @math{2^31} bytes and up to @math{2^63} bytes. The files larger than @twoexp{31} bytes and up to @twoexp{63} bytes. The
file descriptor @code{filedes} must be opened using @code{open64} since file descriptor @code{filedes} must be opened using @code{open64} since
otherwise the large offsets possible with @code{off64_t} will lead to otherwise the large offsets possible with @code{off64_t} will lead to
errors with a descriptor in small file mode. errors with a descriptor in small file mode.
@ -623,7 +623,7 @@ not affected by the operation. The value is the same as before the call.
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
@code{pwrite} function is in fact @code{pwrite64} and the type @code{pwrite} function is in fact @code{pwrite64} and the type
@code{off_t} has 64 bits, which makes it possible to handle files up to @code{off_t} has 64 bits, which makes it possible to handle files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
The return value of @code{pwrite} describes the number of written bytes. The return value of @code{pwrite} describes the number of written bytes.
In the error case it returns @math{-1} like @code{write} does and the In the error case it returns @math{-1} like @code{write} does and the
@ -652,7 +652,7 @@ version 2.
This function is similar to the @code{pwrite} function. The difference This function is similar to the @code{pwrite} function. The difference
is that the @var{offset} parameter is of type @code{off64_t} instead of is that the @var{offset} parameter is of type @code{off64_t} instead of
@code{off_t} which makes it possible on 32 bit machines to address @code{off_t} which makes it possible on 32 bit machines to address
files larger than @math{2^31} bytes and up to @math{2^63} bytes. The files larger than @twoexp{31} bytes and up to @twoexp{63} bytes. The
file descriptor @code{filedes} must be opened using @code{open64} since file descriptor @code{filedes} must be opened using @code{open64} since
otherwise the large offsets possible with @code{off64_t} will lead to otherwise the large offsets possible with @code{off64_t} will lead to
errors with a descriptor in small file mode. errors with a descriptor in small file mode.
@ -752,7 +752,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
@code{lseek} function is in fact @code{lseek64} and the type @code{lseek} function is in fact @code{lseek64} and the type
@code{off_t} has 64 bits which makes it possible to handle files up to @code{off_t} has 64 bits which makes it possible to handle files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
This function is a cancellation point in multi-threaded programs. This This function is a cancellation point in multi-threaded programs. This
is a problem if the thread allocates some resources (like memory, file is a problem if the thread allocates some resources (like memory, file
@ -775,7 +775,7 @@ descriptors.
This function is similar to the @code{lseek} function. The difference This function is similar to the @code{lseek} function. The difference
is that the @var{offset} parameter is of type @code{off64_t} instead of is that the @var{offset} parameter is of type @code{off64_t} instead of
@code{off_t} which makes it possible on 32 bit machines to address @code{off_t} which makes it possible on 32 bit machines to address
files larger than @math{2^31} bytes and up to @math{2^63} bytes. The files larger than @twoexp{31} bytes and up to @twoexp{63} bytes. The
file descriptor @code{filedes} must be opened using @code{open64} since file descriptor @code{filedes} must be opened using @code{open64} since
otherwise the large offsets possible with @code{off64_t} will lead to otherwise the large offsets possible with @code{off64_t} will lead to
errors with a descriptor in small file mode. errors with a descriptor in small file mode.
@ -848,7 +848,7 @@ is transparently replaced by @code{off64_t}.
This type is used similar to @code{off_t}. The difference is that even This type is used similar to @code{off_t}. The difference is that even
on 32 bit machines, where the @code{off_t} type would have 32 bits, on 32 bit machines, where the @code{off_t} type would have 32 bits,
@code{off64_t} has 64 bits and so is able to address files up to @code{off64_t} has 64 bits and so is able to address files up to
@math{2^63} bytes in length. @twoexp{63} bytes in length.
When compiling with @code{_FILE_OFFSET_BITS == 64} this type is When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
available under the name @code{off_t}. available under the name @code{off_t}.

View File

@ -256,4 +256,15 @@ cwd\comments\
!posix\comments\ !posix\comments\
@end macro @end macro
@iftex
@macro twoexp{exp}
@math{2^{{\exp\}}}
@end macro
@end iftex
@ifnottex
@macro twoexp{exp}
2^\exp\
@end macro
@end ifnottex
@end ifclear @end ifclear

View File

@ -270,7 +270,7 @@ Locks}.
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
This function is similar to @code{fopen} but the stream it returns a This function is similar to @code{fopen} but the stream it returns a
pointer for is opened using @code{open64}. Therefore this stream can be pointer for is opened using @code{open64}. Therefore this stream can be
used even on files larger than @math{2^31} bytes on 32 bit machines. used even on files larger than @twoexp{31} bytes on 32 bit machines.
Please note that the return type is still @code{FILE *}. There is no Please note that the return type is still @code{FILE *}. There is no
special @code{FILE} type for the LFS interface. special @code{FILE} type for the LFS interface.
@ -336,7 +336,7 @@ interface replaces transparently the old interface.
@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}} @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
This function is similar to @code{freopen}. The only difference is that This function is similar to @code{freopen}. The only difference is that
on 32 bit machine the stream returned is able to read beyond the on 32 bit machine the stream returned is able to read beyond the
@math{2^31} bytes limits imposed by the normal interface. It should be @twoexp{31} bytes limits imposed by the normal interface. It should be
noted that the stream pointed to by @var{stream} need not be opened noted that the stream pointed to by @var{stream} need not be opened
using @code{fopen64} or @code{freopen64} since its mode is not important using @code{fopen64} or @code{freopen64} since its mode is not important
for this function. for this function.
@ -4412,7 +4412,7 @@ This function is similar to @code{ftello} with the only difference that
the return value is of type @code{off64_t}. This also requires that the the return value is of type @code{off64_t}. This also requires that the
stream @var{stream} was opened using either @code{fopen64}, stream @var{stream} was opened using either @code{fopen64},
@code{freopen64}, or @code{tmpfile64} since otherwise the underlying @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
file operations to position the file pointer beyond the @math{2^31} file operations to position the file pointer beyond the @twoexp{31}
bytes limit might fail. bytes limit might fail.
If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@ -4473,7 +4473,7 @@ the @var{offset} parameter is of type @code{off64_t}. This also
requires that the stream @var{stream} was opened using either requires that the stream @var{stream} was opened using either
@code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
the underlying file operations to position the file pointer beyond the the underlying file operations to position the file pointer beyond the
@math{2^31} bytes limit might fail. @twoexp{31} bytes limit might fail.
If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
bits machine this function is available under the name @code{fseeko} bits machine this function is available under the name @code{fseeko}