Add math library defines for nan functions. From Brennan Ashton.

This commit is contained in:
Gregory Nutt 2015-01-26 19:03:38 -06:00
parent b12cf6d2f5
commit 6418f08459

View File

@ -385,6 +385,14 @@ double trunc (double x);
long double truncl (long double x);
#endif
#define nanf(x) ((float)(NAN))
#ifdef CONFIG_HAVE_DOUBLE
#define nan(x) ((double)(NAN))
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
#define nanl(x) ((long double)(NAN))
#endif
#if defined(__cplusplus)
}
#endif