summaryrefslogtreecommitdiff
path: root/libc/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/unix')
-rw-r--r--libc/sysdeps/unix/i386/sysdep.S7
-rw-r--r--libc/sysdeps/unix/sparc/start.c4
-rw-r--r--libc/sysdeps/unix/sparc/sysdep.S7
-rw-r--r--libc/sysdeps/unix/sparc/sysdep.h14
-rw-r--r--libc/sysdeps/unix/start.c11
-rw-r--r--libc/sysdeps/unix/sysdep.h10
-rw-r--r--libc/sysdeps/unix/sysv/i386/sysdep.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/resource.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/sched.h12
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/sigset.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/socket.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/sys_errlist.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/uio.h10
-rw-r--r--libc/sysdeps/unix/sysv/linux/configure24
-rw-r--r--libc/sysdeps/unix/sysv/linux/configure.in24
-rw-r--r--libc/sysdeps/unix/sysv/linux/epoll_pwait.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/faccessat.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/grantpt.c3
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/glob64.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/olddirent.h12
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sysdep.h13
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/Implies1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/Makefile27
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/Versions25
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S42
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S171
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/__start_context.S52
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/endian.h7
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h320
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/ipc.h54
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h110
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/msq.h69
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/sem.h87
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h35
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h95
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h75
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h81
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h343
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h63
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h150
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/brk.S52
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c32
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/clone.S1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/clone2.S106
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h25
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/dl-static.c69
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/fork.S41
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c89
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/getclktck.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/getcontext.S158
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/getpagesize.c39
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c52
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/ioperm.c217
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/kernel_stat.h21
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h25
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/ldsodefs.h33
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/makecontext.c93
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/pipe.S38
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h32
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/readelflib.c60
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/register-dump.h182
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/setcontext.S153
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/setjmp.S199
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sigaction.c59
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym16
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h26
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sigpending.c39
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sigprocmask.c45
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/swapcontext.c40
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/io.h68
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/procfs.h130
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h192
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/rse.h78
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h66
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sys/user.h54
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/syscall.S30
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/syscalls.list50
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sysconf.c31
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sysdep.S59
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/sysdep.h384
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/system.c35
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/ucontext_i.h47
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/umount.c31
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c1
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/vfork.S44
-rw-r--r--libc/sysdeps/unix/sysv/linux/ia64/wordexp.c60
-rw-r--r--libc/sysdeps/unix/sysv/linux/kernel-features.h17
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S14
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S8
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S3
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S3
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/ppoll.c3
-rw-r--r--libc/sysdeps/unix/sysv/linux/preadv.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/prlimit.c6
-rw-r--r--libc/sysdeps/unix/sysv/linux/pwritev.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/readv.c5
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h17
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c7
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c9
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c61
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/acct.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/epoll.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/mount.h12
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/swap.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/timerfd.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c40
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c45
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h2
-rw-r--r--libc/sysdeps/unix/x86_64/sysdep.S7
120 files changed, 269 insertions, 5353 deletions
diff --git a/libc/sysdeps/unix/i386/sysdep.S b/libc/sysdeps/unix/i386/sysdep.S
index 9f279e15b..fc5cd67ec 100644
--- a/libc/sysdeps/unix/i386/sysdep.S
+++ b/libc/sysdeps/unix/i386/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1997,2000,2002,2004,2005,2011
+/* Copyright (C) 1991-1997,2000,2002,2004,2005,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -30,12 +30,7 @@
.globl C_SYMBOL_NAME(errno)
.globl syscall_error
-#undef syscall_error
-#ifdef NO_UNDERSCORES
__syscall_error:
-#else
-syscall_error:
-#endif
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
diff --git a/libc/sysdeps/unix/sparc/start.c b/libc/sysdeps/unix/sparc/start.c
index a664189bb..6efe69662 100644
--- a/libc/sysdeps/unix/sparc/start.c
+++ b/libc/sysdeps/unix/sparc/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1997,2004,2012 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
@@ -52,9 +52,7 @@
/* The first piece of initialized data. */
int __data_start = 0;
-#ifdef HAVE_WEAK_SYMBOLS
weak_alias (__data_start, data_start)
-#endif
extern void __libc_init (int argc, char **argv, char **envp) __THROW;
extern int main (int argc, char **argv, char **envp) __THROW;
diff --git a/libc/sysdeps/unix/sparc/sysdep.S b/libc/sysdeps/unix/sparc/sysdep.S
index 7e2e4d4e8..5a29275cc 100644
--- a/libc/sysdeps/unix/sparc/sysdep.S
+++ b/libc/sysdeps/unix/sparc/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,12 +25,7 @@
.text
.align 2
-#undef syscall_error
-#ifdef NO_UNDERSCORES
__syscall_error:
-#else
-syscall_error:
-#endif
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
diff --git a/libc/sysdeps/unix/sparc/sysdep.h b/libc/sysdeps/unix/sparc/sysdep.h
index 590b7abc4..f83b1c78f 100644
--- a/libc/sysdeps/unix/sparc/sysdep.h
+++ b/libc/sysdeps/unix/sparc/sysdep.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1993, 1994, 1995, 1997, 2003, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1997, 2003, 2011, 2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,12 +22,10 @@
#ifdef __ASSEMBLER__
-#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
#define syscall_error C_SYMBOL_NAME(__syscall_error)
-#endif
#ifdef PIC
#define SETUP_PIC_REG(reg, tmp) \
@@ -49,20 +47,12 @@ __sparc_get_pc_thunk.reg: \
mov %##tmp, %o7;
#endif
-#ifdef HAVE_ELF
#define ENTRY(name) \
.global C_SYMBOL_NAME(name); \
.type name,@function; \
.align 4; \
C_LABEL(name)
-#else
-#define ENTRY(name) \
- .global C_SYMBOL_NAME(name); \
- .align 4; \
- C_LABEL(name)
-
-#endif /* HAVE_ELF */
#define PSEUDO(name, syscall_name, args) \
.global syscall_error; \
diff --git a/libc/sysdeps/unix/start.c b/libc/sysdeps/unix/start.c
index 2474fc2e7..e5c5e9133 100644
--- a/libc/sysdeps/unix/start.c
+++ b/libc/sysdeps/unix/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 93, 1995-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 1995-1998, 2000, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,9 +40,7 @@
/* The first piece of initialized data. */
int __data_start = 0;
-#ifdef HAVE_WEAK_SYMBOLS
weak_alias (__data_start, data_start)
-#endif
#ifdef DUMMIES
#define ARG_DUMMIES DUMMIES,
@@ -69,13 +67,6 @@ _start ()
start1 ();
}
-#ifndef NO_UNDERSCORES
-/* Make an alias called `start' (no leading underscore, so it can't
- conflict with C symbols) for `_start'. This is the name vendor crt0.o's
- tend to use, and thus the name most linkers expect. */
-asm (".set start, __start");
-#endif
-
#endif
/* ARGSUSED */
diff --git a/libc/sysdeps/unix/sysdep.h b/libc/sysdeps/unix/sysdep.h
index 11e5317df..e8c1ec8e2 100644
--- a/libc/sysdeps/unix/sysdep.h
+++ b/libc/sysdeps/unix/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 96, 98, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 96, 98, 2003, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,11 +22,7 @@
#define HAVE_SYSCALLS
/* Note that using a `PASTE' macro loses. */
-#ifdef __STDC__
#define SYSCALL__(name, args) PSEUDO (__##name, name, args)
-#else
-#define SYSCALL__(name, args) PSEUDO (__/**/name, name, args)
-#endif
#define SYSCALL(name, args) PSEUDO (name, name, args)
/* Machine-dependent sysdep.h files are expected to define the macro
@@ -36,11 +32,7 @@
an instruction such that "MOVE(r1, r0)" works. ret should be defined
as the return instruction. */
-#ifdef __STDC__
#define SYS_ify(syscall_name) SYS_##syscall_name
-#else
-#define SYS_ify(syscall_name) SYS_/**/syscall_name
-#endif
/* Terminate a system call named SYM. This is used on some platforms
to generate correct debugging information. */
diff --git a/libc/sysdeps/unix/sysv/i386/sysdep.h b/libc/sysdeps/unix/sysv/i386/sysdep.h
deleted file mode 100644
index fedd5ea82..000000000
--- a/libc/sysdeps/unix/sysv/i386/sysdep.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* System V does not precede the asm names of C symbols with a `_'. */
-#define NO_UNDERSCORES
-
-#include <sysdeps/unix/i386/sysdep.h>
diff --git a/libc/sysdeps/unix/sysv/linux/bits/resource.h b/libc/sysdeps/unix/sysv/linux/bits/resource.h
index 336c19211..e64843653 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2010, 2011
+ Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -246,13 +246,13 @@ __BEGIN_DECLS
/* Modify and return resource limits of a process atomically. */
# ifndef __USE_FILE_OFFSET64
extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
- __const struct rlimit *__new_limit,
+ const struct rlimit *__new_limit,
struct rlimit *__old_limit) __THROW;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
enum __rlimit_resource __resource,
- __const struct rlimit *__new_limit,
+ const struct rlimit *__new_limit,
struct rlimit *__old_limit), prlimit64);
# else
# define prlimit prlimit64
@@ -260,7 +260,7 @@ extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
# endif
# ifdef __USE_LARGEFILE64
extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
- __const struct rlimit64 *__new_limit,
+ const struct rlimit64 *__new_limit,
struct rlimit64 *__old_limit) __THROW;
# endif
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/bits/sched.h b/libc/sysdeps/unix/sysv/linux/bits/sched.h
index 6b1431dd9..4735fe8c2 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/sched.h
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011
+ Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -161,7 +161,7 @@ typedef struct
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu < 8 * (setsize) \
- ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
@@ -174,8 +174,8 @@ typedef struct
# else
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
- ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
- __const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
+ ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
+ const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
@@ -187,8 +187,8 @@ typedef struct
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
- __const __cpu_mask *__arr1 = (srcset1)->__bits; \
- __const __cpu_mask *__arr2 = (srcset2)->__bits; \
+ const __cpu_mask *__arr1 = (srcset1)->__bits; \
+ const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
diff --git a/libc/sysdeps/unix/sysv/linux/bits/sigset.h b/libc/sysdeps/unix/sysv/linux/bits/sigset.h
index daec8ac49..993cdd5a3 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/sigset.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/sigset.h
@@ -1,5 +1,5 @@
/* __sig_atomic_t, __sigset_t, and related definitions. Linux version.
- Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007
+ Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -101,7 +101,7 @@ typedef struct
/* These functions needn't check for a bogus signal number -- error
checking is done in the non __ versions. */
-extern int __sigismember (__const __sigset_t *, int);
+extern int __sigismember (const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
@@ -115,7 +115,7 @@ extern int __sigdelset (__sigset_t *, int);
return BODY; \
}
-__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const)
+__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const)
__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
diff --git a/libc/sysdeps/unix/sysv/linux/bits/socket.h b/libc/sysdeps/unix/sysv/linux/bits/socket.h
index 69e090bd4..9eeb3770d 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -430,7 +430,7 @@ __BEGIN_DECLS
__THROW. */
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
- __const struct timespec *__tmo);
+ const struct timespec *__tmo);
/* Send a VLEN messages as described by VMESSAGES to socket FD.
Return the number of datagrams successfully written or -1 for errors.
diff --git a/libc/sysdeps/unix/sysv/linux/bits/sys_errlist.h b/libc/sysdeps/unix/sysv/linux/bits/sys_errlist.h
index ee556e8ec..c14e9cdb0 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/sys_errlist.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/sys_errlist.h
@@ -1,5 +1,5 @@
/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,9 +25,9 @@
#ifdef __USE_BSD
extern int sys_nerr;
-extern __const char *__const sys_errlist[];
+extern const char *const sys_errlist[];
#endif
#ifdef __USE_GNU
extern int _sys_nerr;
-extern __const char *__const _sys_errlist[];
+extern const char *const _sys_errlist[];
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/bits/uio.h b/libc/sysdeps/unix/sysv/linux/bits/uio.h
index b2d77195c..42bc615c2 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/uio.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2006, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2006, 2011, 2012 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
@@ -55,17 +55,17 @@ struct iovec
__BEGIN_DECLS
/* Read from another process' address space. */
-extern ssize_t process_vm_readv (pid_t __pid, __const struct iovec *__lvec,
+extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec,
unsigned long int __liovcnt,
- __const struct iovec *__rvec,
+ const struct iovec *__rvec,
unsigned long int __riovcnt,
unsigned long int __flags)
__THROW;
/* Write to another process' address space. */
-extern ssize_t process_vm_writev (pid_t __pid, __const struct iovec *__lvec,
+extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
unsigned long int __liovcnt,
- __const struct iovec *__rvec,
+ const struct iovec *__rvec,
unsigned long int __riovcnt,
unsigned long int __flags)
__THROW;
diff --git a/libc/sysdeps/unix/sysv/linux/configure b/libc/sysdeps/unix/sysv/linux/configure
index fad0ed168..586fa1ba2 100644
--- a/libc/sysdeps/unix/sysv/linux/configure
+++ b/libc/sysdeps/unix/sysv/linux/configure
@@ -200,29 +200,10 @@ fi
# if appropriate too.
test -n "$arch_minimum_kernel" ||
case "$machine" in
- alpha*)
- arch_minimum_kernel=2.1.100
- libc_cv_gcc_unwind_find_fde=yes
- ;;
- arm*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
i386*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
;;
- ia64*)
- arch_minimum_kernel=2.4.0
- ;;
- hppa*)
- libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.19
- ;;
- m68k*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
@@ -409,12 +390,9 @@ use_ldconfig=yes
# We need some extensions to the `ldd' script.
case "$machine" in
- i[3456]86* | m68*)
+ i[3456]86*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
;;
- ia64*)
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
- ;;
s390*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
;;
diff --git a/libc/sysdeps/unix/sysv/linux/configure.in b/libc/sysdeps/unix/sysv/linux/configure.in
index 3f1daab4e..a73c3e51e 100644
--- a/libc/sysdeps/unix/sysv/linux/configure.in
+++ b/libc/sysdeps/unix/sysv/linux/configure.in
@@ -39,29 +39,10 @@ fi
# if appropriate too.
test -n "$arch_minimum_kernel" ||
case "$machine" in
- alpha*)
- arch_minimum_kernel=2.1.100
- libc_cv_gcc_unwind_find_fde=yes
- ;;
- arm*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
i386*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
;;
- ia64*)
- arch_minimum_kernel=2.4.0
- ;;
- hppa*)
- libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.19
- ;;
- m68k*)
- arch_minimum_kernel=2.0.10
- libc_cv_gcc_unwind_find_fde=yes
- ;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.0.10
@@ -223,12 +204,9 @@ use_ldconfig=yes
# We need some extensions to the `ldd' script.
changequote(,)
case "$machine" in
- i[3456]86* | m68*)
+ i[3456]86*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
;;
- ia64*)
- ldd_rewrite_script=sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
- ;;
s390*)
ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
;;
diff --git a/libc/sysdeps/unix/sysv/linux/epoll_pwait.c b/libc/sysdeps/unix/sysv/linux/epoll_pwait.c
index e689073d1..a9c5b3c51 100644
--- a/libc/sysdeps/unix/sysv/linux/epoll_pwait.c
+++ b/libc/sysdeps/unix/sysv/linux/epoll_pwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2011, 2012 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
@@ -67,3 +67,5 @@ stub_warning (epoll_pwait)
# include <stub-tag.h>
#endif
+
+libc_hidden_def (epoll_pwait)
diff --git a/libc/sysdeps/unix/sysv/linux/faccessat.c b/libc/sysdeps/unix/sysv/linux/faccessat.c
index c154deb40..bff7a4b6f 100644
--- a/libc/sysdeps/unix/sysv/linux/faccessat.c
+++ b/libc/sysdeps/unix/sysv/linux/faccessat.c
@@ -1,5 +1,5 @@
/* Test for access to file, relative to open directory. Linux version.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2012 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
@@ -114,7 +114,7 @@ faccessat (fd, file, mode, flag)
#endif
struct stat64 stats;
- if (fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
+ if (__fxstatat64 (_STAT_VER, fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
return -1;
mode &= (X_OK | W_OK | R_OK); /* Clear any bogus bits. */
diff --git a/libc/sysdeps/unix/sysv/linux/grantpt.c b/libc/sysdeps/unix/sysv/linux/grantpt.c
index f2fc60f83..0a3cd472f 100644
--- a/libc/sysdeps/unix/sysv/linux/grantpt.c
+++ b/libc/sysdeps/unix/sysv/linux/grantpt.c
@@ -7,7 +7,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include "not-cancel.h"
+#include <not-cancel.h>
+
#include "pty-private.h"
diff --git a/libc/sysdeps/unix/sysv/linux/i386/glob64.c b/libc/sysdeps/unix/sysv/linux/i386/glob64.c
index 18b7f21ae..b4fcd1a73 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/glob64.c
+++ b/libc/sysdeps/unix/sysv/linux/i386/glob64.c
@@ -32,8 +32,8 @@ libc_hidden_ver (__glob64, glob64)
#include <sysdeps/unix/sysv/linux/i386/olddirent.h>
-int __old_glob64 (__const char *__pattern, int __flags,
- int (*__errfunc) (__const char *, int),
+int __old_glob64 (const char *__pattern, int __flags,
+ int (*__errfunc) (const char *, int),
glob64_t *__pglob);
#undef dirent
diff --git a/libc/sysdeps/unix/sysv/linux/i386/olddirent.h b/libc/sysdeps/unix/sysv/linux/i386/olddirent.h
index 4f73197e5..c5032473f 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/olddirent.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/olddirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2012 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
@@ -33,13 +33,13 @@ struct __old_dirent64
/* Now define the internal interfaces. */
extern struct __old_dirent64 *__old_readdir64 (DIR *__dirp);
extern int __old_readdir64_r (DIR *__dirp, struct __old_dirent64 *__entry,
- struct __old_dirent64 **__result);
+ struct __old_dirent64 **__result);
extern __ssize_t __old_getdents64 (int __fd, char *__buf, size_t __nbytes)
internal_function;
-int __old_scandir64 (__const char * __dir,
+int __old_scandir64 (const char * __dir,
struct __old_dirent64 *** __namelist,
- int (*__selector) (__const struct __old_dirent64 *),
- int (*__cmp) (__const struct __old_dirent64 **,
- __const struct __old_dirent64 **));
+ int (*__selector) (const struct __old_dirent64 *),
+ int (*__cmp) (const struct __old_dirent64 **,
+ const struct __old_dirent64 **));
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sysdep.h b/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
index 726b1df4b..9beb18731 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007,2011
+/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007,2011-2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
@@ -518,20 +518,11 @@ asm (".L__X'%ebx = 1\n\t"
# define check_consistency() \
({ int __res; \
__asm__ __volatile__ \
- ("call __i686.get_pc_thunk.cx;" \
- "addl $_GLOBAL_OFFSET_TABLE_, %%ecx;" \
+ (LOAD_PIC_REG_STR (cx) ";" \
"subl %%ebx, %%ecx;" \
"je 1f;" \
"ud2;" \
"1:\n" \
- ".section .gnu.linkonce.t.__i686.get_pc_thunk.cx,\"ax\",@progbits;" \
- ".globl __i686.get_pc_thunk.cx;" \
- ".hidden __i686.get_pc_thunk.cx;" \
- ".type __i686.get_pc_thunk.cx,@function;" \
- "__i686.get_pc_thunk.cx:" \
- "movl (%%esp), %%ecx;" \
- "ret;" \
- ".previous" \
: "=c" (__res)); \
__res; })
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/Implies b/libc/sysdeps/unix/sysv/linux/ia64/Implies
deleted file mode 100644
index 8d91c8009..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/Implies
+++ /dev/null
@@ -1 +0,0 @@
-unix/sysv/linux/wordsize-64
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/Makefile b/libc/sysdeps/unix/sysv/linux/ia64/Makefile
deleted file mode 100644
index d9a35a7c6..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-ifeq ($(subdir),misc)
-sysdep_headers += sys/rse.h
-endif
-
-ifeq ($(subdir),stdlib)
-sysdep_routines += __start_context
-gen-as-const-headers += sigcontext-offsets.sym
-endif
-
-ifeq ($(subdir),misc)
-sysdep_headers += sys/io.h
-sysdep_routines += ioperm clone2
-endif
-
-ifeq ($(subdir),elf)
-sysdep-dl-routines += dl-static
-sysdep_routines += $(sysdep-dl-routines)
-sysdep-rtld-routines += $(sysdep-dl-routines)
-endif
-
-ifeq ($(subdir),rt)
-librt-routines += rt-sysdep
-endif
-
-# This is a crude attempt to silence the compiler which complains about
-# then 'current' definition in the kernel headers.
-CPPFLAGS += -D_ASM_IA64_CURRENT_H
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/Versions b/libc/sysdeps/unix/sysv/linux/ia64/Versions
deleted file mode 100644
index 13d710a07..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/Versions
+++ /dev/null
@@ -1,25 +0,0 @@
-ld {
- GLIBC_PRIVATE {
- _dl_var_init;
- }
-}
-libc {
- GLIBC_2.2 {
- ioperm; iopl;
- inb; inw; inl;
- _inb; _inw; _inl;
- outb; outw; _outl;
- _outb; _outw; _outl;
- pciconfig_read; pciconfig_write;
-
- # linuxthreads
- __clone2;
- }
- GLIBC_2.2.2 {
- # w*
- wordexp;
- }
- GLIBC_2.2.6 {
- getunwind;
- }
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
deleted file mode 100644
index fa87f67eb..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 2009 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. */
-
- .section .rodata.str1.8,"aMS",@progbits,1
- .align 8
-.LC0:
- .string "longjmp causes uninitialized stack frame"
-
- .section .sdata,"aws",@progbits
- .align 8
- .type longjmp_msg,@object
-longjmp_msg:
- data8 .LC0
- .size longjmp_msg, .-longjmp_msg
-
-#define __longjmp ____longjmp_chk
-
-#define CHECK_RSP(reg) \
- cmp.ltu p0, p8 = reg, r12; \
-(p8) br.cond.dpnt .Lok;; \
- addl r28 = @ltoffx(longjmp_msg#), r1;; \
- ld8.mov r28 = [r28], longjmp_msg#;; \
- ld8 out0 = [r28]; \
- br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \
-.Lok:
-
-#include "__longjmp.S"
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S
deleted file mode 100644
index 2e7490438..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S
+++ /dev/null
@@ -1,171 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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.
-
- Note that __sigsetjmp() did NOT flush the register stack. Instead,
- we do it here since __longjmp() is usually much less frequently
- invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp()
- didn't (and wouldn't be able to) save ar.rnat either. This is a problem
- because if we're not careful, we could end up loading random NaT bits.
- There are two cases:
-
- (i) ar.bsp < ia64_rse_rnat_addr(jmpbuf.ar_bsp)
- ar.rnat contains the desired bits---preserve ar.rnat
- across loadrs and write to ar.bspstore
-
- (ii) ar.bsp >= ia64_rse_rnat_addr(jmpbuf.ar_bsp)
- The desired ar.rnat is stored in
- ia64_rse_rnat_addr(jmpbuf.ar_bsp). Load those
- bits into ar.rnat after setting ar.bspstore. */
-
-#include <sysdep.h>
-#include <features.h>
-
-# define pPos p6 /* is rotate count positive? */
-# define pNeg p7 /* is rotate count negative? */
-
-
- /* __longjmp(__jmp_buf buf, int val) */
-
-LEAF(__longjmp)
-#ifdef CHECK_RSP
- alloc r8=ar.pfs,2,1,1,0
-#else
- alloc r8=ar.pfs,2,1,0,0
-#endif
- mov r27=ar.rsc
- add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
- ;;
- ld8 r8=[r2],-16 // r8 <- orig_jmp_buf_addr
- mov r10=ar.bsp
- and r11=~0x3,r27 // clear ar.rsc.mode
- ;;
- flushrs // flush dirty regs to backing store (must be first in insn grp)
- ld8 r23=[r2],8 // r23 <- jmpbuf.ar_bsp
- sub r8=r8,in0 // r8 <- &orig_jmpbuf - &jmpbuf
- ;;
- ld8 r25=[r2] // r25 <- jmpbuf.ar_unat
- extr.u r8=r8,3,6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f
- ;;
- cmp.lt pNeg,pPos=r8,r0
- mov r2=in0
- ;;
-(pPos) mov r16=r8
-(pNeg) add r16=64,r8
-(pPos) sub r17=64,r8
-(pNeg) sub r17=r0,r8
- ;;
- mov ar.rsc=r11 // put RSE in enforced lazy mode
- shr.u r8=r25,r16
- add r3=8,in0 // r3 <- &jmpbuf.r1
- shl r9=r25,r17
- ;;
- ld8.fill.nta r28=[r2],16 // r28 <- jmpbuf.sp
- or r25=r8,r9
- ;;
- mov r26=ar.rnat
- mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12)
- ;;
-#ifdef CHECK_RSP
- CHECK_RSP (r28)
-#endif
- ld8.fill.nta gp=[r3],16 // r1 (gp)
- dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
- mov sp=r28 // r12 (sp)
- ;;
- ld8.nta r16=[r2],16 // caller's unat
- ld8.nta r17=[r3],16 // fpsr
- ;;
- ld8.fill.nta r4=[r2],16 // r4
- ld8.fill.nta r5=[r3],16 // r5 (gp)
- cmp.geu p8,p0=r10,r11 // p8 <- (ar.bsp >= jmpbuf.ar_bsp)
- ;;
- ld8.fill.nta r6=[r2],16 // r6
- ld8.fill.nta r7=[r3],16 // r7
- ;;
- mov ar.unat=r16 // restore caller's unat
- mov ar.fpsr=r17 // restore fpsr
- ;;
- ld8.nta r16=[r2],16 // b0
- ld8.nta r17=[r3],16 // b1
- ;;
-(p8) ld8 r26=[r11] // r26 <- *ia64_rse_rnat_addr(jmpbuf.ar_bsp)
- mov ar.bspstore=r23 // restore ar.bspstore
- ;;
- ld8.nta r18=[r2],16 // b2
- ld8.nta r19=[r3],16 // b3
- ;;
-#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (r16, r24)
-#endif
- ld8.nta r20=[r2],16 // b4
- ld8.nta r21=[r3],16 // b5
- ;;
- ld8.nta r11=[r2],16 // ar.pfs
- ld8.nta r22=[r3],56 // ar.lc
- ;;
- ld8.nta r24=[r2],32 // pr
- mov b0=r16
- ;;
- ldf.fill.nta f2=[r2],32
- ldf.fill.nta f3=[r3],32
- mov b1=r17
- ;;
- ldf.fill.nta f4=[r2],32
- ldf.fill.nta f5=[r3],32
- mov b2=r18
- ;;
- ldf.fill.nta f16=[r2],32
- ldf.fill.nta f17=[r3],32
- mov b3=r19
- ;;
- ldf.fill.nta f18=[r2],32
- ldf.fill.nta f19=[r3],32
- mov b4=r20
- ;;
- ldf.fill.nta f20=[r2],32
- ldf.fill.nta f21=[r3],32
- mov b5=r21
- ;;
- ldf.fill.nta f22=[r2],32
- ldf.fill.nta f23=[r3],32
- mov ar.lc=r22
- ;;
- ldf.fill.nta f24=[r2],32
- ldf.fill.nta f25=[r3],32
- cmp.eq p8,p9=0,in1
- ;;
- ldf.fill.nta f26=[r2],32
- ldf.fill.nta f27=[r3],32
- mov ar.pfs=r11
- ;;
- ldf.fill.nta f28=[r2],32
- ldf.fill.nta f29=[r3],32
- ;;
- ldf.fill.nta f30=[r2]
- ldf.fill.nta f31=[r3]
-(p8) mov r8=1
-
- mov ar.rnat=r26 // restore ar.rnat
- ;;
- mov ar.rsc=r27 // restore ar.rsc
-(p9) mov r8=in1
-
- invala // virt. -> phys. regnum mapping may change
- mov pr=r24,-1
- ret
-END(__longjmp)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/__start_context.S b/libc/sysdeps/unix/sysv/linux/ia64/__start_context.S
deleted file mode 100644
index 519bd252b..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/__start_context.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <sysdep.h>
-#include <features.h>
-
-/* When a context set up by __makecontext() is activated, control
- transfers to __start_context. When we get here:
-
- b1 = entry point of function to call
- in0 = address of UCP to resume after function returns
- in1 = global pointer for __start_context
- out0 .. outN = arguments for function */
-
-ENTRY(__start_context)
- .prologue
- alloc r2 = ar.pfs, 2, 0, 8, 0
-
- .save rp, r4 // terminate call chain with a NULL rp
- mov r4 = r0
- ;;
-
- .body
- br.call.sptk rp = b1
-1:
- mov gp = in1 // restore gp
- cmp.ne p6,p0 = in0, r0 // uc_link != 0 ?
- ;;
-(p6) mov out0 = in0
-(p6) br.call.sptk rp = __setcontext
-.Lexit:
- mov out0 = 0
- br.call.sptk rp = HIDDEN_JUMPTARGET(exit)
-
-1: br.cond.sptk .Lexit
-END(__start_context)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/endian.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/endian.h
deleted file mode 100644
index 98a5e2399..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/endian.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Linux/ia64 is little-endian. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
deleted file mode 100644
index 72f4b6cea..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux/IA64.
- Copyright (C) 1999, 2000, 2004, 2006, 2007, 2009, 2010, 2011
- 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 <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* must be a directory */
-# define O_NOFOLLOW 0400000 /* don't follow links */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#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 010000 /* 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 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW 7 /* Set record locking info (blocking). */
-
-/* Not necessary, we always have 64-bit offsets. */
-#define F_GETLK64 5 /* Get record locking info. */
-#define F_SETLK64 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 7 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving 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. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#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_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# 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 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# 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
-
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#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. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#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.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-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.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/ipc.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/ipc.h
deleted file mode 100644
index 858c332f1..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/ipc.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _SYS_IPC_H
-# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
-#endif
-
-#include <sys/types.h>
-
-/* 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. */
-#define IPC_INFO 3 /* See ipcs. */
-
-/* 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. */
- __uid_t uid; /* Owner's user ID. */
- __gid_t gid; /* Owner's group ID. */
- __uid_t cuid; /* Creator's user ID. */
- __gid_t cgid; /* Creator's group ID. */
- __mode_t 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/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h
deleted file mode 100644
index 8b1398907..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Definitions for POSIX memory map interface. Linux/ia64 version.
- Copyright (C) 1997,1998,2000,2003,2005,2006,2009,2011
- 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 <bits/mman.h> directly; include <sys/mman.h> 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 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
-/* These are Linux-specific. */
-#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
-# define MAP_GROWSUP 0x00200 /* Register stack-like segment */
-# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x02000 /* Lock the mapping. */
-# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
-# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
-# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 0x1 /* Sync memory asynchronously. */
-#define MS_INVALIDATE 0x2 /* Invalidate the caches. */
-#define MS_SYNC 0x4 /* Synchronous memory sync. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 0x2 /* 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 4 /* 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. */
-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#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 4 /* Don't need these pages. */
-#endif
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/msq.h
deleted file mode 100644
index cd268eea3..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/msq.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contribute by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _SYS_MSG_H
-#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
-#endif
-
-#include <sys/types.h>
-
-/* Define options for message queue functions. */
-#define MSG_NOERROR 010000 /* no error if message is too big */
-#define MSG_EXCEPT 020000 /* recv any msg except of specified type */
-
-
-/* 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 */
- unsigned long int msg_qnum; /* number of messages currently on queue */
- unsigned long int 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/libc/sysdeps/unix/sysv/linux/ia64/bits/sem.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/sem.h
deleted file mode 100644
index 449f1ecc4..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/sem.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Copyright (C) 2000
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _SYS_SEM_H
-# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
-#endif
-
-#include <sys/types.h>
-
-/* 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/libc/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
deleted file mode 100644
index 8bd675e4e..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-/* User code must not depend on the internal representation of jmp_buf. */
-
-#define _JBLEN 70
-
-/* the __jmp_buf element type should be __float80 per ABI... */
-typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-
-#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
deleted file mode 100644
index 71b85295c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (C) 2000, 2002, 2005, 2009 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 <bits/shm.h> directly; use <sys/shm.h> instead."
-#endif
-
-#include <sys/types.h>
-
-/* Permission flag for shmget. */
-#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
-#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
-
-/* 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 */
-#define SHM_EXEC 0100000 /* execution access */
-
-/* Commands for `shmctl'. */
-#define SHM_LOCK 11 /* lock segment (root only) */
-#define SHM_UNLOCK 12 /* unlock segment (root only) */
-
-/* Segment low boundary address multiple. */
-#define SHMLBA (1024 * 1024)
-
-/* 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 */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
deleted file mode 100644
index b557eaa3e..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Definitions for Linux/ia64 sigaction.
- Copyright (C) 1996, 1997, 2000, 2003, 2010 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 <bits/sigaction.h> directly; use <signal.h> 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
-
- /* Special flags. */
- unsigned long int sa_flags;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
- };
-
-/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
-#define SA_NOCLDWAIT 0x00000002 /* Don't create zombie on child death. */
-#define SA_SIGINFO 0x00000004
-#if defined __USE_UNIX98 || defined __USE_MISC
-# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-#endif
-#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
-# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
-# define SA_NODEFER 0x40000000 /* Don't automatically block the signal
- when its handler is being executed. */
-# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
-#endif
-#ifdef __USE_MISC
-# define SA_INTERRUPT 0x20000000 /* Historic 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 0 /* for blocking signals */
-#define SIG_UNBLOCK 1 /* for unblocking signals */
-#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
deleted file mode 100644
index 34bc3c26a..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2007
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jes Sorensen <jes@linuxcare.com>, July 2000
-
- 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 _SYS_UCONTEXT_H
-# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
-#endif
-
-#ifndef _BITS_SIGCONTEXT_H
-#define _BITS_SIGCONTEXT_H 1
-
-#define __need_size_t
-#include <stddef.h>
-#include <bits/sigstack.h>
-
-struct ia64_fpreg
- {
- union
- {
- unsigned long bits[2];
- } u;
- } __attribute__ ((aligned (16)));
-
-struct sigcontext
-{
- unsigned long int sc_flags; /* see manifest constants below */
- unsigned long int sc_nat; /* bit i == 1 iff scratch reg gr[i] is a NaT */
- stack_t sc_stack; /* previously active stack */
-
- unsigned long int sc_ip; /* instruction pointer */
- unsigned long int sc_cfm; /* current frame marker */
- unsigned long int sc_um; /* user mask bits */
- unsigned long int sc_ar_rsc; /* register stack configuration register */
- unsigned long int sc_ar_bsp; /* backing store pointer */
- unsigned long int sc_ar_rnat; /* RSE NaT collection register */
- unsigned long int sc_ar_ccv; /* compare & exchange compare value register */
- unsigned long int sc_ar_unat; /* ar.unat of interrupted context */
- unsigned long int sc_ar_fpsr; /* floating-point status register */
- unsigned long int sc_ar_pfs; /* previous function state */
- unsigned long int sc_ar_lc; /* loop count register */
- unsigned long int sc_pr; /* predicate registers */
- unsigned long int sc_br[8]; /* branch registers */
- unsigned long int sc_gr[32]; /* general registers (static partition) */
- struct ia64_fpreg sc_fr[128]; /* floating-point registers */
- unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */
- unsigned long int sc_loadrs; /* see description above */
- unsigned long int sc_ar25; /* cmp8xchg16 uses this */
- unsigned long int sc_ar26; /* rsvd for scratch use */
- unsigned long int sc_rsvd[12];/* reserved for future use */
-
- /* sc_mask is actually an sigset_t but we don't want to
- * include the kernel headers here. */
- unsigned long int sc_mask; /* signal mask to restore after handler returns */
-};
-
-/* sc_flag bit definitions. */
-#define IA64_SC_FLAG_ONSTACK_BIT 0 /* is handler running on signal stack? */
-#define IA64_SC_FLAG_IN_SYSCALL_BIT 1 /* did signal interrupt a syscall? */
-#define IA64_SC_FLAG_FPH_VALID_BIT 2 /* is state in f[32]-f[127] valid? */
-
-#define IA64_SC_FLAG_ONSTACK (1 << IA64_SC_FLAG_ONSTACK_BIT)
-#define IA64_SC_FLAG_IN_SYSCALL (1 << IA64_SC_FLAG_IN_SYSCALL_BIT)
-#define IA64_SC_FLAG_FPH_VALID (1 << IA64_SC_FLAG_FPH_VALID_BIT)
-
-#endif /* _BITS_SIGCONTEXT_H */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
deleted file mode 100644
index fea5af7fb..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
+++ /dev/null
@@ -1,343 +0,0 @@
-/* siginfo_t, sigevent and constants. Linux/ia64 version.
- Copyright (C) 2000-2004, 2009, 2011 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#if !defined _SIGNAL_H && !defined __need_siginfo_t \
- && !defined __need_sigevent_t
-# error "Never include this file directly. Use <signal.h> 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 <errno.h>. */
- int si_code; /* Signal code. */
- int __pad0; /* Explicit padding. */
-
- 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. */
- int _si_imm;
- unsigned int _si_flags;
- unsigned long int _si_isr;
- } _sigfault;
-
- /* SIGPOLL. */
- struct
- {
- long 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
-
-# ifdef __USE_GNU
-# define si_imm _sifields._sigfault._si_imm
-# define si_segvflags _sifields._sigfault._si_flags
-# define si_isr _sifields._sigfault._si_isr
-# endif
-
-/* 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. */
-# 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
- ILL_BADIADDR /* Unimplemented instruction address. */
-# define ILL_BADIADDR ILL_BADIADDR
-
-# ifdef __USE_GNU
- , ILL_BREAK
-# define ILL_BREAK ILL_BREAK
-# endif
-};
-
-/* `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
-# ifdef __USE_GNU
- , FPE_DECOVF
-# define FPE_DECOVF FPE_DECOVF
- , FPE_DECDIV
-# define FPE_DECDIV FPE_DECDIV
- , FPE_DECERR
-# define FPE_DECERR FPE_DECERR
- , FPE_INVASC
-# define FPE_INVASC FPE_INVASC
- , FPE_INVDEC
-# define FPE_INVDEC FPE_INVDEC
-# endif
-};
-
-/* `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
-# ifdef __USE_GNU
- , SEGV_PSTKOVF /* Paragraph stack overflow. */
-# define SEGV_PSTKOVF SEGV_PSTKOVF
-# endif
-};
-
-/* `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
-
-# ifdef __USE_GNU
- , TRAP_BRANCH
-# define TRAP_BRANCH TRAP_BRANCH
- , TRAP_HWBKPT
-# define TRAP_HWBKPT TRAP_HWBKPT
-# endif
-};
-
-/* `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/libc/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
deleted file mode 100644
index c9c9d2fed..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* sigstack, sigaltstack definitions.
- Copyright (C) 1998, 2000, 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 _SIGNAL_H
-# error "Never include this file directly. Use <signal.h> instead"
-#endif
-
-#ifndef _SIGSTACK_H
-#define _SIGSTACK_H 1
-
-/* 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.
-
- Yes, this should be 131072 but the constant got defined incorrectly
- in the kernel and we have to live with it. Users should in any case
- use SIGSTKSZ as the size user-supplied buffers should have. */
-#define MINSIGSTKSZ 131027
-
-/* System default stack size. */
-#define SIGSTKSZ 262144
-
-
-/* Alternate, preferred interface. */
-typedef struct sigaltstack
- {
- __ptr_t ss_sp;
- int ss_flags;
- size_t ss_size;
- } stack_t;
-
-#endif /* bits/sigstack.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h
deleted file mode 100644
index 86acd27ae..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright (C) 1999-2002, 2009, 2010 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 _SYS_STAT_H && !defined _FCNTL_H
-# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
-#endif
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
-
-/* Versions of the `struct stat' data structure. */
-#define _STAT_VER_KERNEL 0
-#define _STAT_VER_LINUX 1
-#define _STAT_VER _STAT_VER_LINUX
-
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-
-struct stat
- {
- __dev_t st_dev; /* Device. */
- __ino_t st_ino; /* File serial number. */
- __nlink_t st_nlink; /* Link count. */
- __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.*/
- int pad0;
- __dev_t st_rdev; /* Device number, if device. */
- __off_t st_size; /* Size of file, in bytes. */
-#ifdef __USE_MISC
- /* 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 <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
- __blksize_t st_blksize; /* Optimal block size for I/O. */
- __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */
- long int __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. */
- __nlink_t st_nlink; /* Link count. */
- __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.*/
- int pad0;
- __dev_t st_rdev; /* Device number, if device. */
- __off_t st_size; /* Size of file, in bytes. */
-#ifdef __USE_MISC
- /* 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 <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
- __blksize_t st_blksize; /* Optimal block size for I/O. */
- __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
- long int __unused[3];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATBUF_ST_BLKSIZE
-#define _STATBUF_ST_RDEV
-/* Nanosecond resolution time values are supported. */
-#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. */
-
-#ifdef __USE_ATFILE
-# define UTIME_NOW ((1l << 30) - 1l)
-# define UTIME_OMIT ((1l << 30) - 2l)
-#endif
-
-#endif /* bits//stat.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/brk.S b/libc/sysdeps/unix/sysv/linux/ia64/brk.S
deleted file mode 100644
index 0e4114a33..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/brk.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/* brk system call for Linux/ia64
- Copyright (C) 1999,2000,2001,2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Stephane Eranian <eranian@hpl.hp.com> and
- Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
-
- 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 <sysdep.h>
-
-#include <asm/unistd.h>
-#include <asm/errno.h>
-
- .global __curbrk
- .type __curbrk,@object
- .size __curbrk,8
- .data
- .align 8
-__curbrk:
- data8 0
-
-weak_alias (__curbrk, ___brk_addr)
-
-LEAF(__brk)
- .regstk 1, 0, 0, 0
- DO_CALL(__NR_brk)
- cmp.ltu p6, p0 = ret0, in0
- addl r9 = @ltoff(__curbrk), gp
- ;;
- ld8 r9 = [r9]
-(p6) mov ret0 = ENOMEM
-(p6) br.cond.spnt.few __syscall_error
- ;;
- st8 [r9] = ret0
- mov ret0 = 0
- ret
-END(__brk)
-
-weak_alias (__brk, brk)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S b/libc/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S
deleted file mode 100644
index 4e6a2da56..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bsd-_setjmp.S
+++ /dev/null
@@ -1 +0,0 @@
-/* _setjmp is in setjmp.S */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S b/libc/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S
deleted file mode 100644
index 1da848d2f..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/bsd-setjmp.S
+++ /dev/null
@@ -1 +0,0 @@
-/* setjmp is in setjmp.S */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/libc/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
deleted file mode 100644
index 2f3985153..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux/IA64
- Copyright (C) 2000,2001,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 <errno.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-
-
-#include "has_cpuclock.c"
-
-#define HAS_CPUCLOCK (has_cpuclock () > 0)
-
-#include <sysdeps/unix/sysv/linux/clock_getcpuclockid.c>
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/clone.S b/libc/sysdeps/unix/sysv/linux/ia64/clone.S
deleted file mode 100644
index 0cfaeab64..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/clone.S
+++ /dev/null
@@ -1 +0,0 @@
-/* clone is not supported under Linux/ia64, use clone2. */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/clone2.S b/libc/sysdeps/unix/sysv/linux/ia64/clone2.S
deleted file mode 100644
index d38eb201a..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Copyright (C) 2000, 2001, 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 <sysdep.h>
-#include <asm/errno.h>
-
-
-/* int __clone2(int (*fn) (void *arg), void *child_stack_base, */
-/* size_t child_stack_size, int flags, void *arg, */
-/* pid_t *parent_tid, void *tls, pid_t *child_tid) */
-
-#define CHILD p8
-#define PARENT p9
-
-ENTRY(__clone2)
- .prologue
- alloc r2=ar.pfs,8,1,6,0
- cmp.eq p6,p0=0,in0
- cmp.eq p7,p0=0,in1
- mov r8=EINVAL
- mov out0=in3 /* Flags are first syscall argument. */
- mov out1=in1 /* Stack address. */
-(p6) br.cond.spnt.many __syscall_error /* no NULL function pointers */
-(p7) br.cond.spnt.many __syscall_error /* no NULL stack pointers */
- ;;
- mov out2=in2 /* Stack size. */
- mov out3=in5 /* Parent TID Pointer */
- mov out4=in7 /* Child TID Pointer */
- mov out5=in6 /* TLS pointer */
- /*
- * clone2() is special: the child cannot execute br.ret right
- * after the system call returns, because it starts out
- * executing on an empty stack. Because of this, we can't use
- * the new (lightweight) syscall convention here. Instead, we
- * just fall back on always using "break".
- *
- * Furthermore, since the child starts with an empty stack, we
- * need to avoid unwinding past invalid memory. To that end,
- * we'll pretend now that __clone2() is the end of the
- * call-chain. This is wrong for the parent, but only until
- * it returns from clone2() but it's better than the
- * alternative.
- */
- mov r15=SYS_ify (clone2)
- .save rp, r0
- break __BREAK_SYSCALL
- .body
- cmp.eq p6,p0=-1,r10
- cmp.eq CHILD,PARENT=0,r8 /* Are we the child? */
-(p6) br.cond.spnt.many __syscall_error
- ;;
-(CHILD) mov loc0=gp
-(PARENT) ret
- ;;
-#ifdef RESET_PID
- tbit.nz p6,p0=in3,16 /* CLONE_THREAD */
- tbit.z p7,p10=in3,8 /* CLONE_VM */
-(p6) br.cond.dptk 1f
- ;;
- mov r15=SYS_ify (getpid)
-(p10) addl r8=-1,r0
-(p7) break __BREAK_SYSCALL
- ;;
- add r9=PID,r13
- add r10=TID,r13
- ;;
- st4 [r9]=r8
- st4 [r10]=r8
- ;;
-#endif
-1: ld8 out1=[in0],8 /* Retrieve code pointer. */
- mov out0=in4 /* Pass proper argument to fn */
- ;;
- ld8 gp=[in0] /* Load function gp. */
- mov b6=out1
- br.call.dptk.many rp=b6 /* Call fn(arg) in the child */
- ;;
- mov out0=r8 /* Argument to _exit */
- mov gp=loc0
- .globl HIDDEN_JUMPTARGET(_exit)
- br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit)
- /* call _exit with result from fn. */
- ret /* Not reached. */
-PSEUDO_END(__clone2)
-
-/* For now we leave __clone undefined. This is unlikely to be a */
-/* problem, since at least the i386 __clone in glibc always failed */
-/* with a 0 sp (eventhough the kernel explicitly handled it). */
-/* Thus all such calls needed to pass an explicit sp, and as a result, */
-/* would be unlikely to work on ia64. */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S b/libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S
deleted file mode 100644
index eeb96544e..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/dl-brk.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <brk.S>
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h
deleted file mode 100644
index b8e279058..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 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. */
-
-#define _DL_CACHE_DEFAULT_ID 0x203
-
-#define _dl_cache_check_flags(flags) \
- ((flags) == _DL_CACHE_DEFAULT_ID)
-
-#include_next <dl-cache.h>
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/dl-static.c b/libc/sysdeps/unix/sysv/linux/ia64/dl-static.c
deleted file mode 100644
index 4efc07703..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/dl-static.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Variable initialization. IA-64 version.
- Copyright (C) 2001, 2002, 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 <ldsodefs.h>
-
-#ifdef SHARED
-
-void
-_dl_var_init (void *array[])
-{
- /* It has to match "variables" below. */
- enum
- {
- DL_PAGESIZE = 0,
- DL_CLKTCK
- };
-
- GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
- GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]);
-}
-
-#else
-#include <bits/libc-lock.h>
-
-__libc_lock_define_initialized_recursive (static, _dl_static_lock)
-
-static void *variables[] =
-{
- &GLRO(dl_pagesize),
- &GLRO(dl_clktck)
-};
-
-void
-_dl_static_init (struct link_map *map)
-{
- const ElfW(Sym) *ref = NULL;
- lookup_t loadbase;
- void (*f) (void *[]);
-
- __libc_lock_lock_recursive (_dl_static_lock);
-
- loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref,
- map->l_local_scope, NULL, 0, 1, NULL);
- if (ref != NULL)
- {
- f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
- f (variables);
- }
-
- __libc_lock_unlock_recursive (_dl_static_lock);
-}
-
-#endif
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/fork.S b/libc/sysdeps/unix/sysv/linux/ia64/fork.S
deleted file mode 100644
index 0a57ab0d1..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/fork.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2000, 2002 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 <sysdep.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
-
-/* pid_t fork(void); */
-/* Implemented as a clone system call with parameters SIGCHLD and 0 */
-
-ENTRY(__libc_fork)
- alloc r2=ar.pfs,0,0,2,0
- mov out0=SIGCHLD /* Return SIGCHLD when child finishes */
- /* no other clone flags; nothing shared */
- mov out1=0 /* Standard sp value. */
- ;;
- DO_CALL (SYS_ify (clone))
- cmp.eq p6,p0=-1,r10
-(p6) br.cond.spnt.few __syscall_error
- ret
-PSEUDO_END(__libc_fork)
-
-weak_alias (__libc_fork, __fork)
-libc_hidden_def (__fork)
-weak_alias (__libc_fork, fork)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/libc/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c
deleted file mode 100644
index 48abfc13f..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Get frequency of the system processor. IA-64/Linux version.
- Copyright (C) 2001 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 <ctype.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <libc-internal.h>
-
-
-hp_timing_t
-__get_clockfreq (void)
-{
- /* We read the information from the /proc filesystem. It contains at
- least one line like
- itc MHz : 733.390988
- We search for this line and convert the number in an integer. */
- static hp_timing_t result;
- int fd;
-
- /* If this function was called before, we know the result. */
- if (result != 0)
- return result;
-
- fd = open ("/proc/cpuinfo", O_RDONLY);
- if (__builtin_expect (fd != -1, 1))
- {
- /* XXX AFAIK the /proc filesystem can generate "files" only up
- to a size of 4096 bytes. */
- char buf[4096];
- ssize_t n;
-
- n = read (fd, buf, sizeof buf);
- if (__builtin_expect (n, 1) > 0)
- {
- char *mhz = memmem (buf, n, "itc MHz", 7);
-
- if (__builtin_expect (mhz != NULL, 1))
- {
- char *endp = buf + n;
- int seen_decpoint = 0;
- int ndigits = 0;
-
- /* Search for the beginning of the string. */
- while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n')
- ++mhz;
-
- while (mhz < endp && *mhz != '\n')
- {
- if (*mhz >= '0' && *mhz <= '9')
- {
- result *= 10;
- result += *mhz - '0';
- if (seen_decpoint)
- ++ndigits;
- }
- else if (*mhz == '.')
- seen_decpoint = 1;
-
- ++mhz;
- }
-
- /* Compensate for missing digits at the end. */
- while (ndigits++ < 6)
- result *= 10;
- }
- }
-
- close (fd);
- }
-
- return result;
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/getclktck.c b/libc/sysdeps/unix/sysv/linux/ia64/getclktck.c
deleted file mode 100644
index 6636bbe68..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/getclktck.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SYSTEM_CLK_TCK 1024
-#include <sysdeps/unix/sysv/linux/getclktck.c>
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/getcontext.S b/libc/sysdeps/unix/sysv/linux/ia64/getcontext.S
deleted file mode 100644
index 4e18bace2..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/getcontext.S
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <sysdep.h>
-#include <features.h>
-
-#include "ucontext_i.h"
-
-/* __getcontext (ucontext_t *ucp)
-
- Saves the machine context in UCP such that when it is activated,
- it appears as if __getcontext() returned again. The only difference
- is that on a first return, r9 contains 1 and on a subsequent
- return, it contains 0.
-
- This implementation in intended to be used for *synchronous* context
- switches only. Therefore, it does not have to save anything
- other than the PRESERVED state. */
-
-ENTRY(__getcontext)
- .prologue
- .body
- alloc r11 = ar.pfs, 1, 0, 4, 0
-
- // sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask):
-
- mov r3 = SC_MASK
- mov out0 = SIG_BLOCK
-
- flushrs // save dirty partition on rbs
- mov out1 = 0
- add out2 = r3, in0
-
- mov out3 = 8 // sizeof kernel sigset_t
- DO_CALL(__NR_rt_sigprocmask)
-
- mov.m rFPSR = ar.fpsr
- mov.m rRSC = ar.rsc
- add r2 = SC_GR+1*8, r32
- ;;
- mov.m rBSP = ar.bsp
- .prologue
- .save ar.unat, rUNAT
- mov.m rUNAT = ar.unat
- .body
- add r3 = SC_GR+4*8, r32
- ;;
-
-.mem.offset 0,0; st8.spill [r2] = r1, (5*8 - 1*8)
-.mem.offset 8,0; st8.spill [r3] = r4, 16
- mov rPFS = r11
- ;;
-.mem.offset 0,0; st8.spill [r2] = r5, 16
-.mem.offset 8,0; st8.spill [r3] = r6, 48
- and rTMP = ~0x3, rRSC
- ;;
-.mem.offset 0,0; st8.spill [r2] = r7, (SC_FR+2*16-(SC_GR+7*8))
-.mem.offset 8,0; st8.spill [r3] = sp, (SC_FR+3*16-(SC_GR+12*8))
- ;;
- mov.m ar.rsc = rTMP // put RSE into enforced lazy mode
- mov.m rNAT = ar.unat
- mov.i rLC = ar.lc
- ;;
- mov.m rRNAT = ar.rnat
- mov.m ar.rsc = rRSC // restore RSE mode
- mov rPR = pr
-
- /*
- * Rotate NaT bits by rPOS positions to the right:
- */
- stf.spill [r2] = f2, 32
- stf.spill [r3] = f3, 32
- add rPOS = SC_GR, r32 // rPOS <- &sc_gr[0]
- ;;
- stf.spill [r2] = f4, (16*16-4*16)
- stf.spill [r3] = f5, (17*16-5*16)
- extr.u rPOS = rPOS, 3, 6 // get NaT bit number for r0
- ;;
- stf.spill [r2] = f16, 32
- stf.spill [r3] = f17, 32
- sub rCPOS = 64, rPOS
- ;;
- stf.spill [r2] = f18, 32
- stf.spill [r3] = f19, 32
- shr.u rTMP = rNAT, rPOS
- ;;
- stf.spill [r2] = f20, 32
- stf.spill [r3] = f21, 32
- shl rNAT = rNAT, rCPOS
- ;;
- stf.spill [r2] = f22, 32
- stf.spill [r3] = f23, 32
- or rNAT = rNAT, rTMP
- ;;
- stf.spill [r2] = f24, 32
- stf.spill [r3] = f25, 32
- mov r8 = 0
- ;;
- stf.spill [r2] = f26, 32
- stf.spill [r3] = f27, 32
- mov r9 = 1
- ;;
- stf.spill [r2] = f28, 32
- stf.spill [r3] = f29, 32
- mov rB0 = b0
- ;;
- stf.spill [r2] = f30, 32
- stf.spill [r3] = f31, 32
- mov rB1 = b1
- ;;
- mov ar.unat = rUNAT // we're done spilling integer regs; restore caller's UNaT
- add r2 = SC_NAT, r32
- add r3 = SC_BSP, r32
- ;;
- st8 [r2] = rNAT, (SC_RNAT-SC_NAT)
- st8 [r3] = rBSP, (SC_UNAT-SC_BSP)
- mov rB2 = b2
- ;;
- st8 [r2] = rRNAT, (SC_FPSR-SC_RNAT)
- st8 [r3] = rUNAT, (SC_PFS-SC_UNAT)
- mov rB3 = b3
- ;;
- st8 [r2] = rFPSR, (SC_LC-SC_FPSR)
- st8 [r3] = rPFS, (SC_PR-SC_PFS)
- mov rB4 = b4
- ;;
- st8 [r2] = rLC, (SC_BR+0*8-SC_LC)
- st8 [r3] = rPR, (SC_BR+1*8-SC_PR)
- mov rB5 = b5
- ;;
- st8 [r2] = rB0, 16
- st8 [r3] = rB1, 16
- ;;
- st8 [r2] = rB2, 16
- st8 [r3] = rB3, 16
- ;;
- st8 [r2] = rB4
- st8 [r3] = rB5
- ret
-END(__getcontext)
-
-weak_alias (__getcontext, getcontext)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/libc/sysdeps/unix/sysv/linux/ia64/getpagesize.c
deleted file mode 100644
index 1155dfdad..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/getpagesize.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 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. */
-
-#include <assert.h>
-#include <unistd.h>
-#include <sys/param.h>
-
-#include <ldsodefs.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Return the system page size. The return value will depend on how
- the kernel is configured. A program must use this call to
- determine the page size to ensure proper alignment for calls such
- as mmap and friends. --davidm 99/11/30 */
-
-int
-__getpagesize ()
-{
- assert (GLRO(dl_pagesize) != 0);
- return GLRO(dl_pagesize);
-}
-libc_hidden_def (__getpagesize)
-weak_alias (__getpagesize, getpagesize)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/libc/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c
deleted file mode 100644
index 39511cd2c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2000, 2001, 2003, 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 <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <not-cancel.h>
-
-static int itc_usable;
-
-static int
-has_cpuclock (void)
-{
- if (__builtin_expect (itc_usable == 0, 0))
- {
- int newval = 1;
- int fd = open_not_cancel_2 ("/proc/sal/itc_drift", O_RDONLY);
- if (__builtin_expect (fd != -1, 1))
- {
- char buf[16];
- /* We expect the file to contain a single digit followed by
- a newline. If the format changes we better not rely on
- the file content. */
- if (read_not_cancel (fd, buf, sizeof buf) != 2
- || buf[0] != '0' || buf[1] != '\n')
- newval = -1;
-
- close_not_cancel_no_status (fd);
- }
-
- itc_usable = newval;
- }
-
- return itc_usable;
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/ioperm.c b/libc/sysdeps/unix/sysv/linux/ia64/ioperm.c
deleted file mode 100644
index 89a0a36d3..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/ioperm.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-/* 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() or iopl(), 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 4KB page, there are 4 I/O ports. */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/mman.h>
-
-#define MAX_PORT 0x10000
-
-/*
- * Memory fence w/accept. This should never be used in code that is
- * not IA-64 specific.
- */
-#define __ia64_mf_a() __asm__ __volatile__ ("mf.a" ::: "memory")
-
-static struct
- {
- unsigned long int base;
- unsigned long int page_mask;
- }
-io;
-
-__inline__ unsigned long int
-io_offset (unsigned long int port)
-{
- return ((port >> 2) << 12) | (port & 0xfff);
-}
-
-int
-_ioperm (unsigned long int from, unsigned long int num, int turn_on)
-{
-#if 0
- unsigned long int addr, len, base;
-#endif
- unsigned long int base;
- int prot;
-
- /* this test isn't as silly as it may look like; consider overflows! */
- if (from >= MAX_PORT || from + num > MAX_PORT)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (turn_on)
- {
- if (!io.base)
- {
- unsigned long phys_io_base, len;
- int fd;
-
- io.page_mask = ~(__getpagesize() - 1);
-
- /* get I/O base physical address from ar.k0 as per PRM: */
- __asm__ ("mov %0=ar.k0" : "=r"(phys_io_base));
-
- /* The O_SYNC flag tells the /dev/mem driver to map the
- memory uncached: */
- fd = __open ("/dev/mem", O_RDWR | O_SYNC);
- if (fd < 0)
- return -1;
-
- len = io_offset (MAX_PORT);
-#if 1
- /* see comment below */
- base = (unsigned long int) __mmap (0, len, PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, phys_io_base);
-#else
- base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
- fd, phys_io_base);
-#endif
- __close (fd);
-
- if ((long) base == -1)
- return -1;
-
- io.base = base;
- }
- prot = PROT_READ | PROT_WRITE;
- }
- else
- {
- if (!io.base)
- return 0; /* never was turned on... */
-
- prot = PROT_NONE;
- }
-#if 0
- /* We can't do mprotect because that would cause us to lose the
- uncached flag that the /dev/mem driver turned on. A MAP_UNCACHED
- flag seems so much cleaner... */
- addr = (io.base + io_offset (from)) & io.page_mask;
- len = io.base + io_offset (from + num) - addr;
- return mprotect ((void *) addr, len, prot);
-#else
- return 0;
-#endif
-}
-
-int
-_iopl (unsigned int level)
-{
- if (level > 3)
- {
- __set_errno (EINVAL);
- return -1;
- }
- if (level)
- {
- int retval = _ioperm (0, MAX_PORT, 1);
- /* Match the documented error returns of the x86 version. */
- if (retval < 0 && errno == EACCES)
- __set_errno (EPERM);
- return retval;
- }
- return 0;
-}
-
-unsigned int
-_inb (unsigned long int port)
-{
- volatile unsigned char *addr = (void *) io.base + io_offset (port);
- unsigned char ret;
-
- ret = *addr;
- __ia64_mf_a();
- return ret;
-}
-
-unsigned int
-_inw (unsigned long int port)
-{
- volatile unsigned short *addr = (void *) io.base + io_offset (port);
- unsigned short ret;
-
- ret = *addr;
- __ia64_mf_a();
- return ret;
-}
-
-unsigned int
-_inl (unsigned long int port)
-{
- volatile unsigned int *addr = (void *) io.base + io_offset (port);
- unsigned int ret;
-
- ret = *addr;
- __ia64_mf_a();
- return ret;
-}
-
-void
-_outb (unsigned char val, unsigned long int port)
-{
- volatile unsigned char *addr = (void *) io.base + io_offset (port);
-
- *addr = val;
- __ia64_mf_a();
-}
-
-void
-_outw (unsigned short val, unsigned long int port)
-{
- volatile unsigned short *addr = (void *) io.base + io_offset (port);
-
- *addr = val;
- __ia64_mf_a();
-}
-
-void
-_outl (unsigned int val, unsigned long int port)
-{
- volatile unsigned int *addr = (void *) io.base + io_offset (port);
-
- *addr = val;
- __ia64_mf_a();
-}
-
-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);
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/libc/sysdeps/unix/sysv/linux/ia64/kernel_stat.h
deleted file mode 100644
index ef11dc94d..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/kernel_stat.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Definition of `struct stat' used in the kernel.
- 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. */
-
-#define STAT_IS_KERNEL_STAT 1
-#define XSTAT_IS_XSTAT64 1
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h
deleted file mode 100644
index af194898b..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 2001 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 <sysdeps/generic/ldconfig.h>
-
-#define SYSDEP_KNOWN_INTERPRETER_NAMES \
- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
-#define SYSDEP_KNOWN_LIBRARY_NAMES \
- { "libc.so.6", FLAG_ELF_LIBC6 }, \
- { "libm.so.6", FLAG_ELF_LIBC6 },
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
deleted file mode 100644
index 535d1671e..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
+++ /dev/null
@@ -1 +0,0 @@
-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/libc/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
deleted file mode 100644
index 31af62491..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Run-time dynamic linker data structures for loaded ELF shared objects. IA64.
- Copyright (C) 2001 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 _LDSODEFS_H
-
-/* Get the real definitions. */
-#include_next <ldsodefs.h>
-
-/* Now define our stuff. */
-
-/* We need special support to initialize DSO loaded for statically linked
- binaries. */
-extern void _dl_static_init (struct link_map *map);
-#undef DL_STATIC_INIT
-#define DL_STATIC_INIT(map) _dl_static_init (map)
-
-#endif /* ldsodefs.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/makecontext.c b/libc/sysdeps/unix/sysv/linux/ia64/makecontext.c
deleted file mode 100644
index d7a2a9f15..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/makecontext.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <libintl.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ucontext.h>
-#include <sys/rse.h>
-
-
-struct fdesc
- {
- unsigned long ip;
- unsigned long gp;
- };
-
-#define PUSH(val) \
-do { \
- if (ia64_rse_is_rnat_slot (rbs)) \
- *rbs++ = 0; \
- *rbs++ = (val); \
-} while (0)
-
-
-/* This implementation can handle an ARGC value of at most 8 and
- values can be passed only in integer registers (r32-r39). */
-
-void
-__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
-{
- struct sigcontext *sc = &ucp->uc_mcontext;
- extern void __start_context (ucontext_t *link, long gp, ...);
- unsigned long stack_start, stack_end;
- va_list ap;
- long *rbs;
- int i;
-
- stack_start = (long) sc->sc_stack.ss_sp;
- stack_end = (long) sc->sc_stack.ss_sp + sc->sc_stack.ss_size;
-
- stack_start = (stack_start + 7) & -8;
- stack_end = stack_end & -16;
-
- if (argc > 8)
- {
- fprintf (stderr, _("\
-makecontext: does not know how to handle more than 8 arguments\n"));
- exit (-1);
- }
-
- /* set the entry point and global pointer: */
- sc->sc_br[0] = ((struct fdesc *) &__start_context)->ip;
- sc->sc_br[1] = ((struct fdesc *) func)->ip;
- sc->sc_gr[1] = ((struct fdesc *) func)->gp;
-
- /* set up the call frame: */
- sc->sc_ar_pfs = ((sc->sc_ar_pfs & ~0x3fffffffffUL)
- | (argc + 2) | ((argc + 2) << 7));
- rbs = (long *) stack_start;
- PUSH((long) ucp->uc_link);
- PUSH(((struct fdesc *) &__start_context)->gp);
- va_start (ap, argc);
- for (i = 0; i < argc; ++i)
- PUSH(va_arg (ap, long));
- va_end (ap);
-
- /* set the memory and register stack pointers: */
- sc->sc_ar_bsp = (long) rbs;
- sc->sc_gr[12] = stack_end - 16;
-
- /* clear the NaT bits for r1 and r12: */
- sc->sc_nat &= ~((1 << 1) | (1 << 12));
- sc->sc_ar_rnat = 0;
-}
-
-weak_alias (__makecontext, makecontext)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/pipe.S b/libc/sysdeps/unix/sysv/linux/ia64/pipe.S
deleted file mode 100644
index 60624df3c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/pipe.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger <davidm@hpl.hp.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. */
-
-/* __pipe is a special syscall since it returns two values. */
-
-#include <sysdep.h>
-
-ENTRY(__pipe)
- .regstk 1,0,0,0
- DO_CALL (SYS_ify (pipe))
- cmp.ne p6,p0=-1,r10
- ;;
-(p6) st4 [in0]=r8,4
-(p6) mov ret0=0
- ;;
-(p6) st4 [in0]=r9
-(p6) ret
- br.cond.spnt.few __syscall_error
-PSEUDO_END(__pipe)
-
-libc_hidden_def (__pipe)
-weak_alias (__pipe, pipe)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h
deleted file mode 100644
index bc9a8433f..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/profil-counter.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Machine-dependent SIGPROF signal handler. IA-64 version.
- 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. */
-
-/* In many Unix systems signal handlers are called like this
- and the interrupted PC is easily findable in the `struct sigcontext'. */
-
-static void
-profil_counter (int signr, siginfo_t *si, struct sigcontext *scp)
-{
- unsigned long ip = scp->sc_ip & ~0X3ULL, slot = scp->sc_ip & 0x3ull;
-
- /* Note: Linux/ia64 encodes the slot number in bits 0 and 1. We
- want to multiply the slot number by four so we can use bins of
- width 4 to get accurate instruction-level profiling. */
- profil_count ((void *) (ip + 4*slot));
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/readelflib.c b/libc/sysdeps/unix/sysv/linux/ia64/readelflib.c
deleted file mode 100644
index 7a10d23c9..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/readelflib.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 2000, 2001, 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. */
-
-
-int process_elf32_file (const char *file_name, const char *lib, int *flag,
- unsigned int *osversion, char **soname,
- void *file_contents, size_t file_length);
-int process_elf64_file (const char *file_name, const char *lib, int *flag,
- unsigned int *osversion, char **soname,
- void *file_contents, size_t file_length);
-
-/* Returns 0 if everything is ok, != 0 in case of error. */
-int
-process_elf_file (const char *file_name, const char *lib, int *flag,
- unsigned int *osversion, char **soname,
- void *file_contents, size_t file_length)
-{
- ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
- int ret;
-
- if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
- return process_elf32_file (file_name, lib, flag, osversion, soname,
- file_contents, file_length);
- else
- {
- ret = process_elf64_file (file_name, lib, flag, osversion, soname,
- file_contents, file_length);
- /* Intel 64bit libraries are always libc.so.6+. */
- if (!ret)
- *flag = FLAG_IA64_LIB64|FLAG_ELF_LIBC6;
- return ret;
- }
-}
-
-#undef __ELF_NATIVE_CLASS
-#undef process_elf_file
-#define process_elf_file process_elf32_file
-#define __ELF_NATIVE_CLASS 32
-#include "elf/readelflib.c"
-
-#undef __ELF_NATIVE_CLASS
-#undef process_elf_file
-#define process_elf_file process_elf64_file
-#define __ELF_NATIVE_CLASS 64
-#include "elf/readelflib.c"
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/register-dump.h b/libc/sysdeps/unix/sysv/linux/ia64/register-dump.h
deleted file mode 100644
index 513db974f..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/register-dump.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Dump registers.
- Copyright (C) 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
-
- 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 <string.h>
-#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
-
-/* We will print the register dump in this format:
-
- GP: XXXXXXXXXXXXXXXX R2: XXXXXXXXXXXXXXXX R3: XXXXXXXXXXXXXXXX
- R8: XXXXXXXXXXXXXXXX R9: XXXXXXXXXXXXXXXX R10: XXXXXXXXXXXXXXXX
- R11: XXXXXXXXXXXXXXXX SP: XXXXXXXXXXXXXXXX TP: XXXXXXXXXXXXXXXX
- R14: XXXXXXXXXXXXXXXX R15: XXXXXXXXXXXXXXXX R16: XXXXXXXXXXXXXXXX
- R17: XXXXXXXXXXXXXXXX R18: XXXXXXXXXXXXXXXX R19: XXXXXXXXXXXXXXXX
- R20: XXXXXXXXXXXXXXXX R21: XXXXXXXXXXXXXXXX R22: XXXXXXXXXXXXXXXX
- R23: XXXXXXXXXXXXXXXX R24: XXXXXXXXXXXXXXXX R25: XXXXXXXXXXXXXXXX
- R26: XXXXXXXXXXXXXXXX R27: XXXXXXXXXXXXXXXX R28: XXXXXXXXXXXXXXXX
- R29: XXXXXXXXXXXXXXXX R30: XXXXXXXXXXXXXXXX R31: XXXXXXXXXXXXXXXX
-
- RP: XXXXXXXXXXXXXXXX B6: XXXXXXXXXXXXXXXX B7: XXXXXXXXXXXXXXXX
-
- IP: XXXXXXXXXXXXXXXX RSC: XXXXXXXXXXXXXXXX PR: XXXXXXXXXXXXXXXX
- PFS: XXXXXXXXXXXXXXXX UNAT: XXXXXXXXXXXXXXXX CFM: XXXXXXXXXXXXXXXX
- CCV: XXXXXXXXXXXXXXXX FPSR: XXXXXXXXXXXXXXXX
-
- F32: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F33: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- F34: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F35: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-...
- F124: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F125: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- F126: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX F127: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- */
-
-static void
-hexvalue (unsigned long int value, char *buf, size_t len)
-{
- char *cp = _itoa_word (value, buf + len, 16, 0);
- while (cp > buf)
- *--cp = '0';
-}
-
-static void
-regvalue (unsigned long int *value, char letter, int regno, char *buf)
-{
- int n = regno >= 100 ? 3 : regno >= 10 ? 2 : 1;
- buf[0] = ' ';
- buf[1] = letter;
- _itoa_word (regno, buf + 2 + n, 10, 0);
- buf[2 + n] = ':';
- for (++n; n <= 4; ++n)
- buf[2 + n] = ' ';
- hexvalue (value[0], buf + 7, 16);
- if (letter == 'F')
- {
- hexvalue (value[1], buf + 7 + 16, 16);
- buf[7 + 32] = '\n';
- }
- else
- buf[7 + 16] = '\n';
-}
-
-static void
-register_dump (int fd, struct sigcontext *ctx)
-{
- char gpregs[32 - 5][8 + 16];
- char fpregs[128 - 32][8 + 32];
- char bpregs[3][8 + 16];
- char spregs[8][16];
- struct iovec iov[146];
- size_t nr = 0;
- int i;
-
-#define ADD_STRING(str) \
- do \
- { \
- iov[nr].iov_base = (char *) str; \
- iov[nr].iov_len = strlen (str); \
- ++nr; \
- } \
- while (0)
-#define ADD_MEM(str, len) \
- do \
- { \
- iov[nr].iov_base = str; \
- iov[nr].iov_len = len; \
- ++nr; \
- } \
- while (0)
-
- /* Generate strings of register contents. */
- for (i = 1; i < 4; ++i)
- {
- regvalue (&ctx->sc_gr[i], 'R', i, gpregs[i - 1]);
- if (ctx->sc_nat & (1L << i))
- memcpy (gpregs[i - 1] + 7, "NaT ", 16);
- }
- for (i = 8; i < 32; ++i)
- {
- regvalue (&ctx->sc_gr[i], 'R', i, gpregs[i - 5]);
- if (ctx->sc_nat & (1L << i))
- memcpy (gpregs[i - 1] + 7, "NaT ", 16);
- }
- memcpy (gpregs[0] + 1, "GP:", 3);
- memcpy (gpregs[7] + 1, "SP: ", 4);
- memcpy (gpregs[8] + 1, "TP: ", 4);
-
- regvalue (&ctx->sc_br[0], 'B', 0, bpregs[0]);
- regvalue (&ctx->sc_br[6], 'B', 6, bpregs[1]);
- regvalue (&ctx->sc_br[7], 'B', 7, bpregs[2]);
- memcpy (bpregs[0] + 1, "RP:", 3);
-
- if (ctx->sc_flags & IA64_SC_FLAG_FPH_VALID)
- for (i = 32; i < 128; ++i)
- regvalue (&ctx->sc_fr[i].u.bits[0], 'F', i, fpregs[i - 32]);
-
- hexvalue (ctx->sc_ip, spregs[0], sizeof (spregs[0]));
- hexvalue (ctx->sc_ar_rsc, spregs[1], sizeof (spregs[1]));
- hexvalue (ctx->sc_pr, spregs[2], sizeof (spregs[2]));
- hexvalue (ctx->sc_ar_pfs, spregs[3], sizeof (spregs[3]));
- hexvalue (ctx->sc_ar_unat, spregs[4], sizeof (spregs[4]));
- hexvalue (ctx->sc_cfm, spregs[5], sizeof (spregs[5]));
- hexvalue (ctx->sc_ar_ccv, spregs[6], sizeof (spregs[6]));
- hexvalue (ctx->sc_ar_fpsr, spregs[7], sizeof (spregs[7]));
-
- /* Generate the output. */
- ADD_STRING ("Register dump:\n\n");
-
- for (i = 0; i < 32 - 5; ++i)
- ADD_MEM (gpregs[i], sizeof (gpregs[0]) - 1 + ((i % 3) == 2));
- ADD_STRING ("\n");
-
- for (i = 0; i < 3; ++i)
- ADD_MEM (bpregs[i], sizeof (bpregs[0]) - 1);
-
- ADD_STRING ("\n\n IP: ");
- ADD_MEM (spregs[0], sizeof (spregs[0]));
- ADD_STRING (" RSC: ");
- ADD_MEM (spregs[1], sizeof (spregs[0]));
- ADD_STRING (" PR: ");
- ADD_MEM (spregs[2], sizeof (spregs[0]));
- ADD_STRING ("\n PFS: ");
- ADD_MEM (spregs[3], sizeof (spregs[0]));
- ADD_STRING (" UNAT: ");
- ADD_MEM (spregs[4], sizeof (spregs[0]));
- ADD_STRING (" CFM: ");
- ADD_MEM (spregs[5], sizeof (spregs[0]));
- ADD_STRING ("\n CCV: ");
- ADD_MEM (spregs[6], sizeof (spregs[0]));
- ADD_STRING (" FPSR: ");
- ADD_MEM (spregs[7], sizeof (spregs[0]));
- ADD_STRING ("\n");
-
- if (ctx->sc_flags & IA64_SC_FLAG_FPH_VALID)
- {
- ADD_STRING ("\n");
-
- for (i = 0; i < 128 - 32; ++i)
- ADD_MEM (fpregs[i], sizeof (fpregs[0]) - 1 + (i & 1));
- }
-
- /* Write the stuff out. */
- writev (fd, iov, nr);
-}
-
-
-#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S b/libc/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S
deleted file mode 100644
index f966bf1e5..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdep.S>
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/setcontext.S b/libc/sysdeps/unix/sysv/linux/ia64/setcontext.S
deleted file mode 100644
index ef0a93c0c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/setcontext.S
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <sysdep.h>
-#include <features.h>
-
-#include "ucontext_i.h"
-
-/* __setcontext (const ucontext_t *ucp)
-
- Restores the machine context in UCP and thereby resumes execution
- in that context.
-
- This implementation in intended to be used for *synchronous* context
- switches only. Therefore, it does not have to restore anything
- other than the PRESERVED state. */
-
-ENTRY(__setcontext)
- .prologue
- .body
- alloc r11 = ar.pfs, 1, 0, 4, 0
-
- // sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL):
-
- mov r3 = SC_MASK
- mov out0 = SIG_SETMASK
- ;;
- add out1 = r3, in0
- mov out2 = 0
- mov out3 = 8 // sizeof kernel sigset_t
-
- invala
- DO_CALL(__NR_rt_sigprocmask)
- add r2 = SC_NAT, r32
-
- add r3 = SC_RNAT, r32 // r3 <- &sc_ar_rnat
- add rPOS = SC_GR, r32 // rPOS <- &sc_gr[0]
- ;;
- ld8 rNAT = [r2], (SC_BSP-SC_NAT)
- extr.u rPOS = rPOS, 3, 6 // get NaT bit number for r0
- ;;
- ld8 rBSP = [r2], (SC_UNAT-SC_BSP)
- ld8 rRNAT = [r3], (SC_FPSR-SC_RNAT)
- /*
- * Rotate NaT bits by rPOS positions to the left:
- */
- sub rCPOS = 64, rPOS
- ;;
- ld8 rUNAT = [r2], (SC_PFS-SC_UNAT)
- ld8 rFPSR = [r3], (SC_LC-SC_FPSR)
- shl rTMP = rNAT, rPOS
- ;;
- ld8 rPFS = [r2], (SC_PR-SC_PFS)
- ld8 rLC = [r3], (SC_BR+0*8-SC_LC)
- shr.u rNAT = rNAT, rCPOS
- ;;
- ld8 rPR = [r2], (SC_BR+1*8-SC_PR)
- ld8 rB0 = [r3], 16
- or rNAT = rNAT, rTMP
- ;;
- ld8 rB1 = [r2], 16
- ld8 rB2 = [r3], 16
- ;;
- mov.m ar.unat = rNAT
- mov.m rRSC = ar.rsc
- ;;
- ld8 rB3 = [r2], 16
- ld8 rB4 = [r3], (SC_GR+1*8-(SC_BR+4*8))
- ;;
- ld8 rB5 = [r2], (SC_GR+4*8-(SC_BR+5*8))
- ld8.fill r1 = [r3], (5*8 - 1*8)
- ;;
- ld8.fill r4 = [r2], 16
- ld8.fill r5 = [r3], 16
- mov b0 = rB0
- ;;
- ld8.fill r6 = [r2], 48
- ld8.fill r7 = [r3], (SC_FR+2*16-(SC_GR+7*8))
- ;;
- ld8.fill sp = [r2], (SC_FR+3*16-(SC_GR+12*8))
- mov.m ar.fpsr = rFPSR
- mov.i ar.pfs = rPFS
- ;;
- ldf.fill f3 = [r2], 16
- ldf.fill f2 = [r3], 48
- mov b1 = rB1
- ;;
- ldf.fill f4 = [r2], (16*16-4*16)
- ldf.fill f5 = [r3], (17*16-5*16)
- mov b2 = rB2
- ;;
- ldf.fill f16 = [r2], 32
- ldf.fill f17 = [r3], 32
- mov b3 = rB3
- ;;
- ldf.fill f18 = [r2], 32
- ldf.fill f19 = [r3], 32
- mov b4 = rB4
- ;;
- ldf.fill f20 = [r2], 32
- ldf.fill f21 = [r3], 32
- mov b5 = rB5
- ;;
- ldf.fill f22 = [r2], 32
- ldf.fill f23 = [r3], 32
- mov r8 = 0
- ;;
- ldf.fill f24 = [r2], 32
- ldf.fill f25 = [r3], 32
- mov r9 = 0
- ;;
- ldf.fill f26 = [r2], 32
- ldf.fill f27 = [r3], 32
- dep rTMP = 0, rRSC, 16, 14 // clear ar.rsc.loadrs
- ;;
- ldf.fill f28 = [r2], 32
- ldf.fill f29 = [r3], 32
- and rTMP = ~0x3, rTMP // clear ar.rsc.mode
- ;;
- ldf.fill f30 = [r2], 32
- ldf.fill f31 = [r3], 32
- mov pr = rPR, -1
- ;;
- mov.m ar.rsc = rTMP // put RSE into enforced lazy mode
- ;;
- loadrs // drop dirty partition
- ;;
- mov.m ar.bspstore = rBSP
- mov.m ar.unat = rUNAT
- mov.i ar.lc = rLC
- ;;
- mov.m ar.rnat = rRNAT
- mov.m ar.rsc = rRSC
- ret
-END(__setcontext)
-
-weak_alias (__setcontext, setcontext)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/setjmp.S b/libc/sysdeps/unix/sysv/linux/ia64/setjmp.S
deleted file mode 100644
index 53f80d203..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/setjmp.S
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005
- Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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.
-
- The layout of the jmp_buf is as follows. This is subject to change
- and user-code should never depend on the particular layout of
- jmp_buf!
-
-
- offset: description:
- ------- ------------
- 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS)
- 0x008 r1 (gp)
- 0x010 caller's unat
- 0x018 fpsr
- 0x020 r4
- 0x028 r5
- 0x030 r6
- 0x038 r7
- 0x040 rp (b0)
- 0x048 b1
- 0x050 b2
- 0x058 b3
- 0x060 b4
- 0x068 b5
- 0x070 ar.pfs
- 0x078 ar.lc
- 0x080 pr
- 0x088 ar.bsp ; unchangeable (see __longjmp.S)
- 0x090 ar.unat
- 0x098 &__jmp_buf ; address of the jmpbuf (needed to locate NaT bits in unat)
- 0x0a0 f2
- 0x0b0 f3
- 0x0c0 f4
- 0x0d0 f5
- 0x0e0 f16
- 0x0f0 f17
- 0x100 f18
- 0x110 f19
- 0x120 f20
- 0x130 f21
- 0x130 f22
- 0x140 f23
- 0x150 f24
- 0x160 f25
- 0x170 f26
- 0x180 f27
- 0x190 f28
- 0x1a0 f29
- 0x1b0 f30
- 0x1c0 f31 */
-
-#include <sysdep.h>
-#include <features.h>
-
- /* The following two entry points are the traditional entry points: */
-
-LEAF(setjmp)
- alloc r8=ar.pfs,2,0,0,0
- mov in1=1
- br.cond.sptk.many _GI___sigsetjmp
-END(setjmp)
-
-LEAF(_setjmp)
- alloc r8=ar.pfs,2,0,0,0
- mov in1=0
- br.cond.sptk.many _GI___sigsetjmp
-END(_setjmp)
-libc_hidden_def (_setjmp)
-
- /* __sigsetjmp(__jmp_buf buf, int savemask) */
-
-ENTRY(__sigsetjmp)
- .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
- alloc loc1=ar.pfs,2,5,2,0
- .save ar.unat, loc2
- mov loc2=ar.unat
- ;;
- mov r17=ar.fpsr
- mov r2=in0
- add r3=8,in0
- ;;
-.mem.offset 8,0; st8.spill.nta [r2]=sp,16 // r12 (sp)
-.mem.offset 0,0; st8.spill.nta [r3]=gp,16 // r1 (gp)
- ;;
- st8.nta [r2]=loc2,16 // save caller's unat
- st8.nta [r3]=r17,16 // save fpsr
- add r8=0xa0,in0
- ;;
-.mem.offset 8,0; st8.spill.nta [r2]=r4,16 // r4
-.mem.offset 0,0; st8.spill.nta [r3]=r5,16 // r5
- add r9=0xb0,in0
- ;;
- stf.spill.nta [r8]=f2,32
- stf.spill.nta [r9]=f3,32
- mov loc0=rp
- .body
- ;;
- stf.spill.nta [r8]=f4,32
- stf.spill.nta [r9]=f5,32
- mov r17=b1
- ;;
- stf.spill.nta [r8]=f16,32
- stf.spill.nta [r9]=f17,32
- mov r18=b2
- ;;
- stf.spill.nta [r8]=f18,32
- stf.spill.nta [r9]=f19,32
- mov r19=b3
- ;;
- stf.spill.nta [r8]=f20,32
- stf.spill.nta [r9]=f21,32
- mov r20=b4
- ;;
- stf.spill.nta [r8]=f22,32
- stf.spill.nta [r9]=f23,32
- mov r21=b5
- ;;
- stf.spill.nta [r8]=f24,32
- stf.spill.nta [r9]=f25,32
- mov r22=ar.lc
- ;;
- stf.spill.nta [r8]=f26,32
- stf.spill.nta [r9]=f27,32
- mov r24=pr
- ;;
- stf.spill.nta [r8]=f28,32
- stf.spill.nta [r9]=f29,32
-#ifdef PTR_MANGLE
- mov loc3=loc0
- ;;
- PTR_MANGLE (loc3, loc4)
-#else
- ;;
-#endif
- stf.spill.nta [r8]=f30
- stf.spill.nta [r9]=f31
-
-.mem.offset 8,0; st8.spill.nta [r2]=r6,16 // r6
-.mem.offset 0,0; st8.spill.nta [r3]=r7,16 // r7
- ;;
- mov r23=ar.bsp
- mov r25=ar.unat
- mov out0=in0
-
-#ifdef PTR_MANGLE
- st8.nta [r2]=loc3,16 // b0
-#else
- st8.nta [r2]=loc0,16 // b0
-#endif
- st8.nta [r3]=r17,16 // b1
- mov out1=in1
- ;;
- st8.nta [r2]=r18,16 // b2
- st8.nta [r3]=r19,16 // b3
- ;;
- st8.nta [r2]=r20,16 // b4
- st8.nta [r3]=r21,16 // b5
- ;;
- st8.nta [r2]=loc1,16 // ar.pfs
- st8.nta [r3]=r22,16 // ar.lc
- ;;
- st8.nta [r2]=r24,16 // pr
- st8.nta [r3]=r23,16 // ar.bsp
- ;;
- st8.nta [r2]=r25 // ar.unat
- st8.nta [r3]=in0 // &__jmp_buf
-#if defined NOT_IN_libc && defined IS_IN_rtld
- /* In ld.so we never save the signal mask. */
- ;;
-#else
- br.call.dpnt.few rp=__sigjmp_save
-#endif
-.ret0: // force a new bundle ::q
- mov.m ar.unat=loc2 // restore caller's unat
- mov rp=loc0
- mov ar.pfs=loc1
- mov r8=0
- ret
-END(__sigsetjmp)
-strong_alias(__sigsetjmp, _GI___sigsetjmp)
-
-weak_extern(_setjmp)
-weak_extern(setjmp)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sigaction.c b/libc/sysdeps/unix/sysv/linux/ia64/sigaction.c
deleted file mode 100644
index fdbc93f0e..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sigaction.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Linux/IA64 specific sigaction
- Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
-
- 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. */
-
-/* Linux/ia64 only has rt signals, thus we do not even want to try falling
- back to the old style signals as the default Linux handler does. */
-
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* The variable is shared between all wrappers around signal handling
- functions which have RT equivalents. This is the definition. */
-
-
-/* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__libc_sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
-{
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- return INLINE_SYSCALL (rt_sigaction, 4, sig,
- CHECK_1_NULL_OK (act), CHECK_1_NULL_OK (oact), _NSIG / 8);
-}
-libc_hidden_def (__libc_sigaction)
-
-#ifdef WRAPPER_INCLUDE
-# include WRAPPER_INCLUDE
-#endif
-
-#ifndef LIBC_SIGACTION
-weak_alias (__libc_sigaction, __sigaction)
-libc_hidden_def (__sigaction)
-weak_alias (__libc_sigaction, sigaction)
-#endif
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym b/libc/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym
deleted file mode 100644
index 943e68a66..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <stddef.h>
-#include <sys/ucontext.h>
-
---
-SC_NAT offsetof (struct sigcontext, sc_nat)
-SC_BSP offsetof (struct sigcontext, sc_ar_bsp)
-SC_RNAT offsetof (struct sigcontext, sc_ar_rnat)
-SC_UNAT offsetof (struct sigcontext, sc_ar_unat)
-SC_FPSR offsetof (struct sigcontext, sc_ar_fpsr)
-SC_PFS offsetof (struct sigcontext, sc_ar_pfs)
-SC_LC offsetof (struct sigcontext, sc_ar_lc)
-SC_PR offsetof (struct sigcontext, sc_pr)
-SC_BR offsetof (struct sigcontext, sc_br)
-SC_GR offsetof (struct sigcontext, sc_gr)
-SC_FR offsetof (struct sigcontext, sc_fr)
-SC_MASK offsetof (struct sigcontext, sc_mask)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
deleted file mode 100644
index 51c11e6b4..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 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. */
-
-#define SIGCONTEXT siginfo_t *_si, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _si,
-#define GET_PC(ctx) ((ctx)->sc_ip)
-#define GET_FRAME(ctx) ((void *) 0)
-#define GET_STACK(ctx) ((void *) 0)
-
-#define CALL_SIGHANDLER(handler, signo, ctx) \
- (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sigpending.c b/libc/sysdeps/unix/sysv/linux/ia64/sigpending.c
deleted file mode 100644
index ae75a5516..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sigpending.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1997, 1998, 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. */
-
-/* Linux/ia64 only has rt signals, thus we do not even want to try falling
- back to the old style signals as the default Linux handler does. */
-
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Change the set of blocked signals to SET,
- wait until a signal arrives, and restore the set of blocked signals. */
-int
-sigpending (set)
- sigset_t *set;
-{
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/libc/sysdeps/unix/sysv/linux/ia64/sigprocmask.c
deleted file mode 100644
index ba8b05386..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sigprocmask.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Linux/IA64 specific sigprocmask
- Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
-
- 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. */
-
-/* Linux/ia64 only has rt signals, thus we do not even want to try falling
- back to the old style signals as the default Linux handler does. */
-
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Get and/or change the set of blocked signals. */
-int
-__sigprocmask (how, set, oset)
- int how;
- const sigset_t *set;
- sigset_t *oset;
-{
-
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
- CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
-}
-weak_alias (__sigprocmask, sigprocmask)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/libc/sysdeps/unix/sysv/linux/ia64/swapcontext.c
deleted file mode 100644
index 1b9fbdb6a..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/swapcontext.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <ucontext.h>
-
-struct rv
- {
- long retval;
- long first_return;
- };
-
-extern struct rv __getcontext (ucontext_t *__ucp) __THROW;
-extern int __setcontext (__const ucontext_t *__ucp) __THROW;
-
-int
-__swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
-{
- struct rv rv = __getcontext (oucp);
- if (rv.first_return)
- __setcontext (ucp);
- return 0;
-}
-
-weak_alias (__swapcontext, swapcontext)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sys/io.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/io.h
deleted file mode 100644
index 14736ff1c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/io.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _SYS_IO_H
-#define _SYS_IO_H 1
-
-#include <features.h>
-
-__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);
-
-/* 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);
-
-extern unsigned int _inb (unsigned long int __port);
-extern unsigned int _inb (unsigned long int __port);
-extern unsigned int _inw (unsigned long int __port);
-extern unsigned int _inl (unsigned long int __port);
-extern void _outb (unsigned char __val, unsigned long int __port);
-extern void _outw (unsigned short __val, unsigned long int __port);
-extern void _outl (unsigned int __val, unsigned long int __port);
-
-#define inb _inb
-#define inw _inw
-#define inl _inl
-#define outb _outb
-#define outw _outw
-#define outl _outl
-
-/* 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);
-
-extern int pciconfig_write (unsigned long int __bus, unsigned long int __dfn,
- unsigned long int __off, unsigned long int __len,
- unsigned char *__buf);
-
-__END_DECLS
-
-#endif /* _SYS_IO_H */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sys/procfs.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/procfs.h
deleted file mode 100644
index b5196b997..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/procfs.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Copyright (C) 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. */
-
-#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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-
-__BEGIN_DECLS
-
-struct elf_siginfo
- {
- int si_signo; /* Signal number. */
- int si_code; /* Extra code. */
- int si_errno; /* Errno. */
- };
-
-/* We really need just 72 but let's leave some headroom... */
-#define ELF_NGREG 128
-/* f0 and f1 could be omitted, but so what... */
-#define ELF_NFPREG 128
-
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-typedef struct ia64_fpreg elf_fpreg_t;
-typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
-
-typedef elf_greg_t greg_t;
-typedef elf_gregset_t gregset_t;
-typedef elf_fpregset_t fpregset_t;
-#define NGREG ELF_NGREG
-
-/* 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/libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
deleted file mode 100644
index 82d8843ce..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/* `ptrace' debugger support interface. Linux/ia64 version.
- Copyright (C) 2001, 2006, 2007, 2011 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_PTRACE_H
-#define _SYS_PTRACE_H 1
-
-#include <features.h>
-#include <sys/ucontext.h>
-
-__BEGIN_DECLS
-
-/* Type of the REQUEST argument to `ptrace.' */
-enum __ptrace_request
-{
- /* Indicate that the process making this request should be traced.
- All signals received by this process can be intercepted by its
- parent, and its parent can use the other `ptrace' requests. */
- PTRACE_TRACEME = 0,
-#define PT_TRACE_ME PTRACE_TRACEME
-
- /* Return the word in the process's text space at address ADDR. */
- PTRACE_PEEKTEXT = 1,
-#define PT_READ_I PTRACE_PEEKTEXT
-
- /* Return the word in the process's data space at address ADDR. */
- PTRACE_PEEKDATA = 2,
-#define PT_READ_D PTRACE_PEEKDATA
-
- /* Return the word in the process's user area at offset ADDR. */
- PTRACE_PEEKUSER = 3,
-#define PT_READ_U PTRACE_PEEKUSER
-
- /* Write the word DATA into the process's text space at address ADDR. */
- PTRACE_POKETEXT = 4,
-#define PT_WRITE_I PTRACE_POKETEXT
-
- /* Write the word DATA into the process's data space at address ADDR. */
- PTRACE_POKEDATA = 5,
-#define PT_WRITE_D PTRACE_POKEDATA
-
- /* Write the word DATA into the process's user area at offset ADDR. */
- PTRACE_POKEUSER = 6,
-#define PT_WRITE_U PTRACE_POKEUSER
-
- /* Continue the process. */
- PTRACE_CONT = 7,
-#define PT_CONTINUE PTRACE_CONT
-
- /* Kill the process. */
- PTRACE_KILL = 8,
-#define PT_KILL PTRACE_KILL
-
- /* Single step the process.
- This is not supported on all machines. */
- PTRACE_SINGLESTEP = 9,
-#define PT_STEP PTRACE_SINGLESTEP
-
- /* Execute process until next taken branch. */
- PTRACE_SINGLEBLOCK = 12,
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
-
- /* Attach to a process that is already running. */
- PTRACE_ATTACH = 16,
-#define PT_ATTACH PTRACE_ATTACH
-
- /* Detach from a process attached to with PTRACE_ATTACH. */
- PTRACE_DETACH = 17,
-#define PT_DETACH PTRACE_DETACH
-
- /* Get all registers (pt_all_user_regs) in one shot */
- PTRACE_GETREGS = 18,
-#define PT_GETREGS PTRACE_GETREGS
-
- /* Set all registers (pt_all_user_regs) in one shot */
- PTRACE_SETREGS = 19,
-#define PT_SETREGS PTRACE_SETREGS
-
- /* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24,
-#define PT_SYSCALL PTRACE_SYSCALL
-
- /* Set ptrace filter options. */
- PTRACE_SETOPTIONS = 0x4200,
-#define PT_SETOPTIONS PTRACE_SETOPTIONS
-
- /* Get last ptrace message. */
- PTRACE_GETEVENTMSG = 0x4201,
-#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
-
- /* Get siginfo for process. */
- PTRACE_GETSIGINFO = 0x4202,
-#define PT_GETSIGINFO PTRACE_GETSIGINFO
-
- /* Set new siginfo for process. */
- PTRACE_SETSIGINFO = 0x4203,
-#define PT_SETSIGINFO PTRACE_SETSIGINFO
-
- /* Get register content. */
- PTRACE_GETREGSET = 0x4204,
-#define PTRACE_GETREGSET PTRACE_GETREGSET
-
- /* Set register content. */
- PTRACE_SETREGSET = 0x4205,
-#define PTRACE_SETREGSET PTRACE_SETREGSET
-
- /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
- signal or group stop state. */
- PTRACE_SEIZE = 0x4206,
-#define PTRACE_SEIZE PTRACE_SEIZE
-
- /* Trap seized tracee. */
- PTRACE_INTERRUPT = 0x4207,
-#define PTRACE_INTERRUPT PTRACE_INTERRUPT
-
- /* Wait for next group event. */
- PTRACE_LISTEN = 0x4208
-};
-
-
-/* Flag for PTRACE_LISTEN. */
-enum __ptrace_flags
-{
- PTRACE_SEIZE_DEVEL = 0x80000000
-};
-
-/* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */
-struct pt_all_user_regs
- {
- unsigned long nat;
- unsigned long cr_iip;
- unsigned long cfm;
- unsigned long cr_ipsr;
- unsigned long pr;
-
- unsigned long gr[32];
- unsigned long br[8];
- unsigned long ar[128];
- struct ia64_fpreg fr[128];
- };
-
-/* Options set using PTRACE_SETOPTIONS. */
-enum __ptrace_setoptions {
- PTRACE_O_TRACESYSGOOD = 0x00000001,
- PTRACE_O_TRACEFORK = 0x00000002,
- PTRACE_O_TRACEVFORK = 0x00000004,
- PTRACE_O_TRACECLONE = 0x00000008,
- PTRACE_O_TRACEEXEC = 0x00000010,
- PTRACE_O_TRACEVFORKDONE = 0x00000020,
- PTRACE_O_TRACEEXIT = 0x00000040,
- PTRACE_O_MASK = 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options. */
-enum __ptrace_eventcodes {
- PTRACE_EVENT_FORK = 1,
- PTRACE_EVENT_VFORK = 2,
- PTRACE_EVENT_CLONE = 3,
- PTRACE_EVENT_EXEC = 4,
- PTRACE_EVENT_VFORK_DONE = 5,
- PTRACE_EVENT_EXIT = 6
-};
-
-/* Perform process tracing functions. REQUEST is one of the values
- above, and determines the action to be taken.
- For all requests except PTRACE_TRACEME, PID specifies the process to be
- traced.
-
- PID and the other arguments described above for the various requests should
- appear (those that are used for the particular request) as:
- pid_t PID, void *ADDR, int DATA, void *ADDR2
- after REQUEST. */
-extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
-
-__END_DECLS
-
-#endif /* _SYS_PTRACE_H */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sys/rse.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/rse.h
deleted file mode 100644
index 1d1c803d3..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/rse.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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. */
-
-#ifndef _ia64_rse_h
-#define _ia64_rse_h
-
-#include <features.h>
-
-/* Register stack engine related helper functions. This file may be
- used in applications, so be careful about the name-space and give
- some consideration to non-GNU C compilers (though __inline is
- fine). */
-
-static __inline unsigned long
-ia64_rse_slot_num (unsigned long *addr)
-{
- return (((unsigned long) addr) >> 3) & 0x3f;
-}
-
-/* Return TRUE if ADDR is the address of an RNAT slot. */
-
-static __inline unsigned long
-ia64_rse_is_rnat_slot (unsigned long *addr)
-{
- return ia64_rse_slot_num (addr) == 0x3f;
-}
-
-/* Returns the address of the RNAT slot that covers the slot at
- address SLOT_ADDR. */
-
-static __inline unsigned long *
-ia64_rse_rnat_addr (unsigned long *slot_addr)
-{
- return (unsigned long *) ((unsigned long) slot_addr | (0x3f << 3));
-}
-
-/* Calcuate the number of registers in the dirty partition starting at
- BSPSTORE with a size of DIRTY bytes. This isn't simply DIRTY
- divided by eight because the 64th slot is used to store ar.rnat. */
-
-static __inline unsigned long
-ia64_rse_num_regs (unsigned long *bspstore, unsigned long *bsp)
-{
- unsigned long slots = (bsp - bspstore);
-
- return slots - (ia64_rse_slot_num(bspstore) + slots)/0x40;
-}
-
-/* The inverse of the above: given bspstore and the number of
- registers, calculate ar.bsp. */
-
-static __inline unsigned long *
-ia64_rse_skip_regs (unsigned long *addr, long num_regs)
-{
- long delta = ia64_rse_slot_num(addr) + num_regs;
-
- if (num_regs < 0)
- delta -= 0x3e;
- return addr + num_regs + delta/0x3f;
-}
-
-#endif /* _ia64_rse_h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
deleted file mode 100644
index 17dc85f99..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 1998, 2000, 2001, 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_UCONTEXT_H
-#define _SYS_UCONTEXT_H 1
-
-#include <features.h>
-#include <signal.h>
-
-#include <bits/sigcontext.h>
-
-/*
- * These are here mostly for backwards compatibility with older Unices.
- * IA-64 Linux does not distinguish between "struct sigcontext" and
- * "ucontext_t" as all the necessary info is inside the former.
- */
-
-typedef struct sigcontext mcontext_t;
-
-#if defined __cplusplus && __GNUC_PREREQ (3, 5)
-# define _SC_GR0_OFFSET \
- __builtin_offsetof (struct sigcontext, sc_gr[0])
-#elif defined __GNUC__
-# define _SC_GR0_OFFSET \
- (((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)
-#else
-# define _SC_GR0_OFFSET 0xc8 /* pray that this is correct... */
-#endif
-
-typedef struct ucontext
- {
- union
- {
- mcontext_t _mc;
- struct
- {
- unsigned long _pad[_SC_GR0_OFFSET/8];
- struct ucontext *_link; /* this should overlay sc_gr[0] */
- }
- _uc;
- }
- _u;
- }
-ucontext_t;
-
-#define uc_mcontext _u._mc
-#define uc_sigmask _u._mc.sc_mask
-#define uc_stack _u._mc.sc_stack
-#define uc_link _u._uc._link
-
-#endif /* sys/ucontext.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sys/user.h b/libc/sysdeps/unix/sysv/linux/ia64/sys/user.h
deleted file mode 100644
index 039218761..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sys/user.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2002 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
-
-#include <features.h>
-#include <sys/types.h>
-
-/* This definition comes directly from the kernel headers. If
- anything changes in them this header has to be changed, too. */
-
-
-/* The definition in the kernel has the comment "XXX fix me". */
-#define EF_SIZE 3072
-
-
-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/libc/sysdeps/unix/sysv/linux/ia64/syscall.S b/libc/sysdeps/unix/sysv/linux/ia64/syscall.S
deleted file mode 100644
index c638cc865..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/syscall.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jes Sorensen <Jes.Sorensen@cern.ch>.
-
- 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 <sysdep.h>
-
-ENTRY(syscall)
- alloc r2=ar.pfs,1,0,8,0
- mov r15=r32 /* syscall number */
- break __BREAK_SYSCALL
- ;;
- cmp.ne p6,p0=-1,r10 /* r10 = -1 on error */
-(p6) ret
- br.cond.spnt.few __syscall_error
-PSEUDO_END(syscall)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/syscalls.list b/libc/sysdeps/unix/sysv/linux/ia64/syscalls.list
deleted file mode 100644
index c55c70ef5..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ /dev/null
@@ -1,50 +0,0 @@
-# File name Caller Syscall name # args Strong name Weak names
-
-umount2 - umount 2 __umount2 umount2
-
-getpriority - getpriority i:ii __getpriority getpriority
-
-# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
-msgget - msgget i:ii __msgget msgget
-msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
-msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
-shmat - shmat i:ipi __shmat shmat
-shmctl - shmctl i:iip __shmctl shmctl
-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
-semctl - semctl i:iiii __semctl semctl
-
-# 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
-
-# DIG-compliant access to PCI configuration space:
-pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
-pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
-
-ptrace - ptrace 4 __ptrace ptrace
-
-
-# System calls with wrappers.
-
-# IA-64 specific
-getunwind EXTRA getunwind i:pi getunwind
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sysconf.c b/libc/sysdeps/unix/sysv/linux/ia64/sysconf.c
deleted file mode 100644
index 732cc68ef..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sysconf.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Get file-specific information about a file. Linux/ia64 version.
- Copyright (C) 2003, 2004, 2011 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 <assert.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-
-#include "has_cpuclock.c"
-#define HAS_CPUCLOCK(name) (has_cpuclock () ? _POSIX_VERSION : -1)
-
-
-/* Now the generic Linux version. */
-#include "../sysconf.c"
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sysdep.S b/libc/sysdeps/unix/sysv/linux/ia64/sysdep.S
deleted file mode 100644
index 3271857d6..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sysdep.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1999-2001, 2003, 2004, 2011 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.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 <sysdep.h>
-#include <features.h>
-#include <tls.h>
-
-ENTRY(__syscall_error)
-#if RTLD_PRIVATE_ERRNO
- /*
- * Note that the gp has to be set properly for this to work.
- * As long as all syscalls are in the same load unit
- * (executable or shared library) as this routine, we should
- * be fine. Otherwise, we would have to first load the global
- * pointer register from __gp.
- */
- addl r2=@gprel(rtld_errno),gp
- ;;
- st4 [r2]=r8
- mov r8=-1
-#else
-# ifndef NOT_IN_libc
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
- addl r2=@ltoff(@tprel(SYSCALL_ERROR_ERRNO)), gp;;
- ld8 r2=[r2]
- mov r3=r8;;
- mov r8=-1
- add r2=r2,r13;;
- st4 [r2]=r3
-#endif
- ret // ret is #define'd in syscall.h!
-END(__syscall_error)
-
-ENTRY(__ia64_syscall)
- mov r15=r37 /* syscall number */
- break __BREAK_SYSCALL
- cmp.eq p6,p0=-1,r10 /* r10 = -1 on error */
-(p6) br.cond.spnt.few __syscall_error
- ret
-PSEUDO_END(__ia64_syscall)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/sysdep.h b/libc/sysdeps/unix/sysv/linux/ia64/sysdep.h
deleted file mode 100644
index dd7a5b1b1..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ /dev/null
@@ -1,384 +0,0 @@
-/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
- Based on code originally written by David Mosberger-Tang
-
- 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_IA64_SYSDEP_H
-#define _LINUX_IA64_SYSDEP_H 1
-
-#include <sysdeps/unix/sysdep.h>
-#include <sysdeps/ia64/sysdep.h>
-#include <dl-sysdep.h>
-#include <tls.h>
-
-/* As of GAS v2.4.90.0.7, including a ".align" directive inside a
- function will cause bad unwind info to be emitted (GAS doesn't know
- how to account for the padding introduced by the .align directive).
- Turning on this macro will work around this bug by introducing the
- necessary padding explicitly. */
-#define GAS_ALIGN_BREAKS_UNWIND_INFO
-
-/* 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
-
-/* 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
-
-/* This is to help the old kernel headers where __NR_semtimedop is not
- available. */
-#ifndef __NR_semtimedop
-# define __NR_semtimedop 1247
-#endif
-
-#if defined USE_DL_SYSINFO \
- && (!defined NOT_IN_libc \
- || defined IS_IN_libpthread || defined IS_IN_librt)
-# define IA64_USE_NEW_STUB
-#else
-# undef IA64_USE_NEW_STUB
-#endif
-
-#ifdef __ASSEMBLER__
-
-#undef CALL_MCOUNT
-#ifdef PROF
-# define CALL_MCOUNT \
- .data; \
-1: data8 0; /* XXX fixme: use .xdata8 once labels work */ \
- .previous; \
- .prologue; \
- .save ar.pfs, r40; \
- alloc out0 = ar.pfs, 8, 0, 4, 0; \
- mov out1 = gp; \
- .save rp, out2; \
- mov out2 = rp; \
- .body; \
- ;; \
- addl out3 = @ltoff(1b), gp; \
- br.call.sptk.many rp = _mcount \
- ;;
-#else
-# define CALL_MCOUNT /* Do nothing. */
-#endif
-
-/* Linux uses a negative return value to indicate syscall errors, unlike
- most Unices, which use the condition codes' carry flag.
-
- Since version 2.1 the return value of a system call might be negative
- even if the call succeeded. E.g., the `lseek' system call might return
- a large offset. Therefore we must not anymore test for < 0, but test
- for a real error by making sure the value in %d0 is a real error
- number. Linus said he will make sure the no syscall returns a value
- in -1 .. -4095 as a valid result so we can savely test with -4095. */
-
-/* We don't want the label for the error handler to be visible in the symbol
- table when we define it here. */
-#define SYSCALL_ERROR_LABEL __syscall_error
-
-#undef PSEUDO
-#define PSEUDO(name, syscall_name, args) \
- ENTRY(name) \
- DO_CALL (SYS_ify(syscall_name)); \
- cmp.eq p6,p0=-1,r10; \
-(p6) br.cond.spnt.few __syscall_error;
-
-#define DO_CALL_VIA_BREAK(num) \
- mov r15=num; \
- break __BREAK_SYSCALL
-
-#ifdef IA64_USE_NEW_STUB
-# ifdef SHARED
-# define DO_CALL(num) \
- .prologue; \
- adds r2 = SYSINFO_OFFSET, r13;; \
- ld8 r2 = [r2]; \
- .save ar.pfs, r11; \
- mov r11 = ar.pfs;; \
- .body; \
- mov r15 = num; \
- mov b7 = r2; \
- br.call.sptk.many b6 = b7;; \
- .restore sp; \
- mov ar.pfs = r11; \
- .prologue; \
- .body
-# else /* !SHARED */
-# define DO_CALL(num) \
- .prologue; \
- mov r15 = num; \
- movl r2 = _dl_sysinfo;; \
- ld8 r2 = [r2]; \
- .save ar.pfs, r11; \
- mov r11 = ar.pfs;; \
- .body; \
- mov b7 = r2; \
- br.call.sptk.many b6 = b7;; \
- .restore sp; \
- mov ar.pfs = r11; \
- .prologue; \
- .body
-# endif
-#else
-# define DO_CALL(num) DO_CALL_VIA_BREAK(num)
-#endif
-
-#undef PSEUDO_END
-#define PSEUDO_END(name) .endp C_SYMBOL_NAME(name);
-
-#undef PSEUDO_NOERRNO
-#define PSEUDO_NOERRNO(name, syscall_name, args) \
- ENTRY(name) \
- DO_CALL (SYS_ify(syscall_name));
-
-#undef PSEUDO_END_NOERRNO
-#define PSEUDO_END_NOERRNO(name) .endp C_SYMBOL_NAME(name);
-
-#undef PSEUDO_ERRVAL
-#define PSEUDO_ERRVAL(name, syscall_name, args) \
- ENTRY(name) \
- DO_CALL (SYS_ify(syscall_name)); \
- cmp.eq p6,p0=-1,r10; \
-(p6) mov r10=r8;
-
-
-#undef PSEUDO_END_ERRVAL
-#define PSEUDO_END_ERRVAL(name) .endp C_SYMBOL_NAME(name);
-
-#undef END
-#define END(name) \
- .size C_SYMBOL_NAME(name), . - C_SYMBOL_NAME(name) ; \
- .endp C_SYMBOL_NAME(name)
-
-#define ret br.ret.sptk.few b0
-#define ret_NOERRNO ret
-#define ret_ERRVAL ret
-
-#else /* not __ASSEMBLER__ */
-
-#define BREAK_INSN_1(num) "break " #num ";;\n\t"
-#define BREAK_INSN(num) BREAK_INSN_1(num)
-
-/* On IA-64 we have stacked registers for passing arguments. The
- "out" registers end up being the called function's "in"
- registers.
-
- Also, since we have plenty of registers we have two return values
- from a syscall. r10 is set to -1 on error, whilst r8 contains the
- (non-negative) errno on error or the return value on success.
- */
-
-#ifdef IA64_USE_NEW_STUB
-
-# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \
- LOAD_ARGS_##nr (args) \
- register long _r8 __asm ("r8"); \
- register long _r10 __asm ("r10"); \
- register long _r15 __asm ("r15") = name; \
- register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\
- long _retval; \
- LOAD_REGS_##nr \
- /* \
- * Don't specify any unwind info here. We mark ar.pfs as \
- * clobbered. This will force the compiler to save ar.pfs \
- * somewhere and emit appropriate unwind info for that save. \
- */ \
- __asm __volatile ("br.call.sptk.many b6=%0;;\n" \
- : "=b"(_b7), "=r" (_r8), "=r" (_r10), "=r" (_r15) \
- ASM_OUTARGS_##nr \
- : "0" (_b7), "3" (_r15) ASM_ARGS_##nr \
- : "memory", "ar.pfs" ASM_CLOBBERS_##nr); \
- _retval = _r8;
-
-#else /* !IA64_USE_NEW_STUB */
-
-# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \
- LOAD_ARGS_##nr (args) \
- register long _r8 asm ("r8"); \
- register long _r10 asm ("r10"); \
- register long _r15 asm ("r15") = name; \
- long _retval; \
- LOAD_REGS_##nr \
- __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \
- : "=r" (_r8), "=r" (_r10), "=r" (_r15) \
- ASM_OUTARGS_##nr \
- : "2" (_r15) ASM_ARGS_##nr \
- : "memory" ASM_CLOBBERS_##nr); \
- _retval = _r8;
-
-#endif /* !IA64_USE_NEW_STUB */
-
-#define DO_INLINE_SYSCALL(name, nr, args...) \
- DO_INLINE_SYSCALL_NCS (__NR_##name, nr, ##args)
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
- ({ \
- DO_INLINE_SYSCALL_NCS (__NR_##name, nr, args) \
- if (_r10 == -1) \
- { \
- __set_errno (_retval); \
- _retval = -1; \
- } \
- _retval; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long int err
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
- ({ \
- DO_INLINE_SYSCALL_NCS (name, nr, args) \
- err = _r10; \
- _retval; })
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1)
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
-
-#define LOAD_ARGS_0()
-#define LOAD_REGS_0
-#define LOAD_ARGS_1(a1) \
- long _arg1 = (long) (a1); \
- LOAD_ARGS_0 ()
-#define LOAD_REGS_1 \
- register long _out0 asm ("out0") = _arg1; \
- LOAD_REGS_0
-#define LOAD_ARGS_2(a1, a2) \
- long _arg2 = (long) (a2); \
- LOAD_ARGS_1 (a1)
-#define LOAD_REGS_2 \
- register long _out1 asm ("out1") = _arg2; \
- LOAD_REGS_1
-#define LOAD_ARGS_3(a1, a2, a3) \
- long _arg3 = (long) (a3); \
- LOAD_ARGS_2 (a1, a2)
-#define LOAD_REGS_3 \
- register long _out2 asm ("out2") = _arg3; \
- LOAD_REGS_2
-#define LOAD_ARGS_4(a1, a2, a3, a4) \
- long _arg4 = (long) (a4); \
- LOAD_ARGS_3 (a1, a2, a3)
-#define LOAD_REGS_4 \
- register long _out3 asm ("out3") = _arg4; \
- LOAD_REGS_3
-#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
- long _arg5 = (long) (a5); \
- LOAD_ARGS_4 (a1, a2, a3, a4)
-#define LOAD_REGS_5 \
- register long _out4 asm ("out4") = _arg5; \
- LOAD_REGS_4
-#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
- long _arg6 = (long) (a6); \
- LOAD_ARGS_5 (a1, a2, a3, a4, a5)
-#define LOAD_REGS_6 \
- register long _out5 asm ("out5") = _arg6; \
- LOAD_REGS_5
-
-#define ASM_OUTARGS_0
-#define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0)
-#define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1)
-#define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2)
-#define ASM_OUTARGS_4 ASM_OUTARGS_3, "=r" (_out3)
-#define ASM_OUTARGS_5 ASM_OUTARGS_4, "=r" (_out4)
-#define ASM_OUTARGS_6 ASM_OUTARGS_5, "=r" (_out5)
-
-#ifdef IA64_USE_NEW_STUB
-#define ASM_ARGS_0
-#define ASM_ARGS_1 ASM_ARGS_0, "4" (_out0)
-#define ASM_ARGS_2 ASM_ARGS_1, "5" (_out1)
-#define ASM_ARGS_3 ASM_ARGS_2, "6" (_out2)
-#define ASM_ARGS_4 ASM_ARGS_3, "7" (_out3)
-#define ASM_ARGS_5 ASM_ARGS_4, "8" (_out4)
-#define ASM_ARGS_6 ASM_ARGS_5, "9" (_out5)
-#else
-#define ASM_ARGS_0
-#define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0)
-#define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1)
-#define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2)
-#define ASM_ARGS_4 ASM_ARGS_3, "6" (_out3)
-#define ASM_ARGS_5 ASM_ARGS_4, "7" (_out4)
-#define ASM_ARGS_6 ASM_ARGS_5, "8" (_out5)
-#endif
-
-#define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
-#define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
-#define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2"
-#define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3"
-#define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4"
-#define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5"
-#define ASM_CLOBBERS_6_COMMON , "out6", "out7", \
- /* Non-stacked integer registers, minus r8, r10, r15. */ \
- "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \
- "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \
- "r28", "r29", "r30", "r31", \
- /* Predicate registers. */ \
- "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \
- /* Non-rotating fp registers. */ \
- "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- /* Branch registers. */ \
- "b6"
-
-#ifdef IA64_USE_NEW_STUB
-# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON
-#else
-# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7"
-#endif
-
-#endif /* not __ASSEMBLER__ */
-
-/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
-/* We cannot use the thread descriptor because in ld.so we use setjmp
- earlier than the descriptor is initialized. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg, tmpreg) \
- add tmpreg=-16,r13 \
- ;; \
- ld8 tmpreg=[tmpreg] \
- ;; \
- xor reg=reg, tmpreg
-# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
-# else
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
-# endif
-#endif
-
-#endif /* linux/ia64/sysdep.h */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/system.c b/libc/sysdeps/unix/sysv/linux/ia64/system.c
deleted file mode 100644
index 413ff27b3..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/system.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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. */
-
-#include <kernel-features.h>
-
-/* We have to and actually can handle cancelable system(). The big
- problem: we have to kill the child process if necessary. To do
- this a cleanup handler has to be registered and is has to be able
- to find the PID of the child. The main problem is to reliable have
- the PID when needed. It is not necessary for the parent thread to
- return. It might still be in the kernel when the cancellation
- request comes. Therefore we have to use the clone() calls ability
- to have the kernel write the PID into the user-level variable. */
-#ifdef __ASSUME_CLONE_THREAD_FLAGS
-# define FORK() \
- INLINE_SYSCALL (clone2, 6, CLONE_PARENT_SETTID | SIGCHLD, NULL, 0, \
- &pid, NULL, NULL)
-#endif
-
-#include "../system.c"
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/libc/sysdeps/unix/sysv/linux/ia64/ucontext_i.h
deleted file mode 100644
index e2a4d3c2b..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/ucontext_i.h
+++ /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 David Mosberger-Tang <davidm@hpl.hp.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. */
-
-/* Constants shared between setcontext() and getcontext(). Don't
- install this header file. */
-
-#define SIG_BLOCK 0
-#define SIG_UNBLOCK 1
-#define SIG_SETMASK 2
-
-#include <sigcontext-offsets.h>
-
-#define rTMP r16
-#define rPOS r16
-#define rCPOS r17
-#define rNAT r18
-
-#define rB5 r18
-#define rB4 r19
-#define rB3 r20
-#define rB2 r21
-#define rB1 r22
-#define rB0 r23
-#define rRSC r24
-#define rBSP r25
-#define rRNAT r26
-#define rUNAT r27
-#define rFPSR r28
-#define rPFS r29
-#define rLC r30
-#define rPR r31
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/umount.c b/libc/sysdeps/unix/sysv/linux/ia64/umount.c
deleted file mode 100644
index 462ace325..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/umount.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* umount system call for Linux/ia64.
- 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 <sys/mount.h>
-#include <errno.h>
-
-#include <sysdep.h>
-#include <bp-checks.h>
-
-/* Unmount a filesystem. */
-int
-umount (const char *special_file)
-{
- return INLINE_SYSCALL (umount, 2, CHECK_STRING (special_file), 0);
-}
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c b/libc/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c
deleted file mode 100644
index 15d12abfc..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Linux/ia64 does not need unwind table registry. */
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/vfork.S b/libc/sysdeps/unix/sysv/linux/ia64/vfork.S
deleted file mode 100644
index 086fce938..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/vfork.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 2000, 2002 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 <sysdep.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
-
-/* The following are defined in linux/sched.h, which unfortunately */
-/* is not safe for inclusion in an assembly file. */
-#define CLONE_VM 0x00000100 /* set if VM shared between processes */
-#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
-
-/* pid_t vfork(void); */
-/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
-
-ENTRY(__vfork)
- alloc r2=ar.pfs,0,0,2,0
- mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
- mov out1=0 /* Standard sp value. */
- ;;
- DO_CALL_VIA_BREAK (SYS_ify (clone))
- cmp.eq p6,p0=-1,r10
-(p6) br.cond.spnt.few __syscall_error
- ret
-PSEUDO_END(__vfork)
-libc_hidden_def (__vfork)
-
-weak_alias (__vfork, vfork)
diff --git a/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c b/libc/sysdeps/unix/sysv/linux/ia64/wordexp.c
deleted file mode 100644
index c2972e40c..000000000
--- a/libc/sysdeps/unix/sysv/linux/ia64/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 <shlib-compat.h>
-
-/* For Linux/Alpha we have to make the wordexp symbols versioned. */
-#define wordexp(words, pwordexp, flags) \
- __new_wordexp (words, pwordexp, flags)
-
-#include <posix/wordexp.c>
-
-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/libc/sysdeps/unix/sysv/linux/kernel-features.h b/libc/sysdeps/unix/sysv/linux/kernel-features.h
index 58f833e96..2c1b0a835 100644
--- a/libc/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/libc/sysdeps/unix/sysv/linux/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 1999-2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2009, 2010, 2011, 2012 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
@@ -274,11 +274,11 @@
their availability with one define. The changes were made first
for i386 and the have to be done separately for the other archs.
For i386 we pick 2.5.50 as the first version with support.
- For ia64, s390*, PPC, x86-64, and SH we pick 2.5.64 as the first
+ For s390*, PPC, x86-64, and SH we pick 2.5.64 as the first
version with support. */
#if ((__LINUX_KERNEL_VERSION >= 132402 && defined __i386__) \
|| (__LINUX_KERNEL_VERSION >= 132416 \
- && (defined __ia64__ || defined __s390__ \
+ && (defined __s390__ \
|| defined __powerpc__ || defined __x86_64__ || defined __sh__)))
# define __ASSUME_CLONE_THREAD_FLAGS 1
#endif
@@ -334,7 +334,7 @@
/* The utimes syscall has been available for some architectures
forever. For x86 it was introduced after 2.5.75, for x86-64,
ppc, and ppc64 it was introduced in 2.6.0-test3. */
-#if defined __ia64__ || defined __sparc__ \
+#if defined __sparc__ \
|| (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \
|| (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
@@ -419,10 +419,9 @@
the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
on ia64 in 2.6.22-rc1. */
#if __LINUX_KERNEL_VERSION >= 0x020611 \
- && ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__) \
+ && ((!defined __x86_64__ && !defined __sh__) \
|| (__LINUX_KERNEL_VERSION >= 0x020613 \
- && (defined __x86_64__ || defined __sh__)) \
- || (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__))
+ && (defined __x86_64__ || defined __sh__)))
# define __ASSUME_PSELECT 1
# define __ASSUME_PPOLL 1
#endif
@@ -477,7 +476,7 @@
x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23. */
#if __LINUX_KERNEL_VERSION >= 0x020617 \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- || defined __ia64__ || defined __sparc__ || defined __s390__)
+ || defined __sparc__ || defined __s390__)
# define __ASSUME_O_CLOEXEC 1
#endif
@@ -490,7 +489,7 @@
x86-64, PPC, IA-64, and SPARC in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061b \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- || defined __ia64__ || defined __sparc__ || defined __s390__)
+ || defined __sparc__ || defined __s390__)
# define __ASSUME_SOCK_CLOEXEC 1
# define __ASSUME_IN_NONBLOCK 1
# define __ASSUME_PIPE2 1
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
index e2e8f8b3c..4b199f6a9 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
@@ -1,5 +1,5 @@
/* Save current context, powerpc32 common.
- Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2011, 2012 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
@@ -18,13 +18,13 @@
02110-1301 USA. */
/* This is the common implementation of getcontext for powerpc32.
- It not complete in itself should be included in to a framework that
+ It not complete in itself should be included in to a framework that
defines:
__CONTEXT_FUNC_NAME
and if appropriate:
__CONTEXT_ENABLE_FPRS
__CONTEXT_ENABLE_VRS
- Any archecture that implements the Vector unit is assumed to also
+ Any archecture that implements the Vector unit is assumed to also
implement the floating unit. */
/* Stack frame offsets. */
@@ -145,6 +145,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
# ifdef __CONTEXT_ENABLE_VRS
# ifdef PIC
mflr r8
+# define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
SETUP_GOT_ACCESS(r7,got_label)
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
@@ -165,9 +166,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
la r10,(_UC_VREGS)(r3)
la r9,(_UC_VREGS+16)(r3)
-
+
beq 2f /* L(no_vec) */
-/* address of the combined VSCR/VSAVE quadword. */
+/* address of the combined VSCR/VSAVE quadword. */
la r8,(_UC_VREGS+512)(r3)
/* Save the vector registers */
@@ -186,7 +187,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
addi r9,r9,32
stvx v0,0,r8
-
+
stvx v4,0,r10
stvx v5,0,r9
addi r10,r10,32
@@ -282,4 +283,3 @@ ENTRY(__CONTEXT_FUNC_NAME)
mtlr r0
blr
END(__CONTEXT_FUNC_NAME)
-
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
index dad107403..46f3dea8c 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
@@ -1,5 +1,5 @@
/* Save current context.
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2012 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
@@ -54,12 +54,12 @@ versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
compat_text_section
-
-# undef __CONTEXT_FUNC_NAME
+
+# undef __CONTEXT_FUNC_NAME
# define __CONTEXT_FUNC_NAME __novec_getcontext
# undef __CONTEXT_ENABLE_VRS
-# clude "getcontext-common.S"
+# include "getcontext-common.S"
.previous
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
index c35bf9008..38cd1d95c 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
@@ -1,5 +1,5 @@
/* Jump to a new context powerpc32 common.
- Copyright (C) 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2011, 2012 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
@@ -73,6 +73,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
#ifdef PIC
mflr r8
+# define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
SETUP_GOT_ACCESS(r7,got_label)
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
index dbdee3c94..46f5c9076 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+++ b/libc/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, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006,2008,2009,2011,2012 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
@@ -146,6 +146,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
# ifdef PIC
mflr r8
+# define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
SETUP_GOT_ACCESS(r7,got_label)
addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index c42efbabd..322e43b61 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1997-2003,2004,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1997-2006,2012 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
@@ -45,11 +45,7 @@
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 SYS_ify(syscall_name) __NR_##syscall_name
#ifndef __ASSEMBLER__
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index e714c4c53..31a077dbf 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
+/* Copyright (C) 1992,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -53,11 +53,7 @@
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 SYS_ify(syscall_name) __NR_##syscall_name
#ifdef __ASSEMBLER__
diff --git a/libc/sysdeps/unix/sysv/linux/ppoll.c b/libc/sysdeps/unix/sysv/linux/ppoll.c
index 14eb3111b..b331b3a77 100644
--- a/libc/sysdeps/unix/sysv/linux/ppoll.c
+++ b/libc/sysdeps/unix/sysv/linux/ppoll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
@@ -67,6 +67,7 @@ ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
return result;
}
+libc_hidden_def (ppoll)
# ifndef __ASSUME_PPOLL
# define ppoll static __generic_ppoll
diff --git a/libc/sysdeps/unix/sysv/linux/preadv.c b/libc/sysdeps/unix/sysv/linux/preadv.c
index 72722ebc0..fdf5b36b8 100644
--- a/libc/sysdeps/unix/sysv/linux/preadv.c
+++ b/libc/sysdeps/unix/sysv/linux/preadv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2012 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
@@ -42,7 +42,7 @@
(off_t) ((((uint64_t) (val)) >> (sizeof (long) * 4)) >> (sizeof (long) * 4))
#ifndef __ASSUME_PREADV
-static ssize_t PREADV_REPLACEMENT (int, __const struct iovec *,
+static ssize_t PREADV_REPLACEMENT (int, const struct iovec *,
int, OFF_T) internal_function;
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/prlimit.c b/libc/sysdeps/unix/sysv/linux/prlimit.c
index 5f7a19725..e452138a1 100644
--- a/libc/sysdeps/unix/sysv/linux/prlimit.c
+++ b/libc/sysdeps/unix/sysv/linux/prlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2012 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 @@
#ifdef __NR_prlimit64
int
prlimit (__pid_t pid, enum __rlimit_resource resource,
- __const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
+ const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
{
struct rlimit64 new_rlimit64_mem;
struct rlimit64 *new_rlimit64 = NULL;
@@ -83,7 +83,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
#else
int
prlimit (__pid_t pid, enum __rlimit_resource resource,
- __const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
+ const struct rlimit *new_rlimit, struct rlimit *old_rlimit)
{
__set_errno (ENOSYS);
return -1;
diff --git a/libc/sysdeps/unix/sysv/linux/pwritev.c b/libc/sysdeps/unix/sysv/linux/pwritev.c
index 2e9cbb253..534b80041 100644
--- a/libc/sysdeps/unix/sysv/linux/pwritev.c
+++ b/libc/sysdeps/unix/sysv/linux/pwritev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2012 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
@@ -42,7 +42,7 @@
(off_t) ((((uint64_t) (val)) >> (sizeof (long) * 4)) >> (sizeof (long) * 4))
#ifndef __ASSUME_PWRITEV
-static ssize_t PWRITEV_REPLACEMENT (int, __const struct iovec *,
+static ssize_t PWRITEV_REPLACEMENT (int, const struct iovec *,
int, OFF_T) internal_function;
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/readv.c b/libc/sysdeps/unix/sysv/linux/readv.c
index 9425084a2..89e4c60a9 100644
--- a/libc/sysdeps/unix/sysv/linux/readv.c
+++ b/libc/sysdeps/unix/sysv/linux/readv.c
@@ -1,5 +1,6 @@
/* readv supports all Linux kernels >= 2.0.
- Copyright (C) 1997,1998,2000,2002,2003,2009 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2002,2003,2009,2012
+ 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
@@ -28,7 +29,7 @@
#include <kernel-features.h>
#ifndef __ASSUME_COMPLETE_READV_WRITEV
-static ssize_t __atomic_readv_replacement (int, __const struct iovec *,
+static ssize_t __atomic_readv_replacement (int, const struct iovec *,
int) internal_function;
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h b/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
index 4fb77faa9..33de68356 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
+++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2012 Free Software Foundation, Inc.
Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
This file is part of the GNU C Library.
@@ -32,7 +32,7 @@
/* Convert the 64 bit struct utmp value in FROM to the 32 bit version
returned in TO. */
static inline void
-utmp_convert64to32 (__const struct utmp *from, struct utmp32 *to)
+utmp_convert64to32 (const struct utmp *from, struct utmp32 *to)
{
#if _HAVE_UT_TYPE - 0
to->ut_type = from->ut_type;
@@ -60,7 +60,7 @@ utmp_convert64to32 (__const struct utmp *from, struct utmp32 *to)
/* Convert the 32 bit struct utmp value in FROM to the 64 bit version
returned in TO. */
static inline void
-utmp_convert32to64 (__const struct utmp32 *from, struct utmp *to)
+utmp_convert32to64 (const struct utmp32 *from, struct utmp *to)
{
#if _HAVE_UT_TYPE - 0
to->ut_type = from->ut_type;
diff --git a/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h b/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
index dedc6c6be..9042e0f55 100644
--- a/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
+++ b/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
@@ -1,5 +1,5 @@
/* The `struct utmp' type, describing entries in the utmp file. GNU version.
- Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008, 2010
+ Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008, 2010, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -51,14 +51,11 @@ struct utmpx32
/* The internal interface needed by the compat wrapper functions. */
extern struct utmpx *__getutxent (void);
-extern struct utmpx *__getutxid (__const struct utmpx *__id);
-extern struct utmpx *__getutxline (__const struct utmpx *__line);
-extern struct utmpx *__pututxline (__const struct utmpx *__utmpx);
-extern void __updwtmpx (__const char *__wtmpx_file,
- __const struct utmpx *__utmpx);
-extern void __getutmp (__const struct utmpx *__utmpx,
- struct utmp *__utmp);
-extern void __getutmpx (__const struct utmp *__utmp,
- struct utmpx *__utmpx);
+extern struct utmpx *__getutxid (const struct utmpx *__id);
+extern struct utmpx *__getutxline (const struct utmpx *__line);
+extern struct utmpx *__pututxline (const struct utmpx *__utmpx);
+extern void __updwtmpx (const char *__wtmpx_file, const struct utmpx *__utmpx);
+extern void __getutmp (const struct utmpx *__utmpx, struct utmp *__utmp);
+extern void __getutmpx (const struct utmp *__utmp, struct utmpx *__utmpx);
#endif /* utmpx32.h */
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
index 6cfbbd7d9..0fb5a6015 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/SPARC version.
- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2011
+ Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -430,7 +430,7 @@ __BEGIN_DECLS
__THROW. */
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
- __const struct timespec *__tmo);
+ const struct timespec *__tmo);
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
index 3be801a93..bf7027e9b 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
@@ -1,7 +1,7 @@
/* POSIX.1 sigaction call for Linux/SPARC.
- Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-2000,2002,2003,2005,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx), 1997.
+ Contributed by Miguel de Icaza <miguel@nuclecu.unam.mx>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -33,8 +33,7 @@ static void __sigreturn_stub (void);
int __libc_missing_rt_sigs;
int
-__libc_sigaction (int sig, __const struct sigaction *act,
- struct sigaction *oact)
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
struct old_kernel_sigaction k_sigact, k_osigact;
int ret;
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
index b5e35f4e4..d556663dc 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
@@ -1,8 +1,8 @@
/* POSIX.1 sigaction call for Linux/SPARC64.
- Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-2000,2002,2003,2005,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx) and
- Jakub Jelinek (jj@ultra.linux.cz).
+ Contributed by Miguel de Icaza <miguel@nuclecu.unam.mx> and
+ Jakub Jelinek <jj@ultra.linux.cz>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -32,8 +32,7 @@
static void __rt_sigreturn_stub (void);
int
-__libc_sigaction (int sig, __const struct sigaction *act,
- struct sigaction *oact)
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int ret;
struct kernel_sigaction kact, koact;
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
index 075b267bb..e6210f686 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c
@@ -1 +1,60 @@
-#include <sysdeps/unix/sysv/linux/ia64/wordexp.c>
+/* Copyright (C) 2001, 2004, 2005, 2012 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 <shlib-compat.h>
+
+/* For Linux/Alpha we have to make the wordexp symbols versioned. */
+#define wordexp(words, pwordexp, flags) \
+ __new_wordexp (words, pwordexp, flags)
+
+#include <posix/wordexp.c>
+
+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/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h b/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
index 2dfc4fcc2..fdd531e1a 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
@@ -137,7 +137,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
__THROW. */
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
int __maxevents, int __timeout,
- __const __sigset_t *__ss);
+ const __sigset_t *__ss);
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h b/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h
index 833d050fb..0073f7f8a 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/sys/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2012 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
@@ -49,7 +49,7 @@ extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
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,
+ const struct itimerspec *__utmr,
struct itimerspec *__otmr) __THROW;
/* Return the next expiration time of UFD. */
diff --git a/libc/sysdeps/unix/sysv/linux/sys/acct.h b/libc/sysdeps/unix/sysv/linux/sys/acct.h
index 47c63ebfb..e2408de88 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/acct.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/acct.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2007, 2012 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
@@ -102,7 +102,7 @@ enum
/* Switch process accounting on and off. */
-extern int acct (__const char *__filename) __THROW;
+extern int acct (const char *__filename) __THROW;
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sys/epoll.h b/libc/sysdeps/unix/sysv/linux/sys/epoll.h
index f23db922e..2294ee12e 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -137,7 +137,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
__THROW. */
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
int __maxevents, int __timeout,
- __const __sigset_t *__ss);
+ const __sigset_t *__ss);
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sys/mount.h b/libc/sysdeps/unix/sysv/linux/sys/mount.h
index 923b4616c..831a62cf5 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/mount.h
@@ -1,5 +1,5 @@
/* Header file for mounting/unmount Linux filesystems.
- Copyright (C) 1996-2000, 2004, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000, 2004, 2010, 2012 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
@@ -133,15 +133,15 @@ enum
__BEGIN_DECLS
/* Mount a filesystem. */
-extern int mount (__const char *__special_file, __const char *__dir,
- __const char *__fstype, unsigned long int __rwflag,
- __const void *__data) __THROW;
+extern int mount (const char *__special_file, const char *__dir,
+ const char *__fstype, unsigned long int __rwflag,
+ const void *__data) __THROW;
/* Unmount a filesystem. */
-extern int umount (__const char *__special_file) __THROW;
+extern int umount (const char *__special_file) __THROW;
/* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
-extern int umount2 (__const char *__special_file, int __flags) __THROW;
+extern int umount2 (const char *__special_file, int __flags) __THROW;
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sys/swap.h b/libc/sysdeps/unix/sysv/linux/sys/swap.h
index 961006cbb..1493d48a8 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/swap.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/swap.h
@@ -1,5 +1,5 @@
/* Calls to enable and disable swapping on specified locations. Linux version.
- Copyright (C) 1996, 1998, 1999, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999, 2010, 2012 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
@@ -34,10 +34,10 @@ __BEGIN_DECLS
/* Make the block special device PATH available to the system for swapping.
This call is restricted to the super-user. */
-extern int swapon (__const char *__path, int __flags) __THROW;
+extern int swapon (const char *__path, int __flags) __THROW;
/* Stop using block special device PATH for swapping. */
-extern int swapoff (__const char *__path) __THROW;
+extern int swapoff (const char *__path) __THROW;
__END_DECLS
diff --git a/libc/sysdeps/unix/sysv/linux/sys/timerfd.h b/libc/sysdeps/unix/sysv/linux/sys/timerfd.h
index c1bb06f5f..a2cd2c26f 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/timerfd.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/timerfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2012 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
@@ -49,7 +49,7 @@ extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
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,
+ const struct itimerspec *__utmr,
struct itimerspec *__otmr) __THROW;
/* Return the next expiration time of UFD. */
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c b/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c
index c7ddb1fbd..021ce4cb6 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sigpending.c
@@ -1 +1,39 @@
-#include <sysdeps/unix/sysv/linux/ia64/sigpending.c>
+/* Copyright (C) 1997-2000, 2003, 2012 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. */
+
+/* Linux/x86_64 only has rt signals, thus we do not even want to try falling
+ back to the old style signals as the default Linux handler does. */
+
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Change the set of blocked signals to SET,
+ wait until a signal arrives, and restore the set of blocked signals. */
+int
+sigpending (set)
+ sigset_t *set;
+{
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
+}
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c b/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
index bc0927f45..b6624bbb2 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
@@ -1 +1,44 @@
-#include <sysdeps/unix/sysv/linux/ia64/sigprocmask.c>
+/* Copyright (C) 1997-2000, 2003, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
+
+ 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. */
+
+/* Linux/x86_64 only has rt signals, thus we do not even want to try falling
+ back to the old style signals as the default Linux handler does. */
+
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Get and/or change the set of blocked signals. */
+int
+__sigprocmask (how, set, oset)
+ int how;
+ const sigset_t *set;
+ sigset_t *oset;
+{
+
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
+ CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
+}
+weak_alias (__sigprocmask, sigprocmask)
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h b/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
index 6b5ef35f4..260afbe5a 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
@@ -137,7 +137,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
__THROW. */
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
int __maxevents, int __timeout,
- __const __sigset_t *__ss);
+ const __sigset_t *__ss);
__END_DECLS
diff --git a/libc/sysdeps/unix/x86_64/sysdep.S b/libc/sysdeps/unix/x86_64/sysdep.S
index 908da3c3d..5239ab1d4 100644
--- a/libc/sysdeps/unix/x86_64/sysdep.S
+++ b/libc/sysdeps/unix/x86_64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2004, 2005, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2002,2004,2005,2011,2012 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
@@ -30,12 +30,7 @@
.globl C_SYMBOL_NAME(errno)
.globl syscall_error
-#undef syscall_error
-#ifdef NO_UNDERSCORES
__syscall_error:
-#else
-syscall_error:
-#endif
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.