From ef7344f09c5ce00eb519ed14598b2a8e39c68387 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 22 Dec 2013 14:49:48 +0000 Subject: Flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd. As discussed in and , it seems appropriate to flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd. The bulk of the patch is just moving files. The only other changes are: update paths in sysdeps/mach/hurd/Implies and sysdeps/unix/sysv/linux/wait3.c; merge the two syscalls.list files, with the removal of syscalls that were in sysdeps/unix/bsd/syscalls.list but overridden in the bsd4.4 directory by .c files there. Tested x86_64. The installed shared libraries are identical before and after the patch except for libc.so where the move of wait3.c (included by sysdeps/unix/sysv/linux/wait3.c) affects debug info, but the disassembly is unchanged. * 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/sockaddr.h: Move to ... * sysdeps/unix/bsd/bits/sockaddr.h: ... here. * sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: Move to ... * sysdeps/unix/bsd/cmsg_nxthdr.c: ... 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. --- sysdeps/unix/bsd/bsd4.4/Makefile | 3 -- sysdeps/unix/bsd/bsd4.4/Versions | 6 ---- sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h | 42 ---------------------- sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c | 2 -- sysdeps/unix/bsd/bsd4.4/sigblock.c | 1 - sysdeps/unix/bsd/bsd4.4/sigsetmask.c | 1 - sysdeps/unix/bsd/bsd4.4/sigvec.c | 1 - sysdeps/unix/bsd/bsd4.4/syscalls.list | 8 ----- sysdeps/unix/bsd/bsd4.4/tcdrain.c | 27 -------------- sysdeps/unix/bsd/bsd4.4/tcgetattr.c | 40 --------------------- sysdeps/unix/bsd/bsd4.4/tcsetattr.c | 62 --------------------------------- sysdeps/unix/bsd/bsd4.4/wait.c | 32 ----------------- sysdeps/unix/bsd/bsd4.4/wait3.c | 36 ------------------- sysdeps/unix/bsd/bsd4.4/waitpid.c | 43 ----------------------- 14 files changed, 304 deletions(-) delete mode 100644 sysdeps/unix/bsd/bsd4.4/Makefile delete mode 100644 sysdeps/unix/bsd/bsd4.4/Versions delete mode 100644 sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h delete mode 100644 sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/sigblock.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/sigsetmask.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/sigvec.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/syscalls.list delete mode 100644 sysdeps/unix/bsd/bsd4.4/tcdrain.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/tcgetattr.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/tcsetattr.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/wait.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/wait3.c delete mode 100644 sysdeps/unix/bsd/bsd4.4/waitpid.c (limited to 'sysdeps/unix/bsd/bsd4.4') diff --git a/sysdeps/unix/bsd/bsd4.4/Makefile b/sysdeps/unix/bsd/bsd4.4/Makefile deleted file mode 100644 index 208fd24..0000000 --- a/sysdeps/unix/bsd/bsd4.4/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),socket) -sysdep_routines += cmsg_nxthdr -endif diff --git a/sysdeps/unix/bsd/bsd4.4/Versions b/sysdeps/unix/bsd/bsd4.4/Versions deleted file mode 100644 index 99b386b..0000000 --- a/sysdeps/unix/bsd/bsd4.4/Versions +++ /dev/null @@ -1,6 +0,0 @@ -libc { - GLIBC_2.2.5 { - # functions used in inline functions or macros - __cmsg_nxthdr; - } -} diff --git a/sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h b/sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h deleted file mode 100644 index c2a1c9c..0000000 --- a/sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. 4.4 BSD version. - Copyright (C) 1995-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned char sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - unsigned char sa_prefix##len; \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (2 * sizeof (unsigned char)) - -#define _HAVE_SA_LEN 1 /* We have the sa_len field. */ - -#endif /* bits/sockaddr.h */ diff --git a/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c b/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c deleted file mode 100644 index 1a542fa..0000000 --- a/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c +++ /dev/null @@ -1,2 +0,0 @@ -/* The Linux version is perfectly usable on 4.4 BSD. */ -#include diff --git a/sysdeps/unix/bsd/bsd4.4/sigblock.c b/sysdeps/unix/bsd/bsd4.4/sigblock.c deleted file mode 100644 index 2647327..0000000 --- a/sysdeps/unix/bsd/bsd4.4/sigblock.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/bsd4.4/sigsetmask.c b/sysdeps/unix/bsd/bsd4.4/sigsetmask.c deleted file mode 100644 index 47f1e36..0000000 --- a/sysdeps/unix/bsd/bsd4.4/sigsetmask.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/bsd4.4/sigvec.c b/sysdeps/unix/bsd/bsd4.4/sigvec.c deleted file mode 100644 index d03d9bb..0000000 --- a/sysdeps/unix/bsd/bsd4.4/sigvec.c +++ /dev/null @@ -1 +0,0 @@ -#include 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/tcdrain.c b/sysdeps/unix/bsd/bsd4.4/tcdrain.c deleted file mode 100644 index bc63a24..0000000 --- a/sysdeps/unix/bsd/bsd4.4/tcdrain.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1992-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* Wait for pending output to be written on FD. */ -int -__libc_tcdrain (int fd) -{ - return __ioctl (fd, TIOCDRAIN); -} -weak_alias (__libc_tcdrain, tcdrain) diff --git a/sysdeps/unix/bsd/bsd4.4/tcgetattr.c b/sysdeps/unix/bsd/bsd4.4/tcgetattr.c deleted file mode 100644 index e5402cd..0000000 --- a/sysdeps/unix/bsd/bsd4.4/tcgetattr.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1991-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -/* These are defined both in and in . - They should have the same values, but perhaps not written the same way. */ -#undef ECHO -#undef MDMBUF -#undef TOSTOP -#undef FLUSHO -#undef PENDIN -#undef NOFLSH -#include - -/* Put the state of FD into *TERMIOS_P. */ -int -__tcgetattr (fd, termios_p) - int fd; - struct termios *termios_p; -{ - return __ioctl (fd, TIOCGETA, termios_p); -} - -weak_alias (__tcgetattr, tcgetattr) diff --git a/sysdeps/unix/bsd/bsd4.4/tcsetattr.c b/sysdeps/unix/bsd/bsd4.4/tcsetattr.c deleted file mode 100644 index bd58771..0000000 --- a/sysdeps/unix/bsd/bsd4.4/tcsetattr.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1992-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - -/* These are defined both in and in . - They should have the same values, but perhaps not written the same way. */ -#undef ECHO -#undef MDMBUF -#undef TOSTOP -#undef FLUSHO -#undef PENDIN -#undef NOFLSH -#include - - -/* Set the state of FD to *TERMIOS_P. */ -int -tcsetattr (fd, optional_actions, termios_p) - int fd; - int optional_actions; - const struct termios *termios_p; -{ - struct termios myt; - - if (optional_actions & TCSASOFT) - { - myt = *termios_p; - myt.c_cflag |= CIGNORE; - termios_p = &myt; - optional_actions &= ~TCSASOFT; - } - - switch (optional_actions) - { - case TCSANOW: - return __ioctl (fd, TIOCSETA, termios_p); - - case TCSADRAIN: - return __ioctl (fd, TIOCSETAW, termios_p); - - default: - return __ioctl (fd, TIOCSETAF, termios_p); - } -} -libc_hidden_def (tcsetattr) diff --git a/sysdeps/unix/bsd/bsd4.4/wait.c b/sysdeps/unix/bsd/bsd4.4/wait.c deleted file mode 100644 index c561c60..0000000 --- a/sysdeps/unix/bsd/bsd4.4/wait.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1991-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -/* Wait for a child to die. When one does, put its status in *STAT_LOC - and return its process ID. For errors, return (pid_t) -1. */ -__pid_t -__libc_wait (__WAIT_STATUS_DEFN stat_loc) -{ - return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); -} - -weak_alias (__libc_wait, __wait) -weak_alias (__libc_wait, wait) diff --git a/sysdeps/unix/bsd/bsd4.4/wait3.c b/sysdeps/unix/bsd/bsd4.4/wait3.c deleted file mode 100644 index 4af9b4b..0000000 --- a/sysdeps/unix/bsd/bsd4.4/wait3.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1991-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and - return its process ID. For errors return (pid_t) -1. If USAGE is not nil, - store information about the child's resource usage (as a `struct rusage') - there. If the WUNTRACED bit is set in OPTIONS, return status for stopped - children; otherwise don't. */ -pid_t -__wait3 (stat_loc, options, usage) - __WAIT_STATUS stat_loc; - int options; - struct rusage *usage; -{ - return __wait4 (WAIT_ANY, stat_loc, options, usage); -} - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/bsd4.4/waitpid.c b/sysdeps/unix/bsd/bsd4.4/waitpid.c deleted file mode 100644 index f25110b..0000000 --- a/sysdeps/unix/bsd/bsd4.4/waitpid.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1991-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ -pid_t -__libc_waitpid (pid_t pid, int *stat_loc, int options) -{ - return __wait4 (pid, (union wait *) stat_loc, options, NULL); -} - -weak_alias (__libc_waitpid, __waitpid) -libc_hidden_weak (__waitpid) -weak_alias (__libc_waitpid, waitpid) -- cgit v1.1