1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Fix computation of PG_VERSION_NUM by configure: remove unnecessary and

unportable backslashes in awk script (per Patrick Welche), and add
brackets to prevent autoconf from mangling sed's regexp (the sed call
here never did what was expected).
This commit is contained in:
Tom Lane
2007-06-29 16:18:43 +00:00
parent 4303c0fdbf
commit c786796d0a
2 changed files with 5 additions and 5 deletions

4
configure vendored
View File

@ -5271,9 +5271,9 @@ fi
# 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 tab
PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
tr '.' ' ' |
$AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
cat >>confdefs.h <<_ACEOF
#define PG_VERSION_NUM $PG_VERSION_NUM