[gettext] Fix wrong variable type (#49860)

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Vincent Le Garrec 2026-02-13 01:21:44 +01:00 committed by GitHub
parent 4d1c2bda72
commit 2232cc89f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 2 deletions

28
ports/gettext/env.patch Normal file
View File

@ -0,0 +1,28 @@
--- a/gettext-tools/gnulib-lib/localtime.c.old 2024-02-21 11:44:25.000000000 +0100
+++ b/gettext-tools/gnulib-lib/localtime.c 2026-02-05 14:32:39.392247000 +0100
@@ -63,13 +63,19 @@ rpl_localtime (const time_t *tp)
char **env = _environ;
wchar_t **wenv = _wenviron;
if (env != NULL)
- for (char *s = env; *s != NULL; s++)
- if (s[0] == 'T' && s[1] == 'Z' && s[2] == '=')
- s[0] = '$';
+ for (char **ep = env; *ep != NULL; ep++)
+ {
+ char *s = *ep;
+ if (s[0] == 'T' && s[1] == 'Z' && s[2] == '=')
+ s[0] = '$';
+ }
if (wenv != NULL)
- for (wchar_t *ws = wenv; *ws != NULL; ws++)
- if (ws[0] == L'T' && ws[1] == L'Z' && ws[2] == L'=')
- ws[0] = L'$';
+ for (wchar_t **wep = wenv; *wep != NULL; wep++)
+ {
+ wchar_t *ws = *wep;
+ if (ws[0] == L'T' && ws[1] == L'Z' && ws[2] == L'=')
+ ws[0] = L'$';
+ }
}
#endif

View File

@ -30,6 +30,7 @@ vcpkg_extract_source_archive(SOURCE_PATH
parallel-gettext-tools.patch
config-step-order.patch
0001-xgettext-Fix-some-test-failures-on-MSVC.patch
env.patch # https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/lib/localtime.c?id=92cdf62b56462b914193c7770440e505a37c2526
)
set(subdirs "")

View File

@ -1,7 +1,7 @@
{
"name": "gettext",
"version": "0.22.5",
"port-version": 3,
"port-version": 4,
"description": "A GNU framework to help produce multi-lingual messages.",
"homepage": "https://www.gnu.org/software/gettext/",
"license": "GPL-3.0-only",

View File

@ -3342,7 +3342,7 @@
},
"gettext": {
"baseline": "0.22.5",
"port-version": 3
"port-version": 4
},
"gettext-libintl": {
"baseline": "0.22.5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e8581f71d357844e6869e4c79fae472de8012150",
"version": "0.22.5",
"port-version": 4
},
{
"git-tree": "6308f030041019677efe2ef49cc2d7a42b9cf632",
"version": "0.22.5",