bug-gnulib
[Top][All Lists]
Advanced

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

Re: lseek always include windows.h?


From: Eric Blake
Subject: Re: lseek always include windows.h?
Date: Mon, 4 Jun 2007 22:19:30 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Simon Josefsson <simon <at> josefsson.org> writes:

> 
> I got this error building GNU SASL for uClinux:
> 
> Configure said:
> 
> checking whether lseek detects pipes... no
> 
> Any ideas?

I wrote lseek.c under the assumption that mingw (and windows platforms in 
general) were the only known broken platforms, in which case unconditionally 
including windows.h is safe since no other platform should be compiling lseek.c.

> 
> Is this logic wrong perhaps:
> 
>        AC_LINK_IFELSE([
> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
> /* mingw mistakenly returns 0 when trying to seek on pipes.  */
>   Choke me.
> #endif],
>          [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
>      fi])

That looks correct to me - only windows platforms should be failing this test, 
as it is written.  Can you show the config.log snippet that explains why 
uClinux claimed to fail the test?

> 
> Generally, it seems lseek gets pulled in by getpass, via fseeko.  I
> wonder if getpass need to use fseeko?

Yes, because of the GNU philosophy of avoiding arbitrary limits (including a 
>2gb file that getpass happens to be reading from).

-- 
Eric Blake






reply via email to

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