Re: check_strxfrm_bug()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tristan Partin <tristan(at)neon(dot)tech>, Noah Misch <noah(at)leadboat(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: check_strxfrm_bug()
Date: 2023-07-09 06:20:14
Message-ID: e765fcd7-fa6c-0cf4-4286-a5776edeed09@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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,

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-07-09 06:35:39 Re: check_strxfrm_bug()
Previous Message Nathan Bossart 2023-07-09 04:47:08 Re: Preventing non-superusers from altering session authorization