pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: !USE_WIDE_UPPER_LOWER compile errors in v10+
Date: Thu, 21 Sep 2017 05:29:28 +0000
Message-ID: <20170921052928.GA188913@rfd.leadboat.com> (raw)
In-Reply-To: <CAH2-WznnOrK=u-Ui2+vVk+-exMvAk9=nLbyaYVSmWCpAJ5en+A@mail.gmail.com>
References: <CAH2-WznnOrK=u-Ui2+vVk+-exMvAk9=nLbyaYVSmWCpAJ5en+A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Sat, Sep 16, 2017 at 03:33:53PM -0700, Peter Geoghegan wrote:
> On a related note, am I the only one that finds it questionable that
> str_tolower() has an "#ifdef USE_WIDE_UPPER_LOWER" block that itself
> contains an "#ifdef USE_ICU" block? It seems like those two things
> might get conflated on some platforms. We don't want lower() to ever
> not use the ICU infrastructure when an ICU collation is used, and yet
> it's not obvious that that's impossible. I understand that the code in
> regc_pg_locale.c kind of insists on using USE_WIDE_UPPER_LOWER
> facilities, and that that was always accepted as legacy that ICU had
> to live with. Maybe a static assertion is all that we need here (ICU
> builds must also be USE_WIDE_UPPER_LOWER builds).

I checked !USE_WIDE_UPPER_LOWER by configuring v10 as follows:

  ./configure -C --prefix=$HOME/sw/nopath/pg10 --enable-debug \
      --enable-cassert --enable-depend --enable-tap-tests --with-libxml \
      --with-gssapi --with-openssl ac_cv_func_towlower=no

The result fails to compile:

$ make
formatting.c: In function ‘str_tolower’:
formatting.c:1623:10: error: ‘mylocale’ undeclared (first use in this function)
      if (mylocale)
          ^
... snipped other errors ...

A --with-icu build fails similarly.  PG9.6 builds and passes "make check".

Perhaps it is time to require HAVE_WCSTOMBS and HAVE_TOWLOWER, removing
USE_WIDE_UPPER_LOWER?  Every buildfarm fossil has both.  Solaris 2.5.1 (out of
support for 12 years) might be the most interesting OS affected:

https://www.gnu.org/software/gnulib/manual/html_node/towlower.html
https://www.gnu.org/software/gnulib/manual/html_node/wcstombs.html


The above-described topic is currently a PostgreSQL 10 open item.  Peter
(Eisentraut), since you committed the patch believed to have created it, you
own this open item.  If some other commit is more relevant or if this does not
belong as a v10 open item, please let us know.  Otherwise, please observe the
policy on open item ownership[1] and send a status update within three
calendar days of this message.  Include a date for your subsequent status
update.  Thanks.

[1] https://www.postgresql.org/message-id/20170404140717.GA2675809%40tornado.leadboat.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (7+ messages)  latest in thread

Message-ID: <20170921052928.GA188913@rfd.leadboat.com>
Permalink:  ../20170921052928.GA188913@rfd.leadboat.com/
Also on:    postgresql.org/message-id/20170921052928.GA188913@rfd.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, peter.eisentraut@2ndquadrant.com, pg@bowt.ie
  Subject: Re: !USE_WIDE_UPPER_LOWER compile errors in v10+
  In-Reply-To: <20170921052928.GA188913@rfd.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox