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: __LINUX_ERRNO_EXTENSIONS__ and RTEMS


On 16/10/09 12:58 PM, Joel Sherrill wrote:
Hi,

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
cpukit/libnetworking/lib/ftpfs.c
========= EBADRQC
cpukit/libnetworking/lib/ftpfs.c
========= EPFNOSUPPORT
cpukit/librpc/src/rpc/bindresvport.c
cpukit/librpc/src/rpc/clnt_generic.c
========= EHOSTDOWN
cpukit/libnetworking/netinet/ip_input.c
cpukit/libnetworking/netinet/tcp_subr.c
cpukit/libnetworking/nfs/bootp_subr.c
cpukit/libnetworking/net/if_ethersubr.c
========= ETOOMANYREFS
cpukit/libnetworking/netinet/ip_output.c
========= EPROCLIM
cpukit/httpd/sock.c

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
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_10.html
so it is probably really not Linux specific anyway.

+ Every errno in this list appears in the Open Group test suite.

http://tetworks.opengroup.org/tet//sample_binaries/3.3/tet3.3-bin-linux2-dist.cpio.Z

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.


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