Re: !USE_WIDE_UPPER_LOWER compile errors in v10+

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: !USE_WIDE_UPPER_LOWER compile errors in v10+
Date: 2017-09-21 21:38:13
Message-ID: 2653.1506029893@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Noah Misch <noah(at)leadboat(dot)com> writes:
>> Perhaps it is time to require HAVE_WCSTOMBS and HAVE_TOWLOWER, removing
>> USE_WIDE_UPPER_LOWER? Every buildfarm fossil has both.

> +1 ... if nothing else, there's the problem that untested code is likely
> to be broken. You just proved it *is* broken, of course, but my point
> is that even if we repaired the immediate damage we could have little
> confidence in it staying fixed.

Further notes about that:

* The Single Unix Spec v2 (a/k/a POSIX 1997), which has been our minimum
portability spec for quite awhile, requires wcstombs() and towlower(),
and further requires the latter to be declared in <wctype.h>.

* Surveying the buildfarm, I agree with your conclusion that every active
member has wcstombs() and towlower(). gaur/pademelon is the lone member
that lacks <wctype.h>; it declares towlower() in <wchar.h> instead. It's
not so surprising that that system adheres to a pre-1997 idea of where to
put that, because its /usr/include files mostly date from 1996 ...

Meanwhile, I see that Peter has posted a fix for the immediate problem.
I propose that Peter should apply his fix in HEAD and v10, and then
I'll rip out the !USE_WIDE_UPPER_LOWER code paths in HEAD only.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Van Fleet 2017-09-21 21:39:12 Re: Fw: HACKERS[PATCH] split ProcArrayLock into multiple parts -- follow-up
Previous Message Andrew Dunstan 2017-09-21 21:03:13 Re: visual studio 2017 build support