|
From: | Benjamin Lindner |
Subject: | Re: Poor Win32 C runtime implementation |
Date: | Tue, 16 Feb 2010 10:41:32 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Michael Goffioul wrote:
Hi, I've been caught by a poor Win32 C runtime implementation that is unfortunately triggered by some gnulib replacement functions. This affects the VC2008 runtime DLL, I didn't test if this also affect the runtime DLL used by MinGW.
Oi, I need to check this.
For instance, these 2 simple pieces of code produce a crash. I can work around these in my local copy of gnulib. I just wanted to report them. 1) "signal" with unsupported signal #include <signal.h> void handler(int sig) { } int main() { signal(0, handler); return 0; } 2) "fclose" with an invalid file descriptor #include <stdio.h> #include <io.h> int main() { FILE *fp = fopen("configure", "r"); close(fileno(fp)); fclose(fp); return 0; }
I don't understand what gnulib does here. If I use gnulib, are the fopen/fclose functions from the CRT in this example replaced by gnulib implementations?
Is this really a good idea to do? benjamin
[Prev in Thread] | Current Thread | [Next in Thread] |