mirror of
https://github.com/GNOME/libxml2.git
synced 2025-02-11 18:09:31 +08:00
- changed the way Windows socket stuff get included - removed an indetermination xmLDecl/PI(xml...) - xmlNewNs wasn't checking for double definition - fixed a problem with dist-hook duplicates - fixed the loading of external entities APIs, now xmlLoadExternalEntity() is used everywhere - now the xhtml spec validates with the xhtml DTD. - error.c: fixed crashes in case of no input stream - added the xhtml spec and dtds to the validation tests and results Daniel
84 lines
2.5 KiB
C
84 lines
2.5 KiB
C
#define HAVE_CTYPE_H
|
|
#define HAVE_STDLIB_H
|
|
#define HAVE_MALLOC_H
|
|
#define HAVE_TIME_H
|
|
#define HAVE_FCNTL_H
|
|
|
|
#define LIBXML_VERSION "@LIBXML_VERSION@"
|
|
|
|
#include <io.h>
|
|
|
|
#ifdef INCLUDE_WINSOCK
|
|
#include <winsock2.h>
|
|
|
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
|
#define EINPROGRESS WSAEINPROGRESS
|
|
#define EALREADY WSAEALREADY
|
|
#define ENOTSOCK WSAENOTSOCK
|
|
#define EDESTADDRREQ WSAEDESTADDRREQ
|
|
#define EMSGSIZE WSAEMSGSIZE
|
|
#define EPROTOTYPE WSAEPROTOTYPE
|
|
#define ENOPROTOOPT WSAENOPROTOOPT
|
|
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
|
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
|
#define EOPNOTSUPP WSAEOPNOTSUPP
|
|
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
|
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
|
#define EADDRINUSE WSAEADDRINUSE
|
|
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
|
#define ENETDOWN WSAENETDOWN
|
|
#define ENETUNREACH WSAENETUNREACH
|
|
#define ENETRESET WSAENETRESET
|
|
#define ECONNABORTED WSAECONNABORTED
|
|
#define ECONNRESET WSAECONNRESET
|
|
#define ENOBUFS WSAENOBUFS
|
|
#define EISCONN WSAEISCONN
|
|
#define ENOTCONN WSAENOTCONN
|
|
#define ESHUTDOWN WSAESHUTDOWN
|
|
#define ETOOMANYREFS WSAETOOMANYREFS
|
|
#define ETIMEDOUT WSAETIMEDOUT
|
|
#define ECONNREFUSED WSAECONNREFUSED
|
|
#define ELOOP WSAELOOP
|
|
#define ENAMETOOLONG WSAENAMETOOLONG
|
|
#define EHOSTDOWN WSAEHOSTDOWN
|
|
#define EHOSTUNREACH WSAEHOSTUNREACH
|
|
#define ENOTEMPTY WSAENOTEMPTY
|
|
#define EPROCLIM WSAEPROCLIM
|
|
#define EUSERS WSAEUSERS
|
|
#define EDQUOT WSAEDQUOT
|
|
#define ESTALE WSAESTALE
|
|
#define EREMOTE WSAEREMOTE
|
|
#endif /* INCLUDE_WINSOCK */
|
|
|
|
#include <math.h>
|
|
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;
|
|
}
|
|
}
|
|
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;
|
|
}
|
|
}
|