mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
de8a5b7810
* configure.in: Add configuration test for long double type existing and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array) and _LDBL_EQ_DBL tests to not link so that will work with cross-compilers. * configure: Regenerated. * Makefile.in: Ditto. * newlib.hin: Add _HAVE_LONG_DOUBLE flag. * libc/include/math.h: Change non-builtin defines for HUGE_VAL, HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and union __ldmath definitions with (new) _HAVE_LONG_DOUBLE. *libm/common/s_infconst.c: Change definitions to use values from float.h instead of non-so-portable integer forms. Mark as being deprecated (because now removed from math.h, are not used anywhere in Newlib, itself).
22 lines
688 B
C
22 lines
688 B
C
/* Infinity as a constant value. This is used for HUGE_VAL.
|
|
* Added by Cygnus Support.
|
|
*/
|
|
|
|
#include <float.h>
|
|
#include <math.h>
|
|
|
|
/* These should never actually be used any longer, as their use in math.h was
|
|
* removed, but they are kept here in case a user was pointing to them.
|
|
* FIXME: deprecate these identifiers and then delete them. */
|
|
|
|
/* Float version of infinity. */
|
|
const union __fmath __infinityf[1] = { { FLT_MAX+FLT_MAX } };
|
|
|
|
/* Double version of infinity. */
|
|
const union __dmath __infinity[1] = { { DBL_MAX+DBL_MAX } };
|
|
|
|
/* Long double version of infinity. */
|
|
#if defined(_HAVE_LONG_DOUBLE)
|
|
const union __ldmath __infinityld[1] = { { LDBL_MAX+LDBL_MAX } };
|
|
#endif
|