Re: check_strxfrm_bug() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: check_strxfrm_bug()
Date
Msg-id e765fcd7-fa6c-0cf4-4286-a5776edeed09@eisentraut.org
Whole thread Raw
In response to Re: check_strxfrm_bug()  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: check_strxfrm_bug()
List pgsql-hackers
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,




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Preventing non-superusers from altering session authorization
Next
From: Thomas Munro
Date:
Subject: Re: check_strxfrm_bug()