Browse Source

DUK_USE_MATH_xxx detection

pull/1/head
Sami Vaarala 11 years ago
parent
commit
e1f8a7d4dc
  1. 16
      src/duk_features.h

16
src/duk_features.h

@ -8,6 +8,7 @@
* *
* Useful resources: * Useful resources:
* *
* http://sourceforge.net/p/predef/wiki/Home/
* http://sourceforge.net/p/predef/wiki/Architectures/ * http://sourceforge.net/p/predef/wiki/Architectures/
* *
* FIXME: at the moment there is no direct way of configuring * FIXME: at the moment there is no direct way of configuring
@ -274,6 +275,21 @@
#undef DUK_USE_GCC_PRAGMAS #undef DUK_USE_GCC_PRAGMAS
#endif #endif
/* Some math functions are C99 only. This is also an issue with some
* embedded environments using uclibc where uclibc has been configured
* not to provide some functions. For now, use replacements whenever
* using uclibc.
*/
#if defined(_DUK_C99) && !defined(__UCLIBC__)
#define DUK_USE_MATH_FMIN
#define DUK_USE_MATH_FMAX
#define DUK_USE_MATH_ROUND
#else
#undef DUK_USE_MATH_FMIN
#undef DUK_USE_MATH_FMAX
#undef DUK_USE_MATH_ROUND
#endif
/* /*
* Platform specific defines * Platform specific defines
* *

Loading…
Cancel
Save