On 07.07.23 22:30, Thomas Munro wrote:
Thinking about how to bring this all into "normal" form -- where HAVE_XXX means "system defines XXX", not "system defines XXX || we define a replacement"
HAVE_XXX means "code can use XXX", doesn't matter how it got there (it could also be a libpgport replacement).
So I don't think this code is correct. AFAICT, there is nothing right now that can possibly define HAVE_MBSTOWCS_L on Windows/MSVC. Was that the intention?
I think these changes would need to be reverted to make this correct: -# MSVC has replacements defined in src/include/port/win32_port.h. -if cc.get_id() == 'msvc' - cdata.set('HAVE_WCSTOMBS_L', 1) - cdata.set('HAVE_MBSTOWCS_L', 1) -endif - HAVE_MBSTOWCS_L => 1, + HAVE_MBSTOWCS_L => undef, - HAVE_WCSTOMBS_L => 1, + HAVE_WCSTOMBS_L => undef,