Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jBgTK-0007yw-Vs for pgsql-committers@arkaria.postgresql.org; Tue, 10 Mar 2020 15:07:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jBgTJ-00012I-Nh for pgsql-committers@arkaria.postgresql.org; Tue, 10 Mar 2020 15:07:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jBgTJ-000127-D2 for pgsql-committers@lists.postgresql.org; Tue, 10 Mar 2020 15:07:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBgTG-0000Xc-Vg for pgsql-committers@lists.postgresql.org; Tue, 10 Mar 2020 15:07:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02AF70BB024808; Tue, 10 Mar 2020 11:07:00 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Remove win32ver.rc from version_stamp.pl In-reply-to: <19048.1583851745@sss.pgh.pa.us> References: <50ecb345-4dc5-1f7d-64ca-7018195fcc8d@2ndquadrant.com> <19048.1583851745@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 10 Mar 2020 10:49:05 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <24794.1583852807.0@sss.pgh.pa.us> Date: Tue, 10 Mar 2020 11:07:00 -0400 Message-ID: <24807.1583852820@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24794.1583852807.1@sss.pgh.pa.us> I wrote: > I'd suggest reverting the change in how PG_VERSION_NUM is computed > in configure.in --- that was certainly not necessary to the patch, > and evidently you're falling foul of some weird behavior around > nesting double-quotes and backquotes. Actually, you can just get rid of the nesting, because there's no need to be picky about what white-space gets fed to awk. The attached seems to be enough to fix it (tested on gaur). regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="fix-version-num.patch"; charset="us-ascii" Content-ID: <24794.1583852807.2@sss.pgh.pa.us> Content-Description: fix-version-num.patch Content-Transfer-Encoding: quoted-printable diff --git a/configure b/configure index d6d3f26..1a0aca9 100755 --- a/configure +++ b/configure @@ -18887,7 +18887,7 @@ _ACEOF = # Supply a numeric version string for use by 3rd party add-ons # awk -F is a regex on some platforms, and not on others, so make "." a t= ab -PG_VERSION_NUM=3D"`echo "$PG_MAJORVERSION $PG_MINORVERSION" | +PG_VERSION_NUM=3D"`echo $PG_MAJORVERSION $PG_MINORVERSION | $AWK '{printf "%d%04d", $1, $2}'`" = cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index 78902fb..b27708e 100644 --- a/configure.in +++ b/configure.in @@ -2322,7 +2322,7 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR, = # Supply a numeric version string for use by 3rd party add-ons # awk -F is a regex on some platforms, and not on others, so make "." a t= ab -[PG_VERSION_NUM=3D"`echo "$PG_MAJORVERSION $PG_MINORVERSION" | +[PG_VERSION_NUM=3D"`echo $PG_MAJORVERSION $PG_MINORVERSION | $AWK '{printf "%d%04d", $1, $2}'`"] AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version a= s a number]) AC_SUBST(PG_VERSION_NUM) ------- =_aaaaaaaaaa0--