]> git.sesse.net Git - vlc/commitdiff
contrib: xml: don't use GetVersionEx on Windows
authorRafaël Carré <funman@videolan.org>
Mon, 22 Apr 2013 17:27:42 +0000 (19:27 +0200)
committerRafaël Carré <funman@videolan.org>
Mon, 22 Apr 2013 17:28:20 +0000 (19:28 +0200)
All the versions we support can use UTF8

contrib/src/libxml2/rules.mak
contrib/src/libxml2/win32.patch [new file with mode: 0644]

index 29c3aee4827634cd9a95d8c4b42b0d2051c483a3..386a09be17b7ca28cb001cb86048e7a7d543d11e 100644 (file)
@@ -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 (file)
index 0000000..2f586dd
--- /dev/null
@@ -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