Pushes the Plan 9 BSD shims into glibc (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 Jun 2015 19:55:17 +0000 (15:55 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 Jun 2015 20:40:30 +0000 (16:40 -0400)
commit4b879462cc74b1fbf328acfb98a217b78e7748b5
treea4c496c1e5f6fecfec2ce1a246c32f66ecf8d3b3
parent8a3d8905f94bfb7c5638ccb827fa76846361c2bc
Pushes the Plan 9 BSD shims into glibc (XCC)

Glibc had stubs that we were overriding in libbsd.  Those shims ought to be in
glibc, since that's Akaros's way of implementing various socket calls.  This is
also somewhat necessary for some -Werror situations where glibc links with its
versions (which were throwing stub_warnings).

Most functions from libbsd are now in glibc.  nptohl() was removed; no one was
using it.  {get,set}sockopt() were stubs in libbsd that did nothing.  I went
with modified glibc stubs for those.  They won't throw compiler warnings, but
they will fail at runtime.  And with a more appropriate errno.  We can add in
various socket options if they are important.

The bulk of the functions were brought over "as is", with the existing races and
non-reentrancy.  A few of them needed work, since the SOCKADDR_ARG has a
different type within glibc (transparent union).  I did pass the files through
lindent, since they have a fresh git history and needed some formatting.

Rebuild glibc.
24 files changed:
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/Makefile
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/accept.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bind.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/connect.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/gethostname.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/gethstbyad.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/gethstbynm.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getpeername.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getprtname.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getsockname.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getsockopt.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getsrvbynm.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getsrvbypt.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/listen.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/plan9_sockets.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/plan9_sockets.h [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/recv.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/recvfrom.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/send.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sendto.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/setsockopt.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/shutdown.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/socket.c [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/socketpair.c [new file with mode: 0644]