1 #ifndef __LIBXML_WIN32_CONFIG__
2 #define __LIBXML_WIN32_CONFIG__
9 #define GETHOSTBYNAME_ARG_CAST
11 #if defined(_WIN32_WCE)
14 #include "wincecompat.h"
16 #define HAVE_SYS_STAT_H
26 #include <libxml/xmlversion.h>
29 #define ICONV_CONST const
33 #include <wsockcompat.h>
37 * Windows platforms may define except
44 #if defined(_MSC_VER) || defined(__BORLANDC__)
45 /* MS C-runtime has functions which can be used in order to determine if
46 a given floating-point variable contains NaN, (+-)INF. These are
47 preferred, because floating-point technology is considered propriatary
48 by MS and we can assume that their functions know more about their
49 oddities than we do. */
51 /* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
54 #define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
55 : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
57 /* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
59 #define isnan(d) (_isnan(d))
63 static int isinf (double d
) {
65 double val
= frexp (d
, &expon
);
69 } else if (val
== -0.5) {
80 static int isnan (double d
) {
82 double val
= frexp (d
, &expon
);
86 } else if (val
== -0.5) {
99 #define mkdir(p,m) _mkdir(p)
101 #define snprintf _snprintf
104 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
106 #elif defined(__MINGW32__)
107 #define mkdir(p,m) _mkdir(p)
110 /* Threading API to use should be specified here for compatibility reasons.
111 This is however best specified on the compiler's command-line. */
112 #if defined(LIBXML_THREAD_ENABLED)
113 #if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
114 #define HAVE_WIN32_THREADS
118 /* Some third-party libraries far from our control assume the following
119 is defined, which it is not if we don't include windows.h. */
124 #define TRUE (!(FALSE))
127 #endif /* __LIBXML_WIN32_CONFIG__ */