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

Rumko rumcic at gmail.com
Thu Dec 7 12:47:10 PST 2006


I got rid of the _types.h files and moved fenv.h to src/lib/libm/arch/i386/

The only changes in the source tree now are 2 new files (fenv.c and fenv.h) 
and the modified Makefile.inc in lib/libm/arch/i386/.

The updated patch is located at http://www.rumko.net/dragonfly/fenv.diff

On Thursday 07 December 2006 11:29, Simon 'corecode' Schubert wrote:
> 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
Attachment:
pgp00006.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00006.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20061207/fe8fe418/attachment-0013.obj>


More information about the Submit mailing list