aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/bsd')
-rw-r--r--sysdeps/unix/bsd/Implies2
-rw-r--r--sysdeps/unix/bsd/Makefile3
-rw-r--r--sysdeps/unix/bsd/Versions6
-rw-r--r--sysdeps/unix/bsd/bits/signum.h73
-rw-r--r--sysdeps/unix/bsd/bits/sockaddr.h45
-rw-r--r--sysdeps/unix/bsd/bsdtty.h218
-rw-r--r--sysdeps/unix/bsd/cmsg_nxthdr.c2
-rw-r--r--sysdeps/unix/bsd/ftime.c40
-rw-r--r--sysdeps/unix/bsd/getpt.c91
-rw-r--r--sysdeps/unix/bsd/gtty.c26
-rw-r--r--sysdeps/unix/bsd/sigblock.c1
-rw-r--r--sysdeps/unix/bsd/sigsetmask.c1
-rw-r--r--sysdeps/unix/bsd/stty.c26
-rw-r--r--sysdeps/unix/bsd/syscalls.list15
-rw-r--r--sysdeps/unix/bsd/tcdrain.c27
-rw-r--r--sysdeps/unix/bsd/tcflow.c55
-rw-r--r--sysdeps/unix/bsd/tcflush.c48
-rw-r--r--sysdeps/unix/bsd/tcgetattr.c38
-rw-r--r--sysdeps/unix/bsd/tcgetpgrp.c33
-rw-r--r--sysdeps/unix/bsd/tcsendbrk.c53
-rw-r--r--sysdeps/unix/bsd/tcsetattr.c59
-rw-r--r--sysdeps/unix/bsd/tcsetpgrp.c28
-rw-r--r--sysdeps/unix/bsd/ualarm.c40
-rw-r--r--sysdeps/unix/bsd/unlockpt.c36
-rw-r--r--sysdeps/unix/bsd/wait.c32
-rw-r--r--sysdeps/unix/bsd/wait3.c33
-rw-r--r--sysdeps/unix/bsd/waitpid.c42
27 files changed, 0 insertions, 1073 deletions
diff --git a/sysdeps/unix/bsd/Implies b/sysdeps/unix/bsd/Implies
deleted file mode 100644
index c30979e17b..0000000000
--- a/sysdeps/unix/bsd/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# The directory unix/inet implements sockets and networking in the usual way.
-unix/inet
diff --git a/sysdeps/unix/bsd/Makefile b/sysdeps/unix/bsd/Makefile
deleted file mode 100644
index 208fd24484..0000000000
--- a/sysdeps/unix/bsd/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(subdir),socket)
-sysdep_routines += cmsg_nxthdr
-endif
diff --git a/sysdeps/unix/bsd/Versions b/sysdeps/unix/bsd/Versions
deleted file mode 100644
index 99b386b670..0000000000
--- a/sysdeps/unix/bsd/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/bits/signum.h b/sysdeps/unix/bsd/bits/signum.h
deleted file mode 100644
index 268c24a702..0000000000
--- a/sysdeps/unix/bsd/bits/signum.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Signal number definitions. BSD version.
- Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#ifdef _SIGNAL_H
-
-/* This file defines the fake signal functions and signal
- number constants for 4.2 or 4.3 BSD-derived Unix system. */
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-#ifdef __USE_XOPEN
-# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
-#endif
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap (4.2 BSD). */
-#define SIGEMT 7 /* EMT trap (4.2 BSD). */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error (4.2 BSD). */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */
-#define SIGSTOP 17 /* Stop, unblockable (POSIX). */
-#define SIGTSTP 18 /* Keyboard stop (POSIX). */
-#define SIGCONT 19 /* Continue (POSIX). */
-#define SIGCHLD 20 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGTTIN 21 /* Background read from tty (POSIX). */
-#define SIGTTOU 22 /* Background write to tty (POSIX). */
-#define SIGIO 23 /* I/O now possible (4.2 BSD). */
-#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */
-#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
-#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
-#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
-#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
-#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
-#define SIGINFO 29 /* Information request (4.4 BSD). */
-#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */
-#define SIGLOST 32 /* Resource lost (Sun); server died (GNU). */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 33 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/bsd/bits/sockaddr.h b/sysdeps/unix/bsd/bits/sockaddr.h
deleted file mode 100644
index bb98f3a778..0000000000
--- a/sysdeps/unix/bsd/bits/sockaddr.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Definition of struct sockaddr_* common members and sizes, BSD version.
- Copyright (C) 1995-2017 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
- <http://www.gnu.org/licenses/>. */
-
-/*
- * Never include this file directly; use <sys/socket.h> 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. */
-
-/* Size of struct sockaddr_storage. */
-#define _SS_SIZE 128
-
-#endif /* bits/sockaddr.h */
diff --git a/sysdeps/unix/bsd/bsdtty.h b/sysdeps/unix/bsd/bsdtty.h
deleted file mode 100644
index a1da8d5cc3..0000000000
--- a/sysdeps/unix/bsd/bsdtty.h
+++ /dev/null
@@ -1,218 +0,0 @@
-#undef B0
-#undef B50
-#undef B75
-#undef B110
-#undef B134
-#undef B150
-#undef B200
-#undef B300
-#undef B600
-#undef B1200
-#undef B1800
-#undef B2400
-#undef B4800
-#undef B9600
-#undef B19200
-#undef B38400
-#undef EXTA
-#undef EXTB
-#undef ECHO
-#undef TOSTOP
-#undef NOFLSH
-#undef MDMBUF
-#undef FLUSHO
-#undef PENDIN
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-#undef CERASE
-#undef CKILL
-#undef CINTR
-#undef CQUIT
-#undef CSTART
-#undef CSTOP
-#undef CEOF
-#undef CEOT
-#undef CBRK
-#undef CSUSP
-#undef CDSUSP
-#undef CRPRNT
-#undef CFLUSH
-#undef CWERASE
-#undef CLNEXT
-#undef CSTATUS
-
-#include <sys/ioctl.h>
diff --git a/sysdeps/unix/bsd/cmsg_nxthdr.c b/sysdeps/unix/bsd/cmsg_nxthdr.c
deleted file mode 100644
index 1a542fa01a..0000000000
--- a/sysdeps/unix/bsd/cmsg_nxthdr.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* The Linux version is perfectly usable on 4.4 BSD. */
-#include <sysdeps/unix/sysv/linux/cmsg_nxthdr.c>
diff --git a/sysdeps/unix/bsd/ftime.c b/sysdeps/unix/bsd/ftime.c
deleted file mode 100644
index 0d093eea71..0000000000
--- a/sysdeps/unix/bsd/ftime.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 1994-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/timeb.h>
-#include <sys/time.h>
-
-int
-ftime (struct timeb *timebuf)
-{
- struct timeval tv;
- struct timezone tz;
-
- if (__gettimeofday (&tv, &tz) < 0)
- return -1;
-
- timebuf->time = tv.tv_sec;
- timebuf->millitm = (tv.tv_usec + 500) / 1000;
- if (timebuf->millitm == 1000)
- {
- ++timebuf->time;
- timebuf->millitm = 0;
- }
- timebuf->timezone = tz.tz_minuteswest;
- timebuf->dstflag = tz.tz_dsttime;
- return 0;
-}
diff --git a/sysdeps/unix/bsd/getpt.c b/sysdeps/unix/bsd/getpt.c
deleted file mode 100644
index 99e7af15c2..0000000000
--- a/sysdeps/unix/bsd/getpt.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
-
- 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-
-
-/* Prefix for master pseudo terminal nodes. */
-#define _PATH_PTY "/dev/pty"
-
-
-/* Letters indicating a series of pseudo terminals. */
-#ifndef PTYNAME1
-#define PTYNAME1 "pqrsPQRS"
-#endif
-const char __libc_ptyname1[] attribute_hidden = PTYNAME1;
-
-/* Letters indicating the position within a series. */
-#ifndef PTYNAME2
-#define PTYNAME2 "0123456789abcdefghijklmnopqrstuv";
-#endif
-const char __libc_ptyname2[] attribute_hidden = PTYNAME2;
-
-
-/* Open a master pseudo terminal and return its file descriptor. */
-int
-__getpt (void)
-{
- char buf[sizeof (_PATH_PTY) + 2];
- const char *p, *q;
- char *s;
-
- s = __mempcpy (buf, _PATH_PTY, sizeof (_PATH_PTY) - 1);
- /* s[0] and s[1] will be filled in the loop. */
- s[2] = '\0';
-
- for (p = __libc_ptyname1; *p != '\0'; ++p)
- {
- s[0] = *p;
-
- for (q = __libc_ptyname2; *q != '\0'; ++q)
- {
- int fd;
-
- s[1] = *q;
-
- fd = __open (buf, O_RDWR);
- if (fd != -1)
- return fd;
-
- if (errno == ENOENT)
- return -1;
- }
- }
-
- __set_errno (ENOENT);
- return -1;
-}
-
-#undef __getpt
-weak_alias (__getpt, getpt)
-
-#ifndef HAVE_POSIX_OPENPT
-/* We cannot define posix_openpt in general for BSD systems. */
-int
-__posix_openpt (int oflag)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-weak_alias (__posix_openpt, posix_openpt)
-
-stub_warning (posix_openpt)
-#endif
diff --git a/sysdeps/unix/bsd/gtty.c b/sysdeps/unix/bsd/gtty.c
deleted file mode 100644
index 2c32136f32..0000000000
--- a/sysdeps/unix/bsd/gtty.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sgtty.h>
-
-/* Fill in *PARAMS with terminal parameters associated with FD. */
-int
-gtty (int fd, struct sgttyb *params)
-{
- return ioctl (fd, TIOCGETP, (void *) params);
-}
diff --git a/sysdeps/unix/bsd/sigblock.c b/sysdeps/unix/bsd/sigblock.c
deleted file mode 100644
index 2647327db0..0000000000
--- a/sysdeps/unix/bsd/sigblock.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/posix/sigblock.c>
diff --git a/sysdeps/unix/bsd/sigsetmask.c b/sysdeps/unix/bsd/sigsetmask.c
deleted file mode 100644
index 47f1e36a7f..0000000000
--- a/sysdeps/unix/bsd/sigsetmask.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/posix/sigsetmask.c>
diff --git a/sysdeps/unix/bsd/stty.c b/sysdeps/unix/bsd/stty.c
deleted file mode 100644
index 8593c0e5d8..0000000000
--- a/sysdeps/unix/bsd/stty.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sgtty.h>
-
-/* Set the terminal parameters associated with FD to *PARAMS. */
-int
-stty (int fd, const struct sgttyb *params)
-{
- return ioctl (fd, TIOCSETP, (void *) params);
-}
diff --git a/sysdeps/unix/bsd/syscalls.list b/sysdeps/unix/bsd/syscalls.list
deleted file mode 100644
index 0b4d5fcd54..0000000000
--- a/sysdeps/unix/bsd/syscalls.list
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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
-revoke - revoke 1 revoke
-setlogin - setlogin 2 setlogin
-sigaltstack - sigaltstack 2 __sigaltstack sigaltstack
-sigpause - sigpause 1 __sigpause sigpause
-sigstack - sigstack 2 sigstack
-wait4 - wait4 4 __wait4 wait4
diff --git a/sysdeps/unix/bsd/tcdrain.c b/sysdeps/unix/bsd/tcdrain.c
deleted file mode 100644
index ac9d9803a6..0000000000
--- a/sysdeps/unix/bsd/tcdrain.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1992-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <stddef.h>
-#include <sys/ioctl.h>
-
-/* 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/tcflow.c b/sysdeps/unix/bsd/tcflow.c
deleted file mode 100644
index 39a13f13ef..0000000000
--- a/sysdeps/unix/bsd/tcflow.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include "bsdtty.h"
-
-/* Suspend or restart transmission on FD. */
-int
-tcflow (int fd, int action)
-{
- switch (action)
- {
- case TCOOFF:
- return __ioctl (fd, TIOCSTOP, (void *) NULL);
- case TCOON:
- return __ioctl (fd, TIOCSTART, (void *) NULL);
-
- case TCIOFF:
- case TCION:
- {
- /* This just writes the START or STOP character with
- `write'. Is there another way to do this? */
- struct termios attr;
- unsigned char c;
- if (tcgetattr (fd, &attr) < 0)
- return -1;
- c = attr.c_cc[action == TCIOFF ? VSTOP : VSTART];
- if (c != _POSIX_VDISABLE && write (fd, &c, 1) < 1)
- return -1;
- return 0;
- }
-
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
diff --git a/sysdeps/unix/bsd/tcflush.c b/sysdeps/unix/bsd/tcflush.c
deleted file mode 100644
index 4d1e933b56..0000000000
--- a/sysdeps/unix/bsd/tcflush.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include "bsdtty.h"
-#include <sys/file.h>
-
-/* Flush pending data on FD. */
-int
-tcflush (int fd, int queue_selector)
-{
- int arg;
-
- switch (queue_selector)
- {
- case TCIFLUSH:
- arg = FREAD;
- break;
- case TCOFLUSH:
- arg = FWRITE;
- break;
- case TCIOFLUSH:
- arg = FREAD | FWRITE;
- break;
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- return __ioctl (fd, TIOCFLUSH, (void *) &arg);
-}
diff --git a/sysdeps/unix/bsd/tcgetattr.c b/sysdeps/unix/bsd/tcgetattr.c
deleted file mode 100644
index 1779bb9342..0000000000
--- a/sysdeps/unix/bsd/tcgetattr.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <stddef.h>
-#include <termios.h>
-
-/* These are defined both in <bits/termios.h> and in <bits/ioctls.h>.
- 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 <sys/ioctl.h>
-
-/* Put the state of FD into *TERMIOS_P. */
-int
-__tcgetattr (int fd, struct termios *termios_p)
-{
- return __ioctl (fd, TIOCGETA, termios_p);
-}
-
-weak_alias (__tcgetattr, tcgetattr)
diff --git a/sysdeps/unix/bsd/tcgetpgrp.c b/sysdeps/unix/bsd/tcgetpgrp.c
deleted file mode 100644
index 6ba19ed351..0000000000
--- a/sysdeps/unix/bsd/tcgetpgrp.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-/* Return the foreground process group ID of FD. */
-pid_t
-tcgetpgrp (int fd)
-{
- int pgrp;
-
- if (__ioctl (fd, TIOCGPGRP, &pgrp) < 0)
- return (pid_t) -1;
- return (pid_t) pgrp;
-}
-libc_hidden_def (tcgetpgrp)
diff --git a/sysdeps/unix/bsd/tcsendbrk.c b/sysdeps/unix/bsd/tcsendbrk.c
deleted file mode 100644
index f074c7a065..0000000000
--- a/sysdeps/unix/bsd/tcsendbrk.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include "bsdtty.h"
-#include <sys/file.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-/* Send zero bits on FD. */
-int
-tcsendbreak (int fd, int duration)
-{
- struct timeval delay;
-
- /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
- and an implementation-defined period if DURATION is nonzero.
- We define a positive DURATION to be number of microseconds to break. */
- if (duration <= 0)
- duration = 400000;
-
- delay.tv_sec = 0;
- delay.tv_usec = duration;
-
- /* Starting sending break. */
- if (__ioctl (fd, TIOCSBRK, (void *) NULL) < 0)
- return -1;
-
- /* Wait DURATION microseconds. */
- (void) __select (0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL,
- &delay);
-
- /* Turn off the break. */
- return __ioctl (fd, TIOCCBRK, (void *) NULL);
-}
diff --git a/sysdeps/unix/bsd/tcsetattr.c b/sysdeps/unix/bsd/tcsetattr.c
deleted file mode 100644
index c754e80cbe..0000000000
--- a/sysdeps/unix/bsd/tcsetattr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1992-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-
-/* These are defined both in <bits/termios.h> and in <bits/ioctls.h>.
- 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 <sys/ioctl.h>
-
-
-/* Set the state of FD to *TERMIOS_P. */
-int
-tcsetattr (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/tcsetpgrp.c b/sysdeps/unix/bsd/tcsetpgrp.c
deleted file mode 100644
index b99716adbe..0000000000
--- a/sysdeps/unix/bsd/tcsetpgrp.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <unistd.h>
-
-/* Set the foreground process group ID of FD set PGRP_ID. */
-int
-tcsetpgrp (int fd, pid_t pgrp_id)
-{
- return __ioctl (fd, TIOCSPGRP, &pgrp_id);
-}
diff --git a/sysdeps/unix/bsd/ualarm.c b/sysdeps/unix/bsd/ualarm.c
deleted file mode 100644
index 133ed86597..0000000000
--- a/sysdeps/unix/bsd/ualarm.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/time.h>
-#include <unistd.h>
-
-/* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds.
- If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go
- off every INTERVAL microseconds thereafter.
-
- Returns the number of microseconds remaining before the alarm. */
-useconds_t
-ualarm (useconds_t value, useconds_t interval)
-{
- struct itimerval timer, otimer;
-
- timer.it_value.tv_sec = 0;
- timer.it_value.tv_usec = value;
- timer.it_interval.tv_sec = 0;
- timer.it_interval.tv_usec = interval;
-
- if (__setitimer (ITIMER_REAL, &timer, &otimer) < 0)
- return -1;
-
- return (otimer.it_value.tv_sec * 1000000) + otimer.it_value.tv_usec;
-}
diff --git a/sysdeps/unix/bsd/unlockpt.c b/sysdeps/unix/bsd/unlockpt.c
deleted file mode 100644
index 7388c98523..0000000000
--- a/sysdeps/unix/bsd/unlockpt.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
-
- 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
- <http://www.gnu.org/licenses/>. */
-
-#include <paths.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-
-/* Unlock the slave pseudo terminal associated with the master pseudo
- terminal specified by FD. */
-int
-unlockpt (int fd)
-{
- char buf[sizeof (_PATH_TTY) + 2];
-
- /* BSD doesn't have a lock, but it does have `revoke'. */
- if (__ptsname_r (fd, buf, sizeof (buf)))
- return -1;
- return revoke (buf);
-}
diff --git a/sysdeps/unix/bsd/wait.c b/sysdeps/unix/bsd/wait.c
deleted file mode 100644
index 3daed7ee05..0000000000
--- a/sysdeps/unix/bsd/wait.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/wait.h>
-#include <errno.h>
-#include <sys/resource.h>
-#include <stddef.h>
-
-/* 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 (int *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/wait3.c b/sysdeps/unix/bsd/wait3.c
deleted file mode 100644
index feb17e5187..0000000000
--- a/sysdeps/unix/bsd/wait3.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-
-/* 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 (int *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/waitpid.c b/sysdeps/unix/bsd/waitpid.c
deleted file mode 100644
index 18f680e3c0..0000000000
--- a/sysdeps/unix/bsd/waitpid.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1991-2017 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
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <stddef.h>
-
-/* 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
-__waitpid (pid_t pid, int *stat_loc, int options)
-{
- return __wait4 (pid, stat_loc, options, NULL);
-}
-
-libc_hidden_def (__waitpid)
-weak_alias (__waitpid, waitpid)