-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Larry Jones on 12/16/2007 11:50 AM: > Eric Blake writes: >> Then maybe the best course of action, for now, is just reverting the >> verification I added (since with the verify in place, you can't even >> compile, whereas without the verify, you at least get correct behavior on >> small files), leave the silent overflow in place, and document in >> doc/functions/fseeko.texi that BSD/OS is unable to handle streams larger >> than 2GB and that gnulib does not fix it. > > That's fine with me.
Here's what I committed: - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHZ1Mf84KuGfSFAYARAvlMAJsE8SzimbpKdoJrTuBQFJ3EqHsRAQCgijhB FJbXRemRkd9R2QaBfhB+pKI= =Gubz -----END PGP SIGNATURE-----
>From b41a41b698a82d0777fdc20bad8904ae65439338 Mon Sep 17 00:00:00 2001 From: Eric Blake <[EMAIL PROTECTED]> Date: Mon, 17 Dec 2007 21:50:40 -0700 Subject: [PATCH] Revert addition of verify, for BSD/OS. * lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it can't handle large files, for the sake of obsolete platforms. * modules/fseeko (Depends-on): Remove verify. * doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation. * doc/functions/ftello.texi (ftello): Likewise. * doc/functions/fgetpos.texi (fgetpos): Likewise. Reported by Larry Jones. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> --- ChangeLog | 11 +++++++++++ doc/functions/fgetpos.texi | 4 ++++ doc/functions/fseeko.texi | 4 ++++ doc/functions/ftello.texi | 4 ++++ lib/fseeko.c | 3 --- modules/fseeko | 1 - 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e64c846..d109b2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-12-17 Eric Blake <[EMAIL PROTECTED]> + + Revert addition of verify, for BSD/OS. + * lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it + can't handle large files, for the sake of obsolete platforms. + * modules/fseeko (Depends-on): Remove verify. + * doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation. + * doc/functions/ftello.texi (ftello): Likewise. + * doc/functions/fgetpos.texi (fgetpos): Likewise. + Reported by Larry Jones. + 2007-12-17 Petr Salinger <[EMAIL PROTECTED]> getcwd.c: Use a more readable witness: HAVE_OPENAT_SUPPORT diff --git a/doc/functions/fgetpos.texi b/doc/functions/fgetpos.texi index 2caffc0..6a2c607 100644 --- a/doc/functions/fgetpos.texi +++ b/doc/functions/fgetpos.texi @@ -16,4 +16,8 @@ Portability problems not fixed by Gnulib: @code{fflush}, @code{ftell}, @code{ftello}, @code{fgetpos} behave incorrectly on input streams that are opened in @code{O_TEXT} mode and whose contents contains Unix line terminators (LF), on some platforms: mingw. [EMAIL PROTECTED] +On platforms where @code{off_t} is a 64-bit type, but @code{fseeko} is +not present, stream operations on files larger than 2 GB silently do +the wrong thing. This affects BSD/OS, which is mostly obsolete. @end itemize diff --git a/doc/functions/fseeko.texi b/doc/functions/fseeko.texi index 3b6c4e9..f1a45cb 100644 --- a/doc/functions/fseeko.texi +++ b/doc/functions/fseeko.texi @@ -24,4 +24,8 @@ Portability problems not fixed by Gnulib: On platforms where @code{off_t} is a 32-bit type, @code{fseeko} does not work correctly with files larger than 2 GB. The fix is to use the @code{AC_SYS_LARGEFILE} macro. [EMAIL PROTECTED] +On platforms where @code{off_t} is a 64-bit type, but @code{fseeko} is +not present, stream operations on files larger than 2 GB silently do +the wrong thing. This affects BSD/OS, which is mostly obsolete. @end itemize diff --git a/doc/functions/ftello.texi b/doc/functions/ftello.texi index 3fb995f..e78300f 100644 --- a/doc/functions/ftello.texi +++ b/doc/functions/ftello.texi @@ -28,4 +28,8 @@ correctly with files larger than 2 GB. The fix is to use the @code{fflush}, @code{ftell}, @code{ftello}, @code{fgetpos} behave incorrectly on input streams that are opened in @code{O_TEXT} mode and whose contents contains Unix line terminators (LF), on some platforms: mingw. [EMAIL PROTECTED] +On platforms where @code{off_t} is a 64-bit type, but @code{fseeko} is +not present, stream operations on files larger than 2 GB silently do +the wrong thing. This affects BSD/OS, which is mostly obsolete. @end itemize diff --git a/lib/fseeko.c b/lib/fseeko.c index 6d55ec8..97dcf6d 100644 --- a/lib/fseeko.c +++ b/lib/fseeko.c @@ -27,9 +27,6 @@ #if !HAVE_FSEEKO # undef fseek # define fseeko fseek - -# include <verify.h> -verify (sizeof (off_t) == sizeof (long)); #endif int diff --git a/modules/fseeko b/modules/fseeko index cb26003..eb10901 100644 --- a/modules/fseeko +++ b/modules/fseeko @@ -8,7 +8,6 @@ m4/fseeko.m4 Depends-on: lseek stdio -verify configure.ac-early: AC_REQUIRE([AC_FUNC_FSEEKO]) -- 1.5.3.5