aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/dl-machine.h13
-rw-r--r--sysdeps/generic/abort.c20
-rw-r--r--sysdeps/generic/gnu/types.h19
-rw-r--r--sysdeps/generic/selectbits.h29
-rw-r--r--sysdeps/generic/speed.c45
-rw-r--r--sysdeps/i386/selectbits.h57
-rw-r--r--sysdeps/mach/sys/syscall.h (renamed from sysdeps/mach/syscall.h)0
-rw-r--r--sysdeps/posix/signal.c15
-rw-r--r--sysdeps/posix/sigpause.c5
-rw-r--r--sysdeps/posix/sysv_signal.c (renamed from sysdeps/posix/bsd_signal.c)20
-rw-r--r--sysdeps/stub/libc-lock.h20
-rw-r--r--sysdeps/stub/sigpause.c12
-rw-r--r--sysdeps/stub/sys/syscall.h (renamed from sysdeps/stub/syscall.h)0
-rw-r--r--sysdeps/unix/Makefile15
-rw-r--r--sysdeps/unix/bsd/poll.c28
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/tcsetattr.c29
-rw-r--r--sysdeps/unix/bsd/tcdrain.c28
-rw-r--r--sysdeps/unix/bsd/tcflow.c34
-rw-r--r--sysdeps/unix/bsd/tcflush.c28
-rw-r--r--sysdeps/unix/bsd/tcgetpgrp.c35
-rw-r--r--sysdeps/unix/bsd/tcsendbrk.c33
-rw-r--r--sysdeps/unix/bsd/tcsetpgrp.c35
-rw-r--r--sysdeps/unix/getdents.c28
-rw-r--r--sysdeps/unix/siglist.c86
-rw-r--r--sysdeps/unix/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/getdents.c36
-rw-r--r--sysdeps/unix/sysv/i386/sigreturn.S28
-rw-r--r--sysdeps/unix/sysv/linux/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Dist2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/gnu/types.h89
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ioctl-types.h123
-rw-r--r--sysdeps/unix/sysv/linux/alpha/kernel_termios.h18
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sys/acct.h66
-rw-r--r--sysdeps/unix/sysv/linux/alpha/termbits.h188
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ustat.c32
-rw-r--r--sysdeps/unix/sysv/linux/alpha/xmknod.c46
-rw-r--r--sysdeps/unix/sysv/linux/direntry.h17
-rw-r--r--sysdeps/unix/sysv/linux/getdents.c105
-rw-r--r--sysdeps/unix/sysv/linux/gnu/types.h78
-rw-r--r--sysdeps/unix/sysv/linux/ioctl-types.h49
-rw-r--r--sysdeps/unix/sysv/linux/kernel_termios.h13
-rw-r--r--sysdeps/unix/sysv/linux/net/if.h147
-rw-r--r--sysdeps/unix/sysv/linux/netinet/in.h147
-rw-r--r--sysdeps/unix/sysv/linux/siglist.h84
-rw-r--r--sysdeps/unix/sysv/linux/sigset.h89
-rw-r--r--sysdeps/unix/sysv/linux/sigsuspend.c10
-rw-r--r--sysdeps/unix/sysv/linux/socketbits.h138
-rw-r--r--sysdeps/unix/sysv/linux/statfsbuf.h37
-rw-r--r--sysdeps/unix/sysv/linux/sys/acct.h35
-rw-r--r--sysdeps/unix/sysv/linux/sys/ptrace.h4
-rw-r--r--sysdeps/unix/sysv/linux/sys/syscall.h (renamed from sysdeps/unix/sysv/linux/syscall.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h11
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list4
-rw-r--r--sysdeps/unix/sysv/linux/tcgetattr.c56
-rw-r--r--sysdeps/unix/sysv/linux/tcsetattr.c73
-rw-r--r--sysdeps/unix/sysv/linux/termbits.h161
-rw-r--r--sysdeps/unix/sysv/linux/ustat.c32
-rw-r--r--sysdeps/unix/sysv/linux/ustatbits.h29
-rw-r--r--sysdeps/unix/sysv/linux/xmknod.c48
-rw-r--r--sysdeps/unix/sysv/sco3.2.4/sys/syscall.h (renamed from sysdeps/unix/sysv/sco3.2.4/syscall.h)0
-rw-r--r--sysdeps/unix/xmknod.c34
62 files changed, 2232 insertions, 436 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 78c5071b4e..1d01f035ea 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -14,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
@@ -43,7 +43,12 @@ elf_machine_matches_host (Elf64_Word e_machine)
static inline Elf64_Addr
elf_machine_dynamic (void)
{
+#ifdef AXP_MULTI_GOT_LD
return (Elf64_Addr) &_DYNAMIC;
+#else
+ register Elf64_Addr *gp __asm__ ("$29");
+ return gp[-4096];
+#endif
}
/* Return the run-time load address of the shared object. */
diff --git a/sysdeps/generic/abort.c b/sysdeps/generic/abort.c
index 366a543791..14c182b411 100644
--- a/sysdeps/generic/abort.c
+++ b/sysdeps/generic/abort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996, 1997 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
@@ -20,11 +20,12 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
/* Try to get a machine dependent instruction which will make the
program crash. This is used in case everything else fails. */
-#include "abort-instr.h"
+#include <abort-instr.h>
#ifndef ABORT_INSTRUCTION
/* No such instruction is available. */
# define ABORT_INSTRUCTION
@@ -46,7 +47,7 @@ abort (void)
sigset_t sigs;
/* First acquire the lock. */
- __libc_lock_lock (lock);
+ __libc_lock_lock_recursive (lock);
/* Now it's for sure we are alone. But recursive calls are possible. */
@@ -70,8 +71,19 @@ abort (void)
/* Send signal which possibly calls a user handler. */
if (stage == 2)
{
- ++stage;
+ /* This stage is special: we must allow repeated calls of
+ `abort' when a user defined handler for SIGABRT is installed.
+ This is risky since the `raise' implementation might also
+ fail but I don't see another possiblity. */
+ int save_stage = stage;
+
+ stage = 0;
+ __libc_lock_unlock_recursive (lock);
+
raise (SIGABRT);
+
+ __libc_lock_lock_recursive (lock);
+ stage = save_stage + 1;
}
/* There was a handler installed. Now remove it. */
diff --git a/sysdeps/generic/gnu/types.h b/sysdeps/generic/gnu/types.h
index acd817bcab..85f17a4fb1 100644
--- a/sysdeps/generic/gnu/types.h
+++ b/sysdeps/generic/gnu/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 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
@@ -29,17 +29,17 @@ typedef unsigned long __u_long;
#ifdef __GNUC__
typedef unsigned long long int __u_quad_t;
typedef long long int __quad_t;
-typedef __quad_t *__qaddr_t;
#else
typedef struct
{
- long val[2];
+ long __val[2];
} __quad_t;
typedef struct
{
- __u_long val[2];
+ __u_long __val[2];
} __u_quad_t;
#endif
+typedef __quad_t *__qaddr_t;
typedef int __dev_t; /* Type of device numbers. */
typedef unsigned int __uid_t; /* Type of user identifications. */
typedef unsigned int __gid_t; /* Type of group identifications. */
@@ -72,17 +72,10 @@ typedef long int __key_t; /* Type of an IPC key */
typedef struct
{
- /* Some braindead old software uses this member name. */
+ /* XPG4.2 requires this member name. */
unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
} __fd_set;
-typedef unsigned long __fd_mask;
-
-/* This line MUST be split! Otherwise m4 will not change it. */
-#define __FD_ZERO(set) \
- ((void) memset ((__ptr_t) (set), 0, sizeof (fd_set)))
-#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
-#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
-#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
+typedef unsigned long int __fd_mask;
#endif /* gnu/types.h */
diff --git a/sysdeps/generic/selectbits.h b/sysdeps/generic/selectbits.h
new file mode 100644
index 0000000000..e2bdf6049e
--- /dev/null
+++ b/sysdeps/generic/selectbits.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 1997 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SELECTBITS_H
+#define _SELECTBITS_H 1
+
+/* This line MUST be split! Otherwise m4 will not change it. */
+#define __FD_ZERO(set) \
+ ((void) memset ((__ptr_t) (set), 0, sizeof (fd_set)))
+#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
+#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
+#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
+
+#endif /* selectbits.h */
diff --git a/sysdeps/generic/speed.c b/sysdeps/generic/speed.c
index 229c0665e2..52e89508c0 100644
--- a/sysdeps/generic/speed.c
+++ b/sysdeps/generic/speed.c
@@ -1,45 +1,47 @@
/* `struct termios' speed frobnication functions. 4.4 BSD/generic GNU version.
-Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1991, 1992, 1993, 1996, 1997 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 Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 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
-Library General Public License for more details.
+ 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
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <termios.h>
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
{
return termios_p->__ospeed;
}
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
+cfgetispeed (termios_p)
+ const struct termios *termios_p;
{
return termios_p->__ispeed;
}
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetospeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
if (termios_p == NULL)
{
@@ -53,8 +55,9 @@ DEFUN(cfsetospeed, (termios_p, speed),
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetispeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetispeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
if (termios_p == NULL)
{
diff --git a/sysdeps/i386/selectbits.h b/sysdeps/i386/selectbits.h
new file mode 100644
index 0000000000..973ecad58e
--- /dev/null
+++ b/<