mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-05 05:47:00 +03:00
More changes for Win32 compilation
This commit is contained in:
parent
414f269a4f
commit
e02869807e
27
testlimits.c
27
testlimits.c
@ -23,7 +23,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
@ -42,35 +42,20 @@ static int tests_quiet = 0;
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/* maximum time for one parsing befor declaring a timeout */
|
||||
/* maximum time for one parsing before declaring a timeout */
|
||||
#define MAX_TIME 2 /* seconds */
|
||||
|
||||
struct timeval t0;
|
||||
struct timeval tnow;
|
||||
static clock_t t0;
|
||||
int timeout = 0;
|
||||
|
||||
static void reset_timout(void) {
|
||||
timeout = 0;
|
||||
gettimeofday(&t0, NULL);
|
||||
}
|
||||
|
||||
static unsigned long delta_timeval(void) {
|
||||
unsigned long ret;
|
||||
|
||||
if (tnow.tv_usec < t0.tv_usec) {
|
||||
ret = 1000000 + tnow.tv_usec;
|
||||
ret -= t0.tv_usec;
|
||||
ret += (tnow.tv_sec - t0.tv_sec -1) * 1000000;
|
||||
} else {
|
||||
ret = tnow.tv_usec - t0.tv_usec;
|
||||
ret += (tnow.tv_sec - t0.tv_sec) * 1000000;
|
||||
}
|
||||
return(ret);
|
||||
t0 = clock();
|
||||
}
|
||||
|
||||
static int check_time(void) {
|
||||
gettimeofday(&tnow, NULL);
|
||||
if (delta_timeval() > MAX_TIME * 1000000) {
|
||||
clock_t tnow = clock();
|
||||
if (((tnow - t0) / CLOCKS_PER_SEC) > MAX_TIME) {
|
||||
timeout = 1;
|
||||
return(0);
|
||||
}
|
||||
|
@ -262,7 +262,8 @@ UTILS = $(BINDIR)\xmllint.exe\
|
||||
$(BINDIR)\testXPath.exe\
|
||||
$(BINDIR)\runtest.exe\
|
||||
$(BINDIR)\runsuite.exe\
|
||||
$(BINDIR)\testapi.exe
|
||||
$(BINDIR)\testapi.exe\
|
||||
$(BINDIR)\testlimits.exe
|
||||
|
||||
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
|
||||
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
|
||||
|
@ -553,6 +553,11 @@ xmlAutomataSetFinalState
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
xmlBoolToText
|
||||
#endif
|
||||
xmlBufContent
|
||||
xmlBufEnd
|
||||
xmlBufGetNodeContent
|
||||
xmlBufNodeDump
|
||||
xmlBufUse
|
||||
xmlBufferAdd
|
||||
xmlBufferAddHead
|
||||
xmlBufferCCat
|
||||
@ -561,6 +566,7 @@ xmlBufferContent
|
||||
xmlBufferCreate
|
||||
xmlBufferCreateSize
|
||||
xmlBufferCreateStatic
|
||||
xmlBufferDetach
|
||||
xmlBufferDump
|
||||
xmlBufferEmpty
|
||||
xmlBufferFree
|
||||
@ -765,10 +771,12 @@ xmlDictCreate
|
||||
xmlDictCreateSub
|
||||
xmlDictExists
|
||||
xmlDictFree
|
||||
xmlDictGetUsage
|
||||
xmlDictLookup
|
||||
xmlDictOwns
|
||||
xmlDictQLookup
|
||||
xmlDictReference
|
||||
xmlDictSetLimit
|
||||
xmlDictSize
|
||||
xmlDllMain
|
||||
xmlDocCopyNode
|
||||
@ -992,6 +1000,7 @@ xmlInitThreads
|
||||
#ifdef LIBXML_CATALOG_ENABLED
|
||||
xmlInitializeCatalog
|
||||
#endif
|
||||
xmlInitializeDict
|
||||
xmlInitializeGlobalState
|
||||
xmlInitializePredefinedEntities
|
||||
xmlIsBaseChar
|
||||
@ -1292,6 +1301,8 @@ xmlOutputBufferCreateFilename
|
||||
xmlOutputBufferCreateFilenameDefault
|
||||
xmlOutputBufferCreateIO
|
||||
xmlOutputBufferFlush
|
||||
xmlOutputBufferGetContent
|
||||
xmlOutputBufferGetSize
|
||||
xmlOutputBufferWrite
|
||||
xmlOutputBufferWriteEscape
|
||||
xmlOutputBufferWriteString
|
||||
@ -1590,22 +1601,12 @@ xmlSAXParseMemoryWithData
|
||||
xmlSAXUserParseFile
|
||||
xmlSAXUserParseMemory
|
||||
xmlSAXVersion
|
||||
xmlSaveClose
|
||||
xmlSaveDoc
|
||||
xmlSaveFile
|
||||
xmlSaveFileEnc
|
||||
xmlSaveFileTo
|
||||
xmlSaveFlush
|
||||
xmlSaveFormatFile
|
||||
xmlSaveFormatFileEnc
|
||||
xmlSaveFormatFileTo
|
||||
xmlSaveSetAttrEscape
|
||||
xmlSaveSetEscape
|
||||
xmlSaveToBuffer
|
||||
xmlSaveToFd
|
||||
xmlSaveToFilename
|
||||
xmlSaveToIO
|
||||
xmlSaveTree
|
||||
xmlSaveUri
|
||||
xmlScanName
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
@ -1960,6 +1961,7 @@ xmlTextReaderRelaxNGSetSchema
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
xmlTextReaderRelaxNGValidate
|
||||
#endif
|
||||
xmlTextReaderRelaxNGValidateCtxt
|
||||
xmlTextReaderSchemaValidate
|
||||
xmlTextReaderSchemaValidateCtxt
|
||||
xmlTextReaderSetErrorHandler
|
||||
|
Loading…
x
Reference in New Issue
Block a user