[vlc-devel] [PATCH 7/7] contrib: fix supportsUnicode() under Windows App Store builds

Steve Lhomme robux4 at gmail.com
Mon Sep 14 14:40:46 CEST 2015


---
 contrib/src/taglib/rules.mak     |  3 +++
 contrib/src/taglib/unicode.patch | 24 ++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 contrib/src/taglib/unicode.patch

diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index 1dbcda0..e6fb105 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -19,6 +19,9 @@ taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(APPLY) $(SRC)/taglib/0002-Rewrote-ByteVector-replace-simpler.patch
 	$(APPLY) $(SRC)/taglib/iostream.patch
 	$(APPLY) $(SRC)/taglib/m4v.patch
+#ifdef HAVE_WINRT
+	$(APPLY) $(SRC)/taglib/unicode.patch
+#endif
 	$(MOVE)
 
 .taglib: taglib toolchain.cmake
diff --git a/contrib/src/taglib/unicode.patch b/contrib/src/taglib/unicode.patch
new file mode 100644
index 0000000..cd16753
--- /dev/null
+++ b/contrib/src/taglib/unicode.patch
@@ -0,0 +1,24 @@
+diff -urN taglib/taglib/toolkit/tiostream.cpp.orig taglib/taglib/toolkit/tiostream.cpp
+--- taglib/taglib/toolkit/tiostream.cpp.orig    2015-08-06 09:55:54.882605900 +0200
++++ taglib/taglib/toolkit/tiostream.cpp 2015-08-06 10:07:33.885276100 +0200
+@@ -32,6 +32,7 @@
+ # include "tstring.h"
+ # include "tdebug.h"
+ # include <windows.h>
++# include <winapifamily.h>
+
+ namespace
+ {
+@@ -40,8 +41,12 @@
+
+   bool supportsUnicode()
+   {
++#if (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
++    return true;
++#else
+     const FARPROC p = GetProcAddress(GetModuleHandleA("kernel32"), "CreateFileW");
+     return (p != NULL);
++#endif
+   }
+
+   // Indicates whether the system supports Unicode file names.
-- 
2.5.1



More information about the vlc-devel mailing list