This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: bits/mathdef.h cleanup, revisited
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: libc-alpha at sourceware dot org, rsa at us dot ibm dot com, kkojima at gcc dot gnu dot org, davem at davemloft dot net
- Date: Tue, 31 Jan 2012 23:24:50 +0000 (UTC)
- Subject: Re: bits/mathdef.h cleanup, revisited
- References: <Pine.LNX.4.64.1201312033470.13487@digraph.polyomino.org.uk><4F2873F2.4030106@cs.ucla.edu>
On Tue, 31 Jan 2012, Paul Eggert wrote:
> How about the following idea instead? It switches based on
> __FLT_EVAL_METHOD__, not on __GNUC__, which gives GCC (and other compilers)
> a way to communicate to glibc how floating-point computation works.
> (I have not tested this.)
With __FLT_EVAL_METHOD__ maybe we could split this header into an
architecture-independent header and an architecture-dependent header which
most architectures don't need special versions of at all. There's not
much that really needs to be different between architectures and in
general reducing the number of different copies of a header seems like a
good idea.
(I've previously noted that sys/epoll.h, sys/eventfd.h, sys/inotify.h,
sys/signalfd.h, sys/timerfd.h ought to have bits/ headers with the
architecture-specific parts and only one copy of the main headers. I also
think the Linux version of bits/fcntl.h is a good candidate for separating
the parts shared by all Linux architectures from the architecture-specific
parts.)
--
Joseph S. Myers
joseph@codesourcery.com