This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: errno.h: ESTRPIPE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]