aboutsummaryrefslogtreecommitdiff
path: root/ports/gettext/0002-Fix-uwp-build.patch
diff options
context:
space:
mode:
authoratkawa7 <atkawa7@yahoo.com>2017-06-02 06:54:40 -0700
committeratkawa7 <atkawa7@yahoo.com>2017-06-02 06:54:40 -0700
commit308e1fe79392b3db57bb7579e95568cc250357a4 (patch)
treed70631c22dfac06db510fba97b709ef3447403a0 /ports/gettext/0002-Fix-uwp-build.patch
parentb81c419c601c3c07e4c78b91119f2217481df159 (diff)
parent3ebcdd384b58ff5d5f92996a6eb2e9fed0be1710 (diff)
downloadvcpkg-308e1fe79392b3db57bb7579e95568cc250357a4.tar.gz
vcpkg-308e1fe79392b3db57bb7579e95568cc250357a4.zip
Merge https://github.com/Microsoft/vcpkg
Diffstat (limited to 'ports/gettext/0002-Fix-uwp-build.patch')
-rw-r--r--ports/gettext/0002-Fix-uwp-build.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/ports/gettext/0002-Fix-uwp-build.patch b/ports/gettext/0002-Fix-uwp-build.patch
new file mode 100644
index 000000000..4e21ef1ed
--- /dev/null
+++ b/ports/gettext/0002-Fix-uwp-build.patch
@@ -0,0 +1,77 @@
+diff --git "a/gettext-0.19/gettext-runtime/intl/langprefs.c" "b/gettext-0.19/gettext-runtime/intl/langprefs.c"
+index aeb1c4e9..2ac531be 100644
+--- "a/gettext-0.19/gettext-runtime/intl/langprefs.c"
++++ "b/gettext-0.19/gettext-runtime/intl/langprefs.c"
+@@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name);
+ #endif
+
+ #if defined _WIN32 || defined __WIN32__
+-# define WIN32_NATIVE
++# if !defined(WINAPI_FAMILY)
++# define WIN32_NATIVE
++# else
++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
++# define WIN32_NATIVE
++# endif
++# endif
+ #endif
+
+ #ifdef WIN32_NATIVE
+diff --git "a/gettext-0.19/gettext-runtime/intl/localcharset.c" "b/gettext-0.19/gettext-runtime/intl/localcharset.c"
+index 670b8e6c..035a96bd 100644
+--- "a/gettext-0.19/gettext-runtime/intl/localcharset.c"
++++ "b/gettext-0.19/gettext-runtime/intl/localcharset.c"
+@@ -36,6 +36,16 @@
+ # define WINDOWS_NATIVE
+ #endif
+
++#if defined _WIN32 || defined __WIN32__
++# if !defined(WINAPI_FAMILY)
++# define HAVE_ACP
++# else
++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
++# define HAVE_ACP
++# endif
++# endif
++#endif
++
+ #if defined __EMX__
+ /* Assume EMX program runs on OS/2, even if compiled under DOS. */
+ # ifndef OS2
+@@ -361,7 +371,7 @@ STATIC
+ const char *
+ locale_charset (void)
+ {
+- const char *codeset;
++ const char *codeset = NULL;
+ const char *aliases;
+
+ #if !(defined WINDOWS_NATIVE || defined OS2)
+@@ -457,7 +467,7 @@ locale_charset (void)
+
+ # endif
+
+-#elif defined WINDOWS_NATIVE
++#elif defined WINDOWS_NATIVE && defined HAVE_ACP
+
+ static char buf[2 + 10 + 1];
+
+diff --git "a/gettext-0.19/gettext-runtime/intl/localename.c" "b/gettext-0.19/gettext-runtime/intl/localename.c"
+index 108dd6f1..ace3aa88 100644
+--- "a/gettext-0.19/gettext-runtime/intl/localename.c"
++++ "b/gettext-0.19/gettext-runtime/intl/localename.c"
+@@ -54,7 +54,13 @@
+ #endif
+
+ #if defined _WIN32 || defined __WIN32__
+-# define WINDOWS_NATIVE
++# if !defined(WINAPI_FAMILY)
++# define WINDOWS_NATIVE
++# else
++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
++# define WINDOWS_NATIVE
++# endif
++# endif
+ #endif
+
+ #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */