In <[EMAIL PROTECTED]>, David Malone wrote:
> > > There was a discussion on one of the list about what to do for
> > > floating point excpetions recently, and I thought people decided
> > > that causing a signal by default was a right thing?
> >
> > The outcome was that applications that care must set the control word
> > themself and that we go the way of least resistance for the rest.
>
> OK - I just did a quick scout around. Digital Unix gives a SIGFPE;
> Solaris, AIX and Redhat print some captalisation of "Inf"; HP/UX
> prints "++.000000" ;-)
>
> Is there a way of setting the control word which is in any sense
> portable?
It is an i386 assembler instruction. Obviously, operating system
vendors thought it's not their business, but the compiler's.
Unfortunately, gcc doesn't care (although most other native compilers
like SRC m3, CMUCL, SML/NJ do).
FreeBSD's fpsetmask(3) stuff is simple inline assembler that I
personally used in Linux, it should be relativly easy to carry it
around with your application on i386 machines.
Martin
--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <[EMAIL PROTECTED]> http://www.cons.org/cracauer/
Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message