This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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 changes to mark Linux specific errnos


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


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