[xml] Few patches for libxml2-2.3.5 under Win32



Hello Daniel, everyone.

As always, I need to bring this library into existence using Microsoft's
compiler. A fact of life, wether I like it or not. Well, under this
platform, few things are going amiss. Let's fix them :-)

1. A function, xmlXPathDebugDumpCompExpr(), is implemented and called in
xpath.c. However, when I undefine LIBXML_DEBUG_ENABLED, it is still called
but no longer implemented. The patch is in xpath.diff. This patch implements
an empty function incase LIBXML_DEBUG_ENABLED is undefined. I think that
makes things around the place where this function gets called clearer to
read. The empty function ends optimised out by the compiler.

2. VC project files (win32/libxml2/*.dsp) need updating, because they are
now missing one source file or another. Updated files are attached in the
tarball. Why tarball? Well, imagine, VC project files must be in CRLF
format. If they are not, VC complains and refuses to load them (another sad
fact of life). I have put the project files in a tarball so they may avoid
possible conversions underway.

3. The test program, xmllint, claims several overtures across the keyboard
in order to work: 
- Microsoft's C runtime does not have the 'gettimeofday' function, so I
supplied the implementation which can be found in glib of GTK. I know the
recent debate about supplying implementations of things not provided by the
host platform, but xmllint is a test program, not the library itself, so I
tought maybe it's OK.
- The file 'sys/time.h' does not exist on this platform, so I conditionally
included the equivalent. 
- The variable 'memory' is declared only if HAVE_SYS_MMEM_H is defined.
Well, that variable is used even if HAVE_SYS_MMEM_H is undefined :-). 
The patch is in xmllint.diff.

4. This is the last and not really an important thing, so you decide if it
is worth the trouble. The file include/win32config.h has a line like
#define SOMETHING <many spaces here> #define ANOTHERTHING
I don't now if this is the intent? Other than that, I have put in macros to
enable vsnprintf instead of vsprintf. The patch is in win32config.diff.

Cheers
Igor

Attachment: win32config.diff
Description: Binary data

Attachment: xmllint.diff
Description: Binary data

Attachment: xpath.diff
Description: Binary data

Attachment: dspfiles.tar.gz
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]