bug-gnulib
[Top][All Lists]
Advanced

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

Re: mingw lseek bug


From: Eric Blake
Subject: Re: mingw lseek bug
Date: Thu, 24 May 2007 06:07:17 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

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

According to Bruno Haible on 5/24/2007 4:08 AM:
>>   if (PeekNamedPipe ((HANDLE) _get_osfhandle (fd), NULL, 0, NULL, NULL,
>> NULL))
> 
> But there are other types of devices as well, such as special character
> devices (COM: and consoles). It looks safer to include only the regular
> files:
>   GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_DISK.

At the same time, NUL (corresponding to /dev/null) should appear to be
seekable, even though it is a character device and is always at position
0.  Is mingw's fstat reliable enough to get any of this information, or
does it take native Windows calls like this thread has been suggesting?

- --
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

iD8DBQFGVX/184KuGfSFAYARAolAAJ9RGm8IBjy/Y7G1BG8nTcDAkjsvOQCfTVPm
tAIRfVdZBwJdOdyHDSD+S5Q=
=AvH/
-----END PGP SIGNATURE-----




reply via email to

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