diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-20 22:23:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-20 22:23:34 +0000 |
commit | 0585697658a4f4afd4b9811b7a3f73ff820a20d8 (patch) | |
tree | d8b46217cefa61586a014dafb6bb4f87a09224c0 /sysdeps/unix/sysv/linux | |
parent | a592f998bb64e8760f9e67170341793cf70ada12 (diff) | |
download | glibc-0585697658a4f4afd4b9811b7a3f73ff820a20d8.tar.gz glibc-0585697658a4f4afd4b9811b7a3f73ff820a20d8.tar.xz glibc-0585697658a4f4afd4b9811b7a3f73ff820a20d8.zip |
Update.
2002-07-24 Philip Blundell <philb@gnu.org> * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Yield ENODEV on unknown systems. 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * sysdeps/powerpc/powerpc32/atomicity.h: Remove compiler workaround. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_NEW_PRCTL_SYSCALL): Defined for ppc32 too. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Use prctl if possible. * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short interprocedure branches. * sysdeps/powerpc/soft-fp/Dist (sim-full.c, fenv_const.c): Move to... * sysdeps/powerpc/nofpu/Dist: ...here. * sysdeps/unix/sysv/linux/powerpc/Dist (fe_nomask.c): Move to... * sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: ...here. * sysdeps/unix/sysv/linux/s390/s390-64/Dist (kernel_stat.h): Delete. * sysdeps/unix/sysv/linux/sparc/Dist (bits/utmpx.h): Delete. * sysdeps/unix/sysv/linux/x86_64/Dist (bits/utmpx.h): Delete.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/ioperm.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/kernel-features.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/Dist | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c | 29 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/Dist | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/Dist | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/Dist | 1 |
9 files changed, 35 insertions, 19 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c index 40ac8e6038..558b485b61 100644 --- a/sysdeps/unix/sysv/linux/arm/ioperm.c +++ b/sysdeps/unix/sysv/linux/arm/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Phil Blundell, based on the Alpha version by David Mosberger. @@ -166,7 +166,7 @@ init_iosys (void) } /* systype is not a known platform name... */ - __set_errno (EINVAL); + __set_errno (ENODEV); return -1; } @@ -194,8 +194,8 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) return -1; io.base = - (unsigned long int) __mmap (0, MAX_PORT << io.shift, - PROT_READ | PROT_WRITE, + (unsigned long int) __mmap (0, MAX_PORT << io.shift, + PROT_READ | PROT_WRITE, MAP_SHARED, fd, io.io_base); close (fd); if ((long) io.base == -1) diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 45cd3e59c8..239d6379b4 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -210,9 +210,9 @@ # define __ASSUME_MMAP2_SYSCALL 1 #endif -/* Starting with 2.4.21 PowerPC64 implements the new prctl syscall. +/* Starting with 2.4.21 PowerPC implements the new prctl syscall. This allows applications to get/set the Floating Point Exception Mode. */ -#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc64__ +#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc__ # define __ASSUME_NEW_PRCTL_SYSCALL 1 #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/Dist b/sysdeps/unix/sysv/linux/powerpc/Dist index 507728abb1..f36d3685f6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Dist +++ b/sysdeps/unix/sysv/linux/powerpc/Dist @@ -1,6 +1,4 @@ -bits/utmpx.h dl-brk.S -fe_nomask.c ipc_priv.h kernel_termios.h ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist index 381f878080..297e031620 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist @@ -1,2 +1,3 @@ clone.S kernel_stat.h +fe_nomask.c diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c index e51714d312..2c85a3a9e9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c @@ -21,7 +21,11 @@ #include <errno.h> #include <signal.h> #include <unistd.h> +#include <sysdep.h> +#include <sys/prctl.h> +#include "kernel-features.h" +#if __ASSUME_NEW_PRCTL_SYSCALL == 0 /* This is rather fiddly under Linux. We don't have direct access, and there is no system call, but we can change the bits in a signal handler's context... */ @@ -34,18 +38,31 @@ fe_nomask_handler (int signum, struct sigcontext *sc) sc->regs->msr |= 0x900ul; /* FE0 | FE1 */ sigaction (SIGUSR1, &oact, NULL); } +#endif const fenv_t * __fe_nomask_env (void) { - struct sigaction act; +#if __ASSUME_NEW_PRCTL_SYSCALL == 0 +# if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE + int result = INLINE_SYSCALL (prctl, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); - act.sa_handler = (sighandler_t) fe_nomask_handler; - sigemptyset (&act.sa_mask); - act.sa_flags = 0; + if (result == -1 && errno == EINVAL) +# endif + { + struct sigaction act; - sigaction (SIGUSR1, &act, &oact); - raise (SIGUSR1); + act.sa_handler = (sighandler_t) fe_nomask_handler; + sigemptyset (&act.sa_mask); + act.sa_flags = 0; + + sigaction (SIGUSR1, &act, &oact); + raise (SIGUSR1); + } +#else + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); +#endif return FE_ENABLED_ENV; } diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S index 9a0f53e99e..5fb7868c31 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S @@ -38,7 +38,7 @@ ENTRY (__vfork) bnslr+ /* Check if vfork syscall is known at all. */ cmpwi r3,ENOSYS - bne JUMPTARGET(__syscall_error) + bne- .Lsyscall_error # endif #endif @@ -47,7 +47,10 @@ ENTRY (__vfork) /* If we don't have vfork, fork is close enough. */ DO_CALL (SYS_ify (fork)) - PSEUDO_RET + bnslr+ + +.Lsyscall_error: + b JUMPTARGET(__syscall_error) #endif PSEUDO_END (__vfork) diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/Dist b/sysdeps/unix/sysv/linux/s390/s390-64/Dist index bc32c766e1..bfd4edc372 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/Dist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/Dist @@ -1,3 +1,2 @@ clone.S -kernel_stat.h ucontext_i.h diff --git a/sysdeps/unix/sysv/linux/sparc/Dist b/sysdeps/unix/sysv/linux/sparc/Dist index 0fea868016..174d053909 100644 --- a/sysdeps/unix/sysv/linux/sparc/Dist +++ b/sysdeps/unix/sysv/linux/sparc/Dist @@ -1,4 +1,3 @@ -bits/utmpx.h kernel_termios.h sys/trap.h ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/x86_64/Dist b/sysdeps/unix/sysv/linux/x86_64/Dist index 0bae1286eb..57dd1b2221 100644 --- a/sysdeps/unix/sysv/linux/x86_64/Dist +++ b/sysdeps/unix/sysv/linux/x86_64/Dist @@ -1,4 +1,3 @@ -bits/utmpx.h clone.S ldd-rewrite.sed __start_context.S |