[SciPy-dev] [SciPy-user] NumPy On OpenBSD

Travis Oliphant oliphant at ee.byu.edu
Tue Jan 10 20:22:00 EST 2006


LATORNELL, Doug wrote:

>Thanks, Travis.
>
>I've found BSD and OpenBSD #defines in my sys/param.h file.  Or-ing one
>of those in seems like it should work, but I think fpgetsticky() is
>returning 0.  I'm trying to dig into that now and understand it.
>
>BTW, the OpenBSD porting guide page
>(http://www.openbsd.org/porting.html#Generic) is kind of adamant about
>*not* using __OpenBSD__.  Their take is test for features, not specific
>OSes...
>  
>

Yes, that is probably a better way to do it.  I followed numarray's lead 
in how they were handling the IEEE floating-point stuff 
platform-to-platform.   But, we could take advantage of the decent 
configuration system already present where we detect quite a few things 
at build time in the setup.py file.   Tests for the existence of 
different IEEE functions could be defined there as well. 

The presence of specific functions would tell us which method is being 
used and we could then define a UFUNC_IEEE_FPMETHOD variable that 
specified which type was in use.

The only other problem is that different platforms need different header 
files for this capability, so we would probably need to define another 
variable to pick-up the correct headers which would complicate matters. 

-Travis






More information about the SciPy-Dev mailing list