From e3e60f6bdc80109e6cfbd092049a4bbb2f43c457 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 2 Jan 2009 21:14:11 +0000 Subject: Updated to fedora-glibc-20090102T2110 --- sysdeps/unix/alpha/Makefile | 3 - sysdeps/unix/alpha/pipe.S | 32 - sysdeps/unix/alpha/rt-sysdep.S | 1 - sysdeps/unix/alpha/sysdep.S | 135 ---- sysdeps/unix/alpha/sysdep.h | 438 ---------- sysdeps/unix/sysv/linux/accept4.c | 54 ++ sysdeps/unix/sysv/linux/alpha/Implies | 4 - sysdeps/unix/sysv/linux/alpha/Makefile | 38 - sysdeps/unix/sysv/linux/alpha/Versions | 94 --- sysdeps/unix/sysv/linux/alpha/a.out.h | 197 ----- sysdeps/unix/sysv/linux/alpha/adjtime.c | 220 ----- sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h | 18 - sysdeps/unix/sysv/linux/alpha/alpha/regdef.h | 44 - sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies | 2 - .../unix/sysv/linux/alpha/alphaev67/fpu/Implies | 2 - sysdeps/unix/sysv/linux/alpha/bits/a.out.h | 9 - sysdeps/unix/sysv/linux/alpha/bits/dirent.h | 55 -- sysdeps/unix/sysv/linux/alpha/bits/elfclass.h | 14 - sysdeps/unix/sysv/linux/alpha/bits/errno.h | 58 -- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 232 ------ sysdeps/unix/sysv/linux/alpha/bits/ioctls.h | 37 - sysdeps/unix/sysv/linux/alpha/bits/ipc.h | 55 -- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 118 --- sysdeps/unix/sysv/linux/alpha/bits/msq.h | 74 -- sysdeps/unix/sysv/linux/alpha/bits/netdb.h | 35 - sysdeps/unix/sysv/linux/alpha/bits/resource.h | 233 ------ sysdeps/unix/sysv/linux/alpha/bits/sem.h | 85 -- sysdeps/unix/sysv/linux/alpha/bits/shm.h | 101 --- sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 74 -- sysdeps/unix/sysv/linux/alpha/bits/siginfo.h | 303 ------- sysdeps/unix/sysv/linux/alpha/bits/signum.h | 82 -- sysdeps/unix/sysv/linux/alpha/bits/sigstack.h | 55 -- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 157 ---- sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 67 -- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 226 ------ sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 66 -- sysdeps/unix/sysv/linux/alpha/bits/wordsize.h | 30 - sysdeps/unix/sysv/linux/alpha/brk.S | 81 -- sysdeps/unix/sysv/linux/alpha/clone.S | 149 ---- sysdeps/unix/sysv/linux/alpha/dl-auxv.h | 36 - sysdeps/unix/sysv/linux/alpha/dl-brk.S | 1 - sysdeps/unix/sysv/linux/alpha/dl-support.c | 2 - sysdeps/unix/sysv/linux/alpha/dl-sysdep.c | 2 - sysdeps/unix/sysv/linux/alpha/fpu/Implies | 2 - sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c | 92 --- sysdeps/unix/sysv/linux/alpha/fxstat.c | 64 -- sysdeps/unix/sysv/linux/alpha/fxstatat.c | 99 --- sysdeps/unix/sysv/linux/alpha/getclktck.c | 2 - sysdeps/unix/sysv/linux/alpha/getcontext.S | 188 ----- sysdeps/unix/sysv/linux/alpha/getdents.c | 3 - sysdeps/unix/sysv/linux/alpha/getdents64.c | 1 - sysdeps/unix/sysv/linux/alpha/gethostname.c | 47 -- sysdeps/unix/sysv/linux/alpha/getitimer.S | 113 --- sysdeps/unix/sysv/linux/alpha/getrusage.S | 149 ---- sysdeps/unix/sysv/linux/alpha/getsysstats.c | 57 -- sysdeps/unix/sysv/linux/alpha/gettimeofday.S | 120 --- sysdeps/unix/sysv/linux/alpha/glob.c | 52 -- .../unix/sysv/linux/alpha/ieee_get_fp_control.S | 61 -- .../unix/sysv/linux/alpha/ieee_set_fp_control.S | 61 -- sysdeps/unix/sysv/linux/alpha/ioperm.c | 883 --------------------- sysdeps/unix/sysv/linux/alpha/ipc_priv.h | 47 -- sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h | 15 - sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 88 -- sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h | 6 - sysdeps/unix/sysv/linux/alpha/kernel_termios.h | 44 - sysdeps/unix/sysv/linux/alpha/lxstat.c | 64 -- sysdeps/unix/sysv/linux/alpha/makecontext.S | 164 ---- sysdeps/unix/sysv/linux/alpha/msgctl.c | 121 --- sysdeps/unix/sysv/linux/alpha/nldbl-abi.h | 8 - sysdeps/unix/sysv/linux/alpha/oldglob.c | 100 --- sysdeps/unix/sysv/linux/alpha/pipe.S | 1 - sysdeps/unix/sysv/linux/alpha/register-dump.h | 157 ---- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 120 --- sysdeps/unix/sysv/linux/alpha/select.S | 241 ------ sysdeps/unix/sysv/linux/alpha/semctl.c | 136 ---- sysdeps/unix/sysv/linux/alpha/setcontext.S | 35 - sysdeps/unix/sysv/linux/alpha/setfpucw.c | 80 -- sysdeps/unix/sysv/linux/alpha/setitimer.S | 137 ---- sysdeps/unix/sysv/linux/alpha/setregid.c | 31 - sysdeps/unix/sysv/linux/alpha/setresgid.c | 33 - sysdeps/unix/sysv/linux/alpha/setresuid.c | 33 - sysdeps/unix/sysv/linux/alpha/setreuid.c | 31 - sysdeps/unix/sysv/linux/alpha/settimeofday.S | 118 --- sysdeps/unix/sysv/linux/alpha/shmctl.c | 135 ---- sysdeps/unix/sysv/linux/alpha/sigaction.c | 39 - sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h | 25 - sysdeps/unix/sysv/linux/alpha/sigprocmask.c | 58 -- sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 46 -- sysdeps/unix/sysv/linux/alpha/sizes.h | 24 - sysdeps/unix/sysv/linux/alpha/swapcontext.S | 51 -- sysdeps/unix/sysv/linux/alpha/sys/acct.h | 66 -- sysdeps/unix/sysv/linux/alpha/sys/epoll.h | 143 ---- sysdeps/unix/sysv/linux/alpha/sys/eventfd.h | 52 -- sysdeps/unix/sysv/linux/alpha/sys/inotify.h | 105 --- sysdeps/unix/sysv/linux/alpha/sys/io.h | 95 --- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 115 --- sysdeps/unix/sysv/linux/alpha/sys/signalfd.h | 66 -- sysdeps/unix/sysv/linux/alpha/sys/timerfd.h | 60 -- sysdeps/unix/sysv/linux/alpha/sys/ucontext.h | 61 -- sysdeps/unix/sysv/linux/alpha/sys/user.h | 50 -- sysdeps/unix/sysv/linux/alpha/syscall.S | 77 -- sysdeps/unix/sysv/linux/alpha/syscalls.list | 55 -- sysdeps/unix/sysv/linux/alpha/sysconf.c | 152 ---- sysdeps/unix/sysv/linux/alpha/sysdep.h | 101 --- sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym | 18 - sysdeps/unix/sysv/linux/alpha/utimes.S | 123 --- sysdeps/unix/sysv/linux/alpha/wait4.S | 156 ---- sysdeps/unix/sysv/linux/alpha/wordexp.c | 60 -- sysdeps/unix/sysv/linux/alpha/xstat.c | 64 -- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 123 --- sysdeps/unix/sysv/linux/alpha/xstatconv.h | 24 - sysdeps/unix/sysv/linux/bits/sched.h | 27 +- sysdeps/unix/sysv/linux/bits/socket.h | 2 +- sysdeps/unix/sysv/linux/i386/accept4.S | 183 +++++ sysdeps/unix/sysv/linux/i386/paccept.S | 135 ---- sysdeps/unix/sysv/linux/i386/socket.S | 4 +- sysdeps/unix/sysv/linux/ia64/wordexp.c | 61 +- sysdeps/unix/sysv/linux/kernel-features.h | 8 +- sysdeps/unix/sysv/linux/paccept.c | 54 -- sysdeps/unix/sysv/linux/powerpc/ipc_priv.h | 48 +- .../linux/powerpc/powerpc32/getcontext-common.S | 8 +- .../powerpc/powerpc32/power6/fpu/setcontext.S | 2 + .../powerpc/powerpc32/power6/fpu/swapcontext.S | 2 + .../linux/powerpc/powerpc32/setcontext-common.S | 50 +- .../linux/powerpc/powerpc32/swapcontext-common.S | 60 +- .../powerpc/powerpc64/power6/fpu/setcontext.S | 2 + .../powerpc/powerpc64/power6/fpu/swapcontext.S | 2 + .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 58 +- .../sysv/linux/powerpc/powerpc64/swapcontext.S | 58 +- sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c | 2 +- 130 files changed, 547 insertions(+), 9886 deletions(-) delete mode 100644 sysdeps/unix/alpha/Makefile delete mode 100644 sysdeps/unix/alpha/pipe.S delete mode 100644 sysdeps/unix/alpha/rt-sysdep.S delete mode 100644 sysdeps/unix/alpha/sysdep.S delete mode 100644 sysdeps/unix/alpha/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/accept4.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/Implies delete mode 100644 sysdeps/unix/sysv/linux/alpha/Makefile delete mode 100644 sysdeps/unix/sysv/linux/alpha/Versions delete mode 100644 sysdeps/unix/sysv/linux/alpha/a.out.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/adjtime.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/alpha/regdef.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies delete mode 100644 sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/a.out.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/dirent.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/elfclass.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/errno.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/fcntl.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/ioctls.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/ipc.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/mman.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/msq.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/netdb.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/resource.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sem.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/shm.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sigaction.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/siginfo.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/signum.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/sigstack.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/stat.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/statfs.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/typesizes.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/wordsize.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/brk.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/clone.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/dl-auxv.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/dl-brk.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/dl-support.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/dl-sysdep.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/fpu/Implies delete mode 100644 sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/fxstat.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/fxstatat.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/getclktck.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/getcontext.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/getdents.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/getdents64.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/gethostname.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/getitimer.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/getrusage.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/getsysstats.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/gettimeofday.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/glob.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/ioperm.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/ipc_priv.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_stat.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/kernel_termios.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/lxstat.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/makecontext.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/msgctl.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/nldbl-abi.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/oldglob.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/pipe.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/register-dump.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/rt_sigaction.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/select.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/semctl.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setcontext.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/setfpucw.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setitimer.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/settimeofday.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/shmctl.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigprocmask.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigsuspend.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/sizes.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/swapcontext.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/acct.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/epoll.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/eventfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/inotify.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/io.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/procfs.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/signalfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/timerfd.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/ucontext.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/sys/user.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/syscall.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/alpha/sysconf.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/sysdep.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym delete mode 100644 sysdeps/unix/sysv/linux/alpha/utimes.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/wait4.S delete mode 100644 sysdeps/unix/sysv/linux/alpha/wordexp.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/xstat.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/xstatconv.c delete mode 100644 sysdeps/unix/sysv/linux/alpha/xstatconv.h create mode 100644 sysdeps/unix/sysv/linux/i386/accept4.S delete mode 100644 sysdeps/unix/sysv/linux/i386/paccept.S delete mode 100644 sysdeps/unix/sysv/linux/paccept.c create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/swapcontext.S (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/alpha/Makefile b/sysdeps/unix/alpha/Makefile deleted file mode 100644 index 441aa02a83..0000000000 --- a/sysdeps/unix/alpha/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),rt) -librt-sysdep_routines += rt-sysdep -endif diff --git a/sysdeps/unix/alpha/pipe.S b/sysdeps/unix/alpha/pipe.S deleted file mode 100644 index 2da4d78abd..0000000000 --- a/sysdeps/unix/alpha/pipe.S +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger (davidm@cs.arizona.edu). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* __pipe is a special syscall since it returns two values. */ - -#include - -PSEUDO (__pipe, pipe, 0) - stl r0, 0(a0) - stl r1, 4(a0) - mov zero, v0 - ret -PSEUDO_END(__pipe) - -libc_hidden_def (__pipe) -weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/alpha/rt-sysdep.S b/sysdeps/unix/alpha/rt-sysdep.S deleted file mode 100644 index f966bf1e59..0000000000 --- a/sysdeps/unix/alpha/rt-sysdep.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S deleted file mode 100644 index c67a6542f6..0000000000 --- a/sysdeps/unix/alpha/sysdep.S +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -#if defined(__ELF__) && defined(PIC) - /* Put this at the end of libc's text segment so that all of - the direct branches from the syscalls are forward, and - thus predicted not taken. */ - .section .text.last, "ax", @progbits -#else - .text -#endif - -#ifdef PIC - /* When building a shared library, we branch here without - having loaded the GP. Nor, since it was a direct branch, - have we loaded PV with our address. Do both. */ -# define LOADGP br pv, 1f; 1: ldgp gp, 0(pv) -# define PROLOGUE .prologue 0 -# define EPILOGUE -#else - /* When building the static library, we tail call here from - elsewhere, which might use a different GP. The entertaining - part is that we have to return with the GP of our caller - in place, so that linker relaxation works properly. */ - /* ??? This is so ugly. Consider always putting the errno - setting code with the syscall in the static case. */ -# define GPSAVEREG t10 -# define LOADGP ldah t11, 0(pv) !gpdisp!1; \ - br 1f; \ - .subsection 2; \ - 1: mov gp, GPSAVEREG; \ - lda gp, 0(t11) !gpdisp!1; \ - br 2f; \ - .previous; \ - mov gp, GPSAVEREG; \ - 2: -# define PROLOGUE .prologue 1 -# define EPILOGUE mov GPSAVEREG, gp -#endif - - .align 4 - .globl __syscall_error - .ent __syscall_error -__syscall_error: - -#if defined(_LIBC_REENTRANT) && USE___THREAD - -#ifndef NOT_IN_libc -# define SYSCALL_ERROR_ERRNO __libc_errno -#else -# define SYSCALL_ERROR_ERRNO errno -#endif - - LOADGP - PROLOGUE - mov v0, t0 - call_pal PAL_rduniq - ldq t1, SYSCALL_ERROR_ERRNO(gp) !gottprel - addq v0, t1, v0 - stl t0, 0(v0) - lda v0, -1 - EPILOGUE - ret - -#elif defined(_LIBC_REENTRANT) - - LOADGP - lda sp, -32(sp) - .frame sp, 32, ra, 0 - stq ra, 0(sp) - stq v0, 8(sp) -#ifdef GPSAVEREG - stq GPSAVEREG, 16(sp) -#endif - .mask 0x4000001, -32 - PROLOGUE - - /* Find our per-thread errno address */ -#if defined PIC && !defined IS_IN_librt - bsr ra, __errno_location !samegp -#else - jsr ra, __errno_location -#ifndef GPSAVEREG - ldgp gp, 0(ra) -#endif -#endif - - /* Store the error value. */ - ldq t0, 8(sp) - stl t0, 0(v0) - - /* And kick back a -1. */ - ldi v0, -1 - -#ifdef GPSAVEREG - ldq GPSAVEREG, 16(sp) -#endif - ldq ra, 0(sp) - lda sp, 32(sp) - EPILOGUE - ret - -#else - - LOADGP - PROLOGUE - stl v0, errno - lda v0, -1 - EPILOGUE - ret - -#endif - - .subsection 3 - .end __syscall_error diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h deleted file mode 100644 index 2e5bc798eb..0000000000 --- a/sysdeps/unix/alpha/sysdep.h +++ /dev/null @@ -1,438 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe (brendan@zen.org). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#ifdef __ASSEMBLER__ - -#ifdef __linux__ -# include -#else -# include -#endif - -#include /* Defines USE___THREAD. */ - -#ifdef IS_IN_rtld -# include /* Defines RTLD_PRIVATE_ERRNO. */ -#endif - - -#ifdef __STDC__ -#define __LABEL(x) x##: -#else -#define __LABEL(x) x/**/: -#endif - -#define LEAF(name, framesize) \ - .globl name; \ - .align 4; \ - .ent name, 0; \ - __LABEL(name) \ - .frame sp, framesize, ra - -#define ENTRY(name) \ - .globl name; \ - .align 4; \ - .ent name, 0; \ - __LABEL(name) \ - .frame sp, 0, ra - -/* Mark the end of function SYM. */ -#undef END -#define END(sym) .end sym - -#ifdef PROF -# define PSEUDO_PROLOGUE \ - .frame sp, 0, ra; \ - ldgp gp,0(pv); \ - .set noat; \ - lda AT,_mcount; \ - jsr AT,(AT),_mcount; \ - .set at; \ - .prologue 1 -#elif defined PIC -# define PSEUDO_PROLOGUE \ - .frame sp, 0, ra; \ - .prologue 0 -#else -# define PSEUDO_PROLOGUE \ - .frame sp, 0, ra; \ - ldgp gp,0(pv); \ - .prologue 1 -#endif /* PROF */ - -#if RTLD_PRIVATE_ERRNO -# define SYSCALL_ERROR_LABEL $syscall_error -# define SYSCALL_ERROR_HANDLER \ - stl v0, rtld_errno(gp) !gprel; \ - lda v0, -1; \ - ret -#elif defined(PIC) -# define SYSCALL_ERROR_LABEL __syscall_error -# define SYSCALL_ERROR_HANDLER \ - br $31, __syscall_error !samegp -#else -# define SYSCALL_ERROR_LABEL $syscall_error -# define SYSCALL_ERROR_HANDLER \ - jmp $31, __syscall_error -#endif /* RTLD_PRIVATE_ERRNO */ - -/* Overridden by specific syscalls. */ -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS /* Nothing. */ - -#define PSEUDO(name, syscall_name, args) \ - .globl name; \ - .align 4; \ - .ent name,0; \ -__LABEL(name) \ - PSEUDO_PROLOGUE; \ - PSEUDO_PREPARE_ARGS \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; \ - bne a3, SYSCALL_ERROR_LABEL - -#undef PSEUDO_END -#if defined(PIC) && !RTLD_PRIVATE_ERRNO -# define PSEUDO_END(sym) END(sym) -#else -# define PSEUDO_END(sym) \ -$syscall_error: \ - SYSCALL_ERROR_HANDLER; \ - END(sym) -#endif - -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - .globl name; \ - .align 4; \ - .ent name,0; \ -__LABEL(name) \ - PSEUDO_PROLOGUE; \ - PSEUDO_PREPARE_ARGS \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; - -#undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(sym) END(sym) - -#define ret_NOERRNO ret - -#define PSEUDO_ERRVAL(name, syscall_name, args) \ - .globl name; \ - .align 4; \ - .ent name,0; \ -__LABEL(name) \ - PSEUDO_PROLOGUE; \ - PSEUDO_PREPARE_ARGS \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; - -#undef PSEUDO_END_ERRVAL -#define PSEUDO_END_ERRVAL(sym) END(sym) - -#define ret_ERRVAL ret - -#define r0 v0 -#define r1 a4 - -#define MOVE(x,y) mov x,y - -#else /* !ASSEMBLER */ - -/* ??? Linux needs to be able to override INLINE_SYSCALL for one - particular special case. Make this easy. */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - INLINE_SYSCALL1(name, nr, args) - -#define INLINE_SYSCALL1(name, nr, args...) \ -({ \ - long _sc_ret, _sc_err; \ - inline_syscall##nr(__NR_##name, args); \ - if (__builtin_expect (_sc_err, 0)) \ - { \ - __set_errno (_sc_ret); \ - _sc_ret = -1L; \ - } \ - _sc_ret; \ -}) - -#define INTERNAL_SYSCALL(name, err_out, nr, args...) \ - INTERNAL_SYSCALL1(name, err_out, nr, args) - -#define INTERNAL_SYSCALL1(name, err_out, nr, args...) \ - INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args) - -#define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \ -({ \ - long _sc_ret, _sc_err; \ - inline_syscall##nr(name, args); \ - err_out = _sc_err; \ - _sc_ret; \ -}) - -#define INTERNAL_SYSCALL_DECL(err) long int err -#define INTERNAL_SYSCALL_ERROR_P(val, err) err -#define INTERNAL_SYSCALL_ERRNO(val, err) val - -#define inline_syscall_clobbers \ - "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$22", "$23", "$24", "$25", "$27", "$28", "memory" - -/* If TLS is in use, we have a conflict between the PAL_rduniq primitive, - as modeled within GCC, and explicit use of the R0 register. If we use - the register via the asm, the scheduler may place the PAL_rduniq insn - before we've copied the data from R0 into _sc_ret. If this happens - we'll get a reload abort, since R0 is live at the same time it is - needed for the PAL_rduniq. - - Solve this by using the "v" constraint instead of an asm for the syscall - output. We don't do this unconditionally to allow compilation with - older compilers. */ - -#ifdef HAVE___THREAD -#define inline_syscall_r0_asm -#define inline_syscall_r0_out_constraint "=v" -#else -#define inline_syscall_r0_asm __asm__("$0") -#define inline_syscall_r0_out_constraint "=r" -#endif - -/* It is moderately important optimization-wise to limit the lifetime - of the hard-register variables as much as possible. Thus we copy - in/out as close to the asm as possible. */ - -#define inline_syscall0(name, args...) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_19 __asm__("$19"); \ - \ - _sc_0 = name; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19) \ - : "0"(_sc_0) \ - : inline_syscall_clobbers, \ - "$16", "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall1(name,arg1) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16) \ - : "0"(_sc_0), "2"(_sc_16) \ - : inline_syscall_clobbers, \ - "$17", "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall2(name,arg1,arg2) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ - : inline_syscall_clobbers, \ - "$18", "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall3(name,arg1,arg2,arg3) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall4(name,arg1,arg2,arg3,arg4) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19) \ - : inline_syscall_clobbers, "$20", "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - register long _tmp_20 = (long) (arg5); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ - _sc_20 = _tmp_20; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ - "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \ - : inline_syscall_clobbers, "$21"); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \ -{ \ - register long _sc_0 inline_syscall_r0_asm; \ - register long _sc_16 __asm__("$16"); \ - register long _sc_17 __asm__("$17"); \ - register long _sc_18 __asm__("$18"); \ - register long _sc_19 __asm__("$19"); \ - register long _sc_20 __asm__("$20"); \ - register long _sc_21 __asm__("$21"); \ - register long _tmp_16 = (long) (arg1); \ - register long _tmp_17 = (long) (arg2); \ - register long _tmp_18 = (long) (arg3); \ - register long _tmp_19 = (long) (arg4); \ - register long _tmp_20 = (long) (arg5); \ - register long _tmp_21 = (long) (arg6); \ - \ - _sc_0 = name; \ - _sc_16 = _tmp_16; \ - _sc_17 = _tmp_17; \ - _sc_18 = _tmp_18; \ - _sc_19 = _tmp_19; \ - _sc_20 = _tmp_20; \ - _sc_21 = _tmp_21; \ - __asm__ __volatile__ \ - ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \ - : inline_syscall_r0_out_constraint (_sc_0), \ - "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ - "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \ - : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \ - "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \ - : inline_syscall_clobbers); \ - _sc_ret = _sc_0, _sc_err = _sc_19; \ -} - -/* Pointer mangling support. Note that tls access is slow enough that - we don't deoptimize things by placing the pointer check value there. */ - -#include - -#if defined NOT_IN_libc && defined IS_IN_rtld -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, tmp) \ - ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ - ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ - xor src, tmp, dst -# define PTR_MANGLE2(dst, src, tmp) \ - xor src, tmp, dst -# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -# else -extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; -# define PTR_MANGLE(var) \ - (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) -# define PTR_DEMANGLE(var) PTR_MANGLE(var) -# endif -#elif defined PIC -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, tmp) \ - ldq tmp, __pointer_chk_guard; \ - xor src, tmp, dst -# define PTR_MANGLE2(dst, src, tmp) \ - xor src, tmp, dst -# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -# else -extern uintptr_t __pointer_chk_guard attribute_relro; -# define PTR_MANGLE(var) \ - (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) -# define PTR_DEMANGLE(var) PTR_MANGLE(var) -# endif -#endif - -#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/sysv/linux/accept4.c b/sysdeps/unix/sysv/linux/accept4.c new file mode 100644 index 0000000000..97f7b8ce62 --- /dev/null +++ b/sysdeps/unix/sysv/linux/accept4.c @@ -0,0 +1,54 @@ +/* Copyright (C) 2008 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2008. + + 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +#include +#include + +#define __NR_accept4 288 + + +#ifdef __NR_accept4 +int +accept4 (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, int flags) +{ + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (accept4, 4, fd, addr.__sockaddr__, addr_len, flags); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (accept4, 4, fd, addr.__sockaddr__, addr_len, + flags); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +#else +int +accept4 (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, int flags) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (accept4) +#endif diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/sysdeps/unix/sysv/linux/alpha/Implies deleted file mode 100644 index 1616efecbe..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/Implies +++ /dev/null @@ -1,4 +0,0 @@ -unix/sysv/linux/wordsize-64 -# These supply the ABI compatibility for when long double was double. -ieee754/ldbl-64-128 -ieee754/ldbl-opt diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile deleted file mode 100644 index f64f23fd7a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -ifeq ($(subdir),posix) -sysdep_routines += oldglob -endif - -ifeq ($(subdir),stdlib) -gen-as-const-headers += ucontext-offsets.sym -endif - -ifeq ($(subdir),misc) -sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h - -sysdep_routines += ieee_get_fp_control ieee_set_fp_control \ - ioperm llseek - -# Support old timeval32 entry points -sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \ - osf_getitimer osf_setitimer osf_utimes \ - osf_getrusage osf_wait4 - -# Support old ipc control -sysdep_routines += oldmsgctl oldsemctl oldshmctl - -CFLAGS-ioperm.c = -Wa,-mev6 -endif - -ifeq ($(subdir),signal) -sysdep_routines += rt_sigaction -endif - -ifeq ($(subdir),math) -# These 2 routines are normally in libgcc{.a,_s.so.1}. -# However, alpha -mlong-double-128 libgcc relies on -# glibc providing _Ots* routines and without these files -# glibc relies on __multc3/__divtc3 only provided -# by libgcc if configured with -mlong-double-128. -# Provide these routines here as well. -libm-routines += multc3 divtc3 -endif # math diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions deleted file mode 100644 index 8709dd2a38..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/Versions +++ /dev/null @@ -1,94 +0,0 @@ -libc { - # The comment lines with "#errlist-compat" are magic; see - # sysdeps/gnu/errlist-compat.awk. - # When you get an error from errlist-compat.awk, you need to add a new - # version here. Don't do this blindly, since this means changing the ABI - # for all GNU/Linux configurations. - - GLIBC_2.0 { - #errlist-compat 131 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - - # Unfortunately in wider use. - _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse; - _hae_shift; - - # Exception handling support functions from libgcc - __register_frame; __register_frame_table; __deregister_frame; - __frame_state_for; __register_frame_info_table; - - # b* - bus_base; bus_base_sparse; - - # h* - hae_shift; - - # i* - inb; inl; inw; ioperm; iopl; - - # o* - outb; outl; outw; - - # p* - pciconfig_read; pciconfig_write; sethae; - } - GLIBC_2.1 { - #errlist-compat 131 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - - # Linux/Alpha 64-bit timeval functions. - __select; select; - adjtime; adjtimex; __adjtimex; - __gettimeofday; - - # glob interface change - glob; globfree; - - # limit type change - getrusage; - - # time type change - gettimeofday; getitimer; - - # i* - ieee_get_fp_control; ieee_set_fp_control; - - # s* - setitimer; settimeofday; - - # u* - utimes; - - # w* - wait4; - } - GLIBC_2.1.4 { - pciconfig_iobase; - } - GLIBC_2.2.2 { - # w* - wordexp; - } - GLIBC_2.3 { - #errlist-compat 132 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } - GLIBC_2.4 { - #errlist-compat 138 - _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; - } - GLIBC_PRIVATE { - __libc_alpha_cache_shape; - } -} -ld { - GLIBC_PRIVATE { - __libc_alpha_cache_shape; - } -} -librt { - GLIBC_2.3 { - # AIO functions. - aio_cancel; aio_cancel64; - } -} diff --git a/sysdeps/unix/sysv/linux/alpha/a.out.h b/sysdeps/unix/sysv/linux/alpha/a.out.h deleted file mode 100644 index a7699f0fe0..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/a.out.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __A_OUT_GNU_H__ -#define __A_OUT_GNU_H__ - -#include - -#define __GNU_EXEC_MACROS__ - -/* - * OSF/1 ECOFF header structs. ECOFF files consist of: - * - a file header (struct filehdr), - * - an a.out header (struct aouthdr), - * - one or more section headers (struct scnhdr). - * The filhdr's "f_nscns" field contains the - * number of section headers. - */ - -struct filehdr -{ - /* OSF/1 "file" header */ - unsigned short f_magic, f_nscns; - unsigned int f_timdat; - unsigned long f_symptr; - unsigned int f_nsyms; - unsigned short f_opthdr, f_flags; -}; - -struct aouthdr -{ - unsigned long info; /* After that it looks quite normal.. */ - unsigned long tsize; - unsigned long dsize; - unsigned long bsize; - unsigned long entry; - unsigned long text_start; /* With a few additions that actually make sense. */ - unsigned long data_start; - unsigned long bss_start; - unsigned int gprmask, fprmask; /* Bitmask of general & floating point regs used in binary. */ - unsigned long gpvalue; -}; - -struct scnhdr -{ - char s_name[8]; - unsigned long s_paddr; - unsigned long s_vaddr; - unsigned long s_size; - unsigned long s_scnptr; - unsigned long s_relptr; - unsigned long s_lnnoptr; - unsigned short s_nreloc; - unsigned short s_nlnno; - unsigned int s_flags; -}; - -struct exec -{ - /* OSF/1 "file" header */ - struct filehdr fh; - struct aouthdr ah; -}; - -#define a_info ah.info -#define a_text ah.tsize -#define a_data ah.dsize -#define a_bss ah.bsize -#define a_entry ah.entry -#define a_textstart ah.text_start -#define a_datastart ah.data_start -#define a_bssstart ah.bss_start -#define a_gprmask ah.gprmask -#define a_fprmask ah.fprmask -#define a_gpvalue ah.gpvalue - - -#define AOUTHSZ sizeof(struct aouthdr) -#define SCNHSZ sizeof(struct scnhdr) -#define SCNROUND 16 - -enum machine_type -{ - M_OLDSUN2 = 0, - M_68010 = 1, - M_68020 = 2, - M_SPARC = 3, - M_386 = 100, - M_MIPS1 = 151, - M_MIPS2 = 152 -}; - -#define N_MAGIC(exec) ((exec).a_info & 0xffff) -#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) -#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) -#define N_SET_INFO(exec, magic, type, flags) \ - ((exec).a_info = ((magic) & 0xffff) \ - | (((int)(type) & 0xff) << 16) \ - | (((flags) & 0xff) << 24)) -#define N_SET_MAGIC(exec, magic) \ - ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) -#define N_SET_MACHTYPE(exec, machtype) \ - ((exec).a_info = \ - ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) -#define N_SET_FLAGS(exec, flags) \ - ((exec).a_info = \ - ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) - -/* Code indicating object file or impure executable. */ -#define OMAGIC 0407 -/* Code indicating pure executable. */ -#define NMAGIC 0410 -/* Code indicating demand-paged executable. */ -#define ZMAGIC 0413 -/* This indicates a demand-paged executable with the header in the text. - The first page is unmapped to help trap NULL pointer references. */ -#define QMAGIC 0314 -/* Code indicating core file. */ -#define CMAGIC 0421 - -#define N_TRSIZE(x) 0 -#define N_DRSIZE(x) 0 -#define N_SYMSIZE(x) 0 -#define N_BADMAG(x) \ - (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ - && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) -#define _N_HDROFF(x) (1024 - sizeof (struct exec)) -#define N_TXTOFF(x) \ - ((long) N_MAGIC(x) == ZMAGIC ? 0 : \ - (sizeof (struct exec) + (x).fh.f_nscns * SCNHSZ + SCNROUND - 1) \ - & ~(SCNROUND - 1)) - -#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) -#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) -#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) -#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x)) -#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) - -/* Address of text segment in memory after it is loaded. */ -#define N_TXTADDR(x) ((x).a_textstart) - -/* Address of data segment in memory after it is loaded. */ -#define SEGMENT_SIZE 1024 - -#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) -#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) - -#define N_DATADDR(x) ((x).a_datastart) -#define N_BSSADDR(x) ((x).a_bssstart) - -#if !defined (N_NLIST_DECLARED) -struct nlist -{ - union - { - char *n_name; - struct nlist *n_next; - long n_strx; - } n_un; - unsigned char n_type; - char n_other; - short n_desc; - unsigned long n_value; -}; -#endif /* no N_NLIST_DECLARED. */ - -#define N_UNDF 0 -#define N_ABS 2 -#define N_TEXT 4 -#define N_DATA 6 -#define N_BSS 8 -#define N_FN 15 -#define N_EXT 1 -#define N_TYPE 036 -#define N_STAB 0340 -#define N_INDR 0xa -#define N_SETA 0x14 /* Absolute set element symbol. */ -#define N_SETT 0x16 /* Text set element symbol. */ -#define N_SETD 0x18 /* Data set element symbol. */ -#define N_SETB 0x1A /* Bss set element symbol. */ -#define N_SETV 0x1C /* Pointer to set vector in data area. */ - -#if !defined (N_RELOCATION_INFO_DECLARED) -/* This structure describes a single relocation to be performed. - The text-relocation section of the file is a vector of these structures, - all of which apply to the text section. - Likewise, the data-relocation section applies to the data section. */ - -struct relocation_info -{ - int r_address; - unsigned int r_symbolnum:24; - unsigned int r_pcrel:1; - unsigned int r_length:2; - unsigned int r_extern:1; - unsigned int r_pad:4; -}; -#endif /* no N_RELOCATION_INFO_DECLARED. */ - -#endif /* __A_OUT_GNU_H__ */ diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c deleted file mode 100644 index 1700524d34..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/adjtime.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Copyright (C) 1998,2000,2002,2003,2004,2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include - -#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -struct timeval32 -{ - int tv_sec, tv_usec; -}; - -struct timex32 { - unsigned int modes; /* mode selector */ - long offset; /* time offset (usec) */ - long freq; /* frequency offset (scaled ppm) */ - long maxerror; /* maximum error (usec) */ - long esterror; /* estimated error (usec) */ - int status; /* clock command/status */ - long constant; /* pll time constant */ - long precision; /* clock precision (usec) (read only) */ - long tolerance; /* clock frequency tolerance (ppm) - * (read only) - */ - struct timeval32 time; /* (read only) */ - long tick; /* (modified) usecs between clock ticks */ - - long ppsfreq; /* pps frequency (scaled ppm) (ro) */ - long jitter; /* pps jitter (us) (ro) */ - int shift; /* interval duration (s) (shift) (ro) */ - long stabil; /* pps stability (scaled ppm) (ro) */ - long jitcnt; /* jitter limit exceeded (ro) */ - long calcnt; /* calibration intervals (ro) */ - long errcnt; /* calibration errors (ro) */ - long stbcnt; /* stability limit exceeded (ro) */ - - int :32; int :32; int :32; int :32; - int :32; int :32; int :32; int :32; - int :32; int :32; int :32; int :32; -}; - -#define TIMEVAL timeval32 -#define TIMEX timex32 -#define ADJTIME attribute_compat_text_section __adjtime_tv32 -#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x) -#define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x) -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -#define LINKAGE -#else -#define LINKAGE static -#endif - -LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv); - -#include - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -int -attribute_compat_text_section -__adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); } -strong_alias (__adjtimex_tv32, __adjtimex_tv32_1); -strong_alias (__adjtimex_tv32, __adjtimex_tv32_2); -compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0); -compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0); -compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0); -#endif -#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */ - -#undef TIMEVAL -#define TIMEVAL timeval -#undef TIMEX -#define TIMEX timex -#undef ADJTIMEX -#define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x) - -#undef LINKAGE -#undef ADJTIME -#if !defined __ASSUME_TIMEVAL64 -#define LINKAGE static -#define ADJTIME __adjtime_tv64 -#endif - -#include -#include - -#if !defined __ASSUME_TIMEVAL64 -static bool missing_adjtimex; - -int -__adjtime (itv, otv) - const struct timeval *itv; - struct timeval *otv; -{ - struct timeval32 itv32, otv32; - int ret; - - switch (missing_adjtimex) - { - case false: - ret = __adjtime_tv64 (itv, otv); - if (ret && errno == ENOSYS) - missing_adjtimex = 1; - else - break; - - /* FALLTHRU */ - - default: - itv32.tv_sec = itv->tv_sec; - itv32.tv_usec = itv->tv_usec; - ret = __adjtime_tv32 (&itv32, &otv32); - if (ret == 0) - { - otv->tv_sec = otv32.tv_sec; - otv->tv_usec = otv32.tv_usec; - } - break; - } - - return ret; -} -#endif - -versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1); - -int -__adjtimex_tv64 (struct timex *tx) -{ -#if defined __ASSUME_TIMEVAL64 - return ADJTIMEX (tx); -#else - struct timex32 tx32; - int ret; - - switch (missing_adjtimex) - { - case false: - ret = ADJTIMEX (tx); - if (ret && errno == ENOSYS) - missing_adjtimex = 1; - else - break; - - /* FALLTHRU */ - - default: - tx32.modes = tx->modes; - tx32.offset = tx->offset; - tx32.freq = tx->freq; - tx32.maxerror = tx->maxerror; - tx32.esterror = tx->esterror; - tx32.status = tx->status; - tx32.constant = tx->constant; - tx32.precision = tx->precision; - tx32.tolerance = tx->tolerance; - tx32.time.tv_sec = tx->time.tv_sec; - tx32.time.tv_sec = tx->time.tv_usec; - tx32.tick = tx->tick; - tx32.ppsfreq = tx->ppsfreq; - tx32.jitter = tx->jitter; - tx32.shift = tx->shift; - tx32.stabil = tx->stabil; - tx32.jitcnt = tx->jitcnt; - tx32.calcnt = tx->calcnt; - tx32.errcnt = tx->errcnt; - tx32.stbcnt = tx->stbcnt; - - ret = ADJTIMEX32 (&tx32); - if (ret == 0) - { - tx->modes = tx32.modes; - tx->offset = tx32.offset; - tx->freq = tx32.freq; - tx->maxerror = tx32.maxerror; - tx->esterror = tx32.esterror; - tx->status = tx32.status; - tx->constant = tx32.constant; - tx->precision = tx32.precision; - tx->tolerance = tx32.tolerance; - tx->time.tv_sec = tx32.time.tv_sec; - tx->time.tv_usec = tx32.time.tv_sec; - tx->tick = tx32.tick; - tx->ppsfreq = tx32.ppsfreq; - tx->jitter = tx32.jitter; - tx->shift = tx32.shift; - tx->stabil = tx32.stabil; - tx->jitcnt = tx32.jitcnt; - tx->calcnt = tx32.calcnt; - tx->errcnt = tx32.errcnt; - tx->stbcnt = tx32.stbcnt; - } - break; - } - - return ret; -#endif -} - -strong_alias (__adjtimex_tv64, __adjtimex_internal); -strong_alias (__adjtimex_tv64, __adjtimex_tv64p); -weak_alias (__adjtimex_tv64, ntp_adjtime); -versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1); -versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h b/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h deleted file mode 100644 index 57b96d64db..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __alpha_ptrace_h__ -#define __alpha_ptrace_h__ - -/* - * Mostly for OSF/1 compatibility. - */ - -#define REG_BASE 0 -#define NGP_REGS 32 -#define NFP_REGS 32 - -#define GPR_BASE REG_BASE -#define FPR_BASE (GPR_BASE+NGP_REGS) -#define PC (FPR_BASE+NFP_REGS) -#define SPR_PS (PC+1) -#define NPTRC_REGS (SPR_PS+1) - -#endif /* __alpha_ptrace_h__ */ diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h b/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h deleted file mode 100644 index 142df9c4f8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __alpha_regdef_h__ -#define __alpha_regdef_h__ - -#define v0 $0 /* function return value */ - -#define t0 $1 /* temporary registers (caller-saved) */ -#define t1 $2 -#define t2 $3 -#define t3 $4 -#define t4 $5 -#define t5 $6 -#define t6 $7 -#define t7 $8 - -#define s0 $9 /* saved-registers (callee-saved registers) */ -#define s1 $10 -#define s2 $11 -#define s3 $12 -#define s4 $13 -#define s5 $14 -#define s6 $15 -#define fp s6 /* frame-pointer (s6 in frame-less procedures) */ - -#define a0 $16 /* argument registers (caller-saved) */ -#define a1 $17 -#define a2 $18 -#define a3 $19 -#define a4 $20 -#define a5 $21 - -#define t8 $22 /* more temps (caller-saved) */ -#define t9 $23 -#define t10 $24 -#define t11 $25 -#define ra $26 /* return address register */ -#define t12 $27 - -#define pv t12 /* procedure-variable register */ -#define AT $at /* assembler temporary */ -#define gp $29 /* global pointer */ -#define sp $30 /* stack pointer */ -#define zero $31 /* reads as zero, writes are noops */ - -#endif /* __alpha_regdef_h__ */ diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies deleted file mode 100644 index 0d7000dc2d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Override ldbl-opt with alpha specific routines. -alpha/alphaev6/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies deleted file mode 100644 index 617c388d2d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Override ldbl-opt with alpha specific routines. -alpha/alphaev67/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/bits/a.out.h b/sysdeps/unix/sysv/linux/alpha/bits/a.out.h deleted file mode 100644 index 82a3dd4c0d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/a.out.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __A_OUT_GNU_H__ -# error "Never use directly; include instead." -#endif -#ifndef __A_OUT_GNU_H__ -# error "Never use directly; include instead." -#endif -#ifndef __A_OUT_GNU_H__ -# error "Never use directly; include instead." -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h deleted file mode 100644 index 6ed74783ad..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 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 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _BITS_DIRENT_H -#define _BITS_DIRENT_H 1 - -struct dirent - { -#ifdef __USE_FILE_OFFSET64 - __ino64_t d_ino; -#else - __ino_t d_ino; - int __pad; -#endif - __off_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -/* Note dirent64 is the same as dirent. */ -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#define _DIRENT_HAVE_D_TYPE - -#endif /* bits/dirent.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h b/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h deleted file mode 100644 index e5aa4a0fbd..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use directly; include instead." -#endif - -#include - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* Linux/Alpha is exceptional as it has .hash section with 64 bit entries. */ -typedef uint64_t Elf_Symndx; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h deleted file mode 100644 index 8b2f152a1c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/errno.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Error constants. Linux/Alpha specific version. - Copyright (C) 1996,1997,1998,1999,2002,2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -# ifndef ECANCELED -# define ECANCELED 131 -# endif - -/* Support for error codes to support robust mutexes was added later, too. */ -# ifndef EOWNERDEAD -# define EOWNERDEAD 136 -# define ENOTRECOVERABLE 137 -# endif - -# ifndef __ASSEMBLER__ -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 116 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h deleted file mode 100644 index 710bace21f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ /dev/null @@ -1,232 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-2000,2004,2005,2006,2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FCNTL_H -# error "Never use directly; include instead." -#endif - -#include -#ifdef __USE_GNU -# include -#endif - - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 01000 /* not fcntl */ -#define O_TRUNC 02000 /* not fcntl */ -#define O_EXCL 04000 /* not fcntl */ -#define O_NOCTTY 010000 /* not fcntl */ - -#define O_NONBLOCK 00004 -#define O_APPEND 00010 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 040000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 /* fcntl, for BSD compatibility */ - -#ifdef __USE_GNU -# define O_DIRECTORY 0100000 /* Must be a directory. */ -# define O_NOFOLLOW 0200000 /* Do not follow links. */ -# define O_DIRECT 02000000 /* Direct disk access. */ -# define O_NOATIME 04000000 /* Do not set atime. */ -# define O_CLOEXEC 010000000 /* Set close_on_exec. */ -#endif - -#ifdef __USE_LARGEFILE64 -/* Not necessary, files are always with 64bit off_t. */ -# define O_LARGEFILE 0 -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 7 /* Get record locking info. */ -#define F_SETLK 8 /* Set record locking info (non-blocking). */ -#define F_SETLKW 9 /* Set record locking info (blocking). */ -#define F_GETLK64 F_GETLK /* Get record locking info. */ -#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ -#define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_UNIX98 -# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# define F_SETLEASE 1024 /* Set a lease. */ -# define F_GETLEASE 1025 /* Enquire what lease is active. */ -# define F_NOTIFY 1026 /* Request notfications on a directory. */ -# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with - close-on-exit set. */ -#endif - -/* for F_[GET|SET]FD */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */ -#define F_RDLCK 1 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 8 /* Remove lock. */ - -/* for old implementation of bsd flock () */ -#define F_EXLCK 16 /* or 3 */ -#define F_SHLCK 32 /* or 4 */ - -/* Operations for bsd flock(), also used by the kernel implementation */ -#ifdef __USE_BSD -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -/* We don't need to support __USE_FILE_OFFSET64. */ -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif - - -#ifdef __USE_GNU -/* Flags for SYNC_FILE_RANGE. */ -# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages - in the range before performing the - write. */ -# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those - dirty pages in the range which are - not presently under writeback. */ -# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in - the range after performing the - write. */ - -/* Flags for SPLICE and VMSPLICE. */ -# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ -# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing - (but we may still block on the fd - we splice from/to). */ -# define SPLICE_F_MORE 4 /* Expect more data. */ -# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ -#endif - -__BEGIN_DECLS - -#ifdef __USE_GNU - -/* Provide kernel hint to read ahead. */ -extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) - __THROW; - - -/* Selective file content synch'ing. */ -extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, - unsigned int __flags); - - -/* Splice address range into a pipe. */ -extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, - size_t __count, unsigned int __flags); - -/* Splice two files together. */ -extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, - unsigned int __flags); - -/* In-kernel implementation of tee for pipe buffers. */ -extern ssize_t tee (int __fdin, int __fdout, size_t __len, - unsigned int __flags); - -#endif - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h deleted file mode 100644 index c525046e5c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 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 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IOCTL_H -# error "Never use directly; include instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include - -/* Oh well, this is necessary since the kernel data structure is - different from the user-level version. */ -#undef TCGETS -#undef TCSETS -#undef TCSETSW -#undef TCSETSF -#define TCGETS _IOR ('t', 19, char[44]) -#define TCSETS _IOW ('t', 20, char[44]) -#define TCSETSW _IOW ('t', 21, char[44]) -#define TCSETSF _IOW ('t', 22, char[44]) - -#include diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h deleted file mode 100644 index 77f3c938d4..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IPC_H -# error "Never use directly; include instead." -#endif - -#include - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __unused1; - unsigned long int __unused2; - }; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h deleted file mode 100644 index 2f0e564916..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ /dev/null @@ -1,118 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/Alpha version. - Copyright (C) 1997, 1998, 2000, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use directly; include instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x100 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x10 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* Not used by Linux, but here to make sure we don't clash with - OSF/1 defines. */ -#if 0 && defined __USE_BSD -# define MAP_HASSEMAPHORE 0x0200 -# define MAP_INHERIT 0x0400 -# define MAP_UNALIGNED 0x0800 -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x02000 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x08000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ -# define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x40000 /* Do not block on IO. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 2 /* Synchronous memory sync. */ -#define MS_INVALIDATE 4 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 8192 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 16384 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 6 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 6 /* Don't need these pages. */ -#endif - -/* Not used by Linux, but here to make sure we don't clash with - OSF/1 defines. */ -#if 0 && defined __USE_BSD -# define MADV_DONTNEED_COMPAT 4 /* Old version? */ -# define MADV_SPACEAVAIL 5 /* Ensure resources are available. */ -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h deleted file mode 100644 index ab251eaf76..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused1; - unsigned long int __unused2; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h deleted file mode 100644 index e3664fd292..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _NETDB_H -# error "Never include directly; use instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - /* XXX We should probably use uint32_t for the field and ensure - compatiblity by adding appropriate padding. */ - unsigned long int n_net; /* Network number. */ -}; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h deleted file mode 100644 index 92d0199dcd..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h +++ /dev/null @@ -1,233 +0,0 @@ -/* Bit values & structures for resource limits. Alpha/Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_RESOURCE_H -# error "Never use directly; include instead." -#endif - -#include - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - __RLIMIT_RSS = 5, -#define RLIMIT_RSS __RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 6, - __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE __RLIMIT_OFILE - - /* Address space limit (?) */ - RLIMIT_AS = 7, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - __RLIMIT_NPROC = 8, -#define RLIMIT_NPROC __RLIMIT_NPROC - - /* Locked-in-memory address space. */ - __RLIMIT_MEMLOCK = 9, -#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK - - /* Maximum number of file locks. */ - __RLIMIT_LOCKS = 10, -#define RLIMIT_LOCKS __RLIMIT_LOCKS - - /* Maximum number of pending signals. */ - __RLIMIT_SIGPENDING = 11, -#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING - - /* Maximum bytes in POSIX message queues. */ - __RLIMIT_MSGQUEUE = 12, -#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE - - /* Maximum nice priority allowed to raise to. - Nice levels 19 .. -20 correspond to 0 .. 39 - values of this resource limit. */ - __RLIMIT_NICE = 13, -#define RLIMIT_NICE __RLIMIT_NICE - - /* Maximum realtime priority allowed for non-priviledged - processes. */ - __RLIMIT_RTPRIO = 14, -#define RLIMIT_RTPRIO __RLIMIT_RTPRIO - - __RLIMIT_NLIMITS = 15, - __RLIM_NLIMITS = __RLIMIT_NLIMITS -#define RLIMIT_NLIMITS __RLIMIT_NLIMITS -#define RLIM_NLIMITS __RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((long int)(~0UL >> 1)) -#else -# define RLIM_INFINITY 0x7fffffffffffffffLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - -#ifdef __USE_GNU - /* The calling thread. */ - RUSAGE_THREAD = 1 -# define RUSAGE_THREAD RUSAGE_THREAD - /* Name for the same functionality on Solaris. */ -# define RUSAGE_LWP RUSAGE_THREAD -#endif -}; - -#define __need_timeval -#include /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h deleted file mode 100644 index f63360b2bc..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SEM_H -# error "Never include directly; use instead." -#endif - -#include - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused1; - unsigned long int __unused2; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h deleted file mode 100644 index cb214e6412..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SHM_H -# error "Never include directly; use instead." -#endif - -#include - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from */ -#define SHM_W 0200 /* or S_IWUGO from */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - -__BEGIN_DECLS - -/* Segment low boundary address multiple. */ -#define SHMLBA (__getpagesize ()) -extern int __getpagesize (void) __THROW __attribute__ ((__const__)); - - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a shared memory segment. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused1; - unsigned long int __unused2; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ -# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ -# define SHM_NORESERVE 010000 /* don't check for reservations */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - unsigned long int shmmni; - unsigned long int shmseg; - unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h deleted file mode 100644 index 80feb2fa2d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h +++ /dev/null @@ -1,74 +0,0 @@ -/* The proper definitions for Linux/Alpha sigaction. - Copyright (C) 1996, 1997, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never include directly; use instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - unsigned int sa_flags; - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 0x00000020 /* Don't create zombie on child death. */ -#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x00000008 /* Don't automatically block the signal - when its handler is being executed. */ -# define SA_RESETHAND 0x00000010 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 1 /* Block signals. */ -#define SIG_UNBLOCK 2 /* Unblock signals. */ -#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h deleted file mode 100644 index a2aacc04b1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h +++ /dev/null @@ -1,303 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/Alpha version. - Copyright (C) 1997-2002, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use instead" -#endif - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in . */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - int si_tid; /* Timer ID. */ - int si_overrun; /* Overrun count. */ - sigval_t si_sigval; /* Signal value. */ - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timerid _sifields._timer.si_tid -# define si_overrun _sifields._timer.si_overrun -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_TKILL = -6, /* Sent by tkill. */ -# define SI_TKILL SI_TKILL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the - thread to receive the signal. */ - __pid_t _tid; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD, /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD - - SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ -#define SIGEV_THREAD_ID SIGEV_THREAD_ID -}; - -#endif /* have _SIGNAL_H. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h deleted file mode 100644 index 477c13175d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Signal number definitions. Linux/Alpha version. - Copyright (C) 1996, 1997, 1998, 1999, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef _SIGNAL_H - -/* 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. */ -#endif - -/* - * Linux/AXP has different signal numbers that Linux/i386: I'm trying - * to make it OSF/1 binary compatible, at least for normal binaries. - */ -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGEMT 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGBUS 10 -#define SIGSEGV 11 -#define SIGSYS 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGURG 16 -#define SIGSTOP 17 -#define SIGTSTP 18 -#define SIGCONT 19 -#define SIGCHLD 20 -#define SIGCLD SIGCHLD -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGIO 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGINFO 29 -#define SIGUSR1 30 -#define SIGUSR2 31 - -#define SIGPOLL SIGIO -#define SIGPWR SIGINFO -#define SIGIOT SIGABRT - -#define _NSIG 65 /* Biggest signal number + 1. */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* included. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h deleted file mode 100644 index 7faaf98d54..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never include this file directly. Use instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - __ptr_t ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 4096 - -/* System default stack size. */ -#define SIGSTKSZ 16384 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - __ptr_t ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h deleted file mode 100644 index 42748be762..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ /dev/null @@ -1,157 +0,0 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_STAT_H -# error "Never include directly; use instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_KERNEL 0 -#define _STAT_VER_GLIBC2 1 -#define _STAT_VER_GLIBC2_1 2 -#define _STAT_VER_KERNEL64 3 -#define _STAT_VER_GLIBC2_3_4 3 -#define _STAT_VER _STAT_VER_GLIBC2_3_4 - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 0 - - -/* Nanosecond resolution timestamps are stored in a format equivalent to - 'struct timespec'. This is the type used whenever possible but the - Unix namespace rules do not allow the identifier 'timespec' to appear - in the header. Therefore we have to handle the use of - this header in strictly standard-compliant sources special. - - Use neat tidy anonymous unions and structures when possible. */ - -#ifdef __USE_MISC -# if __GNUC_PREREQ(3,3) -# define __ST_TIME(X) \ - __extension__ union { \ - struct timespec st_##X##tim; \ - struct { \ - __time_t st_##X##time; \ - unsigned long st_##X##timensec; \ - }; \ - } -# else -# define __ST_TIME(X) struct timespec st_##X##tim -# define st_atime st_atim.tv_sec -# define st_mtime st_mtim.tv_sec -# define st_ctime st_ctim.tv_sec -# endif -#else -# define __ST_TIME(X) \ - __time_t st_##X##time; \ - unsigned long st_##X##timensec -#endif - - -struct stat - { - __dev_t st_dev; /* Device. */ -#ifdef __USE_FILE_OFFSET64 - __ino64_t st_ino; /* File serial number. */ -#else - __ino_t st_ino; /* File serial number. */ - int __pad0; /* 64-bit st_ino. */ -#endif - __dev_t st_rdev; /* Device number, if device. */ - __off_t st_size; /* Size of file, in bytes. */ -#ifdef __USE_FILE_OFFSET64 - __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ -#else - __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ - int __pad1; /* 64-bit st_blocks. */ -#endif - __mode_t st_mode; /* File mode. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __nlink_t st_nlink; /* Link count. */ - int __pad2; /* Real padding. */ - __ST_TIME(a); /* Time of last access. */ - __ST_TIME(m); /* Time of last modification. */ - __ST_TIME(c); /* Time of last status change. */ - long __unused[3]; - }; - -#ifdef __USE_LARGEFILE64 -/* Note stat64 is the same shape as stat. */ -struct stat64 - { - __dev_t st_dev; /* Device. */ - __ino64_t st_ino; /* File serial number. */ - __dev_t st_rdev; /* Device number, if device. */ - __off_t st_size; /* Size of file, in bytes. */ - __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ - __mode_t st_mode; /* File mode. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __nlink_t st_nlink; /* Link count. */ - int __pad0; /* Real padding. */ - __ST_TIME(a); /* Time of last access. */ - __ST_TIME(m); /* Time of last modification. */ - __ST_TIME(c); /* Time of last status change. */ - long __unused[3]; - }; -#endif - -#undef __ST_TIME - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV -#define _STATBUF_ST_NSEC - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ - -#if defined __USE_ATFILE || defined __USE_GNU -/* XXX This will change to the macro for the next 2008 POSIX revision. */ -# define UTIME_NOW ((1l << 30) - 1l) -# define UTIME_OMIT ((1l << 30) - 2l) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h deleted file mode 100644 index d838e6bf4a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_STATFS_H -# error "Never include directly; use instead." -#endif - -#include /* for __fsid_t and __fsblkcnt_t. */ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_frsize; - int f_spare[5]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_frsize; - int f_spare[5]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN -#define _STATFS_F_FRSIZE diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h deleted file mode 100644 index 966ccf94da..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ /dev/null @@ -1,226 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2003, 2005 - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _TERMIOS_H -# error "Never include directly; use instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[NCCS]; /* control characters */ - cc_t c_line; /* line discipline (== c_cc[33]) */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 -#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 - }; - -/* c_cc characters */ -#define VEOF 0 -#define VEOL 1 -#define VEOL2 2 -#define VERASE 3 -#define VWERASE 4 -#define VKILL 5 -#define VREPRINT 6 -#define VSWTC 7 -#define VINTR 8 -#define VQUIT 9 -#define VSUSP 10 -#define VSTART 12 -#define VSTOP 13 -#define VLNEXT 14 -#define VDISCARD 15 -#define VMIN 16 -#define VTIME 17 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IXON 0001000 -#define IXOFF 0002000 -#ifdef __USE_BSD - /* POSIX.1 doesn't want these... */ -# define IXANY 0004000 -# define IUCLC 0010000 -# define IMAXBEL 0020000 -# define IUTF8 0040000 -#endif - -/* c_oflag bits */ -#define OPOST 0000001 -#define ONLCR 0000002 -#define OLCUC 0000004 - -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 - -#define OFILL 00000100 -#define OFDEL 00000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 00001400 -# define NL0 00000000 -# define NL1 00000400 -# define NL2 00001000 -# define NL3 00001400 -# define TABDLY 00006000 -# define TAB0 00000000 -# define TAB1 00002000 -# define TAB2 00004000 -# define TAB3 00006000 -# define CRDLY 00030000 -# define CR0 00000000 -# define CR1 00010000 -# define CR2 00020000 -# define CR3 00030000 -# define FFDLY 00040000 -# define FF0 00000000 -# define FF1 00040000 -# define BSDLY 00100000 -# define BS0 00000000 -# define BS1 00100000 -#endif - -#define VTDLY 00200000 -#define VT0 00000000 -#define VT1 00200000 - -#ifdef __USE_MISC -# define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */ -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0000037 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -# define CBAUDEX 0000000 -#endif -#define B57600 00020 -#define B115200 00021 -#define B230400 00022 -#define B460800 00023 -#define B500000 00024 -#define B576000 00025 -#define B921600 00026 -#define B1000000 00027 -#define B1152000 00030 -#define B1500000 00031 -#define B2000000 00032 -#define B2500000 00033 -#define B3000000 00034 -#define B3500000 00035 -#define B4000000 00036 - -#define __MAX_BAUD B4000000 - -#define CSIZE 00001400 -#define CS5 00000000 -#define CS6 00000400 -#define CS7 00001000 -#define CS8 00001400 - -#define CSTOPB 00002000 -#define CREAD 00004000 -#define PARENB 00010000 -#define PARODD 00020000 -#define HUPCL 00040000 - -#define CLOCAL 00100000 -#ifdef __USE_MISC -# define CMSPAR 010000000000 /* mark or space (stick) parity */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0x00000080 -#define ICANON 0x00000100 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0x00004000 -#endif -#define ECHO 0x00000008 -#define ECHOE 0x00000002 -#define ECHOK 0x00000004 -#define ECHONL 0x00000010 -#define NOFLSH 0x80000000 -#define TOSTOP 0x00400000 -#ifdef __USE_MISC -# define ECHOCTL 0x00000040 -# define ECHOPRT 0x00000020 -# define ECHOKE 0x00000001 -# define FLUSHO 0x00800000 -# define PENDIN 0x20000000 -#endif -#define IEXTEN 0x00000400 - -/* Values for the ACTION argument to `tcflow'. */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h deleted file mode 100644 index 201585af1f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ /dev/null @@ -1,66 +0,0 @@ -/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. - Copyright (C) 2002, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _BITS_TYPES_H -# error "Never include directly; use instead." -#endif - -#ifndef _BITS_TYPESIZES_H -#define _BITS_TYPESIZES_H 1 - -/* See for the meaning of these macros. This file exists so - that need not vary across different GNU platforms. */ - -#define __DEV_T_TYPE __U64_TYPE -#define __UID_T_TYPE __U32_TYPE -#define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __U32_TYPE -#define __INO64_T_TYPE __U64_TYPE -#define __MODE_T_TYPE __U32_TYPE -#define __NLINK_T_TYPE __U32_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE -#define __OFF64_T_TYPE __S64_TYPE -#define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE -#define __RLIM64_T_TYPE __U64_TYPE -#define __BLKCNT_T_TYPE __U32_TYPE -#define __BLKCNT64_T_TYPE __U64_TYPE -#define __FSBLKCNT_T_TYPE __S32_TYPE -#define __FSBLKCNT64_T_TYPE __S64_TYPE -#define __FSFILCNT_T_TYPE __U32_TYPE -#define __FSFILCNT64_T_TYPE __U64_TYPE -#define __ID_T_TYPE __U32_TYPE -#define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE -#define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __S64_TYPE -#define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE -#define __KEY_T_TYPE __S32_TYPE -#define __CLOCKID_T_TYPE __S32_TYPE -#define __TIMER_T_TYPE void * -#define __BLKSIZE_T_TYPE __U32_TYPE -#define __FSID_T_TYPE struct { int __val[2]; } -#define __SSIZE_T_TYPE __SWORD_TYPE - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -#endif /* bits/typesizes.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h deleted file mode 100644 index 22fc64109c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1999, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __WORDSIZE 64 - -#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL - -/* Signal that we didn't used to have a `long double'. The changes all - the `long double' function variants to be redirects to the double - functions. */ -# define __LONG_DOUBLE_MATH_OPTIONAL 1 -# ifndef __LONG_DOUBLE_128__ -# define __NO_LONG_DOUBLE_MATH 1 -# endif -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S deleted file mode 100644 index e01abebe0e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Brendan Kehoe , 1993. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* __brk is a special syscall under Linux since it never returns an - error. Instead, the error condition is indicated by returning the old - break value (instead of the new, requested one). */ - -#include -#define _ERRNO_H -#include - -#ifdef PIC -.section .bss - .align 3 - .globl __curbrk -__curbrk: .skip 8 - .type __curbrk,@object - .size __curbrk,8 -#else -.comm __curbrk, 8 -#endif - - .text -LEAF(__brk, 8) - ldgp gp, 0(t12) - subq sp, 8, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - /* Save the requested brk across the system call. */ - stq a0, 0(sp) - - ldiq v0, __NR_brk - call_pal PAL_callsys - - ldq a0, 0(sp) - - /* Be prepared for an OSF-style brk. */ - bne a3, $err1 - beq v0, $ok - - /* Correctly handle the brk(0) query case. */ - cmoveq a0, v0, a0 - xor a0, v0, t0 - bne t0, $err0 - - /* Update __curbrk and return cleanly. */ - mov zero, v0 -$ok: stq a0, __curbrk - addq sp, 8, sp - ret - - /* What a horrible way to die. */ -$err0: ldi v0, ENOMEM -$err1: addq sp, 8, sp - SYSCALL_ERROR_HANDLER - - END(__brk) - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S deleted file mode 100644 index 5e0b21ea15..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson , 1996. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* clone() is even more special than fork() as it mucks with stacks - and invokes a function in the right context after its all over. */ - -#include -#define _ERRNO_H 1 -#include - -#define CLONE_VM 0x00000100 -#define CLONE_THREAD 0x00010000 - -/* int clone(int (*fn)(void *arg), void *child_stack, int flags, - void *arg, pid_t *ptid, void *tls, pid_t *ctid); - - Note that everything past ARG is technically optional, based - on FLAGS, and that CTID is arg 7, and thus is on the stack. - However, since a load from top-of-stack better be legal always, - we don't bother checking FLAGS. */ - - .text -ENTRY(__clone) -#ifdef PROF - ldgp gp,0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - /* Sanity check arguments. */ - ldiq v0,EINVAL - beq a0,$error /* no NULL function pointers */ - beq a1,$error /* no NULL stack pointers */ - - /* Save the fn ptr and arg on the new stack. */ - subq a1,32,a1 - stq a0,0(a1) - stq a3,8(a1) -#ifdef RESET_PID - stq a2,16(a1) -#endif - - /* The syscall is of the form clone(flags, usp, ptid, ctid, tls). - Shift the flags, ptid, ctid, tls arguments into place; the - child_stack argument is already correct. */ - mov a2,a0 - mov a4,a2 - ldq a3,0(sp) - mov a5,a4 - - /* Do the system call. */ - ldiq v0,__NR_clone - call_pal PAL_callsys - - bne a3,$error - beq v0,thread_start - - /* Successful return from the parent. */ - ret - - /* Something bad happened -- no child created. */ -$error: -#ifndef PROF - br gp,1f -1: ldgp gp,0(gp) -#endif - SYSCALL_ERROR_HANDLER - - END(__clone) - -/* Load up the arguments to the function. Put this block of code in - its own function so that we can terminate the stack trace with our - debug info. */ - - .ent thread_start -thread_start: - .frame fp,0,fp,0 - mov 0, fp - .prologue 0 - -#ifdef RESET_PID - /* Check and see if we need to reset the PID. */ - ldq t0,16(sp) - lda t1,CLONE_THREAD - and t0,t1,t2 - beq t2,2f -1: -#endif - - /* Load up the arguments. */ - ldq pv,0(sp) - ldq a0,8(sp) - addq sp,32,sp - - /* Call the user's function. */ - jsr ra,(pv) - ldgp gp,0(ra) - - /* Call _exit rather than doing it inline for breakpoint purposes. */ - mov v0,a0 -#ifdef PIC - bsr ra, HIDDEN_JUMPTARGET(_exit) !samegp -#else - jsr ra, HIDDEN_JUMPTARGET(_exit) -#endif - - /* Die horribly. */ - halt - -#ifdef RESET_PID -2: - rduniq - lda t1, CLONE_VM - mov v0, s0 - lda v0, -1 - and t0, t1, t2 - bne t2, 3f - lda v0, __NR_getxpid - callsys -3: - stl v0, PID_OFFSET(s0) - stl v0, TID_OFFSET(s0) - br 1b -#endif - - .end thread_start - -weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h deleted file mode 100644 index 8afc4dba3b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/dl-auxv.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Auxiliary vector processing for Linux/Alpha. - Copyright (C) 2007 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Scan the Aux Vector for the cache shape entries. */ - -long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 }; - -#define DL_PLATFORM_AUXV \ - case AT_L1I_CACHESHAPE: \ - __libc_alpha_cache_shape[0] = av->a_un.a_val; \ - break; \ - case AT_L1D_CACHESHAPE: \ - __libc_alpha_cache_shape[1] = av->a_un.a_val; \ - break; \ - case AT_L2_CACHESHAPE: \ - __libc_alpha_cache_shape[2] = av->a_un.a_val; \ - break; \ - case AT_L3_CACHESHAPE: \ - __libc_alpha_cache_shape[3] = av->a_un.a_val; \ - break; diff --git a/sysdeps/unix/sysv/linux/alpha/dl-brk.S b/sysdeps/unix/sysv/linux/alpha/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/alpha/dl-support.c b/sysdeps/unix/sysv/linux/alpha/dl-support.c deleted file mode 100644 index 290217671c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/dl-support.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "dl-auxv.h" -#include diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c deleted file mode 100644 index 4034820f4d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "dl-auxv.h" -#include diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies deleted file mode 100644 index d76f511c2e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fpu/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Override ldbl-opt with alpha specific routines. -alpha/fpu diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c deleted file mode 100644 index 5e63be5cc7..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 2004,2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include "kernel_sysinfo.h" - - -int -__feraiseexcept (int excepts) -{ - INTERNAL_SYSCALL_DECL (err); - unsigned long t = excepts; - long r; - - r = INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_RAISE_EXCEPTION, &t); - -#ifndef __ASSUME_IEEE_RAISE_EXCEPTION - if (!INTERNAL_SYSCALL_ERROR_P (r, err)) - return 0; - - double d; - - /* If we got an error from SSI_IEEE_RAISE_EXCEPTION, assume it means that - the system call isn't actually implemented. Do the best we can. */ - - /* Invalid implemented with 0 / 0 -> NaN. */ - if (excepts & FE_INVALID) - __asm__ __volatile__ ("divs/su $f31,$f31,%0; trapb" : "=f"(d) : ); - - /* Division By Zero implemented with 1 / 0 -> NaN. */ - if (excepts & FE_DIVBYZERO) - __asm__ __volatile__ ("divs/su %1,$f31,%0; trapb" : "=&f"(d) : "f"(1.0f)); - - /* Overflow and underflow cannot be had all by themselves. We can - generate them with arithmetic, but we always get INEXACT raised - at the same time. Prepare to undo. */ - if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) && !(excepts & FE_INEXACT)) - INTERNAL_SYSCALL (osf_getsysinfo, err, 2, GSI_IEEE_FP_CONTROL, &t); - - /* Overflow implemented with FLT_MAX + FLT_MAX -> Inf. */ - if (excepts & FE_OVERFLOW) - __asm__ __volatile__ ("adds/sui %1,%1,%0; trapb" - : "=&f"(d) : "f"(FLT_MAX)); - - /* Underflow implemented with FLT_MIN * FLT_MIN -> 0. */ - if (excepts & FE_UNDERFLOW) - __asm__ __volatile__ ("muls/sui %1,%1,%0; trapb" - : "=&f"(d) : "f"(FLT_MIN)); - - /* Inexact implemented with (long)0.5 -> 0. */ - if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)) == FE_INEXACT) - __asm__ __volatile__ ("cvttq/svi %1,%0; trapb" : "=&f"(d) : "f"(0.5f)); - - /* If we raised inexact when not asked, and inexact was not previously - raised, then clear that exception. */ - if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) - && !((excepts | t) & FE_INEXACT)) - { - t |= excepts & SWCR_STATUS_MASK; - INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_FP_CONTROL, &t); - } -#endif /* !__ASSUME_IEEE_RAISE_EXCEPTION */ - - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/sysdeps/unix/sysv/linux/alpha/fxstat.c deleted file mode 100644 index 40e08fd86e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fxstat.c +++ /dev/null @@ -1,64 +0,0 @@ -/* fxstat using old-style Unix stat system call. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __fxstat64 __fxstat64_disable - -#include -#include -#include -#include -#include -#include -#include - -#undef __fxstat64 - - -/* Get information about the file NAME in BUF. */ -int -__fxstat (int vers, int fd, struct stat *buf) -{ - INTERNAL_SYSCALL_DECL (err); - int result, errno_out; - struct kernel_stat kbuf; - - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - goto fail; - __libc_missing_axp_stat64 = 1; - } - - result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); - return -1; -} -hidden_def (__fxstat) -weak_alias (__fxstat, _fxstat); -strong_alias (__fxstat, __fxstat64); -hidden_ver (__fxstat, __fxstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c deleted file mode 100644 index 497694619a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 2005, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __fxstatat64 __fxstatat64_disable - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef __fxstatat64 - - -/* Get information about the file NAME in BUF. */ -int -__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) -{ - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - INTERNAL_SYSCALL_DECL (err); - int result, errno_out; - struct kernel_stat kst; - - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); - else - result = INTERNAL_SYSCALL (stat64, err, 2, file, st); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - goto fail; - __libc_missing_axp_stat64 = 1; - } - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); - else - result = INTERNAL_SYSCALL (stat, err, 2, file, &kst); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return __xstat_conv (vers, &kst, st); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __atfct_seterrno (errno_out, fd, buf); - - return -1; -} -libc_hidden_def (__fxstatat) -strong_alias (__fxstatat, __fxstatat64); -libc_hidden_ver(__fxstatat, __fxstatat64); diff --git a/sysdeps/unix/sysv/linux/alpha/getclktck.c b/sysdeps/unix/sysv/linux/alpha/getclktck.c deleted file mode 100644 index 6636bbe689..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getclktck.c +++ /dev/null @@ -1,2 +0,0 @@ -#define SYSTEM_CLK_TCK 1024 -#include diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S deleted file mode 100644 index f010f337e6..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getcontext.S +++ /dev/null @@ -1,188 +0,0 @@ -/* Save current context. - Copyright (C) 2004, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -/* ??? Should be a better place for this that's asm friendly. */ -#define SIG_BLOCK 1 - - -ENTRY (__getcontext) -#ifdef PROF - ldgp gp, 0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - bsr $0, __getcontext_x - mov $31, $0 - ret - -END(__getcontext) -weak_alias (__getcontext, getcontext) - - -/* An internal routine used by getcontext and setcontext. - The incomming return address register is $0. */ - - .align 4 - .globl __getcontext_x - .hidden __getcontext_x - .usepv __getcontext_x, no - - cfi_startproc - cfi_return_column (64) -__getcontext_x: - cfi_register (64, 0) - - .set noat - - /* Return value of getcontext. $0 is the only register - whose value is not preserved. */ - stq $31, UC_SIGCTX+SC_REGS($16) - - /* Store all registers into the context. */ - stq $1, UC_SIGCTX+SC_REGS+1*8($16) - stq $2, UC_SIGCTX+SC_REGS+2*8($16) - stq $3, UC_SIGCTX+SC_REGS+3*8($16) - stq $4, UC_SIGCTX+SC_REGS+4*8($16) - stq $5, UC_SIGCTX+SC_REGS+5*8($16) - stq $6, UC_SIGCTX+SC_REGS+6*8($16) - stq $7, UC_SIGCTX+SC_REGS+7*8($16) - stq $8, UC_SIGCTX+SC_REGS+8*8($16) - stq $9, UC_SIGCTX+SC_REGS+9*8($16) - stq $10, UC_SIGCTX+SC_REGS+10*8($16) - stq $11, UC_SIGCTX+SC_REGS+11*8($16) - stq $12, UC_SIGCTX+SC_REGS+12*8($16) - stq $13, UC_SIGCTX+SC_REGS+13*8($16) - stq $14, UC_SIGCTX+SC_REGS+14*8($16) - stq $15, UC_SIGCTX+SC_REGS+15*8($16) - stq $16, UC_SIGCTX+SC_REGS+16*8($16) - stq $17, UC_SIGCTX+SC_REGS+17*8($16) - stq $18, UC_SIGCTX+SC_REGS+18*8($16) - stq $19, UC_SIGCTX+SC_REGS+19*8($16) - stq $20, UC_SIGCTX+SC_REGS+20*8($16) - stq $21, UC_SIGCTX+SC_REGS+21*8($16) - stq $22, UC_SIGCTX+SC_REGS+22*8($16) - stq $23, UC_SIGCTX+SC_REGS+23*8($16) - stq $24, UC_SIGCTX+SC_REGS+24*8($16) - stq $25, UC_SIGCTX+SC_REGS+25*8($16) - stq $26, UC_SIGCTX+SC_REGS+26*8($16) - stq $27, UC_SIGCTX+SC_REGS+27*8($16) - stq $28, UC_SIGCTX+SC_REGS+28*8($16) - stq $29, UC_SIGCTX+SC_REGS+29*8($16) - stq $30, UC_SIGCTX+SC_REGS+30*8($16) - stq $31, UC_SIGCTX+SC_REGS+31*8($16) - - stt $f0, UC_SIGCTX+SC_FPREGS+0*8($16) - stt $f1, UC_SIGCTX+SC_FPREGS+1*8($16) - stt $f2, UC_SIGCTX+SC_FPREGS+2*8($16) - stt $f3, UC_SIGCTX+SC_FPREGS+3*8($16) - stt $f4, UC_SIGCTX+SC_FPREGS+4*8($16) - stt $f5, UC_SIGCTX+SC_FPREGS+5*8($16) - stt $f6, UC_SIGCTX+SC_FPREGS+6*8($16) - stt $f7, UC_SIGCTX+SC_FPREGS+7*8($16) - stt $f8, UC_SIGCTX+SC_FPREGS+8*8($16) - stt $f9, UC_SIGCTX+SC_FPREGS+9*8($16) - stt $f10, UC_SIGCTX+SC_FPREGS+10*8($16) - stt $f11, UC_SIGCTX+SC_FPREGS+11*8($16) - stt $f12, UC_SIGCTX+SC_FPREGS+12*8($16) - stt $f13, UC_SIGCTX+SC_FPREGS+13*8($16) - stt $f14, UC_SIGCTX+SC_FPREGS+14*8($16) - stt $f15, UC_SIGCTX+SC_FPREGS+15*8($16) - stt $f16, UC_SIGCTX+SC_FPREGS+16*8($16) - stt $f17, UC_SIGCTX+SC_FPREGS+17*8($16) - stt $f18, UC_SIGCTX+SC_FPREGS+18*8($16) - stt $f19, UC_SIGCTX+SC_FPREGS+19*8($16) - stt $f20, UC_SIGCTX+SC_FPREGS+20*8($16) - stt $f21, UC_SIGCTX+SC_FPREGS+21*8($16) - stt $f22, UC_SIGCTX+SC_FPREGS+22*8($16) - stt $f23, UC_SIGCTX+SC_FPREGS+23*8($16) - stt $f24, UC_SIGCTX+SC_FPREGS+24*8($16) - stt $f25, UC_SIGCTX+SC_FPREGS+25*8($16) - stt $f26, UC_SIGCTX+SC_FPREGS+26*8($16) - stt $f27, UC_SIGCTX+SC_FPREGS+27*8($16) - stt $f28, UC_SIGCTX+SC_FPREGS+28*8($16) - stt $f29, UC_SIGCTX+SC_FPREGS+29*8($16) - stt $f30, UC_SIGCTX+SC_FPREGS+30*8($16) - stt $f31, UC_SIGCTX+SC_FPREGS+31*8($16) - - mf_fpcr $f0 - lda $1, 8 - stt $f0, UC_SIGCTX+SC_FPCR($16) - - /* The return address of getcontext is the restart pc. */ - stq $26, UC_SIGCTX+SC_PC($16) - - /* Userlevel always has a processor status word of 8. */ - stq $1, UC_SIGCTX+SC_PS($16) - - /* Save registers around the syscall. We preserve $17 - for the benefit of swapcontext. */ - subq $30, 4*8, $30 - cfi_adjust_cfa_offset(4*8) - stq $0, 0($30) - cfi_rel_offset(64, 0) - stq $16, 8($30) - stq $17, 16($30) - - /* Save the current signal mask. Whee, there are three - copies of this in the alpha ucontext_t. */ - lda $16, SIG_BLOCK - lda $17, 0 - lda $0, __NR_osf_sigprocmask - callsys - - ldq $16, 8($30) - ldq $17, 16($30) - - stq $0, UC_OSF_SIGMASK($16) - stq $0, UC_SIGCTX+SC_MASK($16) - stq $0, UC_SIGMASK($16) - stq $31, UC_SIGMASK + 1*8($16) - stq $31, UC_SIGMASK + 2*8($16) - stq $31, UC_SIGMASK + 3*8($16) - stq $31, UC_SIGMASK + 4*8($16) - stq $31, UC_SIGMASK + 5*8($16) - stq $31, UC_SIGMASK + 6*8($16) - stq $31, UC_SIGMASK + 7*8($16) - stq $31, UC_SIGMASK + 8*8($16) - stq $31, UC_SIGMASK + 9*8($16) - stq $31, UC_SIGMASK +10*8($16) - stq $31, UC_SIGMASK +11*8($16) - stq $31, UC_SIGMASK +12*8($16) - stq $31, UC_SIGMASK +13*8($16) - stq $31, UC_SIGMASK +14*8($16) - stq $31, UC_SIGMASK +15*8($16) - - ldq $0, 0($30) - addq $30, 4*8, $30 - cfi_register (64, 0) - cfi_adjust_cfa_offset(-4*8) - ret $31, ($0), 1 - - cfi_endproc - .size __getcontext_x, .-__getcontext_x - .type __getcontext_x, @function diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c deleted file mode 100644 index dfecfef924..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getdents.c +++ /dev/null @@ -1,3 +0,0 @@ -#define DIRENT_SET_DP_INO(dp, value) \ - do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0) -#include diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c deleted file mode 100644 index e53570c036..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getdents64.c +++ /dev/null @@ -1 +0,0 @@ -#include "../getdents64.c" diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c deleted file mode 100644 index 4e15ee43ed..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/gethostname.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2001 - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include -#include - -int -__gethostname (char *name, size_t len) -{ - int result; - - result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len); - - if (result == 0 - /* See whether the string is terminated. If not we will return - an error. */ - && memchr (name, '\0', len) == NULL) - { - __set_errno (EOVERFLOW); - result = -1; - } - - return result; -} - -weak_alias (__gethostname, gethostname) diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S deleted file mode 100644 index 6644a5c36d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getitimer.S +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETITIMER __getitimer_tv64 -#else -#define GETITIMER getitimer -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETITIMER, getitimer, 2) - ret -PSEUDO_END(GETITIMER) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETITIMER, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(getitimer) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_getitimer) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a1, 8(sp) - ldl t0, 0(a1) - ldl t1, 4(a1) - ldl t2, 8(a1) - ldl t3, 12(a1) - stq t0, 0(a1) - stq t1, 8(a1) - stq t2, 16(a1) - stq t3, 24(a1) - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETITIMER) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S deleted file mode 100644 index 0bca4b5f23..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getrusage.S +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETRUSAGE __getrusage_tv64 -#else -#define GETRUSAGE __getrusage -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETRUSAGE, getrusage, 2) - ret -PSEUDO_END(GETRUSAGE) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETRUSAGE, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(getrusage) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_getrusage) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a1, 8(sp) - ldl t0, 0(a1) # ru_utime.tv_sec - ldl t1, 4(a1) # ru_utime.tv_usec - ldl t2, 8(a1) # ru_stime.tv_sec - ldl t3, 12(a1) # ru_stime.tv_usec - ldt $f15, 16(a1) # ru_maxrss - ldt $f16, 24(a1) # ru_ixrss - ldt $f17, 32(a1) # ru_idrss - ldt $f18, 40(a1) # ru_isrss - ldt $f19, 48(a1) # ru_minflt - ldt $f20, 56(a1) # ru_majflt - ldt $f21, 64(a1) # ru_nswap - ldt $f22, 72(a1) # ru_inblock - ldt $f23, 80(a1) # ru_oublock - ldt $f24, 88(a1) # ru_msgsend - ldt $f25, 96(a1) # ru_msgrcv - ldt $f26, 104(a1) # ru_nsignals - ldt $f27, 112(a1) # ru_nvcsw - .set noat - ldt $f28, 120(a1) # ru_nivcsw - .set at - stq t0, 0(a1) - stq t1, 8(a1) - stq t2, 16(a1) - stq t3, 24(a1) - stt $f15, 32(a1) - stt $f16, 40(a1) - stt $f17, 48(a1) - stt $f18, 56(a1) - stt $f19, 64(a1) - stt $f20, 72(a1) - stt $f21, 80(a1) - stt $f22, 88(a1) - stt $f23, 96(a1) - stt $f24, 104(a1) - stt $f25, 112(a1) - stt $f26, 120(a1) - stt $f27, 128(a1) - .set noat - stt $f28, 136(a1) - .set at - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETRUSAGE) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -strong_alias(__getrusage_tv64, ____getrusage_tv64) -default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1) -default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1) -#else -weak_alias (__getrusage, getrusage) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c deleted file mode 100644 index 0e49a84526..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Determine various system internal values, Linux/Alpha version. - Copyright (C) 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Schwab - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* We need to define a special parser for /proc/cpuinfo. */ -#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \ - do \ - { \ - /* Find the line that contains the information about the number of \ - active cpus. We don't have to fear extremely long lines since \ - the kernel will not generate them. 8192 bytes are really enough. \ - If there is no "CPUs ..." line then we are on a UP system. */ \ - (RESULT) = 1; \ - while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \ - if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \ - || (sscanf (BUFFER, "CPUs probed %*d active %d", \ - &(RESULT)) == 1)) \ - break; \ - } \ - while (0) - - -/* On the Alpha we can distinguish between the number of configured and - active cpus. */ -#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \ - do \ - { \ - /* Find the line that contains the information about the number of \ - probed cpus. We don't have to fear extremely long lines since \ - the kernel will not generate them. 8192 bytes are really enough. \ - If there is no "CPUs ..." line then we are on a UP system. */ \ - (RESULT) = 1; \ - while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \ - if ((sscanf (buffer, "cpus detected : %d", &(RESULT)) == 1) \ - || (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1)) \ - break; \ - } \ - while (0) - -#include diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S deleted file mode 100644 index 7c9183a4fe..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 1998, 2002, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define GETTIMEOFDAY __gettimeofday_tv64 -#else -#define GETTIMEOFDAY __gettimeofday -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(GETTIMEOFDAY, gettimeofday, 2) - ret -PSEUDO_END(GETTIMEOFDAY) -#else - -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(GETTIMEOFDAY, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(gettimeofday) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_gettimeofday) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a0, 0(sp) - beq a0, 2f - ldl t0, 0(a0) - ldl t1, 4(a0) - stq t0, 0(a0) - stq t1, 8(a0) - -2: addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(GETTIMEOFDAY) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p) -default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1) -#else -weak_alias (__gettimeofday, gettimeofday) -#endif -strong_alias(GETTIMEOFDAY, __gettimeofday_internal) diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c deleted file mode 100644 index 84573899d6..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 1998, 2000, 2002, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define glob64 __no_glob64_decl -#define globfree64 __no_globfree64_decl - -#include -#include -#include - -/* For Linux/Alpha we have to make the glob symbols versioned. */ -#define glob(pattern, flags, errfunc, pglob) \ - __new_glob (pattern, flags, errfunc, pglob) -#define globfree(pglob) \ - __new_globfree (pglob) - -/* We need prototypes for these new names. */ -extern int __new_glob (const char *__pattern, int __flags, - int (*__errfunc) (const char *, int), - glob_t *__pglob); -extern void __new_globfree (glob_t *__pglob); - -#include - -#undef glob -#undef globfree -#undef glob64 -#undef globfree64 - -versioned_symbol (libc, __new_glob, glob, GLIBC_2_1); -versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); -libc_hidden_ver (__new_glob, glob) -libc_hidden_ver (__new_globfree, globfree) - -weak_alias (__new_glob, glob64) -weak_alias (__new_globfree, globfree64) -libc_hidden_ver (__new_globfree, globfree64) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S deleted file mode 100644 index 4779f175e5..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include "kernel_sysinfo.h" - - - .text - -LEAF(__ieee_get_fp_control, 16) -#ifdef PROF - ldgp gp, 0(pv) - lda sp, -16(sp) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#elif defined PIC - lda sp, -16(sp) - .prologue 0 -#else - ldgp gp, 0(pv) - lda sp, -16(sp) - .prologue 1 -#endif - - mov sp, a1 - ldi a0, GSI_IEEE_FP_CONTROL - ldi v0, __NR_osf_getsysinfo - call_pal PAL_callsys - bne a3, $error - - ldq v0, 0(sp) - lda sp, 16(sp) - ret - -$error: - lda sp, 16(sp) - SYSCALL_ERROR_HANDLER - - END(__ieee_get_fp_control) - -libc_hidden_def(__ieee_get_fp_control) -weak_alias (__ieee_get_fp_control, ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S deleted file mode 100644 index a9c0891aae..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include "kernel_sysinfo.h" - - -LEAF(__ieee_set_fp_control, 16) -#ifdef PROF - ldgp gp, 0(pv) - lda sp, -16(sp) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#elif defined PIC - lda sp, -16(sp) - .prologue 0 -#else - ldgp gp, 0(pv) - lda sp, -16(sp) - .prologue 1 -#endif - - stq a0, 0(sp) - mov sp, a1 - ldi a0, SSI_IEEE_FP_CONTROL - ldi v0, __NR_osf_setsysinfo - call_pal PAL_callsys - - bne a3, $error - - lda sp, 16(sp) - ret - -$error: - lda sp, 16(sp) - SYSCALL_ERROR_HANDLER - - END(__ieee_set_fp_control) - -libc_hidden_def(__ieee_set_fp_control) -weak_alias (__ieee_set_fp_control, ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c deleted file mode 100644 index 32e96ec2f2..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ /dev/null @@ -1,883 +0,0 @@ -/* Copyright (C) 1992, 1996-1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* I/O access is restricted to ISA port space (ports 0..65535). - Modern devices hopefully are sane enough not to put any performance - critical registers in i/o space. - - On the first call to ioperm, the entire (E)ISA port space is mapped - into the virtual address space at address io.base. mprotect calls - are then used to enable/disable access to ports. Per page, there - are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a Low Cost Alpha - based system using 8KB pages). - - Keep in mind that this code should be able to run in a 32bit address - space. It is therefore unreasonable to expect mmap'ing the entire - sparse address space would work (e.g., the Low Cost Alpha chip has an - I/O address space that's 512MB large!). */ - -/* Make sure the ldbu/stb asms below are not expaneded to macros. */ -#ifndef __alpha_bwx__ -asm(".arch ev56"); -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#define PATH_ALPHA_SYSTYPE "/etc/alpha_systype" -#define PATH_CPUINFO "/proc/cpuinfo" - -#define MAX_PORT 0x10000 -#define vip volatile int * -#define vuip volatile unsigned int * -#define vusp volatile unsigned short * -#define vucp volatile unsigned char * - -#define JENSEN_IO_BASE (0x300000000UL) -#define JENSEN_SPARSE_MEM (0x200000000UL) - -/* With respect to the I/O architecture, APECS and LCA are identical, - so the following defines apply to LCA as well. */ -#define APECS_IO_BASE (0x1c0000000UL) -#define APECS_SPARSE_MEM (0x200000000UL) -#define APECS_DENSE_MEM (0x300000000UL) - -/* The same holds for CIA and PYXIS, except for PYXIS we prefer BWX. */ -#define CIA_IO_BASE (0x8580000000UL) -#define CIA_SPARSE_MEM (0x8000000000UL) -#define CIA_DENSE_MEM (0x8600000000UL) - -#define PYXIS_IO_BASE (0x8900000000UL) -#define PYXIS_DENSE_MEM (0x8800000000UL) - -/* SABLE is EV4, GAMMA is EV5 */ -#define T2_IO_BASE (0x3a0000000UL) -#define T2_SPARSE_MEM (0x200000000UL) -#define T2_DENSE_MEM (0x3c0000000UL) - -#define GAMMA_IO_BASE (0x83a0000000UL) -#define GAMMA_SPARSE_MEM (0x8200000000UL) -#define GAMMA_DENSE_MEM (0x83c0000000UL) - -/* NOTE: these are hardwired to PCI bus 0 addresses!!! */ -#define MCPCIA_IO_BASE (0xf980000000UL) -#define MCPCIA_SPARSE_MEM (0xf800000000UL) -#define MCPCIA_DENSE_MEM (0xf900000000UL) - -/* Tsunami and Irongate use the same offsets, at least for hose 0. */ -#define TSUNAMI_IO_BASE (0x801fc000000UL) -#define TSUNAMI_DENSE_MEM (0x80000000000UL) - -/* Polaris has SPARSE space, but we prefer to use only DENSE - because of some idiosyncracies in actually using SPARSE. */ -#define POLARIS_IO_BASE (0xf9fc000000UL) -#define POLARIS_DENSE_MEM (0xf900000000UL) - -typedef enum { - IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_PYXIS, IOSYS_T2, - IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_POLARIS, - IOSYS_CPUDEP, IOSYS_PCIDEP -} iosys_t; - -typedef enum { - IOSWIZZLE_JENSEN, IOSWIZZLE_SPARSE, IOSWIZZLE_DENSE -} ioswizzle_t; - -static struct io_system { - unsigned long int bus_memory_base; - unsigned long int sparse_bus_mem_base; - unsigned long int bus_io_base; -} io_system[] = { /* NOTE! must match iosys_t enumeration */ -/* UNKNOWN */ {0, 0, 0}, -/* JENSEN */ {0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE}, -/* APECS */ {APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE}, -/* CIA */ {CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE}, -/* PYXIS */ {PYXIS_DENSE_MEM, 0, PYXIS_IO_BASE}, -/* T2 */ {T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE}, -/* TSUNAMI */ {TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE}, -/* MCPCIA */ {MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE}, -/* GAMMA */ {GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE}, -/* POLARIS */ {POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE}, -/* CPUDEP */ {0, 0, 0}, /* for platforms dependent on CPU type */ -/* PCIDEP */ {0, 0, 0}, /* for platforms dependent on core logic */ -}; - -static struct platform { - const char *name; - iosys_t io_sys; -} platform[] = { - {"Alcor", IOSYS_CIA}, - {"Avanti", IOSYS_APECS}, - {"Cabriolet", IOSYS_APECS}, - {"EB164", IOSYS_PCIDEP}, - {"EB64+", IOSYS_APECS}, - {"EB66", IOSYS_APECS}, - {"EB66P", IOSYS_APECS}, - {"Jensen", IOSYS_JENSEN}, - {"Miata", IOSYS_PYXIS}, - {"Mikasa", IOSYS_CPUDEP}, - {"Nautilus", IOSYS_TSUNAMI}, - {"Noname", IOSYS_APECS}, - {"Noritake", IOSYS_CPUDEP}, - {"Rawhide", IOSYS_MCPCIA}, - {"Ruffian", IOSYS_PYXIS}, - {"Sable", IOSYS_CPUDEP}, - {"Takara", IOSYS_CIA}, - {"Tsunami", IOSYS_TSUNAMI}, - {"XL", IOSYS_APECS}, -}; - -struct ioswtch { - void (*sethae)(unsigned long int addr); - void (*outb)(unsigned char b, unsigned long int port); - void (*outw)(unsigned short b, unsigned long int port); - void (*outl)(unsigned int b, unsigned long int port); - unsigned int (*inb)(unsigned long int port); - unsigned int (*inw)(unsigned long int port); - unsigned int (*inl)(unsigned long int port); -}; - -static struct { - unsigned long int hae_cache; - unsigned long int base; - struct ioswtch * swp; - unsigned long int bus_memory_base; - unsigned long int sparse_bus_memory_base; - unsigned long int io_base; - ioswizzle_t swiz; -} io; - -static inline void -stb_mb(unsigned char val, unsigned long addr) -{ - __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); -} - -static inline void -stw_mb(unsigned short val, unsigned long addr) -{ - __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); -} - -static inline void -stl_mb(unsigned int val, unsigned long addr) -{ - __asm__("stl %1,%0; mb" : "=m"(*(vip)addr) : "r"(val)); -} - -/* No need to examine error -- sethae never fails. */ -static inline void -__sethae(unsigned long value) -{ - register unsigned long r16 __asm__("$16") = value; - register unsigned long r0 __asm__("$0") = __NR_sethae; - __asm__ __volatile__ ("callsys" - : "=r"(r0) - : "0"(r0), "r" (r16) - : inline_syscall_clobbers, "$19"); -} - -extern long __pciconfig_iobase(enum __pciconfig_iobase_which __which, - unsigned long int __bus, - unsigned long int __dfn); - -static inline unsigned long int -port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size) -{ - if (ioswiz == IOSWIZZLE_SPARSE) - return io.base + (port << 5) + ((size - 1) << 3); - else if (ioswiz == IOSWIZZLE_DENSE) - return port + io.base; - else - return io.base + (port << 7) + ((size - 1) << 5); -} - -static inline void -inline_sethae (unsigned long int addr, ioswizzle_t ioswiz) -{ - if (ioswiz == IOSWIZZLE_SPARSE) - { - unsigned long int msb; - - /* no need to set hae if msb is 0: */ - msb = addr & 0xf8000000; - if (msb && msb != io.hae_cache) - { - io.hae_cache = msb; - __sethae (msb); - } - } - else if (ioswiz == IOSWIZZLE_JENSEN) - { - /* HAE on the Jensen is bits 31:25 shifted right. */ - addr >>= 25; - if (addr != io.hae_cache) - { - io.hae_cache = addr; - __sethae (addr); - } - } -} - -static inline void -inline_outb (unsigned char b, unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned int w; - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1); - - asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); - stl_mb(w, addr); -} - - -static inline void -inline_outw (unsigned short int b, unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned long w; - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2); - - asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b)); - stl_mb(w, addr); -} - - -static inline void -inline_outl (unsigned int b, unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - - stl_mb(b, addr); -} - - -static inline unsigned int -inline_inb (unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1); - int result; - - result = *(vip) addr; - result >>= (port & 3) * 8; - return 0xffUL & result; -} - - -static inline unsigned int -inline_inw (unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2); - int result; - - result = *(vip) addr; - result >>= (port & 3) * 8; - return 0xffffUL & result; -} - - -static inline unsigned int -inline_inl (unsigned long int port, ioswizzle_t ioswiz) -{ - unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4); - - return *(vuip) addr; -} - -/* - * Now define the inline functions for CPUs supporting byte/word insns, - * and whose core logic supports I/O space accesses utilizing them. - * - * These routines could be used by MIATA, for example, because it has - * and EV56 plus PYXIS, but it currently uses SPARSE anyway. This is - * also true of RX164 which used POLARIS, but we will choose to use - * these routines in that case instead of SPARSE. - * - * These routines are necessary for TSUNAMI/TYPHOON based platforms, - * which will have (at least) EV6. - */ - -static inline unsigned long int -dense_port_to_cpu_addr (unsigned long int port) -{ - return port + io.base; -} - -static inline void -inline_bwx_outb (unsigned char b, unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - stb_mb (b, addr); -} - -static inline void -inline_bwx_outw (unsigned short int b, unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - stw_mb (b, addr); -} - -static inline void -inline_bwx_outl (unsigned int b, unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - stl_mb (b, addr); -} - -static inline unsigned int -inline_bwx_inb (unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned char r; - - __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); - return r; -} - -static inline unsigned int -inline_bwx_inw (unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - unsigned short r; - - __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); - return r; -} - -static inline unsigned int -inline_bwx_inl (unsigned long int port) -{ - unsigned long int addr = dense_port_to_cpu_addr (port); - - return *(vuip) addr; -} - -/* macros to define routines with appropriate names and functions */ - -/* these do either SPARSE or JENSEN swizzle */ - -#define DCL_SETHAE(name, ioswiz) \ -static void \ -name##_sethae (unsigned long int addr) \ -{ \ - inline_sethae (addr, IOSWIZZLE_##ioswiz); \ -} - -#define DCL_OUT(name, func, type, ioswiz) \ -static void \ -name##_##func (unsigned type b, unsigned long int addr) \ -{ \ - inline_##func (b, addr, IOSWIZZLE_##ioswiz); \ -} - -#define DCL_IN(name, func, ioswiz) \ -static unsigned int \ -name##_##func (unsigned long int addr) \ -{ \ - return inline_##func (addr, IOSWIZZLE_##ioswiz); \ -} - -/* these do DENSE, so no swizzle is needed */ - -#define DCL_OUT_BWX(name, func, type) \ -static void \ -name##_##func (unsigned type b, unsigned long int addr) \ -{ \ - inline_bwx_##func (b, addr); \ -} - -#define DCL_IN_BWX(name, func) \ -static unsigned int \ -name##_##func (unsigned long int addr) \ -{ \ - return inline_bwx_##func (addr); \ -} - -/* now declare/define the necessary routines */ - -DCL_SETHAE(jensen, JENSEN) -DCL_OUT(jensen, outb, char, JENSEN) -DCL_OUT(jensen, outw, short int, JENSEN) -DCL_OUT(jensen, outl, int, JENSEN) -DCL_IN(jensen, inb, JENSEN) -DCL_IN(jensen, inw, JENSEN) -DCL_IN(jensen, inl, JENSEN) - -DCL_SETHAE(sparse, SPARSE) -DCL_OUT(sparse, outb, char, SPARSE) -DCL_OUT(sparse, outw, short int, SPARSE) -DCL_OUT(sparse, outl, int, SPARSE) -DCL_IN(sparse, inb, SPARSE) -DCL_IN(sparse, inw, SPARSE) -DCL_IN(sparse, inl, SPARSE) - -DCL_SETHAE(dense, DENSE) -DCL_OUT_BWX(dense, outb, char) -DCL_OUT_BWX(dense, outw, short int) -DCL_OUT_BWX(dense, outl, int) -DCL_IN_BWX(dense, inb) -DCL_IN_BWX(dense, inw) -DCL_IN_BWX(dense, inl) - -/* define the "swizzle" switch */ -static struct ioswtch ioswtch[] = { - { - jensen_sethae, - jensen_outb, jensen_outw, jensen_outl, - jensen_inb, jensen_inw, jensen_inl - }, - { - sparse_sethae, - sparse_outb, sparse_outw, sparse_outl, - sparse_inb, sparse_inw, sparse_inl - }, - { - dense_sethae, - dense_outb, dense_outw, dense_outl, - dense_inb, dense_inw, dense_inl - } -}; - -#undef DEBUG_IOPERM - -/* Routine to process the /proc/cpuinfo information into the fields - that are required for correctly determining the platform parameters. */ - -struct cpuinfo_data -{ - char systype[256]; /* system type field */ - char sysvari[256]; /* system variation field */ - char cpumodel[256]; /* cpu model field */ -}; - -static inline int -process_cpuinfo(struct cpuinfo_data *data) -{ - int got_type, got_vari, got_model; - char dummy[256]; - FILE * fp; - int n; - - data->systype[0] = 0; - data->sysvari[0] = 0; - data->cpumodel[0] = 0; - - /* If there's an /etc/alpha_systype link, we're intending to override - whatever's in /proc/cpuinfo. */ - n = __readlink (PATH_ALPHA_SYSTYPE, data->systype, 256 - 1); - if (n > 0) - { - data->systype[n] = '\0'; - return 1; - } - - fp = fopen (PATH_CPUINFO, "r"); - if (!fp) - return 0; - - got_type = got_vari = got_model = 0; - - while (1) - { - if (fgets (dummy, 256, fp) == NULL) - break; - if (!got_type && - sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) - got_type = 1; - if (!got_vari && - sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) == 1) - got_vari = 1; - if (!got_model && - sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1) - got_model = 1; - } - - fclose (fp); - -#ifdef DEBUG_IOPERM - fprintf(stderr, "system type: `%s'\n", data->systype); - fprintf(stderr, "system vari: `%s'\n", data->sysvari); - fprintf(stderr, "cpu model: `%s'\n", data->cpumodel); -#endif - - return got_type + got_vari + got_model; -} - - -/* - * Initialize I/O system. - */ -static int -init_iosys (void) -{ - long addr; - int i, olderrno = errno; - struct cpuinfo_data data; - - /* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */ - -#ifdef __NR_pciconfig_iobase - addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0); - if (addr != -1) - { - ioswizzle_t io_swiz; - - if (addr == 0) - { - /* Only Jensen doesn't have dense mem space. */ - io.sparse_bus_memory_base - = io_system[IOSYS_JENSEN].sparse_bus_mem_base; - io.io_base = io_system[IOSYS_JENSEN].bus_io_base; - io_swiz = IOSWIZZLE_JENSEN; - } - else - { - io.bus_memory_base = addr; - - addr = __pciconfig_iobase (IOBASE_DENSE_IO, 0, 0); - if (addr != 0) - { - /* The X server uses _bus_base_sparse == 0 to know that - BWX access are supported to dense mem space. This is - true of every system that supports dense io space, so - never fill in io.sparse_bus_memory_base in this case. */ - io_swiz = IOSWIZZLE_DENSE; - io.io_base = addr; - } - else - { - io.sparse_bus_memory_base - = __pciconfig_iobase (IOBASE_SPARSE_MEM, 0, 0); - io.io_base = __pciconfig_iobase (IOBASE_SPARSE_IO, 0, 0); - io_swiz = IOSWIZZLE_SPARSE; - } - } - - io.swiz = io_swiz; - io.swp = &ioswtch[io_swiz]; - - return 0; - } -#endif - - /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */ - - if (process_cpuinfo(&data) == 0) - { - /* This can happen if the format of /proc/cpuinfo changes. */ - fprintf (stderr, - "ioperm.init_iosys: Unable to determine system type.\n" - "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); - __set_errno (ENODEV); - return -1; - } - - /* Translate systype name into i/o system. */ - for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) - { - if (strcmp (platform[i].name, data.systype) == 0) - { - iosys_t io_sys = platform[i].io_sys; - - /* Some platforms can have either EV4 or EV5 CPUs. */ - if (io_sys == IOSYS_CPUDEP) - { - /* SABLE or MIKASA or NORITAKE so far. */ - if (strcmp (platform[i].name, "Sable") == 0) - { - if (strncmp (data.cpumodel, "EV4", 3) == 0) - io_sys = IOSYS_T2; - else if (strncmp (data.cpumodel, "EV5", 3) == 0) - io_sys = IOSYS_GAMMA; - } - else - { - /* This covers MIKASA/NORITAKE. */ - if (strncmp (data.cpumodel, "EV4", 3) == 0) - io_sys = IOSYS_APECS; - else if (strncmp (data.cpumodel, "EV5", 3) == 0) - io_sys = IOSYS_CIA; - } - if (io_sys == IOSYS_CPUDEP) - { - /* This can happen if the format of /proc/cpuinfo changes.*/ - fprintf (stderr, "ioperm.init_iosys: Unable to determine" - " CPU model.\n"); - __set_errno (ENODEV); - return -1; - } - } - /* Some platforms can have different core logic chipsets */ - if (io_sys == IOSYS_PCIDEP) - { - /* EB164 so far */ - if (strcmp (data.systype, "EB164") == 0) - { - if (strncmp (data.sysvari, "RX164", 5) == 0) - io_sys = IOSYS_POLARIS; - else if (strncmp (data.sysvari, "LX164", 5) == 0 - || strncmp (data.sysvari, "SX164", 5) == 0) - io_sys = IOSYS_PYXIS; - else - io_sys = IOSYS_CIA; - } - if (io_sys == IOSYS_PCIDEP) - { - /* This can happen if the format of /proc/cpuinfo changes.*/ - fprintf (stderr, "ioperm.init_iosys: Unable to determine" - " core logic chipset.\n"); - __set_errno (ENODEV); - return -1; - } - } - io.bus_memory_base = io_system[io_sys].bus_memory_base; - io.sparse_bus_memory_base = io_system[io_sys].sparse_bus_mem_base; - io.io_base = io_system[io_sys].bus_io_base; - - if (io_sys == IOSYS_JENSEN) - io.swiz = IOSWIZZLE_JENSEN; - else if (io_sys == IOSYS_TSUNAMI - || io_sys == IOSYS_POLARIS - || io_sys == IOSYS_PYXIS) - io.swiz = IOSWIZZLE_DENSE; - else - io.swiz = IOSWIZZLE_SPARSE; - io.swp = &ioswtch[io.swiz]; - - __set_errno (olderrno); - return 0; - } - } - - __set_errno (ENODEV); - fprintf(stderr, "ioperm.init_iosys: Platform not recognized.\n" - "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n"); - return -1; -} - - -int -_ioperm (unsigned long int from, unsigned long int num, int turn_on) -{ - unsigned long int addr, len, pagesize = __getpagesize(); - int prot; - - if (!io.swp && init_iosys() < 0) - { -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: init_iosys() failed (%m)\n"); -#endif - return -1; - } - - /* This test isn't as silly as it may look like; consider overflows! */ - if (from >= MAX_PORT || from + num > MAX_PORT) - { - __set_errno (EINVAL); -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: from/num out of range\n"); -#endif - return -1; - } - -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base); -#endif - - if (turn_on) - { - if (!io.base) - { - int fd; - - io.hae_cache = 0; - if (io.swiz != IOSWIZZLE_DENSE) - { - /* Synchronize with hw. */ - __sethae (0); - } - - fd = __open ("/dev/mem", O_RDWR); - if (fd < 0) - { -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: /dev/mem open failed (%m)\n"); -#endif - return -1; - } - - addr = port_to_cpu_addr (0, io.swiz, 1); - len = port_to_cpu_addr (MAX_PORT, io.swiz, 1) - addr; - io.base = - (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, - fd, io.io_base); - __close (fd); -#ifdef DEBUG_IOPERM - fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n", - len, io.base); -#endif - if ((long) io.base == -1) - return -1; - } - prot = PROT_READ | PROT_WRITE; - } - else - { - if (!io.base) - return 0; /* never was turned on... */ - - /* turnoff access to relevant pages: */ - prot = PROT_NONE; - } - addr = port_to_cpu_addr (from, io.swiz, 1); - addr &= ~(pagesize - 1); - len = port_to_cpu_addr (from + num, io.swiz, 1) - addr; - return __mprotect ((void *) addr, len, prot); -} - - -int -_iopl (int level) -{ - switch (level) - { - case 0: - return 0; - - case 1: case 2: case 3: - return _ioperm (0, MAX_PORT, 1); - - default: - __set_errno (EINVAL); - return -1; - } -} - - -void -_sethae (unsigned long int addr) -{ - if (!io.swp && init_iosys () < 0) - return; - - io.swp->sethae (addr); -} - - -void -_outb (unsigned char b, unsigned long int port) -{ - if (port >= MAX_PORT) - return; - - io.swp->outb (b, port); -} - - -void -_outw (unsigned short b, unsigned long int port) -{ - if (port >= MAX_PORT) - return; - - io.swp->outw (b, port); -} - - -void -_outl (unsigned int b, unsigned long int port) -{ - if (port >= MAX_PORT) - return; - - io.swp->outl (b, port); -} - - -unsigned int -_inb (unsigned long int port) -{ - return io.swp->inb (port); -} - - -unsigned int -_inw (unsigned long int port) -{ - return io.swp->inw (port); -} - - -unsigned int -_inl (unsigned long int port) -{ - return io.swp->inl (port); -} - - -unsigned long int -_bus_base(void) -{ - if (!io.swp && init_iosys () < 0) - return -1; - return io.bus_memory_base; -} - -unsigned long int -_bus_base_sparse(void) -{ - if (!io.swp && init_iosys () < 0) - return -1; - return io.sparse_bus_memory_base; -} - -int -_hae_shift(void) -{ - if (!io.swp && init_iosys () < 0) - return -1; - if (io.swiz == IOSWIZZLE_JENSEN) - return 7; - if (io.swiz == IOSWIZZLE_SPARSE) - return 5; - return 0; -} - -weak_alias (_sethae, sethae); -weak_alias (_ioperm, ioperm); -weak_alias (_iopl, iopl); -weak_alias (_inb, inb); -weak_alias (_inw, inw); -weak_alias (_inl, inl); -weak_alias (_outb, outb); -weak_alias (_outw, outw); -weak_alias (_outl, outl); -weak_alias (_bus_base, bus_base); -weak_alias (_bus_base_sparse, bus_base_sparse); -weak_alias (_hae_shift, hae_shift); diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h deleted file mode 100644 index 0328dc08e2..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1995-1999, 2000, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#define __IPC_64 0x100 - -struct __old_ipc_perm -{ - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ -}; - - -/* The codes for the functions to use the ipc syscall multiplexer. */ -#define IPCOP_semop 1 -#define IPCOP_semget 2 -#define IPCOP_semctl 3 -#define IPCOP_semtimedop 4 -#define IPCOP_msgsnd 11 -#define IPCOP_msgrcv 12 -#define IPCOP_msgget 13 -#define IPCOP_msgctl 14 -#define IPCOP_shmat 21 -#define IPCOP_shmdt 22 -#define IPCOP_shmget 23 -#define IPCOP_shmctl 24 diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h deleted file mode 100644 index 4c35d969cf..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h +++ /dev/null @@ -1,15 +0,0 @@ -/* This is the sigaction struction from the Linux 2.1.20 kernel. */ - -struct old_kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_mask; - unsigned int sa_flags; -}; - -/* This is the sigaction structure from the Linux 2.1.68 kernel. */ - -struct kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned int sa_flags; - sigset_t sa_mask; -}; diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h deleted file mode 100644 index a1d012ab01..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Definition of `struct stat' used in the kernel. */ -struct kernel_stat - { - unsigned int st_dev; - unsigned int st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned int st_uid; - unsigned int st_gid; - unsigned int st_rdev; - long int st_size; - unsigned long int st_atime; - unsigned long int st_mtime; - unsigned long int st_ctime; - unsigned int st_blksize; - int st_blocks; - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Definition of `struct stat64' used in the kernel. */ -struct kernel_stat64 - { - unsigned long st_dev; - unsigned long st_ino; - unsigned long st_rdev; - long st_size; - unsigned long st_blocks; - - unsigned int st_mode; - unsigned int st_uid; - unsigned int st_gid; - unsigned int st_blksize; - unsigned int st_nlink; - unsigned int __pad0; - - unsigned long st_atime; - unsigned long st_atimensec; - unsigned long st_mtime; - unsigned long st_mtimensec; - unsigned long st_ctime; - unsigned long st_ctimensec; - long __unused[3]; - }; - -/* Definition of `struct stat' used by glibc 2.0. */ -struct glibc2_stat - { - __dev_t st_dev; - __ino_t st_ino; - __mode_t st_mode; - __nlink_t st_nlink; - __uid_t st_uid; - __gid_t st_gid; - __dev_t st_rdev; - __off_t st_size; - __time_t st_atime; - __time_t st_mtime; - __time_t st_ctime; - unsigned int st_blksize; - int st_blocks; - unsigned int st_flags; - unsigned int st_gen; - }; - -/* Definition of `struct stat' used by glibc 2.1. */ -struct glibc21_stat - { - __dev_t st_dev; - __ino64_t st_ino; - __mode_t st_mode; - __nlink_t st_nlink; - __uid_t st_uid; - __gid_t st_gid; - __dev_t st_rdev; - __off_t st_size; - __time_t st_atime; - __time_t st_mtime; - __time_t st_ctime; - __blkcnt64_t st_blocks; - __blksize_t st_blksize; - unsigned int st_flags; - unsigned int st_gen; - int __pad3; - long __unused[4]; - }; - -#define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h b/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h deleted file mode 100644 index a3edec2269..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h +++ /dev/null @@ -1,6 +0,0 @@ -/* A copy of the couple of bits we need from . */ - -#define GSI_IEEE_FP_CONTROL 45 - -#define SSI_IEEE_FP_CONTROL 14 -#define SSI_IEEE_RAISE_EXCEPTION 1001 diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h deleted file mode 100644 index c38f1fac1a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h +++ /dev/null @@ -1,44 +0,0 @@ -/* 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 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _KERNEL_TERMIOS_H -#define _KERNEL_TERMIOS_H 1 - -/* The following corresponds to the values from the Linux 2.1.20 kernel. */ - -/* We need the definition of tcflag_t, cc_t, and speed_t. */ -#include - -#define __KERNEL_NCCS 19 - -struct __kernel_termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_cc[__KERNEL_NCCS]; /* control characters */ - cc_t c_line; /* line discipline */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -#define _HAVE_C_ISPEED 1 -#define _HAVE_C_OSPEED 1 - -#endif /* kernel_termios.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/sysdeps/unix/sysv/linux/alpha/lxstat.c deleted file mode 100644 index 38fac2e2b2..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/lxstat.c +++ /dev/null @@ -1,64 +0,0 @@ -/* lxstat using old-style Unix stat system call. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __lxstat64 __lxstat64_disable - -#include -#include -#include -#include -#include -#include -#include - -#undef __lxstat64 - - -/* Get information about the file NAME in BUF. */ -int -__lxstat (int vers, const char *name, struct stat *buf) -{ - INTERNAL_SYSCALL_DECL (err); - int result, errno_out; - struct kernel_stat kbuf; - - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - goto fail; - __libc_missing_axp_stat64 = 1; - } - - result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); - return -1; -} -hidden_def (__lxstat) -weak_alias (__lxstat, _lxstat); -strong_alias (__lxstat, __lxstat64); -hidden_ver (__lxstat, __lxstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/makecontext.S b/sysdeps/unix/sysv/linux/alpha/makecontext.S deleted file mode 100644 index 223117e26d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/makecontext.S +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - - -ENTRY(__makecontext) - ldgp $29, 0($27) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - /* Compute top of stack, including arguments. */ - ldq $1, UC_STACK+SS_SP($16) - ldq $2, UC_STACK+SS_SIZE($16) - addq $1, $2, $8 - subq $18, 6, $1 - cmovlt $1, 0, $1 - s8addq $1, 0, $2 - subq $8, $2, $8 - - /* Copy all parameters. Switch statement header here. */ - ldah $3, $jumptable($29) !gprelhigh - cmple $18, 6, $1 - mov $18, $2 - cmoveq $1, 7, $2 - s4addq $2, $3, $3 - ldl $4, $jumptable($3) !gprellow - addq $4, $29, $4 - jmp $31, ($4), $args1 - - .section .rodata - .align 2 -$jumptable: - .gprel32 $args0 - .gprel32 $args1 - .gprel32 $args2 - .gprel32 $args3 - .gprel32 $args4 - .gprel32 $args5 - .gprel32 $args6 - .gprel32 $argsN - .text - - /* Here we process arguments 7 through N. This is a straight - stack-to-stack copy. */ - .align 4 -$argsN: - subq $18, 6, $1 - lda $2, 0($8) - lda $3, 3*8($30) - .align 4 -1: - ldq $0, 0($3) - subq $1, 1, $1 - lda $3, 8($3) - stq $0, 0($2) - lda $2, 8($2) - bne $1, 1b - - /* Here we process arguments 6 through 0. This involves - copying into the register save areas of the ucontext. */ - .align 4 -$args6: - ldq $0, 2*8($30) - stq $0, UC_SIGCTX+SC_REGS+21*8($16) - unop - stq $0, UC_SIGCTX+SC_FPREGS+21*8($16) -$args5: - ldq $0, 1*8($30) - stq $0, UC_SIGCTX+SC_REGS+20*8($16) - unop - stq $0, UC_SIGCTX+SC_FPREGS+20*8($16) -$args4: - ldq $0, 0*8($30) - stq $0, UC_SIGCTX+SC_REGS+19*8($16) - unop - stq $0, UC_SIGCTX+SC_FPREGS+19*8($16) -$args3: - unop - stq $21, UC_SIGCTX+SC_REGS+18*8($16) - unop - stt $f21, UC_SIGCTX+SC_FPREGS+18*8($16) -$args2: - unop - stq $20, UC_SIGCTX+SC_REGS+17*8($16) - unop - stt $f20, UC_SIGCTX+SC_FPREGS+17*8($16) -$args1: - unop - stq $19, UC_SIGCTX+SC_REGS+16*8($16) - unop - stt $f19, UC_SIGCTX+SC_FPREGS+16*8($16) -$args0: - - /* Set up the registers ready to invoke __startcontext. - We seed $27 with the target function address, and $9 - with the link from ucp. */ - ldah $0, __startcontext($29) !gprelhigh - ldq $1, UC_LINK($16) - lda $0, __startcontext($0) !gprellow - stq $17, UC_SIGCTX+SC_REGS+27*8($16) - stq $8, UC_SIGCTX+SC_REGS+30*8($16) - stq $0, UC_SIGCTX+SC_PC($16) - stq $1, UC_SIGCTX+SC_REGS+9*8($16) - - /* No return value from makecontext. */ - ret - -END(__makecontext) -weak_alias (__makecontext, makecontext) - -/* This function is where a new makecontext "thread" begins life. - We have already set up $27 for calling the target function, and - we've set $9 to the UC_LINK of the parent context. - - If the function returns, we either jump to the linked context - (if non-null) or exit. */ - - .align 4 - .ent __startcontext -__startcontext: - .frame $31, 0, $31, 0 - .prologue 0 - - jsr $26, ($27), 0 - ldgp $29, 0($26) - mov $9, $16 - beq $9, 1f - -#ifdef PIC - bsr $26, __setcontext !samegp -1: mov $31, $16 - bsr $26, HIDDEN_JUMPTARGET(exit) !samegp -#else - jsr $26, __setcontext - ldgp $29, 0($26) -1: mov $31, $16 - jsr $26, HIDDEN_JUMPTARGET(exit) -#endif - - halt - - .end __startcontext diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c deleted file mode 100644 index a59911fe40..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include -#include -#include - -#include - -struct __old_msqid_ds -{ - struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__unbounded __msg_first; /* pointer to first message on queue */ - struct msg *__unbounded __msg_last; /* pointer to last message on queue */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - struct wait_queue *__unbounded __wwait; /* ??? */ - struct wait_queue *__unbounded __rwait; /* ??? */ - unsigned short int __msg_cbytes; /* current number of bytes on queue */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ - __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ - __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ -}; - -/* Allows to control internal state and destruction of message queue - objects. */ -int __new_msgctl (int, int, struct msqid_ds *); - -int -__new_msgctl (int msqid, int cmd, struct msqid_ds *buf) -{ - /* This is a misnomer -- Alpha had 32-bit uids at the beginning - of time. However, msg_qnum and msg_qbytes changed size at - the same time the size of uid changed elsewhere. */ -#if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); -#else - switch (cmd) { - case MSG_STAT: - case IPC_STAT: - case IPC_SET: - break; - default: - return INLINE_SYSCALL (msgctl, 3, msqid, cmd, CHECK_1 (buf)); - } - - { - int save_errno = errno, result; - struct __old_msqid_ds old; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new msgctl. */ - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - if (cmd == IPC_SET) - { - old.msg_perm.uid = buf->msg_perm.uid; - old.msg_perm.gid = buf->msg_perm.gid; - old.msg_perm.mode = buf->msg_perm.mode; - old.msg_qbytes = buf->msg_qbytes; - if (old.msg_perm.uid != buf->msg_perm.uid || - old.msg_perm.gid != buf->msg_perm.gid || - old.msg_qbytes != buf->msg_qbytes) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, __ptrvalue (&old)); - if (result != -1 && cmd != IPC_SET) - { - memset(buf, 0, sizeof(*buf)); - buf->msg_perm.__key = old.msg_perm.__key; - buf->msg_perm.uid = old.msg_perm.uid; - buf->msg_perm.gid = old.msg_perm.gid; - buf->msg_perm.cuid = old.msg_perm.cuid; - buf->msg_perm.cgid = old.msg_perm.cgid; - buf->msg_perm.mode = old.msg_perm.mode; - buf->msg_perm.__seq = old.msg_perm.__seq; - buf->msg_stime = old.msg_stime; - buf->msg_rtime = old.msg_rtime; - buf->msg_ctime = old.msg_ctime; - buf->__msg_cbytes = old.__msg_cbytes; - buf->msg_qnum = old.msg_qnum; - buf->msg_qbytes = old.msg_qbytes; - buf->msg_lspid = old.msg_lspid; - buf->msg_lrpid = old.msg_lrpid; - } - return result; - } -#endif -} - -#include -versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h b/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h deleted file mode 100644 index bd985cc59c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h +++ /dev/null @@ -1,8 +0,0 @@ -/* ABI version for long double switch. - This is used by the Versions and math_ldbl_opt.h files in - sysdeps/ieee754/ldbl-opt/. It gives the ABI version where - long double == double was replaced with proper long double - for libm *l functions and libc functions using long double. */ - -#define NLDBL_VERSION GLIBC_2.4 -#define LONG_DOUBLE_COMPAT_VERSION GLIBC_2_4 diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c deleted file mode 100644 index 6d9b79f2c3..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/oldglob.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 1998, 2000, 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This file contains only wrappers around the real glob functions. It - became necessary since the glob_t structure changed. */ -#include -#include -#include - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) - -/* This is the old structure. The difference is that the gl_pathc and - gl_offs elements have type `int'. */ -typedef struct - { - int gl_pathc; /* Count of paths matched by the pattern. */ - char **gl_pathv; /* List of matched pathnames. */ - int gl_offs; /* Slots to reserve in `gl_pathv'. */ - int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ - - /* If the GLOB_ALTDIRFUNC flag is set, the following functions - are used instead of the normal file access functions. */ - void (*gl_closedir) (void *); - struct dirent *(*gl_readdir) (void *); - __ptr_t (*gl_opendir) (__const char *); - int (*gl_lstat) (__const char *, struct stat *); - int (*gl_stat) (__const char *, struct stat *); - } old_glob_t; - - -int -attribute_compat_text_section -__old_glob (const char *pattern, int flags, - int (*errfunc) (const char *, int), - old_glob_t *pglob) -{ - glob_t correct; - int result; - - /* Construct an object of correct type. */ - correct.gl_pathc = pglob->gl_pathc; - correct.gl_pathv = pglob->gl_pathv; - correct.gl_offs = pglob->gl_offs; - correct.gl_flags = pglob->gl_flags; - correct.gl_closedir = pglob->gl_closedir; - correct.gl_readdir = pglob->gl_readdir; - correct.gl_opendir = pglob->gl_opendir; - correct.gl_lstat = pglob->gl_lstat; - correct.gl_stat = pglob->gl_stat; - - result = glob (pattern, flags, errfunc, &correct); - - /* And convert it back. */ - pglob->gl_pathc = correct.gl_pathc; - pglob->gl_pathv = correct.gl_pathv; - pglob->gl_offs = correct.gl_offs; - pglob->gl_flags = correct.gl_flags; - pglob->gl_closedir = correct.gl_closedir; - pglob->gl_readdir = correct.gl_readdir; - pglob->gl_opendir = correct.gl_opendir; - pglob->gl_lstat = correct.gl_lstat; - pglob->gl_stat = correct.gl_stat; - - return result; -} -compat_symbol (libc, __old_glob, glob, GLIBC_2_0); - - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -void -attribute_compat_text_section -__old_globfree (old_glob_t *pglob) -{ - glob_t correct; - - /* We only need these two symbols. */ - correct.gl_pathc = pglob->gl_pathc; - correct.gl_pathv = pglob->gl_pathv; - correct.gl_offs = pglob->gl_offs; - - globfree (&correct); -} -compat_symbol (libc, __old_globfree, globfree, GLIBC_2_0); - -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S deleted file mode 100644 index 1e7ec1c199..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/pipe.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h deleted file mode 100644 index 77f962952a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/register-dump.h +++ /dev/null @@ -1,157 +0,0 @@ -/* Dump registers. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -/* We will print the register dump in this format: - - V0: XXXXXXXXXXXXXXXX T0: XXXXXXXXXXXXXXXX T1: XXXXXXXXXXXXXXXX - T2: XXXXXXXXXXXXXXXX T3: XXXXXXXXXXXXXXXX T4: XXXXXXXXXXXXXXXX - T5: XXXXXXXXXXXXXXXX T6: XXXXXXXXXXXXXXXX T7: XXXXXXXXXXXXXXXX - S0: XXXXXXXXXXXXXXXX S1: XXXXXXXXXXXXXXXX S2: XXXXXXXXXXXXXXXX - S3: XXXXXXXXXXXXXXXX S4: XXXXXXXXXXXXXXXX S5: XXXXXXXXXXXXXXXX - S6: XXXXXXXXXXXXXXXX A0: XXXXXXXXXXXXXXXX A1: XXXXXXXXXXXXXXXX - A2: XXXXXXXXXXXXXXXX A3: XXXXXXXXXXXXXXXX A4: XXXXXXXXXXXXXXXX - A5: XXXXXXXXXXXXXXXX T8: XXXXXXXXXXXXXXXX T9: XXXXXXXXXXXXXXXX - T10: XXXXXXXXXXXXXXXX T11: XXXXXXXXXXXXXXXX RA: XXXXXXXXXXXXXXXX - T12: XXXXXXXXXXXXXXXX AT: XXXXXXXXXXXXXXXX GP: XXXXXXXXXXXXXXXX - SP: XXXXXXXXXXXXXXXX PC: XXXXXXXXXXXXXXXX - - FP0: XXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXX FP2: XXXXXXXXXXXXXXXX - FP3: XXXXXXXXXXXXXXXX FP4: XXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXX - FP6: XXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXX FP8: XXXXXXXXXXXXXXXX - FP9: XXXXXXXXXXXXXXXX FP10: XXXXXXXXXXXXXXXX FP11: XXXXXXXXXXXXXXXX - FP12: XXXXXXXXXXXXXXXX FP13: XXXXXXXXXXXXXXXX FP14: XXXXXXXXXXXXXXXX - FP15: XXXXXXXXXXXXXXXX FP16: XXXXXXXXXXXXXXXX FP17: XXXXXXXXXXXXXXXX - FP18: XXXXXXXXXXXXXXXX FP19: XXXXXXXXXXXXXXXX FP20: XXXXXXXXXXXXXXXX - FP21: XXXXXXXXXXXXXXXX FP22: XXXXXXXXXXXXXXXX FP23: XXXXXXXXXXXXXXXX - FP24: XXXXXXXXXXXXXXXX FP25: XXXXXXXXXXXXXXXX FP26: XXXXXXXXXXXXXXXX - FP27: XXXXXXXXXXXXXXXX FP28: XXXXXXXXXXXXXXXX FP29: XXXXXXXXXXXXXXXX - FP30: XXXXXXXXXXXXXXXX FPCR: XXXXXXXXXXXXXXXX - - TA0: XXXXXXXXXXXXXXXX TA1: XXXXXXXXXXXXXXXX TA2: XXXXXXXXXXXXXXXX -*/ - -#define NREGS (32+32+3) - -static const char __attribute__((aligned(8))) regnames[NREGS][8] = -{ - " V0: ", " T0: ", " T1: ", - " T2: ", " T3: ", " T4: ", - " T5: ", " T6: ", " T7: ", - " S0: ", " S1: ", " S2: ", - " S3: ", " S4: ", " S5: ", - " S6: ", " A0: ", " A1: ", - " A2: ", " A3: ", " A4: ", - " A5: ", " T8: ", " T9: ", - " T10: ", " T11: ", " RA: ", - " T12: ", " AT: ", " GP: ", - " SP: ", " PC: ", - - " FP0: ", " FP1: ", " FP2: ", - " FP3: ", " FP4: ", " FP5: ", - " FP6: ", " FP7: ", " FP8: ", - " FP9: ", " FP10: ", " FP11: ", - " FP12: ", " FP13: ", " FP14: ", - " FP15: ", " FP16: ", " FP17: ", - " FP18: ", " FP19: ", " FP20: ", - " FP21: ", " FP22: ", " FP23: ", - " FP24: ", " FP25: ", " FP26: ", - " FP27: ", " FP28: ", " FP29: ", - " FP30: ", " FPCR: ", - - " TA0: ", " TA1: ", " TA2: " -}; - -#define O(FIELD, LF) offsetof(struct sigcontext, FIELD) + LF - -static const int offsets[NREGS] = -{ - O(sc_regs[0], 0), O(sc_regs[1], 0), O(sc_regs[2], 1), - O(sc_regs[3], 0), O(sc_regs[4], 0), O(sc_regs[5], 1), - O(sc_regs[6], 0), O(sc_regs[7], 0), O(sc_regs[8], 1), - O(sc_regs[9], 0), O(sc_regs[10], 0), O(sc_regs[11], 1), - O(sc_regs[12], 0), O(sc_regs[13], 0), O(sc_regs[14], 1), - O(sc_regs[15], 0), O(sc_regs[16], 0), O(sc_regs[17], 1), - O(sc_regs[18], 0), O(sc_regs[19], 0), O(sc_regs[20], 1), - O(sc_regs[21], 0), O(sc_regs[22], 0), O(sc_regs[23], 1), - O(sc_regs[24], 0), O(sc_regs[25], 0), O(sc_regs[26], 1), - O(sc_regs[27], 0), O(sc_regs[28], 0), O(sc_regs[29], 1), - O(sc_regs[30], 0), O(sc_pc, 2), - - O(sc_fpregs[0], 0), O(sc_fpregs[1], 0), O(sc_fpregs[2], 1), - O(sc_fpregs[3], 0), O(sc_fpregs[4], 0), O(sc_fpregs[5], 1), - O(sc_fpregs[6], 0), O(sc_fpregs[7], 0), O(sc_fpregs[8], 1), - O(sc_fpregs[9], 0), O(sc_fpregs[10], 0), O(sc_fpregs[11], 1), - O(sc_fpregs[12], 0), O(sc_fpregs[13], 0), O(sc_fpregs[14], 1), - O(sc_fpregs[15], 0), O(sc_fpregs[16], 0), O(sc_fpregs[17], 1), - O(sc_fpregs[18], 0), O(sc_fpregs[19], 0), O(sc_fpregs[20], 1), - O(sc_fpregs[21], 0), O(sc_fpregs[22], 0), O(sc_fpregs[23], 1), - O(sc_fpregs[24], 0), O(sc_fpregs[25], 0), O(sc_fpregs[26], 1), - O(sc_fpregs[27], 0), O(sc_fpregs[28], 0), O(sc_fpregs[29], 1), - O(sc_fpregs[30], 0), O(sc_fpcr, 2), - - O(sc_traparg_a0, 0), O(sc_traparg_a1, 0), O(sc_traparg_a2, 1) -}; - -#undef O - -static void -register_dump (int fd, struct sigcontext *ctx) -{ - char buf[NREGS*(8+16) + 25 + 80]; - char *p = buf; - size_t i; - - p = stpcpy (p, "Register dump:\n\n"); - - for (i = 0; i < NREGS; ++i) - { - int this_offset, this_lf; - unsigned long val; - signed long j; - - this_offset = offsets[i]; - this_lf = this_offset & 7; - - val = *(unsigned long *)(((size_t)ctx + this_offset) & -8); - - memcpy (p, regnames[i], 8); - p += 8; - - for (j = 60; j >= 0; j -= 4) - { - unsigned long x = (val >> j) & 15; - x += x < 10 ? '0' : 'a' - 10; - *p++ = x; - } - - if (this_lf > 0) - { - if (this_lf > 1) - *p++ = '\n'; - *p++ = '\n'; - } - } - - write (fd, buf, p - buf); -} - -#define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S deleted file mode 100644 index e27949feff..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 1998, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson , 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily - the kernel would have to issue one after setting up the signal return - stack, but the Linux rt_sigaction syscall is prepared to accept a pointer - to the sigreturn syscall, instead of inlining it on the stack. - - This just about halves signal delivery time. */ - - .text - -ENTRY(__syscall_rt_sigaction) - .frame sp,0,ra,0 - ldgp gp,0(pv) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - beq a1, 0f - ldl t0, 8(a1) # sa_flags - - /* The unwinder will subtract one from the return address when - attempting to find the call instruction that led us here. - Since we didn't get here via a normal call, if we do nothing - we would pick up the wrong symbol and the wrong FDE. Account - for this by adding a nop to the start of the function and - then skipping it here by adding 4. */ - ldah a4, __syscall_sigreturn+4(gp) !gprelhigh - ldah t1, __syscall_rt_sigreturn+4(gp) !gprelhigh - lda a4, __syscall_sigreturn+4(a4) !gprellow - lda t1, __syscall_rt_sigreturn+4(t1) !gprellow - and t0, 0x40, t0 # SA_SIGINFO - cmovne t0, t1, a4 - -0: ldi v0, __NR_rt_sigaction - callsys - bne a3, SYSCALL_ERROR_LABEL - ret - -PSEUDO_END(__syscall_rt_sigaction) - -/* To enable unwinding through the signal frame without special hackery - elsewhere, describe the entire struct sigcontext with unwind info. - - In order to minimize the size of the encoding, we set the CFA to the - end of the sigcontext, which makes all of the registers have small - negative offsets from that. */ - - .macro SIGCONTEXT_REGS_I base, from=0 - cfi_offset (\from, \base + (4 + \from) * 8) - .if 30-\from - SIGCONTEXT_REGS_I \base, "(\from+1)" - .endif - .endm - - .macro SIGCONTEXT_REGS_F base, from=32 - cfi_offset (\from, \base + (4 + 1 + \from) * 8) - .if 62-\from - SIGCONTEXT_REGS_F \base, "(\from+1)" - .endif - .endm - - .macro SIGCONTEXT_REGS base - SIGCONTEXT_REGS_I \base - SIGCONTEXT_REGS_F \base - cfi_offset (63, \base + (4 + 32 + 1 + 32) * 8) - cfi_offset (64, \base + 2 * 8) - .endm - - .align 4 - nop - nop - nop - - cfi_startproc - cfi_return_column (64) - SIGCONTEXT_REGS -648 - - cfi_def_cfa_offset (648) -__syscall_sigreturn: - nop - mov sp, a0 - ldi v0, __NR_sigreturn - callsys - .size __syscall_sigreturn, .-__syscall_sigreturn - .type __syscall_sigreturn, @function - - cfi_def_cfa_offset (176 + 648) -__syscall_rt_sigreturn: - nop - mov sp,a0 - ldi v0,__NR_rt_sigreturn - callsys - .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn - .type __syscall_rt_sigreturn, @function - - cfi_endproc diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S deleted file mode 100644 index 35a81e949f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/select.S +++ /dev/null @@ -1,241 +0,0 @@ -/* Copyright (C) 1998,2002,2003,2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SELECT __select_tv64 -#else -#define SELECT __select -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SELECT, select, 5) - ret -PSEUDO_END(SELECT) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SELECT, 64) - ldgp gp, 0(pv) - subq sp, 64, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - stq ra, 40(sp) - .mask 0x4000000, 40-64 - .prologue 1 - -#ifdef CENABLE - SINGLE_THREAD_P (t1) -#else - ldl t0, __libc_missing_axp_tv64 -#endif - - /* Save timeout early, since we'll need to recover this after - the system call. */ - stq a4, 48(sp) - -#ifdef CENABLE - bne t1, $do_cancel -#endif - - bne t0, $do32 - - /* Save arguments in case we do need to fall back. */ - stq a0, 8(sp) - stq a1, 16(sp) - stq a2, 24(sp) - stq a3, 32(sp) - - ldi v0, SYS_ify(select) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 64, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - .align 3 -$do32: - /* If the timeout argument is present bounce to the smaller fmt. */ - beq a4, 1f - ldq t0, 0(a4) - ldq t1, 8(a4) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a4 - -1: ldi v0, SYS_ify(osf_select) - callsys - bne a3, $error - - /* ... and bounce the remaining timeout back. */ - ldq a4, 48(sp) - beq a4, 2f - ldl t0, 0(sp) - ldl t1, 4(sp) - stq t0, 0(a4) - stq t1, 8(a4) - -2: addq sp, 64, sp - ret - -#ifdef CENABLE - .align 3 -$do_cancel: - /* Save arguments. */ - stq a0, 8(sp) - stq a1, 16(sp) - stq a2, 24(sp) - stq a3, 32(sp) - - CENABLE - mov v0, ra - - ldl t0, __libc_missing_axp_tv64 - bne t0, $do_cancel32 - - /* Recover the saved arguments. */ - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - ldi v0, SYS_ify(select) - callsys - - mov ra, a0 - bne a3, $cancel_err64 - - stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) - - /* Everything ok. */ - addq sp, 64, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$cancel_err64: - cmpeq v0, ENOSYS, t0 - beq t0, $cancel_error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - .align 3 -$do_cancel32: - ldq a4, 48(sp) - ldq a3, 32(sp) - ldq a2, 24(sp) - ldq a1, 16(sp) - ldq a0, 8(sp) - - /* If the timeout argument is present bounce to the smaller fmt. */ - beq a4, 1f - ldq t0, 0(a4) - ldq t1, 8(a4) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a4 - -1: ldi v0, SYS_ify(osf_select) - callsys - - mov ra, a0 - bne a3, $cancel_error - - /* ... and bounce the remaining timeout back. */ - ldq a4, 48(sp) - beq a4, 2f - ldl t0, 0(sp) - ldl t1, 4(sp) - stq t0, 0(a4) - stq t1, 8(a4) - -2: stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) - - addq sp, 64, sp - ret - - .align 3 -$cancel_error: - stq v0, 8(sp) - CDISABLE - ldq v0, 8(sp) - ldq ra, 40(sp) -#endif - - .align 3 -$error: - addq sp, 64, sp - SYSCALL_ERROR_HANDLER - -END(SELECT) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__select_tv64, __select, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__select_tv64, __select_tv64p) -default_symbol_version (__select_tv64p, select, GLIBC_2.1) -libc_hidden_ver (__select_tv64, __select) -strong_alias (__select_tv64, __libc_select) -#else -strong_alias (__select, __libc_select) -weak_alias (__select, select) -libc_hidden_def (__select) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c deleted file mode 100644 index 9957f983bf..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/semctl.c +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include - -#include -#include -#include - -#include - -struct __old_semid_ds -{ - struct __old_ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - struct sem *__sembase; /* ptr to first semaphore in array */ - struct sem_queue *__sem_pending; /* pending operations */ - struct sem_queue *__sem_pending_last; /* last pending operation */ - struct sem_undo *__undo; /* ondo requests on this array */ - unsigned short int sem_nsems; /* number of semaphores in set */ -}; - -/* Define a `union semun' suitable for Linux here. */ -union semun -{ - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - unsigned short int *array; /* array for GETALL & SETALL */ - struct seminfo *__buf; /* buffer for IPC_INFO */ -}; - -#include -#include /* definition of CHECK_SEMCTL needs union semum */ - -/* Return identifier for array of NSEMS semaphores associated with - KEY. */ -int __new_semctl (int semid, int semnum, int cmd, ...); - -int -__new_semctl (int semid, int semnum, int cmd, ...) -{ - union semun arg; - va_list ap; - - va_start (ap, cmd); - - /* Get the argument. */ - arg = va_arg (ap, union semun); - - va_end (ap); - -#if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, - CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); -#else - switch (cmd) { - case SEM_STAT: - case IPC_STAT: - case IPC_SET: - break; - default: - return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)->array); - } - - { - int save_errno = errno, result; - struct __old_semid_ds old; - struct semid_ds *buf; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new semctl. */ - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, - CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - buf = arg.buf; - arg.buf = (void *)&old; - if (cmd == IPC_SET) - { - old.sem_perm.uid = buf->sem_perm.uid; - old.sem_perm.gid = buf->sem_perm.gid; - old.sem_perm.mode = buf->sem_perm.mode; - if (old.sem_perm.uid != buf->sem_perm.uid || - old.sem_perm.gid != buf->sem_perm.gid) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, - CHECK_SEMCTL (&arg, semid, cmd)->array); - if (result != -1 && cmd != IPC_SET) - { - memset(buf, 0, sizeof(*buf)); - buf->sem_perm.__key = old.sem_perm.__key; - buf->sem_perm.uid = old.sem_perm.uid; - buf->sem_perm.gid = old.sem_perm.gid; - buf->sem_perm.cuid = old.sem_perm.cuid; - buf->sem_perm.cgid = old.sem_perm.cgid; - buf->sem_perm.mode = old.sem_perm.mode; - buf->sem_perm.__seq = old.sem_perm.__seq; - buf->sem_otime = old.sem_otime; - buf->sem_ctime = old.sem_ctime; - buf->sem_nsems = old.sem_nsems; - } - return result; - } -#endif -} - -#include -versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S deleted file mode 100644 index 27abfd0c12..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setcontext.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Install given context. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - - -/* In case the user fiddled it, copy the "official" signal mask - from the ucontext_t into the sigcontext structure. */ -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS \ - ldq $0, UC_SIGMASK($16); \ - stq $0, UC_SIGCTX+SC_MASK($16); \ - lda $16, UC_SIGCTX($16); - -PSEUDO(__setcontext, sigreturn, 1) - ret -PSEUDO_END(__setcontext) -weak_alias (__setcontext, setcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c deleted file mode 100644 index a7e3a55812..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Set FP exception mask and rounding mode. - Copyright (C) 1996, 1997, 1998, 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -extern void __ieee_set_fp_control (unsigned long); -libc_hidden_proto(__ieee_set_fp_control) - -extern unsigned long __ieee_get_fp_control (void); -libc_hidden_proto(__ieee_get_fp_control) - -static inline unsigned long -rdfpcr (void) -{ - unsigned long fpcr; - asm ("excb; mf_fpcr %0" : "=f"(fpcr)); - return fpcr; -} - - -static inline void -wrfpcr (unsigned long fpcr) -{ - asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr)); -} - - -void -__setfpucw (fpu_control_t fpu_control) -{ - unsigned long fpcr = 0, fpcw = 0; - - if (!fpu_control) - fpu_control = _FPU_DEFAULT; - - /* first, set dynamic rounding mode: */ - - fpcr = rdfpcr(); - fpcr &= ~FPCR_DYN_MASK; - switch (fpu_control & 0xc00) - { - case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; - case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; - case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; - case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; - } - wrfpcr(fpcr); - - /* now tell kernel about traps that we like to hear about: */ - - fpcw = __ieee_get_fp_control(); - fpcw &= ~IEEE_TRAP_ENABLE_MASK; - - if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV; - if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF; - if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE; - if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF; - if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE; - - __fpu_control = fpu_control; /* update global copy */ - - __ieee_set_fp_control(fpcw); -} diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S deleted file mode 100644 index 59caeac680..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setitimer.S +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SETITIMER __setitimer_tv64 -#else -#define SETITIMER __setitimer -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SETITIMER, setitimer, 3) - ret -PSEUDO_END(SETITIMER) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SETITIMER, 48) - ldgp gp, 0(pv) - subq sp, 48, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - stq a2, 16(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(setitimer) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 48, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a2, 16(sp) - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce new value down. */ - beq a1, 1f - ldq t0, 0(a1) - ldq t1, 8(a1) - ldq t2, 16(a1) - ldq t3, 24(a1) - stl t0, 32(sp) - stl t1, 36(sp) - stl t2, 40(sp) - stl t3, 44(sp) - addq sp, 32, a1 - -1: ldi v0, SYS_ify(osf_setitimer) - callsys - bne a3, $error - - /* Conditionaly bounce old value up. */ - ldq a2, 16(sp) - bne a2, 2f - ldl t0, 0(a2) - ldl t1, 4(a2) - ldl t2, 8(a2) - ldl t3, 12(a2) - stq t0, 0(a2) - stq t1, 8(a2) - stq t2, 48(a2) - stq t3, 24(a2) - -2: addq sp, 48, sp - ret - - .align 3 -$error: - addq sp, 48, sp - SYSCALL_ERROR_HANDLER - -END(SETITIMER) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__setitimer_tv64, __setitimer_tv64p) -default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1) -#else -weak_alias (__setitimer, setitimer) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c deleted file mode 100644 index 0973fe4ac1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setregid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - - -int -__setregid (gid_t rgid, gid_t egid) -{ - return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid); -} -#ifndef __setregid -weak_alias (__setregid, setregid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c deleted file mode 100644 index 50e29e3c76..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setresgid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - - -int -__setresgid (gid_t rgid, gid_t egid, gid_t sgid) -{ - return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid, - (int) egid, (int) sgid); -} -libc_hidden_def (__setresgid) -#ifndef __setresgid -weak_alias (__setresgid, setresgid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c deleted file mode 100644 index e76413bf6a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setresuid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - - -int -__setresuid (uid_t ruid, uid_t euid, uid_t suid) -{ - return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid, - (int) euid, (int) suid); -} -libc_hidden_def (__setresuid) -#ifndef __setresuid -weak_alias (__setresuid, setresuid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c deleted file mode 100644 index a23a34792e..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/setreuid.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1998, 2000, 2003, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - - -int -__setreuid (uid_t ruid, uid_t euid) -{ - return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid); -} -#ifndef __setreuid -weak_alias (__setreuid, setreuid) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S deleted file mode 100644 index e39eadc208..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define SETTIMEOFDAY __settimeofday_tv64 -#else -#define SETTIMEOFDAY __settimeofday -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(SETTIMEOFDAY, settimeofday, 2) - ret -PSEUDO_END(SETTIMEOFDAY) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(SETTIMEOFDAY, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - bne t0, $do32 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - ldi v0, SYS_ify(settimeofday) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce the timeval down. */ - beq a0, 1f - ldq t0, 0(a0) - ldq t1, 8(a0) - stl t0, 0(sp) - stl t1, 4(sp) - mov sp, a0 - -1: ldi v0, SYS_ify(osf_settimeofday) - callsys - bne a3, $error - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(SETTIMEOFDAY) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__settimeofday_tv64, __settimeofday_tv64p) -default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1) -#else -weak_alias (__settimeofday, settimeofday) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c deleted file mode 100644 index e63211fa00..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , August 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -struct __old_shmid_ds -{ - struct __old_ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __ipc_pid_t shm_cpid; /* pid of creator */ - __ipc_pid_t shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ -}; - -struct __old_shminfo -{ - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; -}; - -/* Provide operations to control over shared memory segments. */ -int __new_shmctl (int, int, struct shmid_ds *); - -int -__new_shmctl (int shmid, int cmd, struct shmid_ds *buf) -{ -#if __ASSUME_32BITUIDS > 0 - return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); -#else - switch (cmd) { - case SHM_STAT: - case IPC_STAT: - case IPC_SET: - case IPC_INFO: - break; - default: - return INLINE_SYSCALL (shmctl, 3, shmid, cmd, CHECK_1 (buf)); - } - - { - int save_errno = errno, result; - struct __old_shmid_ds old; - - /* Unfortunately there is no way how to find out for sure whether - we should use old or new shmctl. */ - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); - if (result != -1 || errno != EINVAL) - return result; - - __set_errno(save_errno); - if (cmd == IPC_SET) - { - old.shm_perm.uid = buf->shm_perm.uid; - old.shm_perm.gid = buf->shm_perm.gid; - old.shm_perm.mode = buf->shm_perm.mode; - if (old.shm_perm.uid != buf->shm_perm.uid || - old.shm_perm.gid != buf->shm_perm.gid) - { - __set_errno (EINVAL); - return -1; - } - } - result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, __ptrvalue (&old)); - if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT)) - { - memset(buf, 0, sizeof(*buf)); - buf->shm_perm.__key = old.shm_perm.__key; - buf->shm_perm.uid = old.shm_perm.uid; - buf->shm_perm.gid = old.shm_perm.gid; - buf->shm_perm.cuid = old.shm_perm.cuid; - buf->shm_perm.cgid = old.shm_perm.cgid; - buf->shm_perm.mode = old.shm_perm.mode; - buf->shm_perm.__seq = old.shm_perm.__seq; - buf->shm_atime = old.shm_atime; - buf->shm_dtime = old.shm_dtime; - buf->shm_ctime = old.shm_ctime; - buf->shm_segsz = old.shm_segsz; - buf->shm_nattch = old.shm_nattch; - buf->shm_cpid = old.shm_cpid; - buf->shm_lpid = old.shm_lpid; - } - else if (result != -1 && cmd == IPC_INFO) - { - struct __old_shminfo *oldi = (void *)&old; - struct shminfo *i = (struct shminfo *)buf; - - memset(i, 0, sizeof(*i)); - i->shmmax = oldi->shmmax; - i->shmmin = oldi->shmmin; - i->shmmni = oldi->shmmni; - i->shmseg = oldi->shmseg; - i->shmall = oldi->shmall; - } - return result; - } -#endif -} - -#include -versioned_symbol (libc, __new_shmctl, shmctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c deleted file mode 100644 index 26b081d9a3..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2003 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -/* - * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. Detect this in the - * INLINE_SYSCALL macro, and fail to expand inline in that case. - */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - (__NR_##name == __NR_rt_sigaction \ - ? __syscall_rt_sigaction(args) \ - : INLINE_SYSCALL1(name, nr, args)) - -struct kernel_sigaction; -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, - struct kernel_sigaction *__unbounded, size_t); - -#include diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h deleted file mode 100644 index 16c5dcbc5b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1999, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define SIGCONTEXT int _code, struct sigcontext * -#define SIGCONTEXT_EXTRA_ARGS _code, -#define GET_PC(ctx) ((void *) (ctx)->sc_pc) -#define GET_FRAME(ctx) ((void *) (ctx)->sc_regs[15]) -#define GET_STACK(ctx) ((void *) (ctx)->sc_regs[30]) -#define CALL_SIGHANDLER(handler, signo, ctx) \ - (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c deleted file mode 100644 index 1916111a22..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger (davidm@azstarnet.com). - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -/* When there is kernel support for more than 64 signals, we'll have to - switch to a new system call convention here. */ - -int -__sigprocmask (int how, const sigset_t *set, sigset_t *oset) -{ - unsigned long int setval; - long result; - - if (set) - setval = set->__val[0]; - else - { - setval = 0; - how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */ - } - - result = INLINE_SYSCALL (osf_sigprocmask, 2, how, setval); - if (result == -1) - /* If there are ever more than 63 signals, we need to recode this - in assembler since we wouldn't be able to distinguish a mask of - all 1s from -1, but for now, we're doing just fine... */ - return result; - - if (oset) - { - oset->__val[0] = result; - result = _SIGSET_NWORDS; - while (--result > 0) - oset->__val[result] = 0; - } - return 0; -} - -weak_alias (__sigprocmask, sigprocmask); diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S deleted file mode 100644 index 6863c07ec1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1993,1995,1996,1997,2002,2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* sigsuspend is a special syscall since it needs to dereference the - sigset. This will have to change when we have more than 64 signals. */ - -#ifndef NO_CANCELLATION -#include - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); - -PSEUDO(__sigsuspend_nocancel, sigsuspend, 1) - ret -/* Use END, not PSEUDO_END, so that we don't issue two $syscall_error - symbols; we'll jump into __sigsuspend for the error case. */ -END(__sigsuspend_nocancel) -#endif /* NO_CANCELLATION */ - -#include - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); - -PSEUDO(__sigsuspend, sigsuspend, 1) - ret -PSEUDO_END(__sigsuspend) -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) -strong_alias (__sigsuspend, __libc_sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h deleted file mode 100644 index 0c7f4d5d2a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sizes.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1998 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIZES_H -#define _SIZES_H 1 - -#define PTR_SIZE_STR "8" - -#endif /* sizes.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S deleted file mode 100644 index 1221f67f78..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/swapcontext.S +++ /dev/null @@ -1,51 +0,0 @@ -/* Save current context and install the given one. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -ENTRY(__swapcontext) - -#ifdef PROF - ldgp $29, 0($27) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#elif defined PIC - .prologue 0 -#else - ldgp $29, 0($27) - .prologue 1 -#endif - -#ifdef PIC - unop - bsr $0, __getcontext_x !samegp - mov $17, $16 - br $31, __setcontext !samegp -#else - jsr $0, __getcontext_x - mov $17, $16 - jmp $31, __setcontext -#endif - -END(__swapcontext) -weak_alias (__swapcontext, swapcontext) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h deleted file mode 100644 index 1e00006ef7..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 1996, 1997, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_ACCT_H - -#define _SYS_ACCT_H 1 -#include - -#define __need_time_t -#include - - -__BEGIN_DECLS - -#define ACCT_COMM 16 - -struct acct - { - char ac_comm[ACCT_COMM]; /* Accounting command name. */ - time_t ac_utime; /* Accounting user time. */ - time_t ac_stime; /* Accounting system time. */ - time_t ac_etime; /* Accounting elapsed time. */ - time_t ac_btime; /* Beginning time. */ - unsigned int ac_uid; /* Accounting user ID. */ - unsigned int ac_gid; /* Accounting group ID. */ - unsigned int ac_tty; /* Controlling tty. */ - /* Please note that the value of the `ac_tty' field, a device number, - is encoded differently in the kernel and for the libc dev_t type. */ - char ac_flag; /* Accounting flag. */ - long int ac_minflt; /* Accounting minor pagefaults. */ - long int ac_majflt; /* Accounting major pagefaults. */ - long int ac_exitcode; /* Accounting process exitcode. */ - }; - -enum - { - AFORK = 0001, /* Has executed fork, but no exec. */ - ASU = 0002, /* Used super-user privileges. */ - ACORE = 0004, /* Dumped core. */ - AXSIG = 0010 /* Killed by a signal. */ - }; - -#define AHZ 100 - - -/* Switch process accounting on and off. */ -extern int acct (__const char *__filename) __THROW; - -__END_DECLS - -#endif /* sys/acct.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h deleted file mode 100644 index 9f983a5156..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (C) 2002-2006, 2007, 2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_EPOLL_H -#define _SYS_EPOLL_H 1 - -#include -#include - -/* Get __sigset_t. */ -#include - -#ifndef __sigset_t_defined -# define __sigset_t_defined -typedef __sigset_t sigset_t; -#endif - - -/* Flags to be passed to epoll_create2. */ -enum - { - EPOLL_CLOEXEC = 010000000, -#define EPOLL_CLOEXEC EPOLL_CLOEXEC - EPOLL_NONBLOCK = 04 -#define EPOLL_NONBLOCK EPOLL_NONBLOCK - }; - - -enum EPOLL_EVENTS - { - EPOLLIN = 0x001, -#define EPOLLIN EPOLLIN - EPOLLPRI = 0x002, -#define EPOLLPRI EPOLLPRI - EPOLLOUT = 0x004, -#define EPOLLOUT EPOLLOUT - EPOLLRDNORM = 0x040, -#define EPOLLRDNORM EPOLLRDNORM - EPOLLRDBAND = 0x080, -#define EPOLLRDBAND EPOLLRDBAND - EPOLLWRNORM = 0x100, -#define EPOLLWRNORM EPOLLWRNORM - EPOLLWRBAND = 0x200, -#define EPOLLWRBAND EPOLLWRBAND - EPOLLMSG = 0x400, -#define EPOLLMSG EPOLLMSG - EPOLLERR = 0x008, -#define EPOLLERR EPOLLERR - EPOLLHUP = 0x010, -#define EPOLLHUP EPOLLHUP - EPOLLRDHUP = 0x2000, -#define EPOLLRDHUP EPOLLRDHUP - EPOLLONESHOT = (1 << 30), -#define EPOLLONESHOT EPOLLONESHOT - EPOLLET = (1 << 31) -#define EPOLLET EPOLLET - }; - - -/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ -#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ -#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ -#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ - - -typedef union epoll_data -{ - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; -} epoll_data_t; - -struct epoll_event -{ - uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ -}; - - -__BEGIN_DECLS - -/* Creates an epoll instance. Returns an fd for the new instance. - The "size" parameter is a hint specifying the number of file - descriptors to be associated with the new instance. The fd - returned by epoll_create() should be closed with close(). */ -extern int epoll_create (int __size) __THROW; - -/* Same as epoll_create but with an additional FLAGS parameter. */ -extern int epoll_create2 (int __size, int __flags) __THROW; - - -/* Manipulate an epoll instance "epfd". Returns 0 in case of success, - -1 in case of error ( the "errno" variable will contain the - specific error code ) The "op" parameter is one of the EPOLL_CTL_* - constants defined above. The "fd" parameter is the target of the - operation. The "event" parameter describes which events the caller - is interested in and any associated user data. */ -extern int epoll_ctl (int __epfd, int __op, int __fd, - struct epoll_event *__event) __THROW; - - -/* Wait for events on an epoll instance "epfd". Returns the number of - triggered events returned in "events" buffer. Or -1 in case of - error with the "errno" variable set to the specific error code. The - "events" parameter is a buffer that will contain triggered - events. The "maxevents" is the maximum number of events to be - returned ( usually size of "events" ). The "timeout" parameter - specifies the maximum wait time in milliseconds (-1 == infinite). - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout); - - -/* Same as epoll_wait, but the thread's signal mask is temporarily - and atomically replaced with the one provided as parameter. - - This function is a cancellation point and therefore not marked with - __THROW. */ -extern int epoll_pwait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout, - __const __sigset_t *__ss); - -__END_DECLS - -#endif /* sys/epoll.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h deleted file mode 100644 index c8ce554625..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2007, 2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_EVENTFD_H -#define _SYS_EVENTFD_H 1 - -#include - - -/* Type for event counter. */ -typedef uint64_t eventfd_t; - -/* Flags for signalfd. */ -enum - { - EFD_CLOEXEC = 010000000, -#define EFD_CLOEXEC EFD_CLOEXEC - EFD_NONBLOCK = 04 -#define EFD_NONBLOCK EFD_NONBLOCK - }; - - -__BEGIN_DECLS - -/* Return file descriptor for generic event channel. Set initial - value to COUNT. */ -extern int eventfd (int __count, int __flags) __THROW; - -/* Read event counter and possibly wait for events. */ -extern int eventfd_read (int __fd, eventfd_t *__value); - -/* Increment event counter. */ -extern int eventfd_write (int __fd, eventfd_t value); - -__END_DECLS - -#endif /* sys/eventfd.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h deleted file mode 100644 index d61c700d5d..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (C) 2005, 2006, 2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_INOTIFY_H -#define _SYS_INOTIFY_H 1 - -#include - - -/* Flags for the parameter of inotify_init1. */ -enum - { - IN_CLOEXEC = 010000000, -#define IN_CLOEXEC IN_CLOEXEC - IN_NONBLOCK = 04 -#define IN_NONBLOCK IN_NONBLOCK - }; - - -/* Structure describing an inotify event. */ -struct inotify_event -{ - int wd; /* Watch descriptor. */ - uint32_t mask; /* Watch mask. */ - uint32_t cookie; /* Cookie to synchronize two events. */ - uint32_t len; /* Length (including NULs) of name. */ - char name __flexarr; /* Name. */ -}; - - -/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ -#define IN_ACCESS 0x00000001 /* File was accessed. */ -#define IN_MODIFY 0x00000002 /* File was modified. */ -#define IN_ATTRIB 0x00000004 /* Metadata changed. */ -#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ -#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_OPEN 0x00000020 /* File was opened. */ -#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ -#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ -#define IN_CREATE 0x00000100 /* Subfile was created. */ -#define IN_DELETE 0x00000200 /* Subfile was deleted. */ -#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ -#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ - -/* Events sent by the kernel. */ -#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ -#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ -#define IN_IGNORED 0x00008000 /* File was ignored. */ - -/* Helper events. */ -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ -#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ - -/* Special flags. */ -#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a - directory. */ -#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ -#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already - existing watch. */ -#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ -#define IN_ONESHOT 0x80000000 /* Only send event once. */ - -/* All events which a program can wait on. */ -#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ - | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ - | IN_MOVED_TO | IN_CREATE | IN_DELETE \ - | IN_DELETE_SELF | IN_MOVE_SELF) - - -__BEGIN_DECLS - -/* Create and initialize inotify instance. */ -extern int inotify_init (void) __THROW; - -/* Create and initialize inotify instance. */ -extern int inotify_init1 (int __flags) __THROW; - -/* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ -extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) - __THROW; - -/* Remove the watch specified by WD from the inotify instance FD. */ -extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW; - -__END_DECLS - -#endif /* sys/inotify.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h deleted file mode 100644 index 4334c63925..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/io.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 1996, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_IO_H - -#define _SYS_IO_H 1 -#include - -__BEGIN_DECLS - -/* If TURN_ON is TRUE, request for permission to do direct i/o on the - port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O - permission off for that range. This call requires root privileges. - - Portability note: not all Linux platforms support this call. Most - platforms based on the PC I/O architecture probably will, however. - E.g., Linux/Alpha for Alpha PCs supports this. */ -extern int ioperm (unsigned long int __from, unsigned long int __num, - int __turn_on) __THROW; - -/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to - access any I/O port is granted. This call requires root - privileges. */ -extern int iopl (int __level) __THROW; - -/* Return the physical address of the DENSE I/O memory or NULL if none - is available (e.g. on a jensen). */ -extern unsigned long int _bus_base (void) __THROW __attribute__ ((const)); -extern unsigned long int bus_base (void) __THROW __attribute__ ((const)); - -/* Return the physical address of the SPARSE I/O memory. */ -extern unsigned long _bus_base_sparse (void) __THROW __attribute__ ((const)); -extern unsigned long bus_base_sparse (void) __THROW __attribute__ ((const)); - -/* Return the HAE shift used by the SPARSE I/O memory. */ -extern int _hae_shift (void) __THROW __attribute__ ((const)); -extern int hae_shift (void) __THROW __attribute__ ((const)); - -/* Previous three are deprecated in favour of the following, which - knows about multiple PCI "hoses". Provide the PCI bus and dfn - numbers just as to pciconfig_read/write. */ - -enum __pciconfig_iobase_which -{ - IOBASE_HOSE = 0, /* Return hose index. */ - IOBASE_SPARSE_MEM = 1, /* Return physical memory addresses. */ - IOBASE_DENSE_MEM = 2, - IOBASE_SPARSE_IO = 3, - IOBASE_DENSE_IO = 4 -}; - -extern long pciconfig_iobase(enum __pciconfig_iobase_which __which, - unsigned long int __bus, - unsigned long int __dfn) - __THROW __attribute__ ((const)); - -/* Access PCI space protected from machine checks. */ -extern int pciconfig_read (unsigned long int __bus, - unsigned long int __dfn, - unsigned long int __off, - unsigned long int __len, - unsigned char *__buf) __THROW; - -extern int pciconfig_write (unsigned long int __bus, - unsigned long int __dfn, - unsigned long int __off, - unsigned long int __len, - unsigned char *__buf) __THROW; - -/* Userspace declarations. */ -extern unsigned int inb (unsigned long __port) __THROW; -extern unsigned int inw (unsigned long __port) __THROW; -extern unsigned int inl (unsigned long __port) __THROW; -extern void outb (unsigned char __b, unsigned long __port) __THROW; -extern void outw (unsigned short __w, unsigned long __port) __THROW; -extern void outl (unsigned int __l, unsigned long __port) __THROW; - -__END_DECLS - -#endif /* _SYS_IO_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h deleted file mode 100644 index bee51f94e2..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somehow modelled after the file of the same name on SysVr4 - systems. It provides a definition of the core file format for ELF - used on Linux. */ - -#include -#include -#include -#include -#include -#include -#include - -__BEGIN_DECLS - -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - gdb doesn't really use excluded. Fields present but not used are - marked with "XXX". */ -struct elf_prstatus - { -#if 0 - long int pr_flags; /* XXX Process flags. */ - short int pr_why; /* XXX Reason for process halt. */ - short int pr_what; /* XXX More detailed reason. */ -#endif - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ -#if 0 - struct sigaltstack pr_altstack; /* Alternate stack info. */ - struct sigaction pr_action; /* Signal action for current sig. */ -#endif - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ -#if 0 - long int pr_instr; /* Current instruction. */ -#endif - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ - unsigned int pr_uid; - unsigned int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef gregset_t prgregset_t; -typedef fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore habe only ine PID type. */ -typedef __pid_t lwpid_t; - - -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h deleted file mode 100644 index 4cbe977768..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2007, 2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_SIGNALFD_H -#define _SYS_SIGNALFD_H 1 - -#define __need_sigset_t -#include -#include - - -struct signalfd_siginfo -{ - uint32_t ssi_signo; - int32_t ssi_errno; - int32_t ssi_code; - uint32_t ssi_pid; - uint32_t ssi_uid; - int32_t ssi_fd; - uint32_t ssi_tid; - uint32_t ssi_band; - uint32_t ssi_overrun; - uint32_t ssi_trapno; - int32_t ssi_status; - int32_t ssi_int; - uint64_t ssi_ptr; - uint64_t ssi_utime; - uint64_t ssi_stime; - uint64_t ssi_addr; - uint8_t __pad[48]; -}; - -/* Flags for signalfd. */ -enum - { - SFD_CLOEXEC = 010000000, -#define SFD_CLOEXEC SFD_CLOEXEC - SFD_NONBLOCK = 04 -#define SFD_NONBLOCK SFD_NONBLOCK - }; - -__BEGIN_DECLS - -/* Request notification for delivery of signals in MASK to be - performed using descriptor FD.*/ -extern int signalfd (int __fd, const sigset_t *__mask, int __flags) - __THROW __nonnull ((2)); - -__END_DECLS - -#endif /* sys/signalfd.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h deleted file mode 100644 index 09d6ccf6cc..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_TIMERFD_H -#define _SYS_TIMERFD_H 1 - -#include - - -/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ -enum - { - TFD_CLOEXEC = 010000000, -#define TFD_CLOEXEC TFD_CLOEXEC - TFD_NONBLOCK = 04 -#define TFD_NONBLOCK TFD_NONBLOCK - }; - - -/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ -enum - { - TFD_TIMER_ABSTIME = 1 << 0 -#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME - }; - - -__BEGIN_DECLS - -/* Return file descriptor for new interval timer source. */ -extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; - -/* Set next expiration time of interval timer source UFD to UTMR. If - FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is - absolute. Optionally return the old expiration time in OTMR. */ -extern int timerfd_settime (int __ufd, int __flags, - __const struct itimerspec *__utmr, - struct itimerspec *__otmr) __THROW; - -/* Return the next expiration time of UFD. */ -extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; - -__END_DECLS - -#endif /* sys/timerfd.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h deleted file mode 100644 index 438293c62b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1998, 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include - -#include - - -/* Type for general register. */ -typedef long int greg_t; - -/* Number of general registers. */ -#define NGREG 33 - -/* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; - -/* Type for floating-point register. */ -typedef long int fpreg_t; - -/* Number of general registers. */ -#define NFPREG 32 - -/* Container for all general registers. */ -typedef fpreg_t fpregset_t[NFPREG]; - - -/* A machine context is exactly a sigcontext. */ -typedef struct sigcontext mcontext_t; - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - unsigned long __uc_osf_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - } ucontext_t; - -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h deleted file mode 100644 index 4cd29d2ff8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sys/user.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1999 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_USER_H -#define _SYS_USER_H 1 - -/* The whole purpose of this file is for gdb/strace and gdb/strace - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - -#include -#include - -struct user -{ - unsigned long int regs[EF_SIZE / 8 + 32]; /* integer and fp regs */ - size_t u_tsize; /* text size (pages) */ - size_t u_dsize; /* data size (pages) */ - size_t u_ssize; /* stack size (pages) */ - unsigned long int start_code; /* text starting address */ - unsigned long int start_data; /* data starting address */ - unsigned long int start_stack; /* stack starting address */ - long int signal; /* signal causing core dump */ - struct regs *u_ar0; /* help gdb find registers */ - unsigned long int magic; /* identifies a core file */ - char u_comm[32]; /* user command name */ -}; - -#define NBPG PAGE_SIZE -#define UPAGES 1 -#define HOST_TEXT_START_ADDR (u.start_code) -#define HOST_DATA_START_ADDR (u.start_data) -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - -#endif /* sys/user.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S deleted file mode 100644 index 0c4081363a..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1996. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -/* - * This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system - * calls return an error indication in a3. This allows arbitrary 64bit - * values to be returned in v0 (because negative values are not - * mistaken as error numbers). However, C allows only one value to - * be returned, so the interface below folds the error indication passed in - * a3 back into v0: it sets v0 to -errno if an error occurs. Thus, - * no negative 64bit numbers can be returned. To avoid this problem, - * use assembly stubs wherever possible/convenient. - * - * Usage: - * - * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5) - * - * syscall_number = the index of the system call we're invoking - * arg1-arg5 = up to 5 integer arguments to the system call - * - * We need to do some arg shifting: the kernel expects the - * syscall number in v0 and the first five args in a0-a4. - * - */ - - -LEAF(__syscall, 0) -#ifdef PROF - ldgp gp, 0(pv) - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 -#endif - - mov a0, v0 /* Syscall number -> v0 */ - mov a1, a0 /* arg1-arg5 -> a0-a4 */ - mov a2, a1 - mov a3, a2 - mov a4, a3 - mov a5, a4 - - call_pal PAL_callsys /* Invoke system call */ - bne a3, $error - ret - -$error: -#ifndef PROF - br gp, 2f -2: ldgp gp, 0(gp) -#endif - SYSCALL_ERROR_HANDLER - -END(__syscall) - -weak_alias (__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list deleted file mode 100644 index de2c3ceac0..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++ /dev/null @@ -1,55 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -oldmsgctl EXTRA msgctl i:iip __old_msgctl msgctl@GLIBC_2.0 -msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv -msgsnd - msgsnd Ci:ibni __msgsnd msgsnd -shmat - osf_shmat i:ipi __shmat shmat -oldshmctl EXTRA shmctl i:iip __old_shmctl shmctl@GLIBC_2.0 -shmdt - shmdt i:s __shmdt shmdt -shmget - shmget i:iii __shmget shmget -semop - semop i:ipi __semop semop -semtimedop - semtimedop i:ipip semtimedop -semget - semget i:iii __semget semget -oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0 - -sigstack - sigstack 2 sigstack -vfork - vfork 0 __vfork vfork - -getpriority - getpriority i:ii __getpriority getpriority - -# proper socket implementations: -accept - accept Ci:iBN __libc_accept __accept accept -bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect -getpeername - getpeername i:ipp __getpeername getpeername -getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt -listen - listen i:ii __listen listen -recv - recv Ci:ibni __libc_recv __recv recv -recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg -send - send Ci:ibni __libc_send __send send -sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto -setsockopt - setsockopt i:iiibn __setsockopt setsockopt -shutdown - shutdown i:ii __shutdown shutdown -socket - socket i:iii __socket socket -socketpair - socketpair i:iiif __socketpair socketpair - -ptrace - ptrace 4 __ptrace ptrace - -# access pci space protected from machine checks: -pciconfig_read EXTRA pciconfig_read 5 pciconfig_read -pciconfig_write EXTRA pciconfig_write 5 pciconfig_write -pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase - -# support old timeval32 entry points -osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0 -osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0 -osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0 -osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0 -osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0 -osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0 -osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0 -osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0 diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c deleted file mode 100644 index 3e5b4ee85f..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sysconf.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include - - -static long int linux_sysconf (int name); - -#define CSHAPE(totalsize, linesize, assoc) \ - ((totalsize & ~0xff) | (linesize << 4) | assoc) - -extern long __libc_alpha_cache_shape[4]; - -static inline unsigned long -implver (void) -{ - unsigned long i; -#if __GNUC_PREREQ(3,3) - i = __builtin_alpha_implver (); -#else - asm ("implver %0" : "=r" (i)); -#endif - return i; -} - -static inline unsigned long -amask (unsigned long x) -{ - unsigned long r; -#if __GNUC_PREREQ(3,3) - r = __builtin_alpha_amask (x); -#else - asm ("amask %1,%0" : "=r"(r) : "Ir"(x)); -#endif - return r; -} - -/* Get the value of the system variable NAME. */ -long int -__sysconf (int name) -{ - long shape, index; - - /* We only handle the cache information here (for now). */ - if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE) - return linux_sysconf (name); - - /* No Alpha has L4 caches. */ - if (name >= _SC_LEVEL4_CACHE_SIZE) - return -1; - - index = (name - _SC_LEVEL1_ICACHE_SIZE) / 3; - shape = __libc_alpha_cache_shape[index]; - if (shape == -2) - { - long shape_l1i, shape_l1d, shape_l2, shape_l3 = -1; - - /* ??? In the cases below for which we do not know L1 cache sizes, - we could do timings to measure sizes. But for the Bcache, it's - generally big enough that (without additional help) TLB effects - get in the way. We'd either need to be able to allocate large - pages or have the kernel do the timings from KSEG. Fortunately, - kernels beginning with 2.6.5 will pass us this info in auxvec. */ - - switch (implver()) - { - case 0: /* EV4 */ - /* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */ - /* EV4/EV45 had 128k to 16M 32-byte direct Bcache. LCA45 - had 64k to 8M 8-byte direct Bcache. Can't tell. */ - shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 5, 1); - break; - - case 1: /* EV5 */ - if (amask (1 << 8)) - { - /* MAX insns not present; either EV5 or EV56. */ - shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1); - /* ??? L2 and L3 *can* be configured as 32-byte line. */ - shape_l2 = CSHAPE (96*1024, 6, 3); - /* EV5/EV56 has 1M to 16M Bcache. */ - shape_l3 = CSHAPE (0, 6, 1); - } - else - { - /* MAX insns present; either PCA56 or PCA57. */ - /* PCA56 had 16k 64-byte cache; PCA57 had 32k Icache. */ - /* PCA56 had 8k 64-byte cache; PCA57 had 16k Dcache. */ - /* PCA5[67] had 512k to 4M Bcache. */ - shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 6, 1); - } - break; - - case 2: /* EV6 */ - shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2); - /* EV6/EV67/EV68* had 1M to 16M Bcache. */ - shape_l2 = CSHAPE (0, 6, 1); - break; - - case 3: /* EV7 */ - shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2); - shape_l2 = CSHAPE(7*1024*1024/4, 6, 7); - break; - - default: - shape_l1i = shape_l1d = shape_l2 = 0; - break; - } - - __libc_alpha_cache_shape[0] = shape_l1i; - __libc_alpha_cache_shape[1] = shape_l1d; - __libc_alpha_cache_shape[2] = shape_l2; - __libc_alpha_cache_shape[3] = shape_l3; - shape = __libc_alpha_cache_shape[index]; - } - - if (shape <= 0) - return shape; - - switch (name % 3) - { - case 0: /* total size */ - return shape & -0x100; - case 1: /* associativity */ - return shape & 0xf; - default: /* line size */ - return 1L << ((shape >> 4) & 0xf); - } -} - -/* Now the generic Linux version. */ -#undef __sysconf -#define __sysconf static linux_sysconf -#include "../sysconf.c" diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h deleted file mode 100644 index f0661d1622..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004, 2007 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper, , August 1995. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _LINUX_ALPHA_SYSDEP_H -#define _LINUX_ALPHA_SYSDEP_H 1 - -#ifdef __ASSEMBLER__ -#include -#include -#endif - -/* There is some commonality. */ -#include - -#include - -/* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h - of the kernel. But these symbols do not follow the SYS_* syntax - so we have to redefine the `SYS_ify' macro here. */ -#undef SYS_ify -#ifdef __STDC__ -# define SYS_ify(syscall_name) __NR_##syscall_name -#else -# define SYS_ify(syscall_name) __NR_/**/syscall_name -#endif - -/* Define some aliases to make automatic syscall generation work - properly. The SYS_* variants are for the benefit of the files in - sysdeps/unix. */ -#define __NR_getpid __NR_getxpid -#define __NR_getuid __NR_getxuid -#define __NR_getgid __NR_getxgid -#define SYS_getpid __NR_getxpid -#define SYS_getuid __NR_getxuid -#define SYS_getgid __NR_getxgid - -/* - * Some syscalls no Linux program should know about: - */ -#define __NR_osf_sigprocmask 48 -#define __NR_osf_shmat 209 -#define __NR_osf_getsysinfo 256 -#define __NR_osf_setsysinfo 257 - -/* Help old kernel headers where particular syscalls are not available. */ -#ifndef __NR_semtimedop -# define __NR_semtimedop 423 -#endif - -/* This is a kludge to make syscalls.list find these under the names - pread and pwrite, since some kernel headers define those names - and some define the *64 names for the same system calls. */ -#if !defined __NR_pread && defined __NR_pread64 -# define __NR_pread __NR_pread64 -#endif -#if !defined __NR_pwrite && defined __NR_pwrite64 -# define __NR_pwrite __NR_pwrite64 -#endif - -/* - * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. This shouldn't - * happen except for inside sigaction.c, where we handle this - * specially. Catch other uses and error. - */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ -({ \ - extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ - __attribute__((unused)); \ - INLINE_SYSCALL1(name, nr, args); \ -}) - -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err_out, nr, args...) \ -({ \ - extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ - __attribute__((unused)); \ - INTERNAL_SYSCALL1(name, err_out, nr, args); \ -}) - -#endif /* _LINUX_ALPHA_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym b/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym deleted file mode 100644 index f95ff75636..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - --- -UC_LINK offsetof (ucontext_t, uc_link) -UC_OSF_SIGMASK offsetof (ucontext_t, __uc_osf_sigmask) -UC_STACK offsetof (ucontext_t, uc_stack) -UC_SIGCTX offsetof (ucontext_t, uc_mcontext) -UC_SIGMASK offsetof (ucontext_t, uc_sigmask) -SC_REGS offsetof (struct sigcontext, sc_regs) -SC_FPREGS offsetof (struct sigcontext, sc_fpregs) -SC_PC offsetof (struct sigcontext, sc_pc) -SC_PS offsetof (struct sigcontext, sc_ps) -SC_FPCRS offsetof (struct sigcontext, sc_fpcr) -SC_MASK offsetof (struct sigcontext, sc_mask) -SC_FPCR offsetof (struct sigcontext, sc_fpcr) -SS_SP offsetof (stack_t, ss_sp) -SS_SIZE offsetof (stack_t, ss_size) diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S deleted file mode 100644 index 0dd0a9372b..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/utimes.S +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define UTIMES __utimes_tv64 -#else -#define UTIMES __utimes -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(UTIMES, utimes, 2) - ret -PSEUDO_END(UTIMES) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(UTIMES, 16) - ldgp gp, 0(pv) - subq sp, 16, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(utimes) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 16, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: - /* Conditionally bounce values down. */ - beq a1, 1f - ldq t0, 0(a1) - ldq t1, 8(a1) - ldq t2, 16(a1) - ldq t3, 24(a1) - stl t0, 0(sp) - stl t1, 4(sp) - stl t2, 8(sp) - stl t3, 12(sp) - mov sp, a1 - -1: ldi v0, SYS_ify(osf_utimes) - callsys - bne a3, $error - - addq sp, 16, sp - ret - - .align 3 -$error: - addq sp, 16, sp - SYSCALL_ERROR_HANDLER - -END(UTIMES) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__utimes_tv64, __utimes_tv64p) -default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1) -#else -weak_alias (__utimes, utimes) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S deleted file mode 100644 index 634993deb8..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/wait4.S +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright (C) 1998, 2003, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ERRNO_H 1 -#include -#include - -.text - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -#define WAIT4 __wait4_tv64 -#else -#define WAIT4 __wait4 -#endif - -#if defined __ASSUME_TIMEVAL64 -PSEUDO(WAIT4, wait4, 4) - ret -PSEUDO_END(WAIT4) -#else -/* The problem here is that initially we made struct timeval compatible with - OSF/1, using int32. But we defined time_t with uint64, and later found - that POSIX requires tv_sec to be time_t. - - So now we have to do compatibility stuff. */ - -/* The variable is shared between all wrappers around signal handling - functions which have RT equivalents. */ -.comm __libc_missing_axp_tv64, 4 - -LEAF(WAIT4, 32) - ldgp gp, 0(pv) - subq sp, 32, sp -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - ldl t0, __libc_missing_axp_tv64 - - /* Save arguments in case we do need to fall back. */ - stq a0, 0(sp) - stq a1, 8(sp) - stq a2, 16(sp) - stq a3, 24(sp) - - bne t0, $do32 - - ldi v0, SYS_ify(wait4) - callsys - bne a3, $err64 - - /* Everything ok. */ - addq sp, 32, sp - ret - - /* If we didn't get ENOSYS, it is a real error. */ - .align 3 -$err64: cmpeq v0, ENOSYS, t0 - beq t0, $error - stl t0, __libc_missing_axp_tv64 - - /* Recover the saved arguments. */ - ldq a3, 24(sp) - ldq a2, 16(sp) - ldq a1, 8(sp) - ldq a0, 0(sp) - - .align 3 -$do32: ldi v0, SYS_ify(osf_wait4) - callsys - bne a3, $error - - /* Copy back to proper format. */ - ldq a3, 24(sp) - beq a3, 2f - ldl t0, 0(a3) # ru_utime.tv_sec - ldl t1, 4(a3) # ru_utime.tv_usec - ldl t2, 8(a3) # ru_stime.tv_sec - ldl t3, 12(a3) # ru_stime.tv_usec - ldt $f15, 16(a3) # ru_maxrss - ldt $f16, 24(a3) # ru_ixrss - ldt $f17, 32(a3) # ru_idrss - ldt $f18, 40(a3) # ru_isrss - ldt $f19, 48(a3) # ru_minflt - ldt $f20, 56(a3) # ru_majflt - ldt $f21, 64(a3) # ru_nswap - ldt $f22, 72(a3) # ru_inblock - ldt $f23, 80(a3) # ru_oublock - ldt $f24, 88(a3) # ru_msgsend - ldt $f25, 96(a3) # ru_msgrcv - ldt $f26, 104(a3) # ru_nsignals - ldt $f27, 112(a3) # ru_nvcsw - .set noat - ldt $f28, 120(a3) # ru_nivcsw - stq t0, 0(a3) - stq t1, 8(a3) - stq t2, 16(a3) - stq t3, 24(a3) - stt $f15, 32(a3) - stt $f16, 40(a3) - stt $f17, 48(a3) - stt $f18, 56(a3) - stt $f19, 64(a3) - stt $f20, 72(a3) - stt $f21, 80(a3) - stt $f22, 88(a3) - stt $f23, 96(a3) - stt $f24, 104(a3) - stt $f25, 112(a3) - stt $f26, 120(a3) - stt $f27, 128(a3) - stt $f28, 136(a3) - .set at - -2: addq sp, 32, sp - ret - - .align 3 -$error: - addq sp, 32, sp - SYSCALL_ERROR_HANDLER - -END(WAIT4) -#endif /* __ASSUME_TIMEVAL64 */ - -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1) - -/* It seems to me to be a misfeature of the assembler that we can only - have one version-alias per symbol. So create an alias ourselves. - The 'p' is for 'public'. *Shrug* */ -strong_alias (__wait4_tv64, __wait4_tv64p) -default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1) -#else -weak_alias (__wait4, wait4) -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c deleted file mode 100644 index c2972e40c2..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2001, 2004, 2005 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -/* For Linux/Alpha we have to make the wordexp symbols versioned. */ -#define wordexp(words, pwordexp, flags) \ - __new_wordexp (words, pwordexp, flags) - -#include - -versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); - - -#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2) -/* The old, incorrect wordexp_t definition. */ -typedef struct - { - int we_wordc; /* Count of words matched. */ - char **we_wordv; /* List of expanded words. */ - int we_offs; /* Slots to reserve in `we_wordv'. */ - } old_wordexp_t; - - -int -attribute_compat_text_section -__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) -{ - wordexp_t we; - int result; - - we.we_wordc = pwordexp->we_wordc; - we.we_wordv = pwordexp->we_wordv; - we.we_offs = pwordexp->we_offs; - - result = __new_wordexp (words, &we, flags); - - pwordexp->we_wordc = we.we_wordc; - pwordexp->we_wordv = we.we_wordv; - pwordexp->we_offs = we.we_offs; - - return result; -} -compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1); -#endif diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/sysdeps/unix/sysv/linux/alpha/xstat.c deleted file mode 100644 index b7488e425c..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/xstat.c +++ /dev/null @@ -1,64 +0,0 @@ -/* xstat using old-style Unix stat system call. - Copyright (C) 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#define __xstat64 __xstat64_disable - -#include -#include -#include -#include -#include -#include -#include - -#undef __xstat64 - - -/* Get information about the file NAME in BUF. */ -int -__xstat (int vers, const char *name, struct stat *buf) -{ - INTERNAL_SYSCALL_DECL (err); - int result, errno_out; - struct kernel_stat kbuf; - - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - goto fail; - __libc_missing_axp_stat64 = 1; - } - - result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return __xstat_conv (vers, &kbuf, buf); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - - fail: - __set_errno (errno_out); - return -1; -} -hidden_def (__xstat) -weak_alias (__xstat, _xstat); -strong_alias (__xstat, __xstat64); -hidden_ver (__xstat, __xstat64) diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c deleted file mode 100644 index a193b62ad1..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1997, 2003, 2004 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include - - -int __libc_missing_axp_stat64; - -int -__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) -{ - switch (vers) - { - case _STAT_VER_KERNEL: - *(struct kernel_stat *) ubuf = *kbuf; - break; - - case _STAT_VER_GLIBC2: - { - struct glibc2_stat *buf = ubuf; - - buf->st_dev = kbuf->st_dev; - buf->st_ino = kbuf->st_ino; - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; - buf->st_size = kbuf->st_size; - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; - buf->st_blksize = kbuf->st_blksize; - buf->st_blocks = kbuf->st_blocks; - buf->st_flags = kbuf->st_flags; - buf->st_gen = kbuf->st_gen; - } - break; - - case _STAT_VER_GLIBC2_1: - { - struct glibc21_stat *buf = ubuf; - - buf->st_dev = kbuf->st_dev; - buf->st_ino = kbuf->st_ino; - buf->st_mode = kbuf->st_mode; - buf->st_nlink = kbuf->st_nlink; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_rdev = kbuf->st_rdev; - buf->st_size = kbuf->st_size; - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; - buf->st_blocks = kbuf->st_blocks; - buf->st_blksize = kbuf->st_blksize; - buf->st_flags = kbuf->st_flags; - buf->st_gen = kbuf->st_gen; - buf->__pad3 = 0; - buf->__unused[0] = 0; - buf->__unused[1] = 0; - buf->__unused[2] = 0; - buf->__unused[3] = 0; - } - break; - - case _STAT_VER_GLIBC2_3_4: - { - struct stat64 *buf = ubuf; - - buf->st_dev = kbuf->st_dev; - buf->st_ino = kbuf->st_ino; - buf->st_rdev = kbuf->st_rdev; - buf->st_size = kbuf->st_size; - buf->st_blocks = kbuf->st_blocks; - - buf->st_mode = kbuf->st_mode; - buf->st_uid = kbuf->st_uid; - buf->st_gid = kbuf->st_gid; - buf->st_blksize = kbuf->st_blksize; - buf->st_nlink = kbuf->st_nlink; - buf->__pad0 = 0; - - buf->st_atime = kbuf->st_atime; - buf->st_atimensec = 0; - buf->st_mtime = kbuf->st_mtime; - buf->st_mtimensec = 0; - buf->st_ctime = kbuf->st_ctime; - buf->st_ctimensec = 0; - - buf->__unused[0] = 0; - buf->__unused[1] = 0; - buf->__unused[2] = 0; - } - break; - - default: - __set_errno (EINVAL); - return -1; - } - - return 0; -} diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h deleted file mode 100644 index 094d11e5c9..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 2004, 2006 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -extern int __libc_missing_axp_stat64 attribute_hidden; -extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) - attribute_hidden; diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index 8f694d70c4..95d05b4ab2 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -131,26 +131,31 @@ typedef struct do { \ size_t __i; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ - cpu_set_t *__arr = (cpusetp); \ + __cpu_mask *__bits = (cpusetp)->__bits; \ for (__i = 0; __i < __imax; ++__i) \ - __arr->__bits[__i] = 0; \ + __bits[__i] = 0; \ } while (0) # endif # define __CPU_SET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? ((cpusetp)->__bits[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; })) + ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ + |= __CPUMASK (__cpu)) \ + : 0; })) # define __CPU_CLR_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? ((cpusetp)->__bits[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; })) + ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ + &= ~__CPUMASK (__cpu)) \ + : 0; })) # define __CPU_ISSET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? (((cpusetp)->__bits[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 \ + ? ((((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ + & __CPUMASK (__cpu))) != 0 \ : 0; })) # define __CPU_COUNT_S(setsize, cpusetp) \ @@ -162,12 +167,12 @@ typedef struct # else # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__extension__ \ - ({ cpu_set_t *__arr1 = (cpusetp1); \ - cpu_set_t *__arr2 = (cpusetp2); \ + ({ __cpu_mask *__arr1 = (cpusetp1)->__bits; \ + __cpu_mask *__arr2 = (cpusetp2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ - if (__arr1->__bits[__i] != __arr2->__bits[__i]) \ + if (__bits[__i] != __bits[__i]) \ break; \ __i == __imax; })) # endif @@ -175,12 +180,12 @@ typedef struct # define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \ (__extension__ \ ({ cpu_set_t *__dest = (destset); \ - cpu_set_t *__arr1 = (srcset1); \ - cpu_set_t *__arr2 = (srcset2); \ + __cpu_mask *__arr1 = (srcset1)->__bits; \ + __cpu_mask *__arr2 = (srcset2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ - __dest->__bits[__i] = __arr1->__bits[__i] op __arr2->__bits[__i]; \ + ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \ __dest; })) # define __CPU_ALLOC_SIZE(count) \ diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 87c3b91802..72c7335ae5 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -309,7 +309,7 @@ enum { SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD +#ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS #endif diff --git a/sysdeps/unix/sysv/linux/i386/accept4.S b/sysdeps/unix/sysv/linux/i386/accept4.S new file mode 100644 index 0000000000..087ccc456f --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/accept4.S @@ -0,0 +1,183 @@ +/* Copyright (C) 1995-1998,2002,2003,2005, 2008 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +#define EINVAL 22 +#define ENOSYS 38 + +#ifndef SOCKOP_accept4 +# define SOCKOP_accept4 18 +#endif + +#ifdef __ASSUME_ACCEPT4 +# define errlabel SYSCALL_ERROR_LABEL +#else +# define errlabel .Lerr + .data +have_accept4: + .long 0 +#endif + + .text +/* The socket-oriented system calls are handled unusally in Linux/i386. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. */ + +.globl __libc_accept4 +ENTRY (__libc_accept4) +#ifdef CENABLE + SINGLE_THREAD_P + jne 1f +#endif + + /* Save registers. */ + movl %ebx, %edx + cfi_register (3, 2) + + movl $SYS_ify(socketcall), %eax /* System call number in %eax. */ + + movl $SOCKOP_accept4, %ebx /* Subcode is first arg to syscall. */ + lea 4(%esp), %ecx /* Address of args is 2nd arg. */ + + /* Do the system call trap. */ + ENTER_KERNEL + + /* Restore registers. */ + movl %edx, %ebx + cfi_restore (3) + + /* %eax is < 0 if there was an error. */ + cmpl $-125, %eax + jae errlabel + + /* Successful; return the syscall's value. */ +L(pseudo_end): + ret + + +#ifdef CENABLE + /* We need one more register. */ +1: pushl %esi + cfi_adjust_cfa_offset(4) + + /* Enable asynchronous cancellation. */ + CENABLE + movl %eax, %esi + cfi_offset(6, -8) /* %esi */ + + /* Save registers. */ + movl %ebx, %edx + cfi_register (3, 2) + + movl $SYS_ify(socketcall), %eax /* System call number in %eax. */ + + movl $SOCKOP_accept4, %ebx /* Subcode is first arg to syscall. */ + lea 8(%esp), %ecx /* Address of args is 2nd arg. */ + + /* Do the system call trap. */ + ENTER_KERNEL + + /* Restore registers. */ + movl %edx, %ebx + cfi_restore (3) + + /* Restore the cancellation. */ + xchgl %esi, %eax + CDISABLE + + /* Restore registers. */ + movl %esi, %eax + popl %esi + cfi_restore (6) + cfi_adjust_cfa_offset(-4) + + /* %eax is < 0 if there was an error. */ + cmpl $-125, %eax + jae errlabel + + /* Successful; return the syscall's value. */ + ret +#endif + +#ifndef __ASSUME_ACCEPT4 + /* The kernel returns -EINVAL for unknown socket operations. + We need to convert that error to an ENOSYS error. */ +.Lerr: cmpl $-EINVAL, %eax + jne SYSCALL_ERROR_LABEL + + /* Save registers. */ + pushl %ebx + cfi_adjust_cfa_offset(4) + cfi_offset(ebx, -8) + +# ifdef PIC + SETUP_PIC_REG (dx) + addl $_GLOBAL_OFFSET_TABLE_, %edx + movl have_accept4@GOTOFF(%edx), %eax +# else + movl have_accept4, %eax +# endif + testl %eax, %eax + jne 1f + + /* Try another call, this time with the FLAGS parameter + cleared and an invalid file descriptor. This call will not + cause any harm and it will return immediately. */ + movl $-1, 8(%esp) + movl $0, 20(%esp) + + movl $SYS_ify(socketcall), %eax /* System call number in %eax. */ + + movl $SOCKOP_accept4, %ebx /* Subcode is first arg to syscall. */ + lea 8(%esp), %ecx /* Address of args is 2nd arg. */ + + /* Do the system call trap. */ + ENTER_KERNEL + + cmpl $-EINVAL, %eax + movl $-1, %eax + je 3f + movl $1, %eax +3: +# ifdef PIC + movl %eax, have_accept4@GOTOFF(%edx) +# else + movl %eax, have_accept4 +# endif + + testl %eax, %eax + +1: movl $-EINVAL, %eax + jns 2f + movl $-ENOSYS, %eax + + /* Restore registers. */ +2: popl %ebx + cfi_restore (ebx) + + jmp SYSCALL_ERROR_LABEL +#endif +PSEUDO_END (__libc_accept4) + +weak_alias (__libc_accept4, accept4) diff --git a/sysdeps/unix/sysv/linux/i386/paccept.S b/sysdeps/unix/sysv/linux/i386/paccept.S deleted file mode 100644 index 02ad78dd47..0000000000 --- a/sysdeps/unix/sysv/linux/i386/paccept.S +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 1995-1998,2002,2003,2005,2008 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#define _NSIG 64 - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - - .text -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. */ - -ENTRY(do_paccept) -#ifdef SOCKOP_paccept - subl $6*4, %esp - cfi_adjust_cfa_offset(6*4) - - movl (%eax), %ecx - movl %ecx, (%esp) - movl 4(%eax), %ecx - movl %ecx, 4(%esp) - movl 8(%eax), %ecx - movl %ecx, 8(%esp) - movl 12(%eax), %ecx - movl %ecx, 12(%esp) - movl $(_NSIG / 8), 16(%esp) - movl 16(%eax), %ecx - movl %ecx, 20(%esp) - - movl $SYS_ify(socketcall), %eax /* System call number in %eax. */ - - movl $SOCKOP_paccept, %ebx /* Subcode is first arg to syscall. */ - movl %esp, %ecx /* Address of args is 2nd arg. */ - - /* Do the system call trap. */ - ENTER_KERNEL - - addl $6*4, %esp - cfi_adjust_cfa_offset(-6*4) - - /* %eax is < 0 if there was an error. */ - cmpl $-125, %eax - jae SYSCALL_ERROR_LABEL -#else - movl $-ENOSYS, %eax - jmp SYSCALL_ERROR_LABEL - - .section .gnu.glibc-stub.paccept - .previous - .section .gnu.warning.paccept - .string "warning: paccept is not implemented and will always fail" - .previous -#endif -L(pseudo_end): - ret -PSEUDO_END(do_paccept) - - - .globl paccept -ENTRY (paccept) -#ifdef CENABLE - SINGLE_THREAD_P - jne 1f -#endif - - /* Save registers. */ - movl %ebx, %edx - cfi_register (3, 2) - - lea 4(%esp), %eax - call do_paccept - - /* Restore registers. */ - movl %edx, %ebx - cfi_restore (3) - - ret - -#ifdef CENABLE - /* We need one more register. */ -1: pushl %esi - cfi_adjust_cfa_offset(4) - - /* Enable asynchronous cancellation. */ - CENABLE - movl %eax, %esi - cfi_offset(6, -8) /* %esi */ - - /* Save registers. */ - movl %ebx, %edx - cfi_register (3, 2) - - lea 8(%esp), %eax - call do_paccept - - /* Restore registers. */ - movl %edx, %ebx - cfi_restore (3) - - /* Restore the cancellation. */ - xchgl %esi, %eax - CDISABLE - - /* Restore registers. */ - movl %esi, %eax - popl %esi - cfi_restore (6) - cfi_adjust_cfa_offset(-4) - - /* Successful; return the syscall's value. */ - ret -#endif -PSEUDO_END (paccept) diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S index 7c8ac29b86..889e5c7060 100644 --- a/sysdeps/unix/sysv/linux/i386/socket.S +++ b/sysdeps/unix/sysv/linux/i386/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1998,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998,2002,2003,2005,2008 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 @@ -24,7 +24,7 @@ #define P2(a, b) a##b .text -/* The socket-oriented system calls are handled unusally in Linux. +/* The socket-oriented system calls are handled unusally in Linux/i386. They are all gated through the single `socketcall' system call number. `socketcall' takes two arguments: the first is the subcode, specifying which socket function is being called; and the second is a pointer to diff --git a/sysdeps/unix/sysv/linux/ia64/wordexp.c b/sysdeps/unix/sysv/linux/ia64/wordexp.c index 2e3d5bc2e9..c2972e40c2 100644 --- a/sysdeps/unix/sysv/linux/ia64/wordexp.c +++ b/sysdeps/unix/sysv/linux/ia64/wordexp.c @@ -1 +1,60 @@ -#include +/* Copyright (C) 2001, 2004, 2005 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* For Linux/Alpha we have to make the wordexp symbols versioned. */ +#define wordexp(words, pwordexp, flags) \ + __new_wordexp (words, pwordexp, flags) + +#include + +versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); + + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2) +/* The old, incorrect wordexp_t definition. */ +typedef struct + { + int we_wordc; /* Count of words matched. */ + char **we_wordv; /* List of expanded words. */ + int we_offs; /* Slots to reserve in `we_wordv'. */ + } old_wordexp_t; + + +int +attribute_compat_text_section +__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags) +{ + wordexp_t we; + int result; + + we.we_wordc = pwordexp->we_wordc; + we.we_wordv = pwordexp->we_wordv; + we.we_offs = pwordexp->we_offs; + + result = __new_wordexp (words, &we, flags); + + pwordexp->we_wordc = we.we_wordc; + pwordexp->we_wordv = we.we_wordv; + pwordexp->we_offs = we.we_offs; + + return result; +} +compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1); +#endif diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 6031eae2d0..42b1c105a2 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -509,5 +509,11 @@ # define __ASSUME_SOCK_CLOEXEC 1 # define __ASSUME_IN_NONBLOCK 1 # define __ASSUME_PIPE2 1 -# define __ASSUME_PACCEPT 1 +#endif + +/* Support for the accept4 syscall was added in 2.6.28. */ +#if __LINUX_KERNEL_VERSION >= 0x02061c \ + && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ + || defined __ia64__ || defined __sparc__ || __s390__) +# define __ASSUME_ACCEPT4 1 #endif diff --git a/sysdeps/unix/sysv/linux/paccept.c b/sysdeps/unix/sysv/linux/paccept.c deleted file mode 100644 index cc2979c0ed..0000000000 --- a/sysdeps/unix/sysv/linux/paccept.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2008. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include - -#ifdef __NR_paccept -int -paccept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, - const __sigset_t *ss, int flags) -{ - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (paccept, 6, fd, addr.__sockaddr__, addr_len, ss, - _NSIG / 8, flags); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (paccept, 6, fd, addr.__sockaddr__, addr_len, ss, - _NSIG / 8, flags); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} -#else -int -paccept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, - const __sigset_t *ss, int flags) -{ - __set_errno (ENOSYS); - return -1; -stub_warning (epoll_pwait) -} -#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h index 9b85386a7c..0328dc08e2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h @@ -1 +1,47 @@ -#include +/* Copyright (C) 1995-1999, 2000, 2003 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#define __IPC_64 0x100 + +struct __old_ipc_perm +{ + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ +}; + + +/* The codes for the functions to use the ipc syscall multiplexer. */ +#define IPCOP_semop 1 +#define IPCOP_semget 2 +#define IPCOP_semctl 3 +#define IPCOP_semtimedop 4 +#define IPCOP_msgsnd 11 +#define IPCOP_msgrcv 12 +#define IPCOP_msgget 13 +#define IPCOP_msgctl 14 +#define IPCOP_shmat 21 +#define IPCOP_shmdt 22 +#define IPCOP_shmget 23 +#define IPCOP_shmctl 24 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S index c28c34664c..63e1773e22 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S @@ -157,15 +157,15 @@ ENTRY(__CONTEXT_FUNC_NAME) # ifdef SHARED lwz r7,_rtld_global_ro@got(r7) mtlr r8 - lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7) + lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7) # else lwz r7,_dl_hwcap@got(r7) mtlr r8 - lwz r7,0(r7) + lwz r7,4(r7) # endif # else - lis r7,_dl_hwcap@ha - lwz r7,_dl_hwcap@l(r7) + lis r7,(_dl_hwcap+4)@ha + lwz r7,(_dl_hwcap+4)@l(r7) # endif andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/setcontext.S new file mode 100644 index 0000000000..7e44cdf0a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/setcontext.S @@ -0,0 +1,2 @@ +#define _ARCH_PWR6 +#include_next diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/swapcontext.S new file mode 100644 index 0000000000..616e3db872 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/swapcontext.S @@ -0,0 +1,2 @@ +#define _ARCH_PWR6 +#include_next diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S index 40a7a24f19..91ac4366c0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S @@ -1,5 +1,5 @@ /* Jump to a new context powerpc32 common. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008 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 @@ -71,33 +71,34 @@ ENTRY(__CONTEXT_FUNC_NAME) cmpwi r3,0 bne 3f /* L(error_exit) */ -#ifdef __CONTEXT_ENABLE_FPRS -# ifdef __CONTEXT_ENABLE_VRS -# ifdef PIC +#ifdef PIC mflr r8 -# ifdef HAVE_ASM_PPC_REL16 +# ifdef HAVE_ASM_PPC_REL16 bcl 20,31,1f 1: mflr r7 addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l -# else +# else bl _GLOBAL_OFFSET_TABLE_@local-4 mflr r7 -# endif -# ifdef SHARED +# endif +# ifdef SHARED lwz r7,_rtld_global_ro@got(r7) mtlr r8 - lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7) -# else + lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7) +# else lwz r7,_dl_hwcap@got(r7) mtlr r8 - lwz r7,0(r7) -# endif -# else - lis r7,_dl_hwcap@ha - lwz r7,_dl_hwcap@l(r7) -# endif - andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) + lwz r7,4(r7) +# endif +#else + lis r7,(_dl_hwcap+4)@ha + lwz r7,(_dl_hwcap+4)@l(r7) +#endif + +#ifdef __CONTEXT_ENABLE_FPRS +# ifdef __CONTEXT_ENABLE_VRS + andis. r6,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) la r10,(_UC_VREGS)(r31) beq 2f /* L(has_no_vec) */ @@ -199,7 +200,20 @@ ENTRY(__CONTEXT_FUNC_NAME) /* Restore the floating-point registers */ lfd fp31,_UC_FREGS+(32*8)(r31) lfd fp0,_UC_FREGS+(0*8)(r31) - mtfsf 0xff,fp31 +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r7,PPC_FEATURE_HAS_DFP + beq 7f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp31,1,0 + b 8f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +7: mtfsf 0xff,fp31 +8: +# endif /* _ARCH_PWR6 */ lfd fp1,_UC_FREGS+(1*8)(r31) lfd fp2,_UC_FREGS+(2*8)(r31) lfd fp3,_UC_FREGS+(3*8)(r31) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S index 0c7b945ed2..77c982242a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008 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 @@ -143,33 +143,34 @@ ENTRY(__CONTEXT_FUNC_NAME) stfd fp30,_UC_FREGS+(30*8)(r3) stfd fp31,_UC_FREGS+(31*8)(r3) stfd fp0,_UC_FREGS+(32*8)(r3) - -# ifdef __CONTEXT_ENABLE_VRS -# ifdef PIC + +# ifdef PIC mflr r8 -# ifdef HAVE_ASM_PPC_REL16 +# ifdef HAVE_ASM_PPC_REL16 bcl 20,31,1f 1: mflr r7 addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l -# else +# else bl _GLOBAL_OFFSET_TABLE_@local-4 mflr r7 -# endif -# ifdef SHARED +# endif +# ifdef SHARED lwz r7,_rtld_global_ro@got(r7) mtlr r8 - lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7) -# else + lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7) +# else lwz r7,_dl_hwcap@got(r7) mtlr r8 - lwz r7,0(r7) -# endif -# else - lis r7,_dl_hwcap@ha - lwz r7,_dl_hwcap@l(r7) + lwz r7,4(r7) # endif - andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) +# else + lis r7,(_dl_hwcap+4)@ha + lwz r7,(_dl_hwcap+4)@l(r7) +# endif + +# ifdef __CONTEXT_ENABLE_VRS + andis. r6,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) la r10,(_UC_VREGS)(r3) la r9,(_UC_VREGS+16)(r3) @@ -305,8 +306,8 @@ ENTRY(__CONTEXT_FUNC_NAME) # ifdef HAVE_ASM_PPC_REL16 bcl 20,31,5f 5: mflr r7 - addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha - addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l + addis r7,r7,_GLOBAL_OFFSET_TABLE_-5b@ha + addi r7,r7,_GLOBAL_OFFSET_TABLE_-5b@l # else bl _GLOBAL_OFFSET_TABLE_@local-4 mflr r7 @@ -314,14 +315,14 @@ ENTRY(__CONTEXT_FUNC_NAME) mtlr r8 # ifdef SHARED lwz r7,_rtld_global_ro@got(r7) - lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7) + lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r7) # else lwz r7,_dl_hwcap@got(r7) - lwz r7,0(r7) + lwz r7,4(r7) # endif # else - lis r7,_dl_hwcap@ha - lwz r7,_dl_hwcap@l(r7) + lis r7,(_dl_hwcap+4)@ha + lwz r7,(_dl_hwcap+4)@l(r7) # endif andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16) la r10,(_UC_VREGS)(r31) @@ -425,7 +426,20 @@ ENTRY(__CONTEXT_FUNC_NAME) /* Restore the floating-point registers */ lfd fp31,_UC_FREGS+(32*8)(r31) lfd fp0,_UC_FREGS+(0*8)(r31) - mtfsf 0xff,fp31 +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r7,PPC_FEATURE_HAS_DFP + beq 7f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp31,1,0 + b 8f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +7: mtfsf 0xff,fp31 +8: +#endif /* _ARCH_PWR6 */ lfd fp1,_UC_FREGS+(1*8)(r31) lfd fp2,_UC_FREGS+(2*8)(r31) lfd fp3,_UC_FREGS+(3*8)(r31) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/setcontext.S new file mode 100644 index 0000000000..7e44cdf0a1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/setcontext.S @@ -0,0 +1,2 @@ +#define _ARCH_PWR6 +#include_next diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/swapcontext.S new file mode 100644 index 0000000000..616e3db872 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/swapcontext.S @@ -0,0 +1,2 @@ +#define _ARCH_PWR6 +#include_next diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index 48e9af363d..b4e28b4813 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -1,5 +1,5 @@ /* Switch to context. - Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005, 2006, 2008 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 @@ -27,6 +27,15 @@ #include "ucontext_i.h" #include + .section ".toc","aw" +.LC__dl_hwcap: +#ifdef SHARED + .tc _rtld_global_ro[TC],_rtld_global_ro +#else + .tc _dl_hwcap[TC],_dl_hwcap +#endif + .section ".text" + #if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4) ENTRY(__novec_setcontext) CALL_MCOUNT 1 @@ -62,10 +71,32 @@ ENTRY(__novec_setcontext) cmpdi r3,0 bne L(nv_error_exit) +# ifdef SHARED +/* Load _rtld-global._dl_hwcap. */ + ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5) +# else + ld r5,0(r5) /* Load extern _dl_hwcap. */ +# endif + lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) + +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r5,PPC_FEATURE_HAS_DFP + beq 5f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 + b 6f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +5: mtfsf 0xff,fp0 +6: +# endif /* _ARCH_PWR6 */ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) @@ -189,15 +220,7 @@ compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3) #endif - .section ".toc","aw" -.LC__dl_hwcap: -#ifdef SHARED - .tc _rtld_global_ro[TC],_rtld_global_ro -#else - .tc _dl_hwcap[TC],_dl_hwcap -#endif .section ".text" - .machine "altivec" ENTRY(__setcontext) CALL_MCOUNT 1 @@ -241,7 +264,7 @@ ENTRY(__setcontext) # else ld r5,0(r5) /* Load extern _dl_hwcap. */ # endif - andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16) + andis. r6,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16) beq L(has_no_vec) cmpdi r10,0 @@ -346,7 +369,22 @@ L(has_no_vec): lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) + +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r5,PPC_FEATURE_HAS_DFP + beq 7f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 + b 8f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +7: mtfsf 0xff,fp0 +8: +# endif /* _ARCH_PWR6 */ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index 936d641b6b..c42ccfbe44 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and install the given one. - Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005, 2006, 2008 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 @@ -27,7 +27,16 @@ #include "ucontext_i.h" #include + .section ".toc","aw" +.LC__dl_hwcap: +#ifdef SHARED + .tc _rtld_global_ro[TC],_rtld_global_ro +#else + .tc _dl_hwcap[TC],_dl_hwcap +#endif + #if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4) + .section ".text" ENTRY(__novec_swapcontext) CALL_MCOUNT 2 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL @@ -157,10 +166,31 @@ ENTRY(__novec_swapcontext) cmpdi r0,0 bne L(nv_do_sigret) +# ifdef SHARED +/* Load _rtld-global._dl_hwcap. */ + ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8) +# else + ld r8,0(r8) /* Load extern _dl_hwcap. */ +# endif + lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r8,PPC_FEATURE_HAS_DFP + beq 5f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 + b 6f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +5: mtfsf 0xff,fp0 +6: +#endif /* _ARCH_PWR6 */ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) @@ -283,15 +313,7 @@ compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3) #endif - .section ".toc","aw" -.LC__dl_hwcap: -#ifdef SHARED - .tc _rtld_global_ro[TC],_rtld_global_ro -#else - .tc _dl_hwcap[TC],_dl_hwcap -#endif .section ".text" - .machine "altivec" ENTRY(__swapcontext) CALL_MCOUNT 2 @@ -409,7 +431,7 @@ ENTRY(__swapcontext) la r10,(SIGCONTEXT_V_RESERVE+8)(r3) la r9,(SIGCONTEXT_V_RESERVE+24)(r3) - andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16) + andis. r6,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16) clrrdi r10,r10,4 beq L(has_no_vec) @@ -540,7 +562,7 @@ L(has_no_vec): # else ld r8,0(r8) /* Load extern _dl_hwcap. */ # endif - andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16) + andis. r6,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16) beq L(has_no_vec2) cmpdi r10,0 @@ -646,7 +668,21 @@ L(has_no_vec2): lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) +# ifdef _ARCH_PWR6 + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 +# else + /* Availability of DFP indicates a 64-bit FPSCR. */ + andi. r6,r8,PPC_FEATURE_HAS_DFP + beq 7f + /* Use the extended four-operand version of the mtfsf insn. */ + mtfsf 0xff,fp0,1,0 + b 8f + /* Continue to operate on the FPSCR as if it were 32-bits. */ +7: mtfsf 0xff,fp0 +8: +#endif /* _ARCH_PWR6 */ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c b/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c index 2e3d5bc2e9..075b267bb4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c @@ -1 +1 @@ -#include +#include -- cgit v1.2.3