From 3a9bff1e7d818a21a0e040c78a098a2791ed106d Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 4 Dec 2007 08:38:22 -0700 Subject: [PATCH] Make cygwin fseeko check more reliable. * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin version numbers, rather than unrelated feature check. * doc/functions/fseeko.texi (fseeko): Tweak failure report. * doc/functions/ftello.texi (ftello): Likewise. Reported by Bruno Haible. Signed-off-by: Eric Blake --- ChangeLog | 7 +++++++ doc/functions/fseeko.texi | 2 +- doc/functions/ftello.texi | 2 +- m4/stdio_h.m4 | 13 +++++-------- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69b89a5713..54a4b12538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-12-04 Eric Blake + Make cygwin fseeko check more reliable. + * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin + version numbers, rather than unrelated feature check. + * doc/functions/fseeko.texi (fseeko): Tweak failure report. + * doc/functions/ftello.texi (ftello): Likewise. + Reported by Bruno Haible. + * m4/strerror.m4: Bump version number. 2007-12-03 Bruno Haible diff --git a/doc/functions/fseeko.texi b/doc/functions/fseeko.texi index 7d8c0a6aaf..3b6c4e9573 100644 --- a/doc/functions/fseeko.texi +++ b/doc/functions/fseeko.texi @@ -15,7 +15,7 @@ OSF/1 4.0, Solaris 2.5.1, mingw. The declaration of @code{fseeko} in @code{} is not enabled by default on some platforms: glibc 2.3.6. @item -This function fails on seekable stdin, stdout, and stderr: cygwin 1.5.x. +This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24. @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/functions/ftello.texi b/doc/functions/ftello.texi index d6789b7528..3fb995f625 100644 --- a/doc/functions/ftello.texi +++ b/doc/functions/ftello.texi @@ -15,7 +15,7 @@ OSF/1 4.0, Solaris 2.5.1, mingw. The declaration of @code{ftello} in @code{} is not enabled by default on some platforms: glibc 2.3.6. @item -This function fails on seekable stdin, stdout, and stderr: cygwin 1.5.x. +This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24. @end itemize Portability problems not fixed by Gnulib: diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 83d48eccf2..a40d418041 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 8 +# stdio_h.m4 serial 9 dnl Copyright (C) 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -73,13 +73,10 @@ AC_DEFUN([gl_STDIN_LARGE_OFFSET], [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [#if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making - fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, at the - same time that cygwin fixed the declaration of "long timezone" to no - longer be a macro, so we use that as a compile-time test for - cross-compiles rather than building a runtime test. */ -# define timezonevar -# include -# ifdef timezone + fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and + it is easier to do a version check than building a runtime test. */ +# include +# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif])], -- 2.30.2