123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- #ifndef __LIBXML_WIN32_CONFIG__
- #define __LIBXML_WIN32_CONFIG__
- #define HAVE_CTYPE_H
- #define HAVE_STDARG_H
- #define HAVE_MALLOC_H
- #define HAVE_ERRNO_H
- #if defined(_WIN32_WCE)
- #undef HAVE_ERRNO_H
- #include <windows.h>
- #include "wincecompat.h"
- #else
- #define HAVE_SYS_STAT_H
- #define HAVE__STAT
- #define HAVE_STAT
- #define HAVE_STDLIB_H
- #define HAVE_TIME_H
- #define HAVE_FCNTL_H
- #include <io.h>
- #include <direct.h>
- #endif
- #include <libxml/xmlversion.h>
- #ifndef ICONV_CONST
- #define ICONV_CONST const
- #endif
- #ifdef NEED_SOCKETS
- #include <wsockcompat.h>
- #endif
- #undef except
- #define HAVE_ISINF
- #define HAVE_ISNAN
- #include <math.h>
- #if defined(_MSC_VER) || defined(__BORLANDC__)
- #include <float.h>
- #ifndef isinf
- #define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
- : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
- #endif
- #ifndef isnan
- #define isnan(d) (_isnan(d))
- #endif
- #else
- #ifndef isinf
- static int isinf (double d) {
- int expon = 0;
- double val = frexp (d, &expon);
- if (expon == 1025) {
- if (val == 0.5) {
- return 1;
- } else if (val == -0.5) {
- return -1;
- } else {
- return 0;
- }
- } else {
- return 0;
- }
- }
- #endif
- #ifndef isnan
- static int isnan (double d) {
- int expon = 0;
- double val = frexp (d, &expon);
- if (expon == 1025) {
- if (val == 0.5) {
- return 0;
- } else if (val == -0.5) {
- return 0;
- } else {
- return 1;
- }
- } else {
- return 0;
- }
- }
- #endif
- #endif
- #if defined(_MSC_VER)
- #define mkdir(p,m) _mkdir(p)
- #define snprintf _snprintf
- #if _MSC_VER < 1500
- #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
- #endif
- #elif defined(__MINGW32__)
- #define mkdir(p,m) _mkdir(p)
- #endif
- #if defined(LIBXML_THREAD_ENABLED)
- #if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
- #define HAVE_WIN32_THREADS
- #endif
- #endif
- #if !defined(FALSE)
- #define FALSE 0
- #endif
- #if !defined(TRUE)
- #define TRUE (!(FALSE))
- #endif
- #endif
|