Default libm mode is XOPEN?

Kyrill Tkachov kyrylo.tkachov@arm.com
Thu Jul 3 15:29:00 GMT 2014


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 
program:
#include <stdio.h>
#include <math.h>

int
main (void)
{
   printf ("_LIB_VERSION: %d\n", _LIB_VERSION);
   printf ("_XOPEN_: %d\n", _XOPEN_);
   return 0;
}

produces:
_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?

Thanks,
Kyrill



More information about the Newlib mailing list