Eric Blake wrote:
> However, I'm not sure on mingw how to detect whether an fd is open on a
> regular file vs. a pipe. Any ideas?
Check out ser-mingw.c from gdb, they have a fair amount of MinGW pipe/fd
handling code there, e.g.
static int
fd_is_pipe (int fd)
{
if (PeekNamedPipe ((HANDLE) _ge
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I just noticed that lseek on mingw returns 0 instead of -1 on pipes.
Which means that gnulib's fflush module thinks the pipe is seekable, and
loses data in the pipe instead of behaving as a no-op as it should in
trying to reposition the pipe's location
Eric Blake byu.net> writes:
> > Put this into a separate compilation unit, so that fseeko and ftello can
> > share the same cache.
>
> However, the idea of cygfreopen64 has merits on its own, since I plan on
> adding documentation in doc/functions/stdin.texi (and whatever happened to
> stdout an
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 5/23/2007 4:10 PM:
>>> ASSERT (strlen (result) == 20 + 3
>>> ! && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
>>> && strcmp (result + strlen (result) - 3, " 33") == 0);
>> This assert
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 5/23/2007 4:36 PM:
> Eric Blake wrote:
>> It overcomes the
>> fact that cygwin was creating the three std streams in 32-bit mode instead
>> of 64-bit mode, such that fseeko/ftello failed because they expected the
>> stream
Eric Blake wrote:
> It overcomes the
> fact that cygwin was creating the three std streams in 32-bit mode instead
> of 64-bit mode, such that fseeko/ftello failed because they expected the
> stream to be in 64-bit mode.
Glad to see that you found a workaround!
> Index: lib/fseeko.c
>
Eric Blake wrote:
> > --- m4/printf.m422 May 2007 01:02:09 -
> > --- 138,163
> > AC_TRY_RUN([
> > #include
> > #include
> > + static int
> > + strisnan (const char *string, size_t start_index, size_t end_index)
> > + {
> > + if (start_index < end_index)
>
> I know you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Cygwin CVS is already fixed for the upcoming 1.7.0, but as 1.5.24 is the
current stable version, is this patch okay to apply? It overcomes the
fact that cygwin was creating the three std streams in 32-bit mode instead
of 64-bit mode, such that fseeko/