This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Merge sysdeps/unix/inet into sysdeps/unix


Just as I noted in
<http://sourceware.org/ml/libc-alpha/2012-04/msg00843.html> that mmap
and related syscalls can nowadays be considered standard for any
Unix-like system, so sysdeps/unix/mman seems unnecessary, so the same
seems to apply to sysdeps/unix/inet, which (a) defines syscalls in
syscalls.list and (b) enables various glibc directories using Subdirs.
(Apart from general redundancy of these directories, the large number
of makefile rules generated for all the sysdeps directories has been
mentioned as something slowing down glibc builds, so on those grounds
as well it seems useful to reduce the number of such directories.  The
precise arrangements for how the functions relate to syscalls do of
course vary from platform to platform, e.g. Linux use of socketcall on
some platforms, but this does not affect the principle of merging the
directories; systems continue to override syscalls.list entries just
as they did before, whether they are in sysdeps/unix/syscalls.list or
sysdeps/unix/inet/syscalls.list.)

I propose this patch, relative to a tree with
<http://sourceware.org/ml/libc-alpha/2012-04/msg00843.html> applied,
to merge sysdeps/unix/inet into sysdeps/unix.  Tested x86_64,
including making sure the compiled library binaries are identical
before and after the patch.

2012-04-24  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/Subdirs (inet): Add directory from
	sysdeps/unix/inet/Subdirs.
	(resolv): Likewise.
	(hesiod): Likewise.
	(sunrpc): Likewise.
	(nis): Likewise.
	(nscd): Likewise.
	(streams): Likewise.
	* sysdeps/unix/syscalls.list (accept): Add syscall from
	sysdeps/unix/inet/syscalls.list.
	(bind): Likewise.
	(connect): Likewise.
	(gethostid): Likewise.
	(gethostname): Likewise.
	(getpeername): Likewise.
	(getsockname): Likewise.
	(getsockopt): Likewise.
	(listen): Likewise.
	(recv): Likewise.
	(recvfrom): Likewise.
	(recvmsg): Likewise.
	(send): Likewise.
	(sendmsg): Likewise.
	(sendto): Likewise.
	(sethostid): Likewise.
	(sethostname): Likewise.
	(setsockopt): Likewise.
	(shutdown): Likewise.
	(socket): Likewise.
	(socketpair): Likewise.
	* sysdeps/unix/bsd/Implies: Don't include unix/inet.
	* sysdeps/unix/sysv/linux/Implies: Likewise.
	* sysdeps/unix/inet/Subdirs: Remove.
	* sysdeps/unix/inet/syscalls.list: Likewise.

diff --git a/sysdeps/unix/Subdirs b/sysdeps/unix/Subdirs
index a46884d..0cf8416 100644
--- a/sysdeps/unix/Subdirs
+++ b/sysdeps/unix/Subdirs
@@ -1 +1,8 @@
+inet
+resolv
+hesiod
+sunrpc
+nis
+nscd
+streams
 login
diff --git a/sysdeps/unix/bsd/Implies b/sysdeps/unix/bsd/Implies
index cfc4491..953822e 100644
--- a/sysdeps/unix/bsd/Implies
+++ b/sysdeps/unix/bsd/Implies
@@ -1,5 +1,3 @@
 # The directory unix/common contains things which are common to both BSD
 # and SVR4.
 unix/common
-# The directory unix/inet implements sockets and networking in the usual way.
-unix/inet
diff --git a/sysdeps/unix/inet/Subdirs b/sysdeps/unix/inet/Subdirs
deleted file mode 100644
index 4a191e2..0000000
--- a/sysdeps/unix/inet/Subdirs
+++ /dev/null
@@ -1,7 +0,0 @@
-inet
-resolv
-hesiod
-sunrpc
-nis
-nscd
-streams
diff --git a/sysdeps/unix/inet/syscalls.list b/sysdeps/unix/inet/syscalls.list
deleted file mode 100644
index df2f34e..0000000
--- a/sysdeps/unix/inet/syscalls.list
+++ /dev/null
@@ -1,23 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-accept		-	accept		Ci:iBN	__libc_accept	accept
-bind		-	bind		i:ipi	__bind		bind
-connect		-	connect		Ci:ipi	__libc_connect	__connect __connect_internal connect
-gethostid	-	gethostid	i:	gethostid
-gethostname	-	gethostname	i:bn	__gethostname	gethostname
-getpeername	-	getpeername	i:ibN	__getpeername	getpeername
-getsockname	-	getsockname	i:ibN	__getsockname	getsockname
-getsockopt	-	getsockopt	i:iiiBN	getsockopt
-listen		-	listen		i:ii	__listen	listen
-recv		-	recv		Ci:ibni	__libc_recv	recv
-recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom __recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
-send		-	send		Ci:ibni	__libc_send	__send send 
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
-sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
-sethostid	-	sethostid	i:i	sethostid
-sethostname	-	sethostname	i:pi	sethostname
-setsockopt	-	setsockopt	i:iiibn	setsockopt	__setsockopt
-shutdown	-	shutdown	i:ii	shutdown
-socket		-	socket		i:iii	__socket	socket
-socketpair	-	socketpair	i:iiif	socketpair
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index 6f423bf..0331c3e 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -1,12 +1,15 @@
 # File name	Caller	Syscall name	Args	Strong name	Weak names
 
+accept		-	accept		Ci:iBN	__libc_accept	accept
 access		-	access		i:si	__access	access
 acct		-	acct		i:S	acct
+bind		-	bind		i:ipi	__bind		bind
 chdir		-	chdir		i:s	__chdir		chdir
 chmod		-	chmod		i:si	__chmod		chmod
 chown		-	chown		i:sii	__chown		__chown_internal chown
 chroot		-	chroot		i:s	chroot
 close		-	close		Ci:i	__libc_close	__close close
+connect		-	connect		Ci:ipi	__libc_connect	__connect __connect_internal connect
 dup		-	dup		i:i	__dup		dup
 dup2		-	dup2		i:ii	__dup2		dup2
 dup3		-	dup3		i:iii	dup3
@@ -17,14 +20,20 @@ fsync		-	fsync		Ci:i	__libc_fsync	fsync
 getdomain	-	getdomainname	i:si	getdomainname
 getgid		-	getgid		Ei:	__getgid	getgid
 getgroups	-	getgroups	i:ip	__getgroups	getgroups
+gethostid	-	gethostid	i:	gethostid
+gethostname	-	gethostname	i:bn	__gethostname	gethostname
 getitimer	-	getitimer	i:ip	__getitimer	getitimer
+getpeername	-	getpeername	i:ibN	__getpeername	getpeername
 getpid		-	getpid		Ei:	__getpid	getpid
 getpriority	-	getpriority	i:ii	getpriority
 getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit
+getsockname	-	getsockname	i:ibN	__getsockname	getsockname
+getsockopt	-	getsockopt	i:iiiBN	getsockopt
 getuid		-	getuid		Ei:	__getuid	getuid
 ioctl		-	ioctl		i:iiI	__ioctl		ioctl
 kill		-	kill		i:ii	__kill		kill
 link		-	link		i:ss	__link		link
+listen		-	listen		i:ii	__listen	listen
 lseek		-	lseek		i:iii	__libc_lseek	__lseek lseek
 madvise		-	madvise		i:pii	madvise
 mkdir		-	mkdir		i:si	__mkdir		mkdir
@@ -39,21 +48,33 @@ read		-	read		Ci:ibn	__libc_read	__read read
 readlink	-	readlink	i:spi	__readlink	readlink
 readv		-	readv		Ci:ipi	__readv		readv
 reboot		-	reboot		i:i	reboot
+recv		-	recv		Ci:ibni	__libc_recv	recv
+recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom __recvfrom recvfrom
+recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 rename		-	rename		i:ss	rename
 rmdir		-	rmdir		i:s	__rmdir		rmdir
 select		-	select		Ci:iPPPP	__select	__libc_select select
+send		-	send		Ci:ibni	__libc_send	__send send 
+sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
+sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setdomain	-	setdomainname	i:si	setdomainname
 setegid		-	setegid		i:i	__setegid	setegid
 seteuid		-	seteuid		i:i	__seteuid	seteuid
 setgid		-	setgid		i:i	__setgid	setgid
 setgroups	-	setgroups	i:ip	setgroups
+sethostid	-	sethostid	i:i	sethostid
+sethostname	-	sethostname	i:pi	sethostname
 setitimer	-	setitimer	i:ipp	__setitimer	setitimer
 setpriority	-	setpriority	i:iii	setpriority
 setrlimit	-	setrlimit	i:ip	__setrlimit setrlimit
 setsid		-	setsid		i:	__setsid	setsid
+setsockopt	-	setsockopt	i:iiibn	setsockopt	__setsockopt
 settimeofday	-	settimeofday	i:PP	__settimeofday	settimeofday
 setuid		-	setuid		i:i	__setuid	setuid
+shutdown	-	shutdown	i:ii	shutdown
 sigsuspend	-	sigsuspend	Ci:p	sigsuspend
+socket		-	socket		i:iii	__socket	socket
+socketpair	-	socketpair	i:iiif	socketpair
 sstk		-	sstk		b:i	sstk
 statfs		-	statfs		i:sp	__statfs	statfs
 swapoff		-	swapoff		i:s	swapoff
diff --git a/sysdeps/unix/sysv/linux/Implies b/sysdeps/unix/sysv/linux/Implies
index ab04990..5dbcfb3 100644
--- a/sysdeps/unix/sysv/linux/Implies
+++ b/sysdeps/unix/sysv/linux/Implies
@@ -4,6 +4,3 @@ gnu
 
 # Linux shares most of the syscalls which are also common to BSD and SVR4.
 unix/common
-
-# Linux has network support in the kernel.
-unix/inet

-- 
Joseph S. Myers
joseph@codesourcery.com


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