This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessor problem on Cygwin
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: Preprocessor problem on Cygwin
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Tue, 22 May 2001 19:27:45 -0400
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- References: <orpud1hfaj.fsf@guarana.lsd.ic.unicamp.br> <hok839sn8h.fsf@gee.suse.de>
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