This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: errno.h changes to mark Linux specific errnos
On Jul 8 06:56, Joel Sherrill wrote:
> Corinna Vinschen wrote:
>> Cygwin also uses these errno values. In case of Cygwin,
>> __LINUX_ERRNO_EXTENSIONS__ is simply defined in include/sys/config.h:
>>
>> #if defined(__CYGWIN__)
>> #include <cygwin/config.h>
>> #define __LINUX_ERRNO_EXTENSIONS__ 1
>> #define _MB_EXTENDED_CHARSETS_ALL 1
>> #endif
>>
>>
> I'm glad you popped up Corinna. I was worried that
> Cygwin would suffer from this problem also.
>
> If Cygwin has to enable them and RTEMS has them from BSD code,
> then they aren't Linux specific are they?
>
> Maybe the macro is misnamed and you almost always want these
> enabled.
The name of the macro doesn't matter much, imho. The question is if
it's really necessary. Personally I'd vote for removing it entirely and
to expose the errno values to all supported systems. There's no gain to
hide them. If anything, hiding them now might result in undesirable
errno number clashes at some later point.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat