1 #ifndef __LIBXML_WIN32_CONFIG__
2 #define __LIBXML_WIN32_CONFIG__
10 #if defined(_WIN32_WCE)
12 #include "wincecompat.h"
14 #define HAVE_SYS_STAT_H
24 #include <libxml/xmlversion.h>
27 #define ICONV_CONST const
31 * Windows platforms may define except
38 #if defined(_MSC_VER) || defined(__BORLANDC__)
39 /* MS C-runtime has functions which can be used in order to determine if
40 a given floating-point variable contains NaN, (+-)INF. These are
41 preferred, because floating-point technology is considered propriatary
42 by MS and we can assume that their functions know more about their
43 oddities than we do. */
45 /* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
48 #define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
49 : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
51 /* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
53 #define isnan(d) (_isnan(d))
57 static int isinf (double d) {
59 double val = frexp (d, &expon);
63 } else if (val == -0.5) {
74 static int isnan (double d) {
76 double val = frexp (d, &expon);
80 } else if (val == -0.5) {
93 #define mkdir(p,m) _mkdir(p)
94 #if _MSC_VER < 1900 // Cannot define this in VS 2015 and above!
95 #define snprintf _snprintf
98 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
100 #elif defined(__MINGW32__)
101 #define mkdir(p,m) _mkdir(p)
104 /* Threading API to use should be specified here for compatibility reasons.
105 This is however best specified on the compiler's command-line. */
106 #if defined(LIBXML_THREAD_ENABLED)
107 #if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
108 #define HAVE_WIN32_THREADS
112 /* Some third-party libraries far from our control assume the following
113 is defined, which it is not if we don't include windows.h. */
118 #define TRUE (!(FALSE))
121 #endif /* __LIBXML_WIN32_CONFIG__ */