2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (HUGE_VALF, HUGE_VALL): New. * libm/common/Makefile.am: Add s_infconst.c support. * libm/common/Makefile.in: Regenerated. * libm/common/s_infconst.c: New file with float and long double infinity support added. * libm/math/Makefile.am: Remove s_infconst.c support. * libm/math/Makefile.in: Regenerated. * libm/math/s_infconst.c: Moved to common directory. * libm/mathfp/Makefile.am: Remove s_infconst.c support. * libm/mathfp/Makefile.in: Regenerated. * libm/mathfp/s_infconst.c: Moved to common directory.
This commit is contained in:
@ -14,18 +14,34 @@ _BEGIN_STD_C
|
||||
/* Define HUGE_VAL as infinity, unless HUGE_VAL is already defined
|
||||
(which might have been done by something like math-68881.h). */
|
||||
|
||||
union __fmath
|
||||
{
|
||||
__ULong i[1];
|
||||
float f;
|
||||
};
|
||||
|
||||
union __dmath
|
||||
{
|
||||
__ULong i[2];
|
||||
double d;
|
||||
};
|
||||
|
||||
union __ldmath
|
||||
{
|
||||
__ULong i[4];
|
||||
_LONG_DOUBLE ld;
|
||||
};
|
||||
|
||||
/* Declare this as an array without bounds so that no matter what small data
|
||||
support a port and/or library has, this reference will be via the general
|
||||
method for accessing globals. */
|
||||
extern __IMPORT const union __dmath __infinity[];
|
||||
extern __IMPORT const union __fmath __infinityf[];
|
||||
extern __IMPORT const union __ldmath __infinityld[];
|
||||
|
||||
#define HUGE_VAL (__infinity[0].d)
|
||||
#define HUGE_VALF (__infinityf[0].f)
|
||||
#define HUGE_VALL (__infinityld[0].ld)
|
||||
|
||||
#endif /* ! defined (HUGE_VAL) */
|
||||
|
||||
|
Reference in New Issue
Block a user