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: Simon Josefsson
Subject: Re: lseek always include windows.h?
Date: Tue, 05 Jun 2007 14:27:23 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.95 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> Configure said:
>> 
>> checking whether lseek detects pipes... no
>
> What does config.log say about it?

configure:30871: checking whether lseek detects pipes
configure:30936: ucfront-gcc m68k-elf-gcc -m5200 -DCONFIG_COLDFIRE -o conftest  
-g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -msep-data 
-Dlinux -D__linux__ -Dunix -D__uClinux__  -Wl,--fatal-warnings -Wl,-elf2flt 
-Wl,-move-rodata -msep-data -Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata 
-msep-data conftest.c  >&5
conftest.elf2flt: In function `__uClibc_start_main':
: undefined reference to `main'
collect2: ld returned 1 exit status
configure:30942: $? = 1
configure: failed program was:
|
| #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
| /* mingw mistakenly returns 0 when trying to seek on pipes.  */
|   Choke me.
| #endif
configure:30960: result: no

> As you can see from doc/functions/lseek.texi, we didn't expect the test to
> fail on any other platform than Windows. So, what is the problem that µCLinux
> has with lseek()?

Presumably that the test case doesn't build for non-Windows
cross-compilations.  I haven't tested this patch, but will do so soon:

--- lseek.m4    30 May 2007 15:01:38 +0200      1.2
+++ lseek.m4    05 Jun 2007 14:26:41 +0200      
@@ -32,7 +32,8 @@
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 /* mingw mistakenly returns 0 when trying to seek on pipes.  */
   Choke me.
-#endif],
+#endif
+int main () { return 0; }],
          [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
      fi])
   if test $gl_cv_func_lseek_pipe = no; then

/Simon




reply via email to

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