This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
_FPU_SETCW is undefined in libc5
- To: gsl-discuss at sourceware dot cygnus dot com
- Subject: _FPU_SETCW is undefined in libc5
- From: OKUJI Yoshinori <okuji at gnu dot org>
- Date: Mon, 12 Jun 2000 06:46:30 +0900
Hello,
I compiled and checked gsl-0.6 on i586-pc-linux-gnulibc1, and I
found one problem in it. In "ieee-utils/fp-linux.c", _FPU_SETCW is
used unconditionally, but the macro is not defined in libc5,
unfortunately. So I had to patch the file, to run the tests. Here is
the patch:
--- gsl-0.6/ieee-utils/fp-linux.c.orig Mon Jun 12 06:37:35 2000
+++ gsl-0.6/ieee-utils/fp-linux.c Mon Jun 12 05:57:32 2000
@@ -22,6 +22,10 @@
#include <gsl/gsl_errno.h>
#include <gsl/gsl_ieee_utils.h>
+#ifndef _FPU_SETCW
+# define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
+#endif
+
int
gsl_ieee_set_mode (int precision, int rounding, int exception_mask)
{
I just copied the definition from glibc-2.1.3. Although I don't
think the patch is very good, I hope that I've made it clear what is
my problem.
Thanks,
Okuji