summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/ia64')
-rw-r--r--libc/sysdeps/linux/ia64/Makefile.arch6
-rw-r--r--libc/sysdeps/linux/ia64/__longjmp.S79
-rw-r--r--libc/sysdeps/linux/ia64/bits/atomic.h11
-rw-r--r--libc/sysdeps/linux/ia64/bits/byteswap.h105
-rw-r--r--libc/sysdeps/linux/ia64/bits/fcntl.h15
-rw-r--r--libc/sysdeps/linux/ia64/bits/fenv.h11
-rw-r--r--libc/sysdeps/linux/ia64/bits/huge_vall.h41
-rw-r--r--libc/sysdeps/linux/ia64/bits/ipc.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/kernel_stat.h40
-rw-r--r--libc/sysdeps/linux/ia64/bits/kernel_types.h2
-rw-r--r--libc/sysdeps/linux/ia64/bits/local_lim.h99
-rw-r--r--libc/sysdeps/linux/ia64/bits/mathdef.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/mathinline.h7
-rw-r--r--libc/sysdeps/linux/ia64/bits/mman.h102
-rw-r--r--libc/sysdeps/linux/ia64/bits/msq.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/sem.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/setjmp.h12
-rw-r--r--libc/sysdeps/linux/ia64/bits/shm.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/sigaction.h38
-rw-r--r--libc/sysdeps/linux/ia64/bits/sigcontext.h7
-rw-r--r--libc/sysdeps/linux/ia64/bits/siginfo.h26
-rw-r--r--libc/sysdeps/linux/ia64/bits/sigstack.h7
-rw-r--r--libc/sysdeps/linux/ia64/bits/stackinfo.h5
-rw-r--r--libc/sysdeps/linux/ia64/bits/stat.h16
-rw-r--r--libc/sysdeps/linux/ia64/bits/syscalls.h141
-rw-r--r--libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h17
-rw-r--r--libc/sysdeps/linux/ia64/bits/wordsize.h5
-rw-r--r--libc/sysdeps/linux/ia64/brk.S5
-rw-r--r--libc/sysdeps/linux/ia64/clone2.S5
-rw-r--r--libc/sysdeps/linux/ia64/crt1.S5
-rw-r--r--libc/sysdeps/linux/ia64/fork.S21
-rw-r--r--libc/sysdeps/linux/ia64/jmpbuf-unwind.h11
-rw-r--r--libc/sysdeps/linux/ia64/pipe.S5
-rw-r--r--libc/sysdeps/linux/ia64/setjmp.S49
-rw-r--r--libc/sysdeps/linux/ia64/sys/io.h7
-rw-r--r--libc/sysdeps/linux/ia64/sys/procfs.h5
-rw-r--r--libc/sysdeps/linux/ia64/sys/ptrace.h5
-rw-r--r--libc/sysdeps/linux/ia64/sys/ucontext.h7
-rw-r--r--libc/sysdeps/linux/ia64/sys/user.h5
-rw-r--r--libc/sysdeps/linux/ia64/syscall.S5
-rw-r--r--libc/sysdeps/linux/ia64/sysdep.h16
-rw-r--r--libc/sysdeps/linux/ia64/vfork.S9
42 files changed, 455 insertions, 522 deletions
diff --git a/libc/sysdeps/linux/ia64/Makefile.arch b/libc/sysdeps/linux/ia64/Makefile.arch
index 2b3212498..e95e86873 100644
--- a/libc/sysdeps/linux/ia64/Makefile.arch
+++ b/libc/sysdeps/linux/ia64/Makefile.arch
@@ -5,10 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c
+CSRC-y := __syscall_error.c
-SSRC := \
+SSRC-y := \
__longjmp.S brk.S bsd-setjmp.S bsd-_setjmp.S clone2.S fork.S \
pipe.S setjmp.S syscall.S vfork.S
-
-include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch
diff --git a/libc/sysdeps/linux/ia64/__longjmp.S b/libc/sysdeps/linux/ia64/__longjmp.S
index 04c51e75e..fb34ab237 100644
--- a/libc/sysdeps/linux/ia64/__longjmp.S
+++ b/libc/sysdeps/linux/ia64/__longjmp.S
@@ -12,9 +12,8 @@
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.
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>.
Note that __sigsetjmp() did NOT flush the register stack. Instead,
we do it here since __longjmp() is usually much less frequently
@@ -44,18 +43,18 @@
LEAF(__longjmp)
alloc r8=ar.pfs,2,1,0,0
mov r27=ar.rsc
- add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
+ add r2=0x98,in0 /* r2 <- &jmpbuf.orig_jmp_buf_addr */
;;
- ld8 r8=[r2],-16 // r8 <- 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
+ 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
+ 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
+ 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
@@ -65,49 +64,49 @@ LEAF(__longjmp)
(pPos) sub r17=64,r8
(pNeg) sub r17=r0,r8
;;
- mov ar.rsc=r11 // put RSE in enforced lazy mode
+ mov ar.rsc=r11 /* put RSE in enforced lazy mode */
shr.u r8=r25,r16
- add r3=8,in0 // r3 <- &jmpbuf.r1
+ add r3=8,in0 /* r3 <- &jmpbuf.r1 */
shl r9=r25,r17
;;
or r25=r8,r9
;;
mov r26=ar.rnat
- mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12)
+ mov ar.unat=r25 /* setup ar.unat (NaT bits for r1, r4-r7, and r12) */
;;
- ld8.fill.nta sp=[r2],16 // r12 (sp)
- ld8.fill.nta gp=[r3],16 // r1 (gp)
- dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
+ ld8.fill.nta sp=[r2],16 /* r12 (sp) */
+ ld8.fill.nta gp=[r3],16 /* r1 (gp) */
+ dep r11=-1,r23,3,6 /* r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) */
;;
- ld8.nta r16=[r2],16 // caller's unat
- ld8.nta r17=[r3],16 // fpsr
+ 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 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
+ 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
+ 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
+ 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
+(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
+ ld8.nta r18=[r2],16 /* b2 */
+ ld8.nta r19=[r3],16 /* b3 */
;;
- ld8.nta r20=[r2],16 // b4
- ld8.nta r21=[r3],16 // b5
+ 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 r11=[r2],16 /* ar.pfs */
+ ld8.nta r22=[r3],56 /* ar.lc */
;;
- ld8.nta r24=[r2],32 // pr
+ ld8.nta r24=[r2],32 /* pr */
mov b0=r16
;;
ldf.fill.nta f2=[r2],32
@@ -149,12 +148,12 @@ LEAF(__longjmp)
ldf.fill.nta f31=[r3]
(p8) mov r8=1
- mov ar.rnat=r26 // restore ar.rnat
+ mov ar.rnat=r26 /* restore ar.rnat */
;;
- mov ar.rsc=r27 // restore ar.rsc
+ mov ar.rsc=r27 /* restore ar.rsc */
(p9) mov r8=in1
- invala // virt. -> phys. regnum mapping may change
+ invala /* virt. -> phys. regnum mapping may change */
mov pr=r24,-1
ret
END(__longjmp)
diff --git a/libc/sysdeps/linux/ia64/bits/atomic.h b/libc/sysdeps/linux/ia64/bits/atomic.h
index 1020c2f22..1b6ee2b57 100644
--- a/libc/sysdeps/linux/ia64/bits/atomic.h
+++ b/libc/sysdeps/linux/ia64/bits/atomic.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <stdint.h>
#include <ia64intrin.h>
@@ -92,12 +91,12 @@ typedef uintmax_t uatomic_max_t;
do \
{ \
__oldval = __val; \
- if (__builtin_expect (__val <= 0, 0)) \
+ if (unlikely (__val <= 0)) \
break; \
__val = atomic_compare_and_exchange_val_acq (__memp, __oldval - 1, \
__oldval); \
} \
- while (__builtin_expect (__val != __oldval, 0)); \
+ while (unlikely (__val != __oldval)); \
__oldval; })
#define atomic_bit_test_set(mem, bit) \
@@ -113,7 +112,7 @@ typedef uintmax_t uatomic_max_t;
__oldval | __mask, \
__oldval); \
} \
- while (__builtin_expect (__val != __oldval, 0)); \
+ while (unlikely (__val != __oldval)); \
__oldval & __mask; })
#define atomic_full_barrier() __sync_synchronize ()
diff --git a/libc/sysdeps/linux/ia64/bits/byteswap.h b/libc/sysdeps/linux/ia64/bits/byteswap.h
index 6862aa0b6..0e352fcad 100644
--- a/libc/sysdeps/linux/ia64/bits/byteswap.h
+++ b/libc/sysdeps/linux/ia64/bits/byteswap.h
@@ -13,98 +13,37 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
-# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
-#endif
-
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
-
-/* Swap bytes in 16 bit value. */
-#define __bswap_constant_16(x) \
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+#ifndef _ASM_BITS_BYTESWAP_H
+#define _ASM_BITS_BYTESWAP_H 1
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_16(x) \
+#define __bswap_non_constant_16(x) \
(__extension__ \
- ({ register unsigned short int __v, __x = (x); \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_16 (__x); \
- else \
- __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \
- "mux1 %0 = %0, @rev ;;" \
- : "=r" (__v) \
- : "r" ((unsigned short int) (__x))); \
+ ({ register unsigned short int __v; \
+ __asm__ __volatile__ ("shl %0 = %1, 48 ;;" \
+ "mux1 %0 = %0, @rev ;;" \
+ : "=r" (__v) \
+ : "r" ((unsigned short int) (x))); \
__v; }))
-#else
-/* This is better than nothing. */
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
- return __bswap_constant_16 (__bsx);
-}
-#endif
-
-/* Swap bytes in 32 bit value. */
-#define __bswap_constant_32(x) \
- ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
- (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
-
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_32(x) \
+#define __bswap_non_constant_32(x) \
(__extension__ \
- ({ register unsigned int __v, __x = (x); \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_32 (__x); \
- else \
- __asm__ __volatile__ ("shl %0 = %1, 32 ;;" \
- "mux1 %0 = %0, @rev ;;" \
- : "=r" (__v) \
- : "r" ((unsigned int) (__x))); \
+ ({ register unsigned int __v; \
+ __asm__ __volatile__ ("shl %0 = %1, 32 ;;" \
+ "mux1 %0 = %0, @rev ;;" \
+ : "=r" (__v) \
+ : "r" ((unsigned int) (x))); \
__v; }))
-#else
-static __inline unsigned int
-__bswap_32 (unsigned int __bsx)
-{
- return __bswap_constant_32 (__bsx);
-}
-#endif
-
-/* Swap bytes in 64 bit value. */
-#define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ul) >> 56) \
- | (((x) & 0x00ff000000000000ul) >> 40) \
- | (((x) & 0x0000ff0000000000ul) >> 24) \
- | (((x) & 0x000000ff00000000ul) >> 8) \
- | (((x) & 0x00000000ff000000ul) << 8) \
- | (((x) & 0x0000000000ff0000ul) << 24) \
- | (((x) & 0x000000000000ff00ul) << 40) \
- | (((x) & 0x00000000000000fful) << 56))
-
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __bswap_64(x) \
+#define __bswap_non_constant_64(x) \
(__extension__ \
- ({ register unsigned long int __v, __x = (x); \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_64 (__x); \
- else \
- __asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \
- : "=r" (__v) \
- : "r" ((unsigned long int) (__x))); \
+ ({ register unsigned long int __v; \
+ __asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \
+ : "=r" (__v) \
+ : "r" ((unsigned long int) (x))); \
__v; }))
-
-#else
-static __inline unsigned long int
-__bswap_64 (unsigned long int __bsx)
-{
- return __bswap_constant_64 (__bsx);
-}
#endif
-#endif /* _BITS_BYTESWAP_H */
+#include <bits/byteswap-common.h>
diff --git a/libc/sysdeps/linux/ia64/bits/fcntl.h b/libc/sysdeps/linux/ia64/bits/fcntl.h
index 2a4b9ca35..bbc905c8c 100644
--- a/libc/sysdeps/linux/ia64/bits/fcntl.h
+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
@@ -49,9 +48,8 @@
# define O_DIRECTORY 0200000 /* must be a directory */
# define O_NOFOLLOW 0400000 /* don't follow links */
# define O_NOATIME 01000000 /* Do not set atime. */
-# if 0
# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-# endif
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
#ifdef __USE_LARGEFILE64
@@ -98,6 +96,8 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
close-on-exit set on new fd. */
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
#endif
/* For F_[GET|SET]FD. */
@@ -161,7 +161,6 @@ struct flock64
};
#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
@@ -183,7 +182,7 @@ struct flock64
#endif
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
@@ -206,7 +205,7 @@ struct flock64
__BEGIN_DECLS
-#ifdef __USE_GNU
+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
diff --git a/libc/sysdeps/linux/ia64/bits/fenv.h b/libc/sysdeps/linux/ia64/bits/fenv.h
index 32515f079..3b4afde3a 100644
--- a/libc/sysdeps/linux/ia64/bits/fenv.h
+++ b/libc/sysdeps/linux/ia64/bits/fenv.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
@@ -73,15 +72,15 @@ typedef unsigned long int fexcept_t;
typedef unsigned long int fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL)
+#define FE_DFL_ENV ((const fenv_t *) 0xc009804c0270033fUL)
#ifdef __USE_GNU
/* Floating-point environment where only FE_UNNORMAL is masked since this
exception is not generally supported by glibc. */
-# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL)
+# define FE_NOMASK_ENV ((const fenv_t *) 0xc009804c02700302UL)
/* Floating-point environment with (processor-dependent) non-IEEE
floating point. In this case, turning on flush-to-zero mode for
s0, s2, and s3. */
-# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL)
+# define FE_NONIEEE_ENV ((const fenv_t *) 0xc009a04d0270037fUL)
#endif
diff --git a/libc/sysdeps/linux/ia64/bits/huge_vall.h b/libc/sysdeps/linux/ia64/bits/huge_vall.h
new file mode 100644
index 000000000..a043f88b0
--- /dev/null
+++ b/libc/sysdeps/linux/ia64/bits/huge_vall.h
@@ -0,0 +1,41 @@
+/* `HUGE_VALL' constant for ia64 (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 2000, 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
+#endif
+
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VALL (__builtin_huge_vall())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VALL (__extension__ 0x1.0p32767L)
+#else
+
+# define __HUGE_VALL_bytes { 0,0,0,0,0,0,0, 0x80, 0xff, 0x7f, 0,0,0,0,0,0}
+
+# define __huge_vall_t union { unsigned char __c[16]; long double __ld; }
+# ifdef __GNUC__
+# define HUGE_VALL (__extension__ \
+ ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
+# else /* Not GCC. */
+static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+# define HUGE_VALL (__huge_vall.__ld)
+# endif /* GCC. */
+
+#endif /* GCC 2.95 */
diff --git a/libc/sysdeps/linux/ia64/bits/ipc.h b/libc/sysdeps/linux/ia64/bits/ipc.h
index 858c332f1..eb014d7b9 100644
--- a/libc/sysdeps/linux/ia64/bits/ipc.h
+++ b/libc/sysdeps/linux/ia64/bits/ipc.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
diff --git a/libc/sysdeps/linux/ia64/bits/kernel_stat.h b/libc/sysdeps/linux/ia64/bits/kernel_stat.h
index c67c92d16..28abc4bf5 100644
--- a/libc/sysdeps/linux/ia64/bits/kernel_stat.h
+++ b/libc/sysdeps/linux/ia64/bits/kernel_stat.h
@@ -1,12 +1,8 @@
/* Ripped from linux/include/asm-ia64/stat.h
* and renamed 'struct stat' to 'struct kernel_stat' */
-#ifndef _ASM_IA64_STAT_H
-#define _ASM_IA64_STAT_H
-
-#ifndef _LIBC
-#error bits/kernel_stat.h is for internal uClibc use only!
-#endif
+#ifndef _BITS_STAT_STRUCT_H
+#define _BITS_STAT_STRUCT_H
/*
* Modified 1998, 1999
@@ -23,39 +19,15 @@ struct kernel_stat {
unsigned int __pad0;
unsigned long st_rdev;
unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_atime_nsec;
- unsigned long st_mtime;
- unsigned long st_mtime_nsec;
- unsigned long st_ctime;
- unsigned long st_ctime_nsec;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned long st_blksize;
long st_blocks;
unsigned long __unused[3];
};
-#define STAT_HAVE_NSEC 1
-
-struct __old_kernel_stat {
- unsigned int st_dev;
- unsigned int st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
- unsigned int st_uid;
- unsigned int st_gid;
- unsigned int st_rdev;
- unsigned int __pad1;
- unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
- unsigned int st_blksize;
- int st_blocks;
- unsigned int __unused1;
- unsigned int __unused2;
-};
-
/* ia64 stat64 is same as stat */
#define kernel_stat64 kernel_stat
-#endif /* _ASM_IA64_STAT_H */
+#endif /* _BITS_STAT_STRUCT_H */
diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h
index c8ef86d77..e31dc6534 100644
--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h
+++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h
@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t;
typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_old_dev_t;
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
#endif /* _ASM_IA64_POSIX_TYPES_H */
diff --git a/libc/sysdeps/linux/ia64/bits/local_lim.h b/libc/sysdeps/linux/ia64/bits/local_lim.h
new file mode 100644
index 000000000..ccba222e3
--- /dev/null
+++ b/libc/sysdeps/linux/ia64/bits/local_lim.h
@@ -0,0 +1,99 @@
+/* Minimum guaranteed maximum values for system limits. Linux/IA-64 version.
+ Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ see <http://www.gnu.org/licenses/>. */
+
+/* The kernel header pollutes the namespace with the NR_OPEN symbol
+ and defines LINK_MAX although filesystems have different maxima. A
+ similar thing is true for OPEN_MAX: the limit can be changed at
+ runtime and therefore the macro must not be defined. Remove this
+ after including the header if necessary. */
+#ifndef NR_OPEN
+# define __undef_NR_OPEN
+#endif
+#ifndef LINK_MAX
+# define __undef_LINK_MAX
+#endif
+#ifndef OPEN_MAX
+# define __undef_OPEN_MAX
+#endif
+#ifndef ARG_MAX
+# define __undef_ARG_MAX
+#endif
+
+/* The kernel sources contain a file with all the needed information. */
+#include <linux/limits.h>
+
+/* Have to remove NR_OPEN? */
+#ifdef __undef_NR_OPEN
+# undef NR_OPEN
+# undef __undef_NR_OPEN
+#endif
+/* Have to remove LINK_MAX? */
+#ifdef __undef_LINK_MAX
+# undef LINK_MAX
+# undef __undef_LINK_MAX
+#endif
+/* Have to remove OPEN_MAX? */
+#ifdef __undef_OPEN_MAX
+# undef OPEN_MAX
+# undef __undef_OPEN_MAX
+#endif
+/* Have to remove ARG_MAX? */
+#ifdef __undef_ARG_MAX
+# undef ARG_MAX
+# undef __undef_ARG_MAX
+#endif
+
+/* The number of data keys per process. */
+#define _POSIX_THREAD_KEYS_MAX 128
+/* This is the value this implementation supports. */
+#define PTHREAD_KEYS_MAX 1024
+
+/* Controlling the iterations of destructors for thread-specific data. */
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
+/* Number of iterations this implementation does. */
+#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
+
+/* The number of threads per process. */
+#define _POSIX_THREAD_THREADS_MAX 64
+/* We have no predefined limit on the number of threads. */
+#undef PTHREAD_THREADS_MAX
+
+/* Maximum amount by which a process can descrease its asynchronous I/O
+ priority level. */
+#define AIO_PRIO_DELTA_MAX 20
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 196608
+
+/* Maximum number of timer expiration overruns. */
+#define DELAYTIMER_MAX 2147483647
+
+/* Maximum tty name length. */
+#define TTY_NAME_MAX 32
+
+/* Maximum login name length. This is arbitrary. */
+#define LOGIN_NAME_MAX 256
+
+/* Maximum host name length. */
+#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX (2147483647)
diff --git a/libc/sysdeps/linux/ia64/bits/mathdef.h b/libc/sysdeps/linux/ia64/bits/mathdef.h
index 5da23cc8a..b1cc1e709 100644
--- a/libc/sysdeps/linux/ia64/bits/mathdef.h
+++ b/libc/sysdeps/linux/ia64/bits/mathdef.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
diff --git a/libc/sysdeps/linux/ia64/bits/mathinline.h b/libc/sysdeps/linux/ia64/bits/mathinline.h
index 9bb5f1a71..7db5a8ef4 100644
--- a/libc/sysdeps/linux/ia64/bits/mathinline.h
+++ b/libc/sysdeps/linux/ia64/bits/mathinline.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _MATH_H
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
@@ -24,7 +23,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif
#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
diff --git a/libc/sysdeps/linux/ia64/bits/mman.h b/libc/sysdeps/linux/ia64/bits/mman.h
index a27a30fc0..a9d56ed07 100644
--- a/libc/sysdeps/linux/ia64/bits/mman.h
+++ b/libc/sysdeps/linux/ia64/bits/mman.h
@@ -1,104 +1,4 @@
-/* Definitions for POSIX memory map interface. Linux/ia64 version.
- Copyright (C) 1997,1998,2000,2003,2005,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#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. */
-#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
+#include <bits/mman-common.h>
diff --git a/libc/sysdeps/linux/ia64/bits/msq.h b/libc/sysdeps/linux/ia64/bits/msq.h
index cd268eea3..2dea98627 100644
--- a/libc/sysdeps/linux/ia64/bits/msq.h
+++ b/libc/sysdeps/linux/ia64/bits/msq.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_MSG_H
#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
diff --git a/libc/sysdeps/linux/ia64/bits/sem.h b/libc/sysdeps/linux/ia64/bits/sem.h
index 449f1ecc4..aa56e155d 100644
--- a/libc/sysdeps/linux/ia64/bits/sem.h
+++ b/libc/sysdeps/linux/ia64/bits/sem.h
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_SEM_H
# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
diff --git a/libc/sysdeps/linux/ia64/bits/setjmp.h b/libc/sysdeps/linux/ia64/bits/setjmp.h
index 76625753d..4ebc5565d 100644
--- a/libc/sysdeps/linux/ia64/bits/setjmp.h
+++ b/libc/sysdeps/linux/ia64/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+ 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>.
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
@@ -32,9 +31,4 @@
/* the __jmp_buf element type should be __float80 per ABI... */
typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
-
#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/ia64/bits/shm.h b/libc/sysdeps/linux/ia64/bits/shm.h
index 7f38f2dd7..0d0c96e6f 100644
--- a/libc/sysdeps/linux/ia64/bits/shm.h
+++ b/libc/sysdeps/linux/ia64/bits/shm.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_SHM_H
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
diff --git a/libc/sysdeps/linux/ia64/bits/sigaction.h b/libc/sysdeps/linux/ia64/bits/sigaction.h
index 11599d520..edec85ba0 100644
--- a/libc/sysdeps/linux/ia64/bits/sigaction.h
+++ b/libc/sysdeps/linux/ia64/bits/sigaction.h
@@ -13,39 +13,29 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#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. */
+struct sigaction {
#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
+ union {
+ __sighandler_t sa_handler;
+ 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;
+ __sighandler_t sa_handler;
#endif
-
- /* Special flags. */
- unsigned long int sa_flags;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
- };
+ unsigned long sa_flags;
+ sigset_t sa_mask;
+ /* IA64 has no sa_restorer field. */
+};
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
diff --git a/libc/sysdeps/linux/ia64/bits/sigcontext.h b/libc/sysdeps/linux/ia64/bits/sigcontext.h
index 72c60ec24..6c2b521cd 100644
--- a/libc/sysdeps/linux/ia64/bits/sigcontext.h
+++ b/libc/sysdeps/linux/ia64/bits/sigcontext.h
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
@@ -25,6 +24,8 @@
#ifndef _BITS_SIGCONTEXT_H
#define _BITS_SIGCONTEXT_H 1
+#define __need_size_t
+#include <stddef.h>
#include <bits/sigstack.h>
struct ia64_fpreg
diff --git a/libc/sysdeps/linux/ia64/bits/siginfo.h b/libc/sysdeps/linux/ia64/bits/siginfo.h
index 66310c65b..df18b3606 100644
--- a/libc/sysdeps/linux/ia64/bits/siginfo.h
+++ b/libc/sysdeps/linux/ia64/bits/siginfo.h
@@ -14,9 +14,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
&& !defined __need_sigevent_t
@@ -103,6 +102,14 @@ typedef struct siginfo
long int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
+
+ /* SIGSYS. */
+ struct
+ {
+ void *_call_addr; /* Calling user insn. */
+ int _syscall; /* Triggering system call number. */
+ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */
+ } _sigsys;
} _sifields;
} siginfo_t;
@@ -121,6 +128,9 @@ typedef struct siginfo
# define si_addr _sifields._sigfault.si_addr
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
+# define si_call_addr _sifields._sigsys._call_addr
+# define si_syscall _sifields._sigsys._syscall
+# define si_arch _sifields._sigsys._arch
# ifdef __USE_GNU
# define si_imm _sifields._sigfault._si_imm
@@ -298,7 +308,11 @@ enum
/* Structure to transport application-defined values with signals. */
# define __SIGEV_MAX_SIZE 64
-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# if __WORDSIZE == 64
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
typedef struct sigevent
{
@@ -310,6 +324,10 @@ typedef struct sigevent
{
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. */
diff --git a/libc/sysdeps/linux/ia64/bits/sigstack.h b/libc/sysdeps/linux/ia64/bits/sigstack.h
index c9c9d2fed..4e2021b75 100644
--- a/libc/sysdeps/linux/ia64/bits/sigstack.h
+++ b/libc/sysdeps/linux/ia64/bits/sigstack.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
@@ -24,12 +23,14 @@
#ifndef _SIGSTACK_H
#define _SIGSTACK_H 1
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
/* Structure describing a signal stack (obsolete). */
struct sigstack
{
__ptr_t ss_sp; /* Signal stack pointer. */
int ss_onstack; /* Nonzero if executing on this stack. */
};
+#endif
/* Possible values for `ss_flags.'. */
diff --git a/libc/sysdeps/linux/ia64/bits/stackinfo.h b/libc/sysdeps/linux/ia64/bits/stackinfo.h
index b7dc5d91d..67cdec057 100644
--- a/libc/sysdeps/linux/ia64/bits/stackinfo.h
+++ b/libc/sysdeps/linux/ia64/bits/stackinfo.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/libc/sysdeps/linux/ia64/bits/stat.h b/libc/sysdeps/linux/ia64/bits/stat.h
index a5a121b28..e868b0950 100644
--- a/libc/sysdeps/linux/ia64/bits/stat.h
+++ b/libc/sysdeps/linux/ia64/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 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
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
@@ -39,7 +38,7 @@ struct stat
int pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-#if 0 /*def __USE_MISC*/
+#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
@@ -78,7 +77,7 @@ struct stat64
int pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-#if 0 /*def __USE_MISC*/
+#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
@@ -138,3 +137,8 @@ struct stat64
#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
diff --git a/libc/sysdeps/linux/ia64/bits/syscalls.h b/libc/sysdeps/linux/ia64/bits/syscalls.h
index 0c3d6ca3a..47ab2b8ca 100644
--- a/libc/sysdeps/linux/ia64/bits/syscalls.h
+++ b/libc/sysdeps/linux/ia64/bits/syscalls.h
@@ -15,9 +15,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _BITS_SYSCALLS_H
#define _BITS_SYSCALLS_H
@@ -30,30 +29,63 @@
#include <errno.h>
-#define SYS_ify(syscall_name) (__NR_##syscall_name)
-
#undef IA64_USE_NEW_STUB
-/* taken from asm-ia64/break.h */
#define __IA64_BREAK_SYSCALL 0x100000
-#define ___IA64_BREAK_SYSCALL "0x100000"
-
-#define _DO_SYSCALL(name, nr, args...) \
- LOAD_ARGS_##nr (args) \
- register long _r8 __asm__ ("r8"); \
- register long _r10 __asm__ ("r10"); \
- register long _r15 __asm__ ("r15") = SYS_ify(name); \
- long _retval; \
- LOAD_REGS_##nr \
- __asm__ __volatile__ ("break " ___IA64_BREAK_SYSCALL ";;\n\t" \
- : "=r" (_r8), "=r" (_r10), "=r" (_r15) ASM_OUTARGS_##nr \
- : "2" (_r15) ASM_ARGS_##nr \
- : "memory" ASM_CLOBBERS_##nr); \
- _retval = _r8; \
- if (_r10 == -1) { \
- __set_errno (_retval); \
- _retval = -1; \
- }
+
+/* mostly taken from glibc sysdeps/unix/sysv/linux/ia64/sysdep.h */
+#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.
+ */
+
+# 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 (__IA64_BREAK_SYSCALL) \
+ : "=r" (_r8), "=r" (_r10), "=r" (_r15) \
+ ASM_OUTARGS_##nr \
+ : "2" (_r15) ASM_ARGS_##nr \
+ : "memory" ASM_CLOBBERS_##nr); \
+ _retval = _r8;
+
+#define INLINE_SYSCALL_NCS(name, nr, args...) \
+(__extension__ \
+ ({ \
+ DO_INLINE_SYSCALL_NCS (name, nr, args) \
+ if (unlikely (_r10 == -1)) \
+ { \
+ __set_errno (_retval); \
+ _retval = -1; \
+ } \
+ _retval; \
+ }) \
+)
+
+#define INTERNAL_SYSCALL_DECL(err) long int err
+
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
+ ({ \
+ DO_INLINE_SYSCALL_NCS (name, nr, args) \
+ err = _r10; \
+ _retval; \
+ }) \
+)
+#define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1)
+
+#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#define LOAD_ARGS_0()
#define LOAD_REGS_0
@@ -102,15 +134,6 @@
#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)
@@ -118,7 +141,6 @@
#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"
@@ -126,6 +148,7 @@
#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 ASM_CLOBBERS_6_COMMON , "b7"
#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", \
@@ -138,55 +161,5 @@
/* 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
-
-
-
-#define _syscall0(type,name) \
-type name(void) \
-{ \
- _DO_SYSCALL(name, 0); return (type) _retval; \
-}
-
-#define _syscall1(type,name,type1,arg1) \
-type name(type1 arg1) \
-{ \
- _DO_SYSCALL(name, 1, arg1); return (type) _retval; \
-}
-
-#define _syscall2(type,name,type1,arg1,type2,arg2) \
-type name(type1 arg1, type2 arg2) \
-{ \
- _DO_SYSCALL(name, 2, arg1, arg2); return (type) _retval; \
-}
-
-#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
-type name(type1 arg1, type2 arg2, type3 arg3) \
-{ \
- _DO_SYSCALL(name, 3, arg1, arg2, arg3); return (type) _retval; \
-}
-
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-{ \
- _DO_SYSCALL(name, 4, arg1, arg2, arg3, arg4); return (type) _retval; \
-}
-
-#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
-{ \
- _DO_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); return (type) _retval; \
-}
-
-#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
-{ \
- _DO_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); return (type) _retval; \
-}
-
#endif /* __ASSEMBLER__ */
#endif /* _BITS_SYSCALLS_H */
diff --git a/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
index 953279e73..25c983206 100644
--- a/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
@@ -11,28 +11,31 @@
/* can your target use syscall6() for mmap ? */
#define __UCLIBC_MMAP_HAS_6_ARGS__
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
/* does your target have a broken create_module() ? */
#undef __UCLIBC_BROKEN_CREATE_MODULE__
+/* does your target have to worry about older [gs]etrlimit() ? */
+#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
+
/* does your target have an asm .set ? */
#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
-/* define if target doesn't like .global */
-#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
-
/* define if target supports .weak */
#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
/* define if target supports .weakext */
#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
-/* needed probably only for ppc64 */
-#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
+/* define if target supports CFI pseudo ops */
+#undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
/* define if target supports IEEE signed zero floats */
#define __UCLIBC_HAVE_SIGNED_ZERO__
+/* only weird assemblers generally need this */
+#undef __UCLIBC_ASM_LINE_SEP__
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
diff --git a/libc/sysdeps/linux/ia64/bits/wordsize.h b/libc/sysdeps/linux/ia64/bits/wordsize.h
index dd698fa97..afb2131de 100644
--- a/libc/sysdeps/linux/ia64/bits/wordsize.h
+++ b/libc/sysdeps/linux/ia64/bits/wordsize.h
@@ -12,8 +12,7 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#define __WORDSIZE 64
diff --git a/libc/sysdeps/linux/ia64/brk.S b/libc/sysdeps/linux/ia64/brk.S
index e9974d515..3c5f922e4 100644
--- a/libc/sysdeps/linux/ia64/brk.S
+++ b/libc/sysdeps/linux/ia64/brk.S
@@ -15,9 +15,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
diff --git a/libc/sysdeps/linux/ia64/clone2.S b/libc/sysdeps/linux/ia64/clone2.S
index 7f067dff8..c077f722a 100644
--- a/libc/sysdeps/linux/ia64/clone2.S
+++ b/libc/sysdeps/linux/ia64/clone2.S
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
diff --git a/libc/sysdeps/linux/ia64/crt1.S b/libc/sysdeps/linux/ia64/crt1.S
index 774e84ff4..c88193c51 100644
--- a/libc/sysdeps/linux/ia64/crt1.S
+++ b/libc/sysdeps/linux/ia64/crt1.S
@@ -30,9 +30,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#define __ASSEMBLY__
#include "sysdep.h"
diff --git a/libc/sysdeps/linux/ia64/fork.S b/libc/sysdeps/linux/ia64/fork.S
index c657453f2..d09d925d8 100644
--- a/libc/sysdeps/linux/ia64/fork.S
+++ b/libc/sysdeps/linux/ia64/fork.S
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
@@ -24,7 +23,10 @@
/* pid_t fork(void); */
/* Implemented as a clone system call with parameters SIGCHLD and 0 */
-ENTRY(__libc_fork)
+#ifdef __UCLIBC_HAS_THREADS__
+.weak fork
+#endif
+ENTRY(fork)
alloc r2=ar.pfs,0,0,2,0
mov out0=SIGCHLD /* Return SIGCHLD when child finishes */
/* no other clone flags; nothing shared */
@@ -34,9 +36,8 @@ ENTRY(__libc_fork)
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)
-libc_hidden_weak (fork)
+PSEUDO_END(fork)
+#ifdef __UCLIBC_HAS_THREADS__
+strong_alias(fork,__libc_fork)
+#endif
+libc_hidden_def(fork)
diff --git a/libc/sysdeps/linux/ia64/jmpbuf-unwind.h b/libc/sysdeps/linux/ia64/jmpbuf-unwind.h
new file mode 100644
index 000000000..91e2df8e7
--- /dev/null
+++ b/libc/sysdeps/linux/ia64/jmpbuf-unwind.h
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
diff --git a/libc/sysdeps/linux/ia64/pipe.S b/libc/sysdeps/linux/ia64/pipe.S
index 2bfa8a71f..d2fc2d4ee 100644
--- a/libc/sysdeps/linux/ia64/pipe.S
+++ b/libc/sysdeps/linux/ia64/pipe.S
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* __pipe is a special syscall since it returns two values. */
diff --git a/libc/sysdeps/linux/ia64/setjmp.S b/libc/sysdeps/linux/ia64/setjmp.S
index 11dc0e62e..05f112ea0 100644
--- a/libc/sysdeps/linux/ia64/setjmp.S
+++ b/libc/sysdeps/linux/ia64/setjmp.S
@@ -13,9 +13,8 @@
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.
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>.
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
@@ -95,15 +94,15 @@ ENTRY(__sigsetjmp)
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)
+.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
+ 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
+.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
@@ -145,39 +144,39 @@ ENTRY(__sigsetjmp)
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
+.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
- st8.nta [r2]=loc0,16 // b0
- st8.nta [r3]=r17,16 // b1
+ st8.nta [r2]=loc0,16 /* b0 */
+ st8.nta [r3]=r17,16 /* b1 */
mov out1=in1
;;
- st8.nta [r2]=r18,16 // b2
- st8.nta [r3]=r19,16 // b3
+ 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]=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]=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]=r24,16 /* pr */
+ st8.nta [r3]=r23,16 /* ar.bsp */
;;
- st8.nta [r2]=r25 // ar.unat
- st8.nta [r3]=in0 // &__jmp_buf
+ 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
+.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
diff --git a/libc/sysdeps/linux/ia64/sys/io.h b/libc/sysdeps/linux/ia64/sys/io.h
index 14736ff1c..f07e945ed 100644
--- a/libc/sysdeps/linux/ia64/sys/io.h
+++ b/libc/sysdeps/linux/ia64/sys/io.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_IO_H
#define _SYS_IO_H 1
@@ -24,6 +23,7 @@
__BEGIN_DECLS
+#if defined __UCLIBC_LINUX_SPECIFIC__
/* 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.
@@ -38,6 +38,7 @@ extern int ioperm (unsigned long int __from, unsigned long int __num,
access any I/O port is granted. This call requires root
privileges. */
extern int iopl (int __level);
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
extern unsigned int _inb (unsigned long int __port);
extern unsigned int _inb (unsigned long int __port);
diff --git a/libc/sysdeps/linux/ia64/sys/procfs.h b/libc/sysdeps/linux/ia64/sys/procfs.h
index b5196b997..51c3f7ecb 100644
--- a/libc/sysdeps/linux/ia64/sys/procfs.h
+++ b/libc/sysdeps/linux/ia64/sys/procfs.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
diff --git a/libc/sysdeps/linux/ia64/sys/ptrace.h b/libc/sysdeps/linux/ia64/sys/ptrace.h
index 986c4b2d3..09944880b 100644
--- a/libc/sysdeps/linux/ia64/sys/ptrace.h
+++ b/libc/sysdeps/linux/ia64/sys/ptrace.h
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_PTRACE_H
#define _SYS_PTRACE_H 1
diff --git a/libc/sysdeps/linux/ia64/sys/ucontext.h b/libc/sysdeps/linux/ia64/sys/ucontext.h
index 17dc85f99..ef5656717 100644
--- a/libc/sysdeps/linux/ia64/sys/ucontext.h
+++ b/libc/sysdeps/linux/ia64/sys/ucontext.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H 1
@@ -32,7 +31,7 @@
typedef struct sigcontext mcontext_t;
-#if defined __cplusplus && __GNUC_PREREQ (3, 5)
+#if __GNUC_PREREQ (3, 5)
# define _SC_GR0_OFFSET \
__builtin_offsetof (struct sigcontext, sc_gr[0])
#elif defined __GNUC__
diff --git a/libc/sysdeps/linux/ia64/sys/user.h b/libc/sysdeps/linux/ia64/sys/user.h
index 039218761..b998f63f0 100644
--- a/libc/sysdeps/linux/ia64/sys/user.h
+++ b/libc/sysdeps/linux/ia64/sys/user.h
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
diff --git a/libc/sysdeps/linux/ia64/syscall.S b/libc/sysdeps/linux/ia64/syscall.S
index e4ac834c6..3a5daeeb5 100644
--- a/libc/sysdeps/linux/ia64/syscall.S
+++ b/libc/sysdeps/linux/ia64/syscall.S
@@ -13,9 +13,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
diff --git a/libc/sysdeps/linux/ia64/sysdep.h b/libc/sysdeps/linux/ia64/sysdep.h
index d10020ac1..3e7e4674a 100644
--- a/libc/sysdeps/linux/ia64/sysdep.h
+++ b/libc/sysdeps/linux/ia64/sysdep.h
@@ -14,13 +14,13 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _LINUX_IA64_SYSDEP_H
#define _LINUX_IA64_SYSDEP_H 1
+#include <common/sysdep.h>
#include <features.h>
#include <asm/unistd.h>
@@ -49,6 +49,15 @@
C_LABEL(name) \
CALL_MCOUNT
+#define HIDDEN_ENTRY(name) \
+ .text; \
+ .align 32; \
+ .proc C_SYMBOL_NAME(name); \
+ .global C_SYMBOL_NAME(name); \
+ .hidden C_SYMBOL_NAME(name); \
+ C_LABEL(name) \
+ CALL_MCOUNT
+
#define LEAF(name) \
.text; \
.align 32; \
@@ -161,7 +170,6 @@
#define ret br.ret.sptk.few b0
#define ret_NOERRNO ret
-#define ret_ERRVAL ret
#endif /* not __ASSEMBLER__ */
diff --git a/libc/sysdeps/linux/ia64/vfork.S b/libc/sysdeps/linux/ia64/vfork.S
index f233b05e2..40f9f1933 100644
--- a/libc/sysdeps/linux/ia64/vfork.S
+++ b/libc/sysdeps/linux/ia64/vfork.S
@@ -12,9 +12,8 @@
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. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
@@ -29,7 +28,7 @@
/* pid_t vfork(void); */
/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
-ENTRY(__vfork)
+HIDDEN_ENTRY(__vfork)
alloc r2=ar.pfs,0,0,2,0
mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
mov out1=0 /* Standard sp value. */
@@ -41,4 +40,4 @@ ENTRY(__vfork)
PSEUDO_END(__vfork)
weak_alias(__vfork,vfork)
-libc_hidden_weak(vfork)
+libc_hidden_def(vfork)