From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18008 invoked by alias); 11 Apr 2003 18:06:56 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 17992 invoked from network); 11 Apr 2003 18:06:56 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 11 Apr 2003 18:06:56 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h3BI6rqO019045; Fri, 11 Apr 2003 20:06:53 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id h3BI6qnC019043; Fri, 11 Apr 2003 20:06:52 +0200 Date: Fri, 11 Apr 2003 18:06:00 -0000 From: Jakub Jelinek To: Roland McGrath , Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix ppc64 test-fenv Message-ID: <20030411180652.GF16629@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-04/txt/msg00031.txt.bz2 Hi! Unless ppc64 glibc is built with --enable-kernel=2.4.21 or higher (without this switch 2.4.19 is assumed), it will fail test-fenv no matter whatever kernel it is running on. The following patch fixes it. 2003-04-11 Jakub Jelinek * 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. --- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c.jj 2003-03-06 12:26:24.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c 2003-04-11 10:18:44.000000000 -0400 @@ -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 Jakub