Re: [xml] Release candidate 2 of libxml2 2.8.0

Hi Roumen,

My win build system is back home so haven't had a chance to look at it or be able to test any of this stuff 
until next week. Can't really comment until then. 


On May 22, 2012, at 5:43 PM, Roumen Petrov <bugtrack roumenpetrov info> wrote:

Hi All,

I think that I understand MSC build issue.

Michael Ludwig wrote:
Rob Richards schrieb am 21.05.2012 um 05:48 (-0400):
The mingw change for Bug 676427 ends up breaking for windows VS builds
as the change affects them and not just mingw. Basically by remove the
definitions, I end up with a bunch of unresolved external symbol

The configure.js create  config.h from win32config.h but win32/Makefile* files does not define 
HAVE_CONFIG_H in CFLAGS. I don't know why.

All source files except :
- runsuite.c
- runtest.c
- runxmlconf.c
- testapi.c
- testrecurse.c
include libxml.h unconditionally .

Above listed five (5) files use:
#include "libxml.h"
#include <stdio.h>

So proposed fix is to replace just with
#include "libxml.h"
#include <stdio.h>
Note without to use #define IN_LIBXML before #include libxml.h

FWIW, the link error I'm seeing is:

link.exe /nologo /VERSION:2.8 /LIBPATH:bin.msvc /LIBPATH:C:\Opt\CLib\LibXML\lib /OUT:bin.msvc\runtest.exe 
libxml2.lib  wsock32.lib ws2_32.lib iconv.lib kernel32.lib int.utils.msvc\runtest.obj
runtest.obj : error LNK2019: Verweis auf nicht aufgelÃstes externes Symbol "_snprintf" in Funktion 


Second solutions it to restore redefinition {v}snprintf  to  _{v}snprintf but with different rule . For 
instance following code:
#if defined(_WIN32) && !defined(__CYGWIN__)
#define snprintf _snprintf
to be replaced by
#if defined(_MSC_VER)
#define snprintf _snprintf

Third solution is to update win32/Makefile* to define HAVE_CONFIG_H in CFLAGS.
Note that win32/VC10/runsuite.vcxproj list HAVE_CONFIG_H in <PreprocessorDefinitions> tag.

So what you think ?


P.S. I forgot to update testapi.c so I will provide  additional patch depending from feedback to address in 
addition testapi.c.

xml mailing list, project page
xml gnome org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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