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
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Wed, 8 Jul 2009 11:16:10 +0200
- Subject: Re: errno.h changes to mark Linux specific errnos
- References: <4A539DC0.1070105@oarcorp.com>
- Reply-to: newlib at sourceware dot org
On Jul 7 14:10, Joel Sherrill wrote:
> Hi,
>
> In trying to build RTEMS with the newlib CVS head,
> I noticed that the following errno's are used by
> the BSD TCP/IP stack in RTEMS:
>
> #define EBADRQC 54 /* Invalid request code */
> #define EPFNOSUPPORT 96 /* Protocol family not supported */
> #define EHOSTDOWN 117 /* Host is down */
> #define ETOOMANYREFS 129
>
> So they are not only specific to Linux. I changed the
> conditional protecting each of these defines to
>
> #if defined(__LINUX_ERRNO_EXTENSIONS__) || defined(__rtems__)
>
> Is this the right solution? Any better ideas?
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
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat