This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
Re: _FPU_SETCW is undefined in libc5
- To: OKUJI Yoshinori <okuji at gnu dot org>
- Subject: Re: _FPU_SETCW is undefined in libc5
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Mon, 12 Jun 2000 19:33:32 +0100 (BST)
- Cc: gsl-discuss at sourceware dot cygnus dot com
- References: <20000612064630E.okuji@kuicr.kyoto-u.ac.jp>
Thank you, I have added the patch.
best regards
Brian Gough
OKUJI Yoshinori writes:
> 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
>