diff options
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/sys/io.h | 13 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/syscalls.list | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/configure | 22 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/brk.c | 34 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/syscalls.list | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.S | 17 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/init-first.c | 34 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/llseek.c | 35 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/m68k/sysdep.S | 13 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 1 |
11 files changed, 113 insertions, 66 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 69c207a575..a200064a1c 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 c4aa2c776c..208e793119 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 4a52bf2818..49cc697489 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 2592c6c8c8..ef7590d367 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 d11c3c40d9..5bb9d59d5c 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 63dd0bd8e2..d95a120aa0 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 d676004084..4b86d1dfe7 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 6e1d71204c..7c5b510956 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 0000000000..a1284db6be --- /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 95e63542ee..5533be2c1b 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 01ca1bc8bb..07a3c1db4b 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 |