summaryrefslogtreecommitdiff
path: root/sysdeps/unix/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/bsd')
-rw-r--r--sysdeps/unix/bsd/bits/signum.h60
-rw-r--r--sysdeps/unix/bsd/bits/sockaddr.h7
-rw-r--r--sysdeps/unix/bsd/ftime.c2
-rw-r--r--sysdeps/unix/bsd/getpt.c2
-rw-r--r--sysdeps/unix/bsd/gtty.c4
-rw-r--r--sysdeps/unix/bsd/stty.c4
-rw-r--r--sysdeps/unix/bsd/tcdrain.c2
-rw-r--r--sysdeps/unix/bsd/tcflow.c4
-rw-r--r--sysdeps/unix/bsd/tcflush.c2
-rw-r--r--sysdeps/unix/bsd/tcgetattr.c3
-rw-r--r--sysdeps/unix/bsd/tcgetpgrp.c2
-rw-r--r--sysdeps/unix/bsd/tcsendbrk.c2
-rw-r--r--sysdeps/unix/bsd/tcsetattr.c2
-rw-r--r--sysdeps/unix/bsd/tcsetpgrp.c2
-rw-r--r--sysdeps/unix/bsd/ualarm.c2
-rw-r--r--sysdeps/unix/bsd/unlockpt.c4
-rw-r--r--sysdeps/unix/bsd/wait.c4
-rw-r--r--sysdeps/unix/bsd/wait3.c4
-rw-r--r--sysdeps/unix/bsd/waitpid.c4
19 files changed, 41 insertions, 75 deletions
diff --git a/sysdeps/unix/bsd/bits/signum.h b/sysdeps/unix/bsd/bits/signum.h
index 022007cf8a..85e11d6882 100644
--- a/sysdeps/unix/bsd/bits/signum.h
+++ b/sysdeps/unix/bsd/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. BSD version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -16,58 +16,20 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef _SIGNAL_H
+#ifndef _BITS_SIGNUM_H
+#define _BITS_SIGNUM_H 1
-/* 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_UNIX98
-# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#ifndef _SIGNAL_H
+#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
+#include <bits/signum-generic.h>
-/* 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). */
+/* Adjustments and additions to the signal number constants for
+ 4.2 or 4.3 BSD-derived Unix systems. */
+
+#define SIGEMT 7 /* Emulator trap (4.2 BSD). */
#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. */
+#endif /* bits/signum.h. */
diff --git a/sysdeps/unix/bsd/bits/sockaddr.h b/sysdeps/unix/bsd/bits/sockaddr.h
index aa127689bf..8a8030638f 100644
--- a/sysdeps/unix/bsd/bits/sockaddr.h
+++ b/sysdeps/unix/bsd/bits/sockaddr.h
@@ -1,5 +1,5 @@
-/* Definition of `struct sockaddr_*' common members. 4.4 BSD version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Definition of struct sockaddr_* common members and sizes, BSD version.
+ Copyright (C) 1995-2018 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
@@ -39,4 +39,7 @@ typedef unsigned char sa_family_t;
#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/ftime.c b/sysdeps/unix/bsd/ftime.c
index 812b32c147..10011b6bae 100644
--- a/sysdeps/unix/bsd/ftime.c
+++ b/sysdeps/unix/bsd/ftime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/unix/bsd/getpt.c b/sysdeps/unix/bsd/getpt.c
index 118fe63eeb..ea4947fb4f 100644
--- a/sysdeps/unix/bsd/getpt.c
+++ b/sysdeps/unix/bsd/getpt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
diff --git a/sysdeps/unix/bsd/gtty.c b/sysdeps/unix/bsd/gtty.c
index 60a2063675..77e2a7268c 100644
--- a/sysdeps/unix/bsd/gtty.c
+++ b/sysdeps/unix/bsd/gtty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -22,5 +22,5 @@
int
gtty (int fd, struct sgttyb *params)
{
- return ioctl (fd, TIOCGETP, (void *) params);
+ return __ioctl (fd, TIOCGETP, (void *) params);
}
diff --git a/sysdeps/unix/bsd/stty.c b/sysdeps/unix/bsd/stty.c
index 0ce8044533..8a0bbdef80 100644
--- a/sysdeps/unix/bsd/stty.c
+++ b/sysdeps/unix/bsd/stty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -22,5 +22,5 @@
int
stty (int fd, const struct sgttyb *params)
{
- return ioctl (fd, TIOCSETP, (void *) params);
+ return __ioctl (fd, TIOCSETP, (void *) params);
}
diff --git a/sysdeps/unix/bsd/tcdrain.c b/sysdeps/unix/bsd/tcdrain.c
index 547187a0b6..6492694b64 100644
--- a/sysdeps/unix/bsd/tcdrain.c
+++ b/sysdeps/unix/bsd/tcdrain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/unix/bsd/tcflow.c b/sysdeps/unix/bsd/tcflow.c
index e2839a3377..3eb5f61093 100644
--- a/sysdeps/unix/bsd/tcflow.c
+++ b/sysdeps/unix/bsd/tcflow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -40,7 +40,7 @@ tcflow (int fd, int action)
`write'. Is there another way to do this? */
struct termios attr;
unsigned char c;
- if (tcgetattr (fd, &attr) < 0)
+ if (__tcgetattr (fd, &attr) < 0)
return -1;
c = attr.c_cc[action == TCIOFF ? VSTOP : VSTART];
if (c != _POSIX_VDISABLE && write (fd, &c, 1) < 1)
diff --git a/sysdeps/unix/bsd/tcflush.c b/sysdeps/unix/bsd/tcflush.c
index a6209bc384..d0f7b76974 100644
--- a/sysdeps/unix/bsd/tcflush.c
+++ b/sysdeps/unix/bsd/tcflush.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/unix/bsd/tcgetattr.c b/sysdeps/unix/bsd/tcgetattr.c
index 71d67c8212..7a9acd17bd 100644
--- a/sysdeps/unix/bsd/tcgetattr.c
+++ b/sysdeps/unix/bsd/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -35,4 +35,5 @@ __tcgetattr (int fd, struct termios *termios_p)
return __ioctl (fd, TIOCGETA, termios_p);
}
+libc_hidden_def (__tcgetattr)
weak_alias (__tcgetattr, tcgetattr)
diff --git a/sysdeps/unix/bsd/tcgetpgrp.c b/sysdeps/unix/bsd/tcgetpgrp.c
index b3dedce805..24d77e675b 100644
--- a/sysdeps/unix/bsd/tcgetpgrp.c
+++ b/sysdeps/unix/bsd/tcgetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/unix/bsd/tcsendbrk.c b/sysdeps/unix/bsd/tcsendbrk.c
index 533b9d01cb..39ce08914e 100644
--- a/sysdeps/unix/bsd/tcsendbrk.c
+++ b/sysdeps/unix/bsd/tcsendbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/unix/bsd/tcsetattr.c b/sysdeps/unix/bsd/tcsetattr.c
index bf5d992151..5803be4fc0 100644
--- a/sysdeps/unix/bsd/tcsetattr.c
+++ b/sysdeps/unix/bsd/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/unix/bsd/tcsetpgrp.c b/sysdeps/unix/bsd/tcsetpgrp.c
index 23bd42c141..10b8b60394 100644
--- a/sysdeps/unix/bsd/tcsetpgrp.c
+++ b/sysdeps/unix/bsd/tcsetpgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/unix/bsd/ualarm.c b/sysdeps/unix/bsd/ualarm.c
index 92c245cd9d..3c317f6654 100644
--- a/sysdeps/unix/bsd/ualarm.c
+++ b/sysdeps/unix/bsd/ualarm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/unix/bsd/unlockpt.c b/sysdeps/unix/bsd/unlockpt.c
index 436d8a2c0e..d771d3201e 100644
--- a/sysdeps/unix/bsd/unlockpt.c
+++ b/sysdeps/unix/bsd/unlockpt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
@@ -32,5 +32,5 @@ unlockpt (int fd)
/* BSD doesn't have a lock, but it does have `revoke'. */
if (__ptsname_r (fd, buf, sizeof (buf)))
return -1;
- return revoke (buf);
+ return __revoke (buf);
}
diff --git a/sysdeps/unix/bsd/wait.c b/sysdeps/unix/bsd/wait.c
index 31de60e764..13c6cde851 100644
--- a/sysdeps/unix/bsd/wait.c
+++ b/sysdeps/unix/bsd/wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -23,7 +23,7 @@
/* 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)
+__libc_wait (int *stat_loc)
{
return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
}
diff --git a/sysdeps/unix/bsd/wait3.c b/sysdeps/unix/bsd/wait3.c
index 3f95ac7881..3c7f534a01 100644
--- a/sysdeps/unix/bsd/wait3.c
+++ b/sysdeps/unix/bsd/wait3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -25,7 +25,7 @@
there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
children; otherwise don't. */
pid_t
-__wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage)
+__wait3 (int *stat_loc, int options, struct rusage *usage)
{
return __wait4 (WAIT_ANY, stat_loc, options, usage);
}
diff --git a/sysdeps/unix/bsd/waitpid.c b/sysdeps/unix/bsd/waitpid.c
index 083c686ad0..543b94fc9f 100644
--- a/sysdeps/unix/bsd/waitpid.c
+++ b/sysdeps/unix/bsd/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -35,7 +35,7 @@
pid_t
__waitpid (pid_t pid, int *stat_loc, int options)
{
- return __wait4 (pid, (union wait *) stat_loc, options, NULL);
+ return __wait4 (pid, stat_loc, options, NULL);
}
libc_hidden_def (__waitpid)