Re: Thread-safe nl_langinfo() and localeconv()
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Thomas Munro <thomas.munro@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-29T14:08:06Z
Lists: pgsql-hackers
Hi,
On 2025-03-28 09:13:54 +0100, Peter Eisentraut wrote:
> On 27.03.25 11:16, Peter Eisentraut wrote:
> > > Patch 0002 also looks okay, except that the error handling could be
> > > unified with existing code, as I had previously pointed out. Patch
> > > 0005 fixes that.
> >
> > I plan to commit this one next, after the above had a bit of time to stew.
>
> also done
My compiler complains with:
[20/1982 42 1%] Compiling C object src/port/libpgport_shlib.a.p/pg_localeconv_r.c.o
../../../../../home/andres/src/postgresql/src/port/pg_localeconv_r.c:63:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
63 | const static struct lconv_member_info table[] = {
| ^~~~~
This is the only such warning in the postgres tree. I'll go and fix that.
Greetings,
Andres Freund
Commits
-
Fix "‘static’ is not at beginning of declaration" warning
- 116e851db5b3 18.0 landed
-
Use thread-safe strftime_l() instead of strftime().
- 890fc826c91f 18.0 landed
-
Provide thread-safe pg_localeconv_r().
- b98be8a2a2a6 18.0 landed
-
Harmonize MinGW CODESET lookup with MSVC.
- bf3401fe813a 18.0 landed
-
Include <xlocale.h> for macOS, take II.
- 2488058dc356 18.0 landed
-
Use thread-safe nl_langinfo_l(), not nl_langinfo().
- 35eeea623022 18.0 landed
-
All POSIX systems have langinfo.h and CODESET.
- 14c648ff0094 18.0 landed