aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/elf/Makefile4
-rw-r--r--sysdeps/generic/errno-loc.c28
-rw-r--r--sysdeps/stub/libc-lock.h3
-rw-r--r--sysdeps/unix/sysv/linux/Makefile4
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sys/io.h13
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list5
-rw-r--r--sysdeps/unix/sysv/linux/configure22
-rw-r--r--sysdeps/unix/sysv/linux/i386/brk.c34
-rw-r--r--sysdeps/unix/sysv/linux/i386/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.S17
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c34
-rw-r--r--sysdeps/unix/sysv/linux/llseek.c35
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.S13
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
14 files changed, 148 insertions, 66 deletions
diff --git a/sysdeps/alpha/elf/Makefile b/sysdeps/alpha/elf/Makefile
new file mode 100644
index 0000000..db849bd
--- /dev/null
+++ b/sysdeps/alpha/elf/Makefile
@@ -0,0 +1,4 @@
+ifeq ($(subdir), csu)
+extra-objs += crtbegin.o crtend.o
+install-lib += crtbegin.o crtend.o
+endif
diff --git a/sysdeps/generic/errno-loc.c b/sysdeps/generic/errno-loc.c
new file mode 100644
index 0000000..46b9f17
--- /dev/null
+++ b/sysdeps/generic/errno-loc.c
@@ -0,0 +1,28 @@
+/* MT support function to get address of `errno' variable, non-threaded
+ version.
+ Copyright (C) 1996 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. */
+
+extern int errno;
+
+int *
+weak_const_function
+__errno_location (void)
+{
+ return &errno;
+}
diff --git a/sysdeps/stub/libc-lock.h b/sysdeps/stub/libc-lock.h
index bb89de2..158a221 100644
--- a/sysdeps/stub/libc-lock.h
+++ b/sysdeps/stub/libc-lock.h
@@ -37,6 +37,9 @@
state. */
#define __libc_lock_init(NAME)
+/* Same as last but this time we initialize a recursive mutex. */
+#define __libc_lock_init_recursive(NAME)
+
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 69c207a..a200064 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -1,9 +1,11 @@
ifeq ($(subdir), csu)
CFLAGS-init-first.c = -fkeep-inline-functions
+
+sysdep_routines += errno-loc
endif
ifeq ($(subdir), misc)
-sysdep_routines += sysctl clone
+sysdep_routines += sysctl clone llseek
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index c4aa2c7..208e793 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -54,6 +54,19 @@ extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const));
extern int _hae_shift __P ((void)) __attribute__ ((const));
extern int hae_shift __P ((void)) __attribute__ ((const));
+/* Access PCI space protected from machine checks. */
+extern int pciconfig_read __P ((unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf));
+
+extern int pciconfig_write __P ((unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf));
+
__END_DECLS
#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 4a52bf2..49cc697 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,6 +21,7 @@ getdents - getdents 3 __getdirentries getdirentries
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap
+llseek EXTRA lseek 3 llseek
# these are actually common with the x86:
fstatfs - fstatfs 2 __fstatfs fstatfs
@@ -46,3 +47,7 @@ setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
sysctl - _sysctl 6 sysctl
+
+# access pci space protected from machine checks:
+pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
+pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 2592c6c..ef7590d 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -52,3 +52,25 @@ if test "$prefix" = "/usr"; then
libc_cv_slibdir="/lib"
libc_cv_sysconfdir="/etc"
fi
+
+# Under Linux the LinuxThreads and crypt add-on should be available.
+case $add_ons in
+ # Both are available. Good.
+ *linuxthreads*des-crypt* | *des-crypt*linuxthreads*)
+ ;;
+ *linuxthreads*)
+ echo "\
+*** WARNING:
+*** Are you sure you do not want to use the \`crypt' add-on?"
+ ;;
+ *des-crypt*)
+ echo "\
+*** WARNING:
+*** Are you sure you do not want to use the \`LinuxThread' add-on?"
+ ;;
+ *)
+ echo "\
+*** WARNING: Are you sure you do not want to use the \`LinuxThreads'
+*** and \`crypt' add-ons?"
+ ;;
+esac
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
index d11c3c4..5bb9d59 100644
--- a/sysdeps/unix/sysv/linux/i386/brk.c
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
@@ -1,21 +1,21 @@
/* brk system call for Linux/i386.
-Copyright (C) 1995, 1996 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1995, 1996 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. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list
index 63dd0bd..d95a120 100644
--- a/sysdeps/unix/sysv/linux/i386/syscalls.list
+++ b/sysdeps/unix/sysv/linux/i386/syscalls.list
@@ -1,3 +1,4 @@
# File name Caller Syscall name # args Strong name Weak names
+s_llseek llseek _llseek 5 __sys_llseek
vm86 - vm86 1 __vm86 vm86
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S
index d676004..4b86d1d 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.S
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.S
@@ -52,20 +52,3 @@ ENTRY (__syscall_error)
#include <sysdeps/unix/i386/sysdep.S>
#endif /* !PIC */
-
-
- .weak __errno_location
- .type __errno_location,@function
- .align 16
-__errno_location:
- CALL_MCOUNT
-#ifdef PIC
- call .L2
-.L2: popl %ecx
- addl $_GLOBAL_OFFSET_TABLE_+[.-.L2], %ecx
- movl errno@GOT(%ecx), %eax
-#else
- movl $errno, %eax
-#endif
- ret
-END (__errno_location)
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index 6e1d712..7c5b510 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -1,21 +1,21 @@
/* Initialization code run first thing by the ELF startup code. Linux version.
-Copyright (C) 1995, 1996 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1995, 1996 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. */
#include <unistd.h>
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/llseek.c b/sysdeps/unix/sysv/linux/llseek.c
new file mode 100644
index 0000000..a1284db
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/llseek.c
@@ -0,0 +1,35 @@
+/* Long-long seek operation.
+ Copyright (C) 1996 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. */
+
+#include <sys/types.h>
+
+
+extern int __sys_llseek (int fd, off_t offset_hi, off_t offset_lo,
+ loff_t *result, int whence);
+
+/* Seek to OFFSET on FD, starting from WHENCE. */
+loff_t
+llseek (int fd, loff_t offset, int whence)
+{
+ loff_t result;
+
+ return (loff_t) (__sys_llseek (fd, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff),
+ &result, whence) ?: result);
+}
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 95e6354..5533be2 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -61,16 +61,3 @@ __syscall_error:
rts
END (__syscall_error)
#endif /* PIC */
-
- .weak __errno_location
- .type __errno_location,@function
- .align 4
-__errno_location:
- CALL_MCOUNT
-#ifdef PIC
- move.l (%pc, errno@GOTPC), %a0
-#else
- lea errno, %a0
-#endif
- rts
-END (__errno_location)
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 01ca1bc..07a3c1d 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -20,7 +20,6 @@ ioperm - ioperm 3 ioperm
iopl - iopl 1 iopl
ipc msgget ipc 5 __ipc
klogctl EXTRA syslog 3 klogctl
-llseek EXTRA _llseek 5 _llseek llseek
mlock EXTRA mlock 2 __mlock mlock
mlockall EXTRA mlockall 1 __mlockall mlockall
mount EXTRA mount 5 __mount mount