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]

Re: Flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd


On Thu, 17 May 2012, Thomas Schwinge wrote:

> Hi!
> 
> I generally agree to this patch, but it seems there are two issues that
> need to be sorted out.
> 
> On Wed, 9 May 2012 17:01:55 +0000 (UTC), "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> > 	* sysdeps/mach/hurd/Implies: Change unix/bsd/bsd4.4 to unix/bsd.
> 
> Comparing to the ordering I posted in
> <http://news.gmane.org/find-root.php?message_id=%3c87aa1xk7f5.fsf%40schwinge.name%3e>,
> this will move sysdeps/unix/bsd (and Implies) at the place where
> sysdeps/unix/bsd/bsd4.4 is now.  According to my review, this would cause
> conflicts for sys/reboot.h where sysdeps/unix/bsd/sys/reboot.h would then
> preferred over the current sysdeps/mach/sys/reboot.h, and for usleep,
> where sysdeps/unix/bsd/usleep.c would then preferred over the current
> sysdeps/mach/usleep.c.  I have to leave, so unfortunately cannot analyze
> this further right now, but will do so in the next days.

Here is a new version (git diff -M) of
<http://sourceware.org/ml/libc-alpha/2012-05/msg00477.html>, updated
to move those sysdeps/mach/ files you identify in
<http://sourceware.org/ml/libc-alpha/2012-05/msg01165.html> into
sysdeps/mach/hurd/ so they don't get overridden by sysdeps/unix/bsd/
files.  Since there are only two such files, but lots more files
currently in a "bsd4.4" directory that no longer represents a clearly
meaningful distinction in glibc, I think this is the best approach for
making incremental progress in this area on sysdeps cleanup.

Tested x86_64.  Could you test this patch for Hurd?

2012-07-08  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/mach/sys/reboot.h: Move to ...
	* sysdeps/mach/hurd/sys/reboot.h: ... here.
	* sysdeps/mach/usleep.c: Move to ...
	* sysdeps/mach/hurd/usleep.c: ... here.
	* sysdeps/mach/hurd/Implies: Change unix/bsd/bsd4.4 to unix/bsd.
	* sysdeps/unix/bsd/syscalls.list (chflags): Add entry from
	sysdeps/unix/bsd/bsd4.4/syscalls.list.
	(fchflags): Likewise.
	(revoke): Likewise.
	(setlogin): Likewise.
	(sigaltstack): Likewise.
	(wait4): Likewise.
	(sigblock): Remove.
	(sigsetmask): Likewise.
	(wait3): Likewise.
	(waitpid): Likewise.
	* sysdeps/unix/bsd/bsd4.4/syscalls.list: Remove file.
	* sysdeps/unix/sysv/linux/wait3.c: Update directory of included
	file.
	* sysdeps/unix/bsd/bsd4.4/Makefile: Move to ...
	* sysdeps/unix/bsd/Makefile: ... here.
	* sysdeps/unix/bsd/bsd4.4/Versions: Move to ...
	* sysdeps/unix/bsd/Versions: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Move to ...
	* sysdeps/unix/bsd/bits/dirent.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/errno.h: Move to ...
	* sysdeps/unix/bsd/bits/errno.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/fcntl.h: Move to ...
	* sysdeps/unix/bsd/bits/fcntl.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/ioctls.h: Move to ...
	* sysdeps/unix/bsd/bits/ioctls.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Move to ...
	* sysdeps/unix/bsd/bits/sockaddr.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Move to ...
	* sysdeps/unix/bsd/bits/socket.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: Move to ...
	* sysdeps/unix/bsd/cmsg_nxthdr.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h: Move to ...
	* sysdeps/unix/bsd/freebsd/bits/environments.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h: Move to ...
	* sysdeps/unix/bsd/freebsd/bits/typesizes.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h: Move to ...
	* sysdeps/unix/bsd/freebsd/sys/sysmacros.h: ... here.
	* sysdeps/unix/bsd/bsd4.4/sigblock.c: Move to ...
	* sysdeps/unix/bsd/sigblock.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/sigsetmask.c: Move to ...
	* sysdeps/unix/bsd/sigsetmask.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/sigvec.c: Move to ...
	* sysdeps/unix/bsd/sigvec.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Move to ...
	* sysdeps/unix/bsd/tcdrain.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/tcgetattr.c: Move to ...
	* sysdeps/unix/bsd/tcgetattr.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/tcsetattr.c: Move to ...
	* sysdeps/unix/bsd/tcsetattr.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/wait.c: Move to ...
	* sysdeps/unix/bsd/wait.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/wait3.c: Move to ...
	* sysdeps/unix/bsd/wait3.c: ... here.
	* sysdeps/unix/bsd/bsd4.4/waitpid.c: Move to ...
	* sysdeps/unix/bsd/waitpid.c: ... here.

diff --git a/sysdeps/mach/hurd/Implies b/sysdeps/mach/hurd/Implies
index b606346..d2d5234 100644
--- a/sysdeps/mach/hurd/Implies
+++ b/sysdeps/mach/hurd/Implies
@@ -2,4 +2,4 @@
 # Hurd-based GNU systems.
 gnu
 # The Hurd provides a rough superset of the functionality of 4.4 BSD.
-unix/bsd/bsd4.4
+unix/bsd
diff --git a/sysdeps/mach/sys/reboot.h b/sysdeps/mach/hurd/sys/reboot.h
similarity index 100%
rename from sysdeps/mach/sys/reboot.h
rename to sysdeps/mach/hurd/sys/reboot.h
diff --git a/sysdeps/mach/usleep.c b/sysdeps/mach/hurd/usleep.c
similarity index 100%
rename from sysdeps/mach/usleep.c
rename to sysdeps/mach/hurd/usleep.c
diff --git a/sysdeps/unix/bsd/bsd4.4/Makefile b/sysdeps/unix/bsd/Makefile
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/Makefile
rename to sysdeps/unix/bsd/Makefile
diff --git a/sysdeps/unix/bsd/bsd4.4/Versions b/sysdeps/unix/bsd/Versions
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/Versions
rename to sysdeps/unix/bsd/Versions
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/dirent.h b/sysdeps/unix/bsd/bits/dirent.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/dirent.h
rename to sysdeps/unix/bsd/bits/dirent.h
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/errno.h b/sysdeps/unix/bsd/bits/errno.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/errno.h
rename to sysdeps/unix/bsd/bits/errno.h
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h b/sysdeps/unix/bsd/bits/fcntl.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
rename to sysdeps/unix/bsd/bits/fcntl.h
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/ioctls.h b/sysdeps/unix/bsd/bits/ioctls.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/ioctls.h
rename to sysdeps/unix/bsd/bits/ioctls.h
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h b/sysdeps/unix/bsd/bits/sockaddr.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h
rename to sysdeps/unix/bsd/bits/sockaddr.h
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/socket.h b/sysdeps/unix/bsd/bits/socket.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/bits/socket.h
rename to sysdeps/unix/bsd/bits/socket.h
diff --git a/sysdeps/unix/bsd/bsd4.4/syscalls.list b/sysdeps/unix/bsd/bsd4.4/syscalls.list
deleted file mode 100644
index a4d3546..0000000
--- a/sysdeps/unix/bsd/bsd4.4/syscalls.list
+++ /dev/null
@@ -1,8 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-chflags		-	chflags		2	chflags
-fchflags	-	fchflags	2	fchflags
-revoke		-	revoke		1	revoke
-setlogin	-	setlogin	2	setlogin
-sigaltstack	-	sigaltstack	2	__sigaltstack	sigaltstack
-wait4		-	wait4		4	__wait4		wait4
diff --git a/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c b/sysdeps/unix/bsd/cmsg_nxthdr.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c
rename to sysdeps/unix/bsd/cmsg_nxthdr.c
diff --git a/sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h b/sysdeps/unix/bsd/freebsd/bits/environments.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h
rename to sysdeps/unix/bsd/freebsd/bits/environments.h
diff --git a/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h b/sysdeps/unix/bsd/freebsd/bits/typesizes.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
rename to sysdeps/unix/bsd/freebsd/bits/typesizes.h
diff --git a/sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h b/sysdeps/unix/bsd/freebsd/sys/sysmacros.h
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h
rename to sysdeps/unix/bsd/freebsd/sys/sysmacros.h
diff --git a/sysdeps/unix/bsd/bsd4.4/sigblock.c b/sysdeps/unix/bsd/sigblock.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/sigblock.c
rename to sysdeps/unix/bsd/sigblock.c
diff --git a/sysdeps/unix/bsd/bsd4.4/sigsetmask.c b/sysdeps/unix/bsd/sigsetmask.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/sigsetmask.c
rename to sysdeps/unix/bsd/sigsetmask.c
diff --git a/sysdeps/unix/bsd/bsd4.4/sigvec.c b/sysdeps/unix/bsd/sigvec.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/sigvec.c
rename to sysdeps/unix/bsd/sigvec.c
diff --git a/sysdeps/unix/bsd/syscalls.list b/sysdeps/unix/bsd/syscalls.list
index e84819d..9f48a14 100644
--- a/sysdeps/unix/bsd/syscalls.list
+++ b/sysdeps/unix/bsd/syscalls.list
@@ -1,14 +1,16 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
+chflags		-	chflags		2	chflags
+fchflags	-	fchflags	2	fchflags
 flock		-	flock		2	__flock		flock
 getdents	-	getdirentries	4	__getdirentries	getdirentries
 getdtsz		-	getdtablesize	0	__getdtablesize	getdtablesize
 getpagesize	-	getpagesize	0	__getpagesize	getpagesize
 killpg		-	killpg		2	killpg
-sigblock	-	sigblock	1	__sigblock	sigblock
+revoke		-	revoke		1	revoke
+setlogin	-	setlogin	2	setlogin
+sigaltstack	-	sigaltstack	2	__sigaltstack	sigaltstack
 sigpause	-	sigpause	1	__sigpause	sigpause
-sigsetmask	-	sigsetmask	1	__sigsetmask	sigsetmask
 sigstack	-	sigstack	2	sigstack
 sigvec		-	sigvec		3	__sigvec	sigvec
-wait3		-	wait3		3	__wait3		wait3
-waitpid		-	waitpid		3	__waitpid	waitpid
+wait4		-	wait4		4	__wait4		wait4
diff --git a/sysdeps/unix/bsd/bsd4.4/tcdrain.c b/sysdeps/unix/bsd/tcdrain.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/tcdrain.c
rename to sysdeps/unix/bsd/tcdrain.c
diff --git a/sysdeps/unix/bsd/bsd4.4/tcgetattr.c b/sysdeps/unix/bsd/tcgetattr.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/tcgetattr.c
rename to sysdeps/unix/bsd/tcgetattr.c
diff --git a/sysdeps/unix/bsd/bsd4.4/tcsetattr.c b/sysdeps/unix/bsd/tcsetattr.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/tcsetattr.c
rename to sysdeps/unix/bsd/tcsetattr.c
diff --git a/sysdeps/unix/bsd/bsd4.4/wait.c b/sysdeps/unix/bsd/wait.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/wait.c
rename to sysdeps/unix/bsd/wait.c
diff --git a/sysdeps/unix/bsd/bsd4.4/wait3.c b/sysdeps/unix/bsd/wait3.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/wait3.c
rename to sysdeps/unix/bsd/wait3.c
diff --git a/sysdeps/unix/bsd/bsd4.4/waitpid.c b/sysdeps/unix/bsd/waitpid.c
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/waitpid.c
rename to sysdeps/unix/bsd/waitpid.c
diff --git a/sysdeps/unix/sysv/linux/wait3.c b/sysdeps/unix/sysv/linux/wait3.c
index 0b3bdee..2ff027f 100644
--- a/sysdeps/unix/sysv/linux/wait3.c
+++ b/sysdeps/unix/sysv/linux/wait3.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/wait3.c>
+#include <sysdeps/unix/bsd/wait3.c>

-- 
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]