aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-04-11 22:09:16 +0000
committerRoland McGrath <roland@gnu.org>2003-04-11 22:09:16 +0000
commitb35fce97f8d4a2963af866cb4801245d0f47d3ac (patch)
tree0d0d51d1d4f855f03f0195c71009f3e384963753
parent52a5e9757ed1f93f1be9890e0aea4ce947635320 (diff)
downloadglibc-b35fce97f8d4a2963af866cb4801245d0f47d3ac.tar
glibc-b35fce97f8d4a2963af866cb4801245d0f47d3ac.tar.gz
glibc-b35fce97f8d4a2963af866cb4801245d0f47d3ac.tar.bz2
glibc-b35fce97f8d4a2963af866cb4801245d0f47d3ac.zip
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
(__fe_nomask_env): Try prctl even if __ASSUME_NEW_PRCTL_SYSCALL is not defined, but the prctl constants are.
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f68d16d8b8..10870c435f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2003-04-11 Jakub Jelinek <jakub@redhat.com>
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
+ (__fe_nomask_env): Try prctl even if __ASSUME_NEW_PRCTL_SYSCALL
+ is not defined, but the prctl constants are.
+
* string/tester.c (test_strcmp): Fix a typo.
2003-04-09 Ulrich Drepper <drepper@redhat.com>
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
index 70dc064425..7571f28780 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
@@ -27,9 +27,15 @@
const fenv_t *
__fe_nomask_env (void)
{
-#ifdef __ASSUME_NEW_PRCTL_SYSCALL
+#if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE
+ int result;
INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
+ result = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
+# ifndef __ASSUME_NEW_PRCTL_SYSCALL
+ if (INTERNAL_SYSCALL_ERROR_P (result, err)
+ && INTERNAL_SYSCALL_ERRNO (result, err) == EINVAL)
+ __set_errno (ENOSYS);
+# endif
#else
__set_errno (ENOSYS);
#endif