[ros-diffs] [hyperion] 42443: modified include/crt/float.h added include/crt/msc/msc_float.h Implement <float.h> for Visual C++

hyperion at svn.reactos.org hyperion at svn.reactos.org
Fri Aug 7 03:03:09 CEST 2009


Author: hyperion
Date: Fri Aug  7 03:03:09 2009
New Revision: 42443

URL: http://svn.reactos.org/svn/reactos?rev=42443&view=rev
Log:
modified   include/crt/float.h
added      include/crt/msc/msc_float.h
   Implement <float.h> for Visual C++

Added:
    trunk/reactos/include/crt/msc/msc_float.h   (with props)
Modified:
    trunk/reactos/include/crt/float.h

Modified: trunk/reactos/include/crt/float.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/float.h?rev=42443&r1=42442&r2=42443&view=diff
==============================================================================
--- trunk/reactos/include/crt/float.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/float.h [iso-8859-1] Fri Aug  7 03:03:09 2009
@@ -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,12 +12,16 @@
  * 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.
  *
  */
 
 #ifdef __GNUC__
 #include_next<float.h>
+#endif
+
+#ifdef _MSC_VER
+#include <msc_float.h>
 #endif
 
 #ifndef _MINGW_FLOAT_H_
@@ -117,7 +121,7 @@
    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);

Added: trunk/reactos/include/crt/msc/msc_float.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/msc/msc_float.h?rev=42443&view=auto
==============================================================================
--- trunk/reactos/include/crt/msc/msc_float.h (added)
+++ trunk/reactos/include/crt/msc/msc_float.h [iso-8859-1] Fri Aug  7 03:03:09 2009
@@ -1,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

Propchange: trunk/reactos/include/crt/msc/msc_float.h
------------------------------------------------------------------------------
    svn:eol-style = native




More information about the Ros-diffs mailing list