This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
RE: errno.h: ESTRPIPE
Warren Young skrev:
> Corinna Vinschen wrote:
> > This is very Linux device specific and this never occurs on Cygwin.
> > What about just defining this error code to some arbitrary
> value like
> >
> > #ifdef __CYGWIN__
> > #define ESTRPIPE 9999
> > #endif
>
> I like it. If there are any other errno constants supported by Linux
> but not Cygwin, you could also define them with the same value. It
> would effectively be the "this never happens" value.
That a bad suggestion.
Consider code like this:
switch (errno) {
case -ESTRPIPE:
capers();
break;
case -EFOOBAR:
cucumber();
break;
}
If both ESTRPIPE and EFOOBAR are defined to 9999 that doesn't work too
well, and you end up having cygwin specific patches in any case.
Cheers,
Peter