version of setlocale:
The comment says it was about a problem with printf() and friends, so I
wonder, why was that "#undef setlocale" line put inside the larger
"#ifdef USE_REPL_SNPRINTF" block? If I understand the problem correctly,
it has nothing to do with our replacement snprintf() function.
Fortunately, we always use the replacement snprintf() code on Windows,
so there's no user-visible bug here, but if you imagine that we didn't
USE_REPL_SNPRINTF on Windows, we would still want the "#undef setlocale"
to take effect, right? I think that block is misplaced.