From 064df4b419780552f45554cb019a4901e0b5bb53 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Fri, 7 Aug 2009 01:03:09 +0000 Subject: [PATCH] modified include/crt/float.h added include/crt/msc/msc_float.h Implement for Visual C++ svn path=/trunk/; revision=42443 --- reactos/include/crt/float.h | 10 +++++-- reactos/include/crt/msc/msc_float.h | 44 +++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 reactos/include/crt/msc/msc_float.h diff --git a/reactos/include/crt/float.h b/reactos/include/crt/float.h index 56d277061d9..caa2d0df90b 100644 --- a/reactos/include/crt/float.h +++ b/reactos/include/crt/float.h @@ -1,4 +1,4 @@ -/* +/* * float.h * This file has no copyright assigned and is placed in the Public Domain. * This file is a part of the mingw-runtime package. @@ -12,7 +12,7 @@ * NOTE: GCC provides float.h, but it doesn't include the non-standard * stuff for accessing the fp controller. We include_next the * GCC-supplied header and just define the MS-specific extensions - * here. + * here. * */ @@ -20,6 +20,10 @@ #include_next #endif +#ifdef _MSC_VER +#include +#endif + #ifndef _MINGW_FLOAT_H_ #define _MINGW_FLOAT_H_ @@ -117,7 +121,7 @@ _CRTIMP unsigned int __cdecl __attribute__ ((__nothrow__)) _statusfp (void); /* word to 0x37f (64 bit mantissa precison rather than 53 bit). By default, the mingw version of _fpreset sets fp control as per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when - building your application. + building your application. */ void __cdecl __attribute__ ((__nothrow__)) _fpreset (void); void __cdecl __attribute__ ((__nothrow__)) fpreset (void); diff --git a/reactos/include/crt/msc/msc_float.h b/reactos/include/crt/msc/msc_float.h new file mode 100644 index 00000000000..6be230c3252 --- /dev/null +++ b/reactos/include/crt/msc/msc_float.h @@ -0,0 +1,44 @@ +#ifndef _FLOAT_H___ +#define _FLOAT_H___ + +#define FLT_RADIX 2 + +#define FLT_MANT_DIG 24 +#define DBL_MANT_DIG 53 +#define LDBL_MANT_DIG DBL_MANT_DIG + +#define FLT_DIG 6 +#define DBL_DIG 15 +#define LDBL_DIG 15 + +#define FLT_MIN_EXP (-125) +#define DBL_MIN_EXP (-1021) +#define LDBL_MIN_EXP (-1021) + +#define FLT_MIN_10_EXP (-37) +#define DBL_MIN_10_EXP (-307) +#define LDBL_MIN_10_EXP (-307) + +#define FLT_MAX_EXP 128 +#define DBL_MAX_EXP 1024 +#define LDBL_MAX_EXP 1024 + +#define FLT_MAX_10_EXP 38 +#define DBL_MAX_10_EXP 308 +#define LDBL_MAX_10_EXP 308 + +#define FLT_MAX 3.402823466e+38F +#define DBL_MAX 1.7976931348623158e+308 +#define LDBL_MAX 1.7976931348623158e+308 + +#define FLT_EPSILON 1.192092896e-07F +#define DBL_EPSILON 2.2204460492503131e-016 +#define LDBL_EPSILON 2.2204460492503131e-016 + +#define FLT_MIN 1.175494351e-38F +#define DBL_MIN 2.2250738585072014e-308 +#define LDBL_MIN 2.2250738585072014e-308 + +#define FLT_ROUNDS 1 + +#endif