[vlc-commits] contrib: xml: don't use GetVersionEx on Windows

Rafaël Carré git at videolan.org
Mon Apr 22 19:30:24 CEST 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Apr 22 19:27:42 2013 +0200| [f091e0d45393cc71d71127d2461212eb4474e1ef] | committer: Rafaël Carré

contrib: xml: don't use GetVersionEx on Windows

All the versions we support can use UTF8

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f091e0d45393cc71d71127d2461212eb4474e1ef
---

 contrib/src/libxml2/rules.mak   |    1 +
 contrib/src/libxml2/win32.patch |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/contrib/src/libxml2/rules.mak b/contrib/src/libxml2/rules.mak
index 29c3aee..386a09b 100644
--- a/contrib/src/libxml2/rules.mak
+++ b/contrib/src/libxml2/rules.mak
@@ -21,6 +21,7 @@ ifdef HAVE_DARWIN_OS
 	$(APPLY) $(SRC)/libxml2/osx-threads.patch
 endif
 	$(APPLY) $(SRC)/libxml2/no-tests.patch
+	$(APPLY) $(SRC)/libxml2/win32.patch
 	$(APPLY) $(SRC)/libxml2/pthread.patch
 	$(MOVE)
 
diff --git a/contrib/src/libxml2/win32.patch b/contrib/src/libxml2/win32.patch
new file mode 100644
index 0000000..2f586dd
--- /dev/null
+++ b/contrib/src/libxml2/win32.patch
@@ -0,0 +1,20 @@
+--- libxml2/xmlIO.c.orig	2013-04-22 19:24:23.613036400 +0200
++++ libxml2/xmlIO.c	2013-04-22 19:24:56.249035859 +0200
+@@ -726,14 +726,14 @@
+ xmlInitPlatformSpecificIo(void)
+ {
+     static int xmlPlatformIoInitialized = 0;
+-    OSVERSIONINFO osvi;
++    /*OSVERSIONINFO osvi;*/
+ 
+     if(xmlPlatformIoInitialized)
+       return;
+ 
+-    osvi.dwOSVersionInfoSize = sizeof(osvi);
++    /*osvi.dwOSVersionInfoSize = sizeof(osvi);*/
+ 
+-    if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) {
++    if(1 /*GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)*/) {
+       xmlWrapStat = xmlWrapStatUtf8;
+       xmlWrapOpen = xmlWrapOpenUtf8;
+ #ifdef HAVE_ZLIB_H



More information about the vlc-commits mailing list