public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Ondřej Bílka" <neleai@seznam.cz>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH][BZ #17787] Fix exponents in manual.
Date: Tue, 06 Jan 2015 11:57:00 -0000	[thread overview]
Message-ID: <20150106115720.GA19882@domone> (raw)
In-Reply-To: <871tn9joub.fsf@igel.home>

On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
> Ondřej Bílka <neleai@seznam.cz> writes:
> 
> > Is this ok to commit or is there trick to also handle info?
> 
> Use different renditions for @iftex and @ifnottex (html output will also
> be verbatim like info output).
> 
That makes patch look bit ugly but does job. Ok with this?

        * manual/filesys.texi: Fix exponents.
        * manual/llio.texi: Likewise.
        * manual/stdio.texi: Likewise.

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 7d55b43..936ac2d 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -1833,7 +1833,12 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
 @end deftp
 
 The extensions for the Large File Support (LFS) require, even on 32-bit
+@iftex
+machines, types which can handle file sizes up to @math{2^{63}}.
+@end iftex
+@ifnottex
 machines, types which can handle file sizes up to @math{2^63}.
+@end ifnottex
 Therefore a new definition of @code{struct stat} is necessary.
 
 @comment sys/stat.h
@@ -3072,7 +3077,12 @@ 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
 @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
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 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:
@@ -3109,7 +3119,12 @@ The operation was interrupted by a signal.
 This function is similar to the @code{truncate} function.  The
 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
-@math{2^63} bytes.
+@iftex
+@math{2^{63}} bytes.
+@end iftex
+@ifnottex
+@math{2^{63}} bytes.
+@end ifnottex
 
 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
@@ -3143,7 +3158,12 @@ The example below shows how this works.
 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{off_t} has 64 bits which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 The return value is @math{0} for success, or @math{-1} for an error.  The
 following errors may occur:
@@ -3189,7 +3209,12 @@ The operation was interrupted by a signal.
 This function is similar to the @code{ftruncate} function.  The
 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
+@iftex
+@math{2^{63}} bytes.
+@end iftex
+@ifnottex
 @math{2^63} bytes.
+@end ifnottex
 
 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
diff --git a/manual/llio.texi b/manual/llio.texi
index 4f3fada..60662f7 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -150,8 +150,18 @@ or @code{O_CREAT} is set and the file does not already exist.
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
 descriptor opened in the large file mode which enables the file handling
+@iftex
+functions to use files up to @math{2^{63}} bytes in size and offset from
+@end iftex
+@ifnottex
 functions to use files up to @math{2^63} bytes in size and offset from
+@end ifnottex
+@iftex
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
+@end iftex
+@ifnottex
 @math{-2^63} to @math{2^63}.  This happens transparently for the user
+@end ifnottex
 since all of the lowlevel file handling functions are equally replaced.
 
 This function is a cancellation point in multi-threaded programs.  This
@@ -201,8 +211,18 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
 descriptor opened in the large file mode which enables the file handling
+@iftex
+functions to use files up to @math{2^{63}} in size and offset from
+@end iftex
+@ifnottex
 functions to use files up to @math{2^63} in size and offset from
+@end ifnottex
+@iftex
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
+@end iftex
+@ifnottex
 @math{-2^63} to @math{2^63}.  This happens transparently for the user
+@end ifnottex
 since all of the lowlevel file handling functions are equally replaced.
 @end deftypefn
 
@@ -422,7 +442,12 @@ 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
 @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
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 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
@@ -451,7 +476,12 @@ version 2.
 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
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -623,7 +653,12 @@ 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
 @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
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 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
@@ -652,7 +687,12 @@ version 2.
 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
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -752,7 +792,12 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
 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{off_t} has 64 bits which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 This function is a cancellation point in multi-threaded programs.  This
 is a problem if the thread allocates some resources (like memory, file
@@ -775,7 +820,12 @@ descriptors.
 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
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -848,7 +898,12 @@ is transparently replaced by @code{off64_t}.
 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,
 @code{off64_t} has 64 bits and so is able to address files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
 available under the name @code{off_t}.
diff --git a/manual/stdio.texi b/manual/stdio.texi
index e407170..b50b27e 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -270,7 +270,12 @@ Locks}.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 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
+@iftex
+used even on files larger than @math{2^{31}} bytes on 32 bit machines.
+@end iftex
+@ifnottex
 used even on files larger than @math{2^31} bytes on 32 bit machines.
+@end ifnottex
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
@@ -336,7 +341,12 @@ interface replaces transparently the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
 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
+@iftex
+@math{2^{31}} bytes limits imposed by the normal interface.  It should be
+@end iftex
+@ifnottex
 @math{2^31} bytes limits imposed by the normal interface.  It should be
+@end ifnottex
 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
 for this function.
@@ -4412,7 +4422,12 @@ 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
 stream @var{stream} was opened using either @code{fopen64},
 @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
+@iftex
+file operations to position the file pointer beyond the @math{2^{31}}
+@end iftex
+@ifnottex
 file operations to position the file pointer beyond the @math{2^31}
+@end ifnottex
 bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@@ -4473,7 +4488,12 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
 requires that the stream @var{stream} was opened using either
 @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
 the underlying file operations to position the file pointer beyond the
+@iftex
+@math{2^{31}} bytes limit might fail.
+@end iftex
+@ifnottex
 @math{2^31} bytes limit might fail.
+@end ifnottex
 
 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}

  reply	other threads:[~2015-01-06 11:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 12:11 Ondřej Bílka
2015-01-05 14:15 ` Andreas Schwab
2015-01-06 11:57   ` Ondřej Bílka [this message]
2015-01-06 14:20     ` Andreas Schwab
2015-01-06 18:02       ` Ondřej Bílka
2015-01-06 18:09         ` Andreas Schwab
2015-01-06 21:32           ` Ondřej Bílka
2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
2015-06-16 19:54       ` Carlos O'Donell
2015-06-16 20:24       ` Joseph Myers
2015-06-16 21:42         ` Carlos O'Donell
2015-06-18 15:26           ` [PATCH v3][BZ " Ondřej Bílka
2015-06-18 15:50             ` Joseph Myers
2015-06-18 16:05               ` Carlos O'Donell
2015-06-18 16:20                 ` Joseph Myers
2015-07-12  9:33                   ` [PATCH v4][BZ " Ondřej Bílka
2015-08-12 20:26                     ` [PING][PATCH " Ondřej Bílka
2015-08-19  6:33                       ` [PING^2][PATCH " Ondřej Bílka
2015-08-19 12:57                         ` Joseph Myers
2015-06-18 15:54             ` [PATCH v3][BZ " Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150106115720.GA19882@domone \
    --to=neleai@seznam.cz \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).