Add definition for HUGE_VAL

Dimitrie O. Paun dimi at intelliware.ca
Thu Apr 8 15:26:22 CDT 2004


ChangeLog
    Dimitrie O. Paun <dpaun at rogers.com>
    Add definition for HUGE_VAL.

Index: include/msvcrt/math.h
===================================================================
RCS file: /var/cvs/wine/include/msvcrt/math.h,v
retrieving revision 1.2
diff -u -r1.2 math.h
--- include/msvcrt/math.h	12 Mar 2004 19:47:20 -0000	1.2
+++ include/msvcrt/math.h	8 Apr 2004 16:18:15 -0000
@@ -86,6 +86,18 @@
 int MSVCRT(_matherr)(struct MSVCRT(_exception)*);
 double MSVCRT(_cabs)(struct MSVCRT(_complex));
 
+#ifndef HUGE_VAL
+#  if defined(__GNUC__) && (__GNUC__ >= 3)
+#    define HUGE_VAL    (__extension__ 0x1.0p2047)
+#  else
+static union { 
+    unsigned char __c[8];
+    double __d;
+} __huge_val = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
+#    define HUGE_VAL    (__huge_val.__d)
+#  endif
+#endif
+
 #ifdef __cplusplus
 }
 #endif

-- 
Dimi.






More information about the wine-patches mailing list