[vlc-commits] contrib: taglib: Don't use non unicode CreateFile variants on winrt

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 7 15:37:33 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Apr  7 15:18:03 2016 +0200| [7faca74cf9ee043eed4e5ee20ced2403260319f1] | committer: Hugo Beauzée-Luyssen

contrib: taglib: Don't use non unicode CreateFile variants on winrt

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

 contrib/src/taglib/rules.mak     |    3 +++
 contrib/src/taglib/unicode.patch |   13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index 377b514..5aea202 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -15,6 +15,9 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz:
 
 taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(UNPACK)
+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..954ad64
--- /dev/null
+++ b/contrib/src/taglib/unicode.patch
@@ -0,0 +1,13 @@
+--- taglib/taglib/toolkit/tfilestream.cpp.orig	2016-04-07 15:14:47.251819871 +0200
++++ taglib/taglib/toolkit/tfilestream.cpp	2016-04-07 15:15:05.491812493 +0200
+@@ -53,8 +53,10 @@
+ 
+     if(!path.wstr().empty())
+       return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
++#ifndef UNICODE
+     else if(!path.str().empty())
+       return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
++#endif
+     else
+       return InvalidFileHandle;
+   }



More information about the vlc-commits mailing list