On Mar 13 10:50, Christopher Faylor wrote: > On Fri, Mar 13, 2009 at 06:10:48AM -0600, Warren Young wrote: > > 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. > > I'm not sure that you got this but I think Corinna was suggesting that > this should be defined in the code in question rather than in Cygwin > itself.
Right. > I don't have a problem defining unique errnos that currently never > happen if it makes Cygwin more compatible with Linux. I just think that > the value should be marked as > > /* Linux compatibility: this currently can never happen */ Hmm, this doesn't make much sense in the newlib errno.h. We already have a couple of errnos which are not generated by Cygwin without such a comment. > Yaakov's intent was to reduce the amount of special casing required when > porting to Cygwin to remove the need to do #ifdef __CYGWIN__'s. I think > he knows that he could have ifdef'ed this since I suspect that he's had > to do that many times in the past. > > Defining a unique value means that, if we do decide at some point to add > functionality which utilizes that errno the will be no need to recompile > the application. That's quite a good argument. If you both think it's a good idea to define this new errno, I'm fine with it, too. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat