Re: On non-Windows, hard depend on uselocale(3) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: On non-Windows, hard depend on uselocale(3)
Date
Msg-id CA+hUKGKu7H7iPNQsZ5FcPkZVbgXc5iTBgUjdpM2EHP4q=Tz42Q@mail.gmail.com
Whole thread Raw
In response to Re: On non-Windows, hard depend on uselocale(3)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: On non-Windows, hard depend on uselocale(3)
List pgsql-hackers
On Thu, Nov 16, 2023 at 9:51 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > On Thu, Nov 16, 2023 at 6:45 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> You would need to do some research and try to prove that that won't
> >> be a problem on any modern platform.  Presumably it once was a problem,
> >> or we'd not have bothered with a configure check.
>
> > According to data I scraped from the build farm, the last two systems
> > we had that didn't have uselocale() were curculio (OpenBSD 5.9) and
> > wrasse (Solaris 11.3), but those were both shut down (though wrasse
> > still runs old branches) as they were well out of support.
>
> AFAICS, NetBSD still doesn't have it.  They have no on-line man page
> for it, and my animal mamba shows it as not found.

Oh :-(  I see that but had missed that sidewinder was NetBSD and my
scraped data predates mamba.  Sorry for the wrong info.

Currently pg_locale.c requires systems to have *either* uselocale() or
mbstowcs_l()/wcstombs_l(), but NetBSD satisfies the second
requirement.  The other uses of uselocale() are in ECPG code that must
be falling back to the setlocale() path.  In other words, isn't it the
case that we don't require uselocale() to compile ECPG stuff, but it'll
probably crash or corrupt itself or give wrong answers if you push it
on NetBSD, so... uhh, really we do require it?



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: On non-Windows, hard depend on uselocale(3)
Next
From: Nathan Bossart
Date:
Subject: Re: typo in fallback implementation for pg_atomic_test_set_flag()