Preprocessor problem on Cygwin
Christopher Faylor
cgf@redhat.com
Tue May 22 16:29:00 GMT 2001
On Tue, May 22, 2001 at 12:15:58PM +0200, Andreas Jaeger wrote:
>Alexandre Oliva <aoliva@redhat.com> writes:
>>Every now and then, I try my (bad) luck on Cygwin. This time, I fell
>>prey of an apparent bug in the version of the Cygwin dll I had
>>installed: it sets errno even when lstat() succeeds, which breaks cpp's
>>pathname simplification code.
>>
>>Even though I believe this is actually a bug in Cygwin, I thought I'd
>>work around the problem, that might well be present in other OSs, with
>>this simple patch in GCC. Ok for mainline? Ok for branch?
>
>It's not a bug in Cygwin. Errno is in general only defined when an
>error occurs, the library might change it if no error occurs. The
>patch is therefore from a library perspective,
I agree. Any software which relies on the value of errno to be
consistent across library calls or, worse, which thinks that it can get
valid information from errno after a *successful* call is IMO broken.
However, we will fix the problem in Cygwin since the setting of errno
was unintentional. I believe that gcc should be fixed as well.
cgf
More information about the Gcc-patches
mailing list