internal.h: fake ISO C99 INFINITY and NAN if not defined

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
Daniel Kochmański 2015-09-04 20:58:31 +02:00
parent 899f51106e
commit a461f561df

View file

@ -604,6 +604,18 @@ extern cl_object si_wait_for_all_processes _ECL_ARGS((cl_narg narg, ...));
# define ldexpf(x,y) ldexp((float)x,y)
#endif
/*
* Fake INFINITY and NAN defined in ISO C99 (portably)
*/
#ifndef INFINITY
# define INFINITY (1.0/0.0)
#endif
#ifndef NAN
# define NAN (0.0/0.0)
#endif
#ifdef __cplusplus
}
#endif