Re: !USE_WIDE_UPPER_LOWER compile errors in v10+
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Peter Geoghegan <pg@bowt.ie>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-21T21:38:13Z
Lists: pgsql-hackers
I wrote: > Noah Misch <noah@leadboat.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
Commits
-
Assume wcstombs(), towlower(), and sibling functions are always present.
- 85feb77aa09c 11.0 landed