__LINUX_ERRNO_EXTENSIONS__ and RTEMS
Mon Oct 19 20:42:00 GMT 2009
On 16/10/09 12:58 PM, Joel Sherrill wrote:
> Ralf Corsepius didn't like my patch to turn on
> __LINUX_ERRNO_EXTENSIONS__ for RTEMS. So in fairness,
> I did some analysis from an RTEMS perspective
> and here are the results.
> RTEMS includes a port of the FreeBSD TCP/IP stack
> and a few other BSD network services. I grep'ed
> the RTEMS source for every errno marked as a
> Linux extension by newlib. Here is the result:
> ======== EBADR
> ========= EBADRQC
> ========= EPFNOSUPPORT
> ========= EHOSTDOWN
> ========= ETOOMANYREFS
> ========= EPROCLIM
> What are the above files from?
> + libnetworking is the TCP/IP stack and some services.
> + libnetworking/ftpfs is RTEMS specific but tests for an error
> returned by the stack.
> + librpc is Sun RPC/XDR.
> + httpd is the GoAhead webserver.
> Are there any relevant standards?
> + EHOSTDOWN is from
> so it is probably really not Linux specific anyway.
> + Every errno in this list appears in the Open Group test suite.
> I was unable to uncompress this so don't know what that means.
> I didn't see any obvious references to them at opengroup.org in
> a standards page in my search.
> It would be interesting to see if other errnos marked
> Linux extensions are also used by *BSD but the set above
> are the problems for RTEMS. We cannot build RTEMS with
> newlib cvs without those defined.
> What is the best solution?
I believe it was RTEMS originally that had the problem with all the
errnos being exposed so I am totally ok with you creating a new flag:
__OPEN_GROUP_ERRNO_EXTENSIONS__ and using this flag or'd with the
__LINUX_ERRNO_EXTENSIONS__ flag for the errnos above.
Another alternative would be to override sys/errno.h for RTEMS.
-- Jeff J.
More information about the Newlib