|
1 | | - |
2 | | -/* Type cast for the gethostbyname() argument */ |
3 | | -#define GETHOSTBYNAME_ARG_CAST (char *) |
4 | | - |
5 | | -/* Define to 1 if you have the <arpa/inet.h> header file. */ |
6 | | -/* #undef HAVE_ARPA_INET_H */ |
7 | | - |
8 | | -/* Define to 1 if you have the <arpa/nameser.h> header file. */ |
9 | | -/* #undef HAVE_ARPA_NAMESER_H */ |
10 | | - |
11 | | -/* Whether struct sockaddr::__ss_family exists */ |
12 | | -/* #undef HAVE_BROKEN_SS_FAMILY */ |
13 | | - |
14 | | -/* Define to 1 if you have the <ctype.h> header file. */ |
15 | | -#define HAVE_CTYPE_H 1 |
16 | | - |
17 | | -/* Define to 1 if you have the <dirent.h> header file. */ |
18 | | -#define HAVE_DIRENT_H 1 |
19 | | - |
20 | | -/* Define to 1 if you have the <dlfcn.h> header file. */ |
21 | | -/* #undef HAVE_DLFCN_H */ |
22 | | - |
23 | | -/* Have dlopen based dso */ |
24 | | -/* #undef HAVE_DLOPEN */ |
25 | | - |
26 | | -/* Define to 1 if you have the <dl.h> header file. */ |
27 | | -/* #undef HAVE_DL_H */ |
28 | | - |
29 | | -/* Define to 1 if you have the <errno.h> header file. */ |
30 | | -#define HAVE_ERRNO_H 1 |
31 | | - |
32 | | -/* Define to 1 if you have the <fcntl.h> header file. */ |
33 | | -#define HAVE_FCNTL_H 1 |
34 | | - |
35 | | -/* Define to 1 if you have the <float.h> header file. */ |
36 | | -#define HAVE_FLOAT_H 1 |
37 | | - |
38 | | -/* Define to 1 if you have the `fprintf' function. */ |
39 | | -#define HAVE_FPRINTF 1 |
40 | | - |
41 | | -/* Define to 1 if you have the `ftime' function. */ |
42 | | -#define HAVE_FTIME 1 |
43 | | - |
44 | | -/* Define if getaddrinfo is there */ |
45 | | -/* #undef HAVE_GETADDRINFO */ |
46 | | - |
47 | | -/* Define to 1 if you have the `gettimeofday' function. */ |
48 | | -#define HAVE_GETTIMEOFDAY 1 |
49 | | - |
50 | | -/* Define to 1 if you have the <inttypes.h> header file. */ |
51 | | -#define HAVE_INTTYPES_H 1 |
52 | | - |
53 | | -/* Define to 1 if you have the `isascii' function. */ |
54 | | -#define HAVE_ISASCII 1 |
55 | | - |
56 | | -/* Define if isinf is there */ |
57 | | -#define HAVE_ISINF /**/ |
58 | | - |
59 | | -/* Define if isnan is there */ |
60 | | -#define HAVE_ISNAN /**/ |
61 | | - |
62 | | -/* Define to 1 if you have the `isnand' function. */ |
63 | | -/* #undef HAVE_ISNAND */ |
64 | | - |
65 | | -/* Define if history library is there (-lhistory) */ |
66 | | -/* #undef HAVE_LIBHISTORY */ |
67 | | - |
68 | | -/* Have compression library */ |
69 | | -#define HAVE_LIBLZMA 1 |
70 | | - |
71 | | -/* Define if pthread library is there (-lpthread) */ |
72 | | -/* #undef HAVE_LIBPTHREAD */ |
73 | | - |
74 | | -/* Define if readline library is there (-lreadline) */ |
75 | | -/* #undef HAVE_LIBREADLINE */ |
76 | | - |
77 | | -/* Have compression library */ |
78 | | -#define HAVE_LIBZ 1 |
79 | | - |
80 | | -/* Define to 1 if you have the <limits.h> header file. */ |
81 | | -#define HAVE_LIMITS_H 1 |
82 | | - |
83 | | -/* Define to 1 if you have the `localtime' function. */ |
84 | | -#define HAVE_LOCALTIME 1 |
85 | | - |
86 | | -/* Define to 1 if you have the <lzma.h> header file. */ |
87 | | -#define HAVE_LZMA_H 1 |
88 | | - |
89 | | -/* Define to 1 if you have the <malloc.h> header file. */ |
90 | | -#define HAVE_MALLOC_H 1 |
91 | | - |
92 | | -/* Define to 1 if you have the <math.h> header file. */ |
93 | | -#define HAVE_MATH_H 1 |
94 | | - |
95 | | -/* Define to 1 if you have the <memory.h> header file. */ |
96 | | -#define HAVE_MEMORY_H 1 |
97 | | - |
98 | | -/* Define to 1 if you have the `mmap' function. */ |
99 | | -/* #undef HAVE_MMAP */ |
100 | | - |
101 | | -/* Define to 1 if you have the `munmap' function. */ |
102 | | -/* #undef HAVE_MUNMAP */ |
103 | | - |
104 | | -/* mmap() is no good without munmap() */ |
105 | | -#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP) |
106 | | -# undef /**/ HAVE_MMAP |
| 1 | +#ifndef __LIBXML_WIN32_CONFIG__ |
| 2 | +#define __LIBXML_WIN32_CONFIG__ |
| 3 | + |
| 4 | +#define HAVE_CTYPE_H |
| 5 | +#define HAVE_STDARG_H |
| 6 | +#define HAVE_MALLOC_H |
| 7 | +#define HAVE_ERRNO_H |
| 8 | +#define SEND_ARG2_CAST |
| 9 | +#define GETHOSTBYNAME_ARG_CAST |
| 10 | + |
| 11 | +#if defined(_WIN32_WCE) |
| 12 | +#undef HAVE_ERRNO_H |
| 13 | +#include "wincecompat.h" |
| 14 | +#else |
| 15 | +#define HAVE_SYS_STAT_H |
| 16 | +#define HAVE_STAT |
| 17 | +#define HAVE_STDLIB_H |
| 18 | +#define HAVE_TIME_H |
| 19 | +#define HAVE_FCNTL_H |
| 20 | +#include <io.h> |
| 21 | +#include <direct.h> |
107 | 22 | #endif |
108 | 23 |
|
109 | | -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ |
110 | | -/* #undef HAVE_NDIR_H */ |
111 | | - |
112 | | -/* Define to 1 if you have the <netdb.h> header file. */ |
113 | | -/* #undef HAVE_NETDB_H */ |
114 | | - |
115 | | -/* Define to 1 if you have the <netinet/in.h> header file. */ |
116 | | -/* #undef HAVE_NETINET_IN_H */ |
117 | | - |
118 | | -/* Define to 1 if you have the <poll.h> header file. */ |
119 | | -/* #undef HAVE_POLL_H */ |
120 | | - |
121 | | -/* Define to 1 if you have the `printf' function. */ |
122 | | -#define HAVE_PRINTF 1 |
123 | | - |
124 | | -/* Define if <pthread.h> is there */ |
125 | | -/* #undef HAVE_PTHREAD_H */ |
126 | | -#define HAVE_WIN32_THREADS 1 |
127 | | - |
128 | | -/* Define to 1 if you have the `putenv' function. */ |
129 | | -#define HAVE_PUTENV 1 |
130 | | - |
131 | | -/* Define to 1 if you have the `rand' function. */ |
132 | | -#define HAVE_RAND 1 |
133 | | - |
134 | | -/* Define to 1 if you have the `rand_r' function. */ |
135 | | -/* #undef HAVE_RAND_R */ |
136 | | - |
137 | | -/* Define to 1 if you have the <resolv.h> header file. */ |
138 | | -/* #undef HAVE_RESOLV_H */ |
139 | | - |
140 | | -/* Have shl_load based dso */ |
141 | | -/* #undef HAVE_SHLLOAD */ |
142 | | - |
143 | | -/* Define to 1 if you have the `signal' function. */ |
144 | | -#define HAVE_SIGNAL 1 |
| 24 | +#include <libxml/xmlversion.h> |
145 | 25 |
|
146 | | -/* Define to 1 if you have the <signal.h> header file. */ |
147 | | -#define HAVE_SIGNAL_H 1 |
148 | | - |
149 | | -/* Define to 1 if you have the `snprintf' function. */ |
150 | | -#define HAVE_SNPRINTF 1 |
151 | | - |
152 | | -/* Define to 1 if you have the `sprintf' function. */ |
153 | | -#define HAVE_SPRINTF 1 |
154 | | - |
155 | | -/* Define to 1 if you have the `srand' function. */ |
156 | | -#define HAVE_SRAND 1 |
157 | | - |
158 | | -/* Define to 1 if you have the `sscanf' function. */ |
159 | | -#define HAVE_SSCANF 1 |
160 | | - |
161 | | -/* Define to 1 if you have the `stat' function. */ |
162 | | -#define HAVE_STAT 1 |
163 | | - |
164 | | -/* Define to 1 if you have the <stdarg.h> header file. */ |
165 | | -#define HAVE_STDARG_H 1 |
166 | | - |
167 | | -/* Define to 1 if you have the <stdint.h> header file. */ |
168 | | -#define HAVE_STDINT_H 1 |
169 | | - |
170 | | -/* Define to 1 if you have the <stdlib.h> header file. */ |
171 | | -#define HAVE_STDLIB_H 1 |
172 | | - |
173 | | -/* Define to 1 if you have the `strftime' function. */ |
174 | | -#define HAVE_STRFTIME 1 |
175 | | - |
176 | | -/* Define to 1 if you have the <strings.h> header file. */ |
177 | | -/* #undef HAVE_STRINGS_H */ |
178 | | - |
179 | | -/* Define to 1 if you have the <string.h> header file. */ |
180 | | -#define HAVE_STRING_H 1 |
181 | | - |
182 | | -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. |
183 | | - */ |
184 | | -/* #undef HAVE_SYS_DIR_H */ |
185 | | - |
186 | | -/* Define to 1 if you have the <sys/mman.h> header file. */ |
187 | | -/* #undef HAVE_SYS_MMAN_H */ |
188 | | - |
189 | | -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. |
190 | | - */ |
191 | | -/* #undef HAVE_SYS_NDIR_H */ |
192 | | - |
193 | | -/* Define to 1 if you have the <sys/select.h> header file. */ |
194 | | -/* #undef HAVE_SYS_SELECT_H */ |
195 | | - |
196 | | -/* Define to 1 if you have the <sys/socket.h> header file. */ |
197 | | -/* #undef HAVE_SYS_SOCKET_H */ |
198 | | - |
199 | | -/* Define to 1 if you have the <sys/stat.h> header file. */ |
200 | | -#define HAVE_SYS_STAT_H 1 |
201 | | - |
202 | | -/* Define to 1 if you have the <sys/timeb.h> header file. */ |
203 | | -#define HAVE_SYS_TIMEB_H 1 |
204 | | - |
205 | | -/* Define to 1 if you have the <sys/time.h> header file. */ |
206 | | -/* #undef HAVE_SYS_TIME_H */ |
207 | | - |
208 | | -/* Define to 1 if you have the <sys/types.h> header file. */ |
209 | | -#define HAVE_SYS_TYPES_H 1 |
210 | | - |
211 | | -/* Define to 1 if you have the `time' function. */ |
212 | | -#define HAVE_TIME 1 |
213 | | - |
214 | | -/* Define to 1 if you have the <time.h> header file. */ |
215 | | -#define HAVE_TIME_H 1 |
216 | | - |
217 | | -/* Define to 1 if you have the <unistd.h> header file. */ |
218 | | -/* #undef HAVE_UNISTD_H */ |
219 | | - |
220 | | -/* Whether va_copy() is available */ |
221 | | -#define HAVE_VA_COPY 1 |
222 | | - |
223 | | -/* Define to 1 if you have the `vfprintf' function. */ |
224 | | -#define HAVE_VFPRINTF 1 |
225 | | - |
226 | | -/* Define to 1 if you have the `vsnprintf' function. */ |
227 | | -#define HAVE_VSNPRINTF 1 |
228 | | - |
229 | | -/* Define to 1 if you have the `vsprintf' function. */ |
230 | | -#define HAVE_VSPRINTF 1 |
231 | | - |
232 | | -/* Define to 1 if you have the <zlib.h> header file. */ |
233 | | -#define HAVE_ZLIB_H 1 |
234 | | - |
235 | | -/* Define to 1 if you have the `_stat' function. */ |
236 | | -#define HAVE__STAT 1 |
237 | | - |
238 | | -/* Whether __va_copy() is available */ |
239 | | -/* #undef HAVE___VA_COPY */ |
240 | | - |
241 | | -/* Define as const if the declaration of iconv() needs const. */ |
242 | | -#define ICONV_CONST |
243 | | - |
244 | | -/* Type cast for the send() function 2nd arg */ |
245 | | -#define SEND_ARG2_CAST (char *) |
246 | | - |
247 | | -/* Define to 1 if you have the ANSI C header files. */ |
248 | | -#define STDC_HEADERS 1 |
| 26 | +#ifndef ICONV_CONST |
| 27 | +#define ICONV_CONST const |
| 28 | +#endif |
249 | 29 |
|
250 | | -/* Support for IPv6 */ |
251 | | -/* #undef SUPPORT_IP6 */ |
| 30 | +/* |
| 31 | + * Windows platforms may define except |
| 32 | + */ |
| 33 | +#undef except |
| 34 | + |
| 35 | +#define HAVE_ISINF |
| 36 | +#define HAVE_ISNAN |
| 37 | +#include <math.h> |
| 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. */ |
| 44 | +#include <float.h> |
| 45 | +/* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass |
| 46 | + function. */ |
| 47 | +#ifndef isinf |
| 48 | +#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \ |
| 49 | + : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0)) |
| 50 | +#endif |
| 51 | +/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */ |
| 52 | +#ifndef isnan |
| 53 | +#define isnan(d) (_isnan(d)) |
| 54 | +#endif |
| 55 | +#else /* _MSC_VER */ |
| 56 | +#ifndef isinf |
| 57 | +static int isinf (double d) { |
| 58 | + int expon = 0; |
| 59 | + double val = frexp (d, &expon); |
| 60 | + if (expon == 1025) { |
| 61 | + if (val == 0.5) { |
| 62 | + return 1; |
| 63 | + } else if (val == -0.5) { |
| 64 | + return -1; |
| 65 | + } else { |
| 66 | + return 0; |
| 67 | + } |
| 68 | + } else { |
| 69 | + return 0; |
| 70 | + } |
| 71 | +} |
| 72 | +#endif |
| 73 | +#ifndef isnan |
| 74 | +static int isnan (double d) { |
| 75 | + int expon = 0; |
| 76 | + double val = frexp (d, &expon); |
| 77 | + if (expon == 1025) { |
| 78 | + if (val == 0.5) { |
| 79 | + return 0; |
| 80 | + } else if (val == -0.5) { |
| 81 | + return 0; |
| 82 | + } else { |
| 83 | + return 1; |
| 84 | + } |
| 85 | + } else { |
| 86 | + return 0; |
| 87 | + } |
| 88 | +} |
| 89 | +#endif |
| 90 | +#endif /* _MSC_VER */ |
252 | 91 |
|
253 | | -/* Define if va_list is an array type */ |
254 | | -/* #undef VA_LIST_IS_ARRAY */ |
| 92 | +#if defined(_MSC_VER) |
| 93 | +#define mkdir(p,m) _mkdir(p) |
| 94 | +#if _MSC_VER < 1900 |
| 95 | +#define snprintf _snprintf |
| 96 | +#endif |
| 97 | +#if _MSC_VER < 1500 |
| 98 | +#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a) |
| 99 | +#endif |
| 100 | +#elif defined(__MINGW32__) |
| 101 | +#define mkdir(p,m) _mkdir(p) |
| 102 | +#endif |
255 | 103 |
|
256 | | -/* Determine what socket length (socklen_t) data type is */ |
257 | | -#define XML_SOCKLEN_T int |
| 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 |
| 109 | +#endif |
| 110 | +#endif |
258 | 111 |
|
259 | | -/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, |
260 | | - <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the |
261 | | - #define below would cause a syntax error. */ |
262 | | -/* #undef _UINT32_T */ |
| 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. */ |
| 114 | +#if !defined(FALSE) |
| 115 | +#define FALSE 0 |
| 116 | +#endif |
| 117 | +#if !defined(TRUE) |
| 118 | +#define TRUE (!(FALSE)) |
| 119 | +#endif |
263 | 120 |
|
264 | | -/* Using the Win32 Socket implementation */ |
265 | | -#define _WINSOCKAPI_ 1 |
| 121 | +#endif /* __LIBXML_WIN32_CONFIG__ */ |
266 | 122 |
|
267 | | -#ifdef NEED_SOCKETS |
268 | | -#include <wsockcompat.h> |
269 | | -#endif |
0 commit comments