Re: Thread-safe nl_langinfo() and localeconv()

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Thomas Munro <thomas.munro@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-08-28T19:07:06Z
Lists: pgsql-hackers
On 16.08.24 02:48, Thomas Munro wrote:
> 2.  A similar argument applies to Windows canonicalisation.  CREATE
> COLLATION isn't doing it.  CREATE DATABASE is, but again, what is the
> point?  See previous.

I don't really know about Windows locales.  But we are doing 
canonicalization of ICU locale names now.  So there seems to be a desire 
to do canonicalization in general.  (Obviously, if we're doing it 
poorly, then we don't have to keep it that way indefinitely.)




Commits

  1. Fix "‘static’ is not at beginning of declaration" warning

  2. Use thread-safe strftime_l() instead of strftime().

  3. Provide thread-safe pg_localeconv_r().

  4. Harmonize MinGW CODESET lookup with MSVC.

  5. Include <xlocale.h> for macOS, take II.

  6. Use thread-safe nl_langinfo_l(), not nl_langinfo().

  7. All POSIX systems have langinfo.h and CODESET.