blob: 75471b0c63816e45230139cace150bed8312ddf4 [file] [log] [blame]
Daniel Veillard4151acb2001-06-22 10:48:57 +00001#ifndef __LIBXML_WIN32_CONFIG__
2#define __LIBXML_WIN32_CONFIG__
3
Owen Taylor3473f882001-02-23 17:55:21 +00004#define HAVE_CTYPE_H
5#define HAVE_STDLIB_H
6#define HAVE_MALLOC_H
7#define HAVE_TIME_H
8#define HAVE_FCNTL_H
9
10#include <io.h>
11
Daniel Veillard4151acb2001-06-22 10:48:57 +000012#ifndef LIBXML_DLL_IMPORT
Owen Taylor3473f882001-02-23 17:55:21 +000013#define LIBXML_DLL_IMPORT
Daniel Veillard4151acb2001-06-22 10:48:57 +000014#endif
Owen Taylor3473f882001-02-23 17:55:21 +000015#define SOCKLEN_T int
16
Daniel Veillardf3afa7d2001-06-09 13:52:58 +000017#ifdef NEED_SOCKETS
Owen Taylor3473f882001-02-23 17:55:21 +000018#include <winsock2.h>
19
20#define EWOULDBLOCK WSAEWOULDBLOCK
21#define EINPROGRESS WSAEINPROGRESS
22#define EALREADY WSAEALREADY
23#define ENOTSOCK WSAENOTSOCK
24#define EDESTADDRREQ WSAEDESTADDRREQ
25#define EMSGSIZE WSAEMSGSIZE
26#define EPROTOTYPE WSAEPROTOTYPE
27#define ENOPROTOOPT WSAENOPROTOOPT
28#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
29#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
30#define EOPNOTSUPP WSAEOPNOTSUPP
31#define EPFNOSUPPORT WSAEPFNOSUPPORT
32#define EAFNOSUPPORT WSAEAFNOSUPPORT
33#define EADDRINUSE WSAEADDRINUSE
34#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
35#define ENETDOWN WSAENETDOWN
36#define ENETUNREACH WSAENETUNREACH
37#define ENETRESET WSAENETRESET
38#define ECONNABORTED WSAECONNABORTED
39#define ECONNRESET WSAECONNRESET
40#define ENOBUFS WSAENOBUFS
41#define EISCONN WSAEISCONN
42#define ENOTCONN WSAENOTCONN
43#define ESHUTDOWN WSAESHUTDOWN
44#define ETOOMANYREFS WSAETOOMANYREFS
45#define ETIMEDOUT WSAETIMEDOUT
46#define ECONNREFUSED WSAECONNREFUSED
47#define ELOOP WSAELOOP
48#define ENAMETOOLONG WSAENAMETOOLONG
49#define EHOSTDOWN WSAEHOSTDOWN
50#define EHOSTUNREACH WSAEHOSTUNREACH
51#define ENOTEMPTY WSAENOTEMPTY
52#define EPROCLIM WSAEPROCLIM
53#define EUSERS WSAEUSERS
54#define EDQUOT WSAEDQUOT
55#define ESTALE WSAESTALE
56#define EREMOTE WSAEREMOTE
57#endif /* INCLUDE_WINSOCK */
58
59#define HAVE_ISINF
60#define HAVE_ISNAN
61
62#include <math.h>
63static int isinf (double d) {
64 int expon = 0;
65 double val = frexp (d, &expon);
66 if (expon == 1025) {
67 if (val == 0.5) {
68 return 1;
69 } else if (val == -0.5) {
70 return -1;
71 } else {
72 return 0;
73 }
74 } else {
75 return 0;
76 }
77}
78static int isnan (double d) {
79 int expon = 0;
80 double val = frexp (d, &expon);
81 if (expon == 1025) {
82 if (val == 0.5) {
83 return 0;
84 } else if (val == -0.5) {
85 return 0;
86 } else {
87 return 1;
88 }
89 } else {
90 return 0;
91 }
92}
93
94#include <direct.h>
95
Daniel Veillard2d90de42001-04-16 17:46:18 +000096#define HAVE_SYS_STAT_H
97#define HAVE__STAT
98
99/* Microsoft's C runtime names all non-ANSI functions with a leading
100 underscore. Since functionality is still the same, they can be used. */
101#ifdef _MSC_VER
Daniel Veillardf3afa7d2001-06-09 13:52:58 +0000102#include <libxml/xmlversion.h>
103#ifndef WITH_TRIO
Daniel Veillard2d90de42001-04-16 17:46:18 +0000104#define snprintf _snprintf
105#define vsnprintf _vsnprintf
Daniel Veillardf3afa7d2001-06-09 13:52:58 +0000106#endif /* WITH_TRIO */
Daniel Veillard2d90de42001-04-16 17:46:18 +0000107#endif /* _MSC_VER */
Owen Taylor3473f882001-02-23 17:55:21 +0000108
Daniel Veillardcc146db2001-06-22 11:10:52 +0000109
110#ifndef ATTRIBUTE_UNUSED
111#define ATTRIBUTE_UNUSED
112#endif
113
Daniel Veillard4151acb2001-06-22 10:48:57 +0000114#endif /* __LIBXML_WIN32_CONFIG__ */
115