bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fseeko and cygwin


From: Eric Blake
Subject: Re: fseeko and cygwin
Date: Tue, 04 Dec 2007 06:26:20 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 12/3/2007 5:14 AM:
> Eric Blake wrote:
>>    /* 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
> 
> Wouldn't it be simpler, and easier to understand, to just use the version
> numbers CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR from
> <cygwin/version.h>?

Sure.  I'm committing the following.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----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

iD8DBQFHVVV784KuGfSFAYARAjmGAJwK4+Wpky5hJ1Dla+77chNxRVFkCACfXKk5
udfDlGXDSIZhJ4CafTsupDs=
=sXi+
-----END PGP SIGNATURE-----
>From 0be42a48fb7dba9c4747d65de1141c571ba34fa1 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 4 Dec 2007 06:25:39 -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.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog     |    5 +++++
 m4/stdio_h.m4 |   13 +++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 90a109b..1d19790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-12-04  Eric Blake  <address@hidden>
 
+       Make cygwin fseeko check more reliable.
+       * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin
+       version numbers, rather than unrelated feature check.
+       Reported by Bruno Haible.
+
        * m4/strerror.m4: Bump serial number.
 
 2007-12-03  Bruno Haible  <address@hidden>
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 83d48ec..a40d418 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 <stdio.h>],
 [#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 <sys/time.h>
-# 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 <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
   choke me
 # endif
 #endif])],
-- 
1.5.3.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]