_FPU_SETCW is undefined in libc5

Brian Gough bjg@network-theory.co.uk
Wed Jun 14 13:03:00 GMT 2000


Sounds like __setfpucw is the way to go. I have no way to test things
on libc5 myself, so improved patches are welcome. Thanks.

Evgeny Stambulchik writes:
 > On 11-Jun-00 OKUJI Yoshinori wrote:
 >   
 > >  --- 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
 > 
 > With libc5, one can use 
 > 
 > #include <i386/fpu_control.h>
 > extern void __setfpucw __P ((unsigned short));
 > 
 > Similarly in <m68k/fpu_control.h>:
 > 
 > extern void __setfpucw __P ((unsigned long));
 > 
 > All other archs of Linux are solely glibc2 based, I think.
 > 
 > Regards,
 > 
 > Evgeny
 > 
 >    ____________________________________________________________
 >   / Evgeny Stambulchik  <fnevgeny@plasma-gate.weizmann.ac.il>  \
 >  /  Plasma Laboratory, Weizmann Institute of Science, Israel \  \
 >  |  Phone : (972)8-934-3610  == | == FAX   : (972)8-934-3491 |  |
 >  |  URL   :    http://plasma-gate.weizmann.ac.il/~fnevgeny/  |  |
 >  |  Finger for PGP key >=====================================+  |
 >  |______________________________________________________________|
 > 
 > 


More information about the Gsl-discuss mailing list