[xml] Patches for Win32/MSCC build

Hi there.

Here are few things regarding the Win32/MSCC build of libxml2. The patches
are made against libxml2-2.3.6.

1. MSVC project files are updated to contain newly made source files. The
project files are in the tarball named 'dspfiles.tar.gz', compressed in
order to avoid CRLF->LF conversion. These files must be in CRLF format,
because the Microsoft's IDE does not like it otherwise. All .dsp files from
the tarball belong under win32/libxml2.

2. The file 'libxml2.def.src' is a pseudo-source file used to generate the
.DEF for the MS linker. The above project files assume it is there and
handle it properly without further intervention. It belongs under
win32/libxml2 as well. With this, we can finally make a usable shared
library under Win32/MSCC platform. The library exports 736 symbols and if
that isn't enough... I would like to thank everyone for ideas and thoughts
regarding this issue.

3. I made small change to include/libxml/xmlversion.h. Namely, this file is
included by the above 'libxml2.def.src' and then preprocessed. After
preprocessing, a small piece of code remains in the generated .DEF file and
MS linker feels slightly offended by that. The piece of code in question is
a simple function prototype:
    extern void xmlCheckVersion(int version);

A small modification makes it conditional:

    extern void xmlCheckVersion(int version);

This 'LIBXML2_COMPILING_MSCCDEF' macro is defined in 'libxml2.def.src'.
Under all other platform/compiler combinations, it is always undefined. The
patch can be found in xmlversion.diff

4. include/win32config.h now has the mappings for snprintf and vsnprintf,
which are present in Microsoft's C runtime under different names. The patch
is in win32config.diff

5. xmllint.c received a small modification which makes it compile and work
under Win32/MSCC correctly, with disabled timings. The patch is in

I wish you all a nice weekend

Attachment: dspfiles.tar.gz
Description: Binary data

Attachment: libxml2.def.src
Description: Binary data

Attachment: win32config.diff
Description: Binary data

Attachment: xmllint.diff
Description: Binary data

Attachment: xmlversion.diff
Description: Binary data

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