Re: [xml] Patch for MinGW



Hi,

this hurts noone, so I applied it in CVS.

Thanks,
Igor


Magnus Henoch wrote:
Hi,

I ran into a small problem when building libxml on MinGW 2.0.0-3
with MSYS 1.0.8.  The functions isinf and isnan are already defined
as macros in the headers when they are redefined as functions in
include/win32config.h, which gives cryptic syntax errors.  My
patch solves this; I'm not sure whether it is the Right Thing,
though.  Maybe a more thought-through solution would be better.

Regards,
Magnus Henoch

diff -ru libxml2-2.4.28/include/win32config.h libxml2-2.4.28-patched/include/win32config.h
--- libxml2-2.4.28/include/win32config.h        Fri Nov 15 12:16:02 2002
+++ libxml2-2.4.28-patched/include/win32config.h        Wed Dec 11 17:15:33 2002
@@ -48,6 +48,7 @@
 #define isnan(d) (_isnan(d))
 #endif
 #else /* _MSC_VER */
+#ifndef isinf
 static int isinf (double d) {
     int expon = 0;
     double val = frexp (d, &expon);
@@ -63,6 +64,8 @@
         return 0;
     }
 }
+#endif /* isinf */
+#ifndef isnan
 static int isnan (double d) {
     int expon = 0;
     double val = frexp (d, &expon);
@@ -78,6 +81,7 @@
         return 0;
     }
 }
+#endif /* isnan */
 #endif /* _MSC_VER */
#if defined(_MSC_VER) || defined(__MINGW32__)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]