[vlc-devel] [PATCH] contrib: gpg-error: fix UNICODE usage

Steve Lhomme robux4 at videolabs.io
Tue May 24 11:59:06 CEST 2016


---
 contrib/src/gpg-error/rules.mak           |  1 +
 contrib/src/gpg-error/win32-unicode.patch | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 contrib/src/gpg-error/win32-unicode.patch

diff --git a/contrib/src/gpg-error/rules.mak b/contrib/src/gpg-error/rules.mak
index 32fb973..b7ff7ca 100644
--- a/contrib/src/gpg-error/rules.mak
+++ b/contrib/src/gpg-error/rules.mak
@@ -17,6 +17,7 @@ endif
 endif
 	$(APPLY) $(SRC)/gpg-error/missing-unistd-include.patch
 	$(APPLY) $(SRC)/gpg-error/no-executable.patch
+	$(APPLY) $(SRC)/gpg-error/win32-unicode.patch
 	$(MOVE)
 	cp $@/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h $@/src/syscfg/lock-obj-pub.linux-android.h
 ifdef HAVE_TIZEN
diff --git a/contrib/src/gpg-error/win32-unicode.patch b/contrib/src/gpg-error/win32-unicode.patch
new file mode 100644
index 0000000..0b6c832
--- /dev/null
+++ b/contrib/src/gpg-error/win32-unicode.patch
@@ -0,0 +1,29 @@
+--- libgpg-error/src/estream.c	2016-05-24 11:21:10.180251700 +0200
++++ libgpg-error/src/estream.c.msvc	2016-05-24 11:23:18.195880200 +0200
+@@ -4115,7 +4115,7 @@ tmpfd (void)
+ {
+ #ifdef HAVE_W32_SYSTEM
+   int attempts, n;
+-#ifdef HAVE_W32CE_SYSTEM
++#if defined(HAVE_W32CE_SYSTEM) || defined(UNICODE)
+   wchar_t buffer[MAX_PATH+9+12+1];
+ # define mystrlen(a) wcslen (a)
+   wchar_t *name, *p;
+@@ -4136,7 +4136,7 @@ tmpfd (void)
+       return -1;
+     }
+   p = buffer + mystrlen (buffer);
+-#ifdef HAVE_W32CE_SYSTEM
++#if defined(HAVE_W32CE_SYSTEM) || defined(UNICODE)
+   wcscpy (p, L"_estream");
+ #else
+   strcpy (p, "_estream");
+@@ -4157,7 +4157,7 @@ tmpfd (void)
+           *p++ = tohex (((value >> 28) & 0x0f));
+           value <<= 4;
+         }
+-#ifdef HAVE_W32CE_SYSTEM
++#if defined(HAVE_W32CE_SYSTEM) || defined(UNICODE)
+       wcscpy (p, L".tmp");
+ #else
+       strcpy (p, ".tmp");
-- 
2.8.1



More information about the vlc-devel mailing list