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