Default libm mode is XOPEN?
Mon Jul 7 13:26:00 GMT 2014
On Jul 3 16:29, Kyrill Tkachov wrote:
> Hi all,
> Looking at newlib/libm/common/fdlibm.h I see the lines:
> /* REDHAT LOCAL: Default to XOPEN_MODE. */
> #define _XOPEN_MODE
> Building an aarch64-none-elf compiler with newlib, the following test
> #include <stdio.h>
> #include <math.h>
> main (void)
> printf ("_LIB_VERSION: %d\n", _LIB_VERSION);
> printf ("_XOPEN_: %d\n", _XOPEN_);
> return 0;
> _LIB_VERSION: 1
> _XOPEN_: 1
> Is this /* REDHAT LOCAL: Default to XOPEN_MODE. */ really intentional for
> all users of newlib?
> I thought IEEE was supposed to be the default one. Or are targets expected
> to override this?
It might be pretty tricky to track down why this was done. _XOPEN_MODE
was defined in fdlibm.h since the introduction of the public CVS
repository back in 2000. The definition doesn't show up in the
ChangeLog at all, so this change dates back to at least 1995.
OTOH, changing this now would potentially break a lot of targets.
We might have to introduce some workaround if there's an actual need.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Newlib