_FPU_SETCW is undefined in libc5

OKUJI Yoshinori okuji@gnu.org
Sun Jun 11 14:49:00 GMT 2000


  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


More information about the Gsl-discuss mailing list