[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fdopen on MSVC
From: |
Bruno Haible |
Subject: |
Re: fdopen on MSVC |
Date: |
Tue, 27 Sep 2011 00:17:25 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Paolo Bonzini asked:
> > * modules/fclose-tests (Depends-on): Add fdopen.
> > * modules/fflush-tests (Depends-on): Likewise.
> > * modules/fgetc-tests (Depends-on): Likewise.
> > * modules/fputc-tests (Depends-on): Likewise.
> > * modules/fread-tests (Depends-on): Likewise.
> > * modules/freopen-tests (Depends-on): Likewise.
> > * modules/fseeko-tests (Depends-on): Likewise.
> > * modules/ftello-tests (Depends-on): Likewise.
> > * modules/fwrite-tests (Depends-on): Likewise.
>
> Why?
These tests (test-fgetc.c etc.) call fdopen (-1, "r"), which is supposed
to return NULL / EBADF. But -- see doc/posix-functions/fdopen.texi --
this call crashes on MSVC 9, and the gnulib 'fdopen' module provides the
workaround (through an invalid parameter handler that prevents the crash).
Bruno
--
In memoriam Pavlos Bakoyannis <http://en.wikipedia.org/wiki/Pavlos_Bakoyannis>