]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/gettext/0002-Fix-uwp-build.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / gettext / 0002-Fix-uwp-build.patch
CommitLineData
1e59de90
TL
1diff --git "a/gettext-runtime/intl/langprefs.c" "b/gettext-runtime/intl/langprefs.c"
2index aeb1c4e9..2ac531be 100644
3--- "a/gettext-runtime/intl/langprefs.c"
4+++ "b/gettext-runtime/intl/langprefs.c"
5@@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name);
6 #endif
7
8 #if defined _WIN32
9-# define WIN32_NATIVE
10+# if !defined(WINAPI_FAMILY)
11+# define WIN32_NATIVE
12+# else
13+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
14+# define WIN32_NATIVE
15+# endif
16+# endif
17 #endif
18
19 #ifdef WIN32_NATIVE
20diff --git "a/gettext-runtime/intl/localcharset.c" "b/gettext-runtime/intl/localcharset.c"
21index 670b8e6c..035a96bd 100644
22--- "a/gettext-runtime/intl/localcharset.c"
23+++ "b/gettext-runtime/intl/localcharset.c"
24@@ -36,6 +36,16 @@
25 # include <locale.h>
26 #endif
27
28+#if defined _WIN32
29+# if !defined(WINAPI_FAMILY)
30+# define HAVE_ACP
31+# else
32+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
33+# define HAVE_ACP
34+# endif
35+# endif
36+#endif
37+
38 #if defined __EMX__
39 /* Assume EMX program runs on OS/2, even if compiled under DOS. */
40 # ifndef OS2
41@@ -830,7 +830,7 @@ STATIC
42 const char *
43 locale_charset (void)
44 {
45- const char *codeset;
46+ const char *codeset = NULL;
47
48 /* This function must be multithread-safe. To achieve this without using
49 thread-local storage, we use a simple strcpy or memcpy to fill this static
50@@ -912,7 +912,7 @@ locale_charset (void)
51 /* The canonical name cannot be determined. */
52 codeset = "";
53
54-# elif defined WINDOWS_NATIVE
55+# elif defined WINDOWS_NATIVE && defined HAVE_ACP
56
57 char buf[2 + 10 + 1];
58 static char resultbuf[2 + 10 + 1];
59diff --git "a/gettext-runtime/intl/localename.c" "b/gettext-runtime/intl/localename.c"
60index 108dd6f1..ace3aa88 100644
61--- "a/gettext-runtime/intl/localename.c"
62+++ "b/gettext-runtime/intl/localename.c"
63@@ -75,10 +75,16 @@
64 #endif
65
66 #if defined _WIN32 && !defined __CYGWIN__
67-# define WINDOWS_NATIVE
68+# if !defined(WINAPI_FAMILY)
69+# define WINDOWS_NATIVE
70+# else
71+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
72+# define WINDOWS_NATIVE
73+# endif
74+# endif
75 # if !defined IN_LIBINTL
76 # include "glthread/lock.h"
77 # endif
78 #endif
79
80 #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */