[xml] Patchs for building under Visual Studio 2008



I ran into a couple snags getting libxml to compile under win32 in my particular configuration.  Just some minor changes which get it to build and link in VS2008 with the compiler changes.  These diffs were made against the 2.6.31 release from ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.31.tar.gz.

 

The patch for win32config.h is backwards compatible as it checks the compiler version, the makefile patch does not.  Perhaps there is a way to do this in configure.js that I didn’t notice, or in the makefile itself, I must admit I’m not a makefile ninja.

 

Cheers

David

 

--- win32/Makefile.msvc.orig    Wed Jan 16 16:31:09 2008

+++ win32/Makefile.msvc Wed Jan 16 16:30:22 2008

@@ -66,7 +66,7 @@

 LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)

 LIBS =

 !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"

-LIBS = $(LIBS) wsock32.lib

+LIBS = $(LIBS) wsock32.lib ws2_32.lib

 !endif

 !if "$(WITH_ICONV)" == "1"

 LIBS = $(LIBS) iconv.lib

--- include/win32config.h.orig  Wed Jan 16 16:18:41 2008

+++ include/win32config.h       Wed Jan 16 16:07:43 2008

@@ -92,7 +92,9 @@

 #if defined(_MSC_VER)

 #define mkdir(p,m) _mkdir(p)

 #define snprintf _snprintf

+#if _MSC_VER < 1500

 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)

+#endif

 #elif defined(__MINGW32__)

 #define mkdir(p,m) _mkdir(p)

 #endif



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