errno.h: ESTRPIPE

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Fri Mar 13 14:51:00 GMT 2009


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.

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 */

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.

cgf



More information about the Cygwin-patches mailing list