summaryrefslogtreecommitdiffstats
path: root/t/t4018/cpp-function-returning-pointer
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-05 12:20:22 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-05 11:19:56 -0800
commitf1d734bf25570e3355c3c147e71e075a2f8f98f2 (patch)
treea36d9e3fc25340d645135de0c57a287a6397716b /t/t4018/cpp-function-returning-pointer
parent4cae5847694f0d62b6da3b55164f7749c0a19fef (diff)
downloadgit-f1d734bf25570e3355c3c147e71e075a2f8f98f2.tar.gz
git-f1d734bf25570e3355c3c147e71e075a2f8f98f2.zip
meson: detect broken iconv that requires ICONV_RESTART_RESET
In d0cec08d70 (utf8.c: prepare workaround for iconv under macOS 14/15, 2026-01-12) we have introduced a new workaround for a broken version of libiconv on macOS. This workaround has for now only been wired up for our Makefile, so using Meson with such a broken version will fail. We can rather easily detect the broken behaviour. Some encodings have different modes that can be switched to via an escape sequence. In the case of ISO-2022-JP this can be done via "<Esc>$B" and "<Esc>(J" to switch between ASCII and JIS modes. The bug now triggers when one does multiple calls to iconv(3p) to convert a string piece by piece, where the first call enters JIS mode. The second call forgets about the fact that it is still in JIS mode, and consequently it will incorrectly treat the input as ASCII, and thus the produced output is of course garbage. Wire up a test that exercises this in Meson and, if it fails, set the `ICONV_RESTART_RESET` define. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/cpp-function-returning-pointer')
0 files changed, 0 insertions, 0 deletions