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's needed by rtems marked as linux extensions


A patch has been made to move the 3 errnos into the general list.


2009-12-16 Jeff Johnston <jjohnstn@redhat.com>


        * libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
        and ETOOMANYREFS into general list as they are referenced
        by OpenGroup and needed by RTEMS.

-- Jeff J.

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

RTEMS TCP/IP code will not compile against the newlib
head.

I posted earlier this year about errno's that had
been marked as Linux specified which are really not.
I found 6 errnos originally but the two others
on the original list were part of a longer string so
showed up via grep but were not really used.

========= EBADRQC (RTEMS code we can change)
cpukit/libnetworking/lib/ftpfs.c
========= EPFNOSUPPORT (used in Sun RPC/XDR)
cpukit/librpc/src/rpc/bindresvport.c
cpukit/librpc/src/rpc/clnt_generic.c
========= EHOSTDOWN (used in BSD TCP/IP stack)
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 (BSD TCP/IP stack)
cpukit/libnetworking/netinet/ip_output.c


So EBADRQC can be changed on our site. That code is specific to RTEMS and we can changed that to EINVAL.

So that leaves EPFNOSUPPORT, EHOSTDOWN, and ETOOMANYREFS.

EHOSTDOWN is defined in OpenGroup. The other two I don't know.

In general, the "Linux specific patch" marked some BSD
and OpenGroup errnos as Linux specific. That covers
the 3 we care about.

IMO EHOSTDOWN should just be enabled. It is incorrect
to mark is as Linux specific.

The other two are from BSD. What to do about them is
up to you. They are NOT proprietary to RTEMS.

When I looked originally, I found these OpenGroup references

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.



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