GNOME Bugzilla – Bug 58020
xslt 1.0.1 win2k misc compilation problems
Last modified: 2009-08-15 18:40:50 UTC
Compiler MSVC 6 SP 6 OS Win2k sp 2 xslt 1.0.1 (Last changelog entry Tue Jul 24 17:45:22 CEST 2001) xml2 2.14.1 (Last changelog entry Tue Jul 24 15:39:11 CEST 2001) xml2 built using libxml2_a/ debug configuration xslt built using libxslt/debug configuration Multiple definitions ==================== HAVE_ISINF HAVE_ISNAN Had to put an #ifdef HAVE_ISINF/#define HAVE_ISINF/#endif (also ISNAN) in number.c and win32config.h. In documents.c near 242 ======================= Function xsltFindDocument is supposed to return a xsltDocPtr but the return at line 242 is an xsltStylesheetPtr. They do not appear to be similar structures. In xsltutils.h near line 125 ============================ #define XSLT_TIMESTAMP_TICS_PER_SEC 100000l Should be 10,000 if you want 0.1 msec resolution. In xsltutils.h the preprocessor symbol XSLT_WIN32_PERFORMANCE_COUNTER is never defined. In win32 project, xsltproc.c points to a file in the old location, not the current location, I think. File strio.h near line ? ======================== #ifndef DEBUG #ifndef NDEBUG # define NDEBUG #endif #endif Otherwise I get errors when NDEBUG already defined (for a Release build). In xsltutils.c ============== In xsltTimeStamp: I forgot that xslt defines HAVE_GETTIME because it uses the timval struct for some other function (select ?). Therefore the tests must be reversed so that the XSLT_WIN32_PERFORMANCE_COUNTER comes first: long xsltTimestamp(void) { #ifdef XSLT_WIN32_PERFORMANCE_COUNTER BOOL ok; LARGE_INTEGER performanceCount; LARGE_INTEGER performanceFrequency; LONGLONG quadCount; double seconds; static LONGLONG startupQuadCount = 0; static LONGLONG startupQuadFreq = 0; ok = QueryPerformanceCounter(&performanceCount); if (!ok) return 0; quadCount = performanceCount.QuadPart; if (calibration < 0) { calibration = 0; ok = QueryPerformanceFrequency(&performanceFrequency); if (!ok) return 0; startupQuadFreq = performanceFrequency.QuadPart; startupQuadCount = quadCount; return (0); } if (startupQuadFreq == 0) return 0; seconds = (quadCount - startupQuadCount) / (double) startupQuadFreq; return (long) (seconds * XSLT_TIMESTAMP_TICS_PER_SEC); #else /* XSLT_WIN32_PERFORMANCE_COUNTER */ #ifdef HAVE_GETTIMEOFDAY static struct timeval startup; struct timeval cur; long tics; if (calibration < 0) { gettimeofday(&startup, NULL); calibration = 0; calibration = xsltCalibrateTimestamps(); gettimeofday(&startup, NULL); return (0); } gettimeofday(&cur, NULL); tics = (cur.tv_sec - startup.tv_sec) * XSLT_TIMESTAMP_TICS_PER_SEC; tics += (cur.tv_usec - startup.tv_usec) / (1000000l / XSLT_TIMESTAMP_TICS_PER_SEC); tics -= calibration; return(tics); #else /* Neither gettimeofday() nor Win32 performance counter available */ return (0); #endif /* HAVE_GETTIMEOFDAY */ #endif /* XSLT_WIN32_PERFORMANCE_COUNTER */ }
I would also expect most of those to have been fixed in CVS, I just commited the change to xsltTimestamp(), Daniel
Should be closed by 1.0.2 release, thanks, Daniel