add fenv to libm (was: Re: <EMPTY SUBJECT>)

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Thu Dec 7 02:31:38 PST 2006


Rumko wrote:
Now ... this patch in it's current form does not contain the man pages yet 
(will do that after everything else is good enough) and I had to comment out 
a few lines in _types.h cause they were declared in other header files (for 
example __time_t in sys/machine/pc32/include/_types.h and __clockid_t in 
sys/sys/_types.h.
okay, this will have to be fixed not to contain types from freebsd.  i am sure that you only need to modify files in lib/libm.

Also, from what I have understood from the FreeBSD implementation of fenv, it 
seems to be cpu specific (FreeBSD seems to have different files for different 
archs) and including fenv in libm was no problem since it has arch specific 
files (src/lib/libm/arch/i386/...), but what about the fenv.h file? For now I 
have put it directly into src/include since I couldn't find arch specific 
headers for /usr/include (afaik fenv.h has to be present 
at /usr/include/fenv.h), but when ports to different archs (like amd64) 
start, we will probably need an arch specific /usr/include as well.
the port to amd64 has already started.  however, it is not finished.  it is crucial that all future work strictly respects this fact and integrates amd64.

for some reason we are now using netbsd's libm, and they don't have special treatment of amd64.  i am pretty sure that is not needed in any case, it is merely an optimization.

to install a cpu-specific header, just add

INCS+= fenv.h

in arch/i386/Makefile.inc

Besides that, the freebsd code contains unnecessary compatibility code which should be removed (like splitting mxcsr).

cheers
 simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00004.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20061207/ba4c1a3b/attachment-0019.obj>


More information about the Submit mailing list