Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e7a770

Browse files
committed
Fix configure's incorrect version tests for flex and perl.
awk's equality-comparison operator is "==" not "=". We got this rightin many places, but not in configure's checks for supported versionnumbers of flex and perl. It hadn't been noticed because unsupportedversions are so old as to be basically extinct in the wild, and becausethe only consequence is whether or not a WARNING flies by duringconfigure.Daniel Gustafsson noted the problem with respect to the test for flex,I found the other by reviewing other awk calls.
1 parentad5993d commit5e7a770

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎config/perl.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if test "$PERL"; then
1313
pgac_perl_version=`$PERL -v 2>/dev/null | sed -n['s/This is perl.*v[a-z]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']`
1414
AC_MSG_NOTICE([using perl $pgac_perl_version])
1515
if echo "$pgac_perl_version" | sed['s/[.a-z_]/ /g'] | \
16-
$AWK '{ if ([$]1 = 5 &&[$]2 >= 8) exit 1; else exit 0;}'
16+
$AWK '{ if ([$]1 == 5 &&[$]2 >= 8) exit 1; else exit 0;}'
1717
then
1818
AC_MSG_WARN([
1919
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.

‎config/programs.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ else
7777
echo '%%' > conftest.l
7878
if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7979
pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
80-
if echo "$pgac_flex_version" | sed['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 = 2 && ([$]2 > 5 || ([$]2 = 5 &&[$]3 >= 31))) exit 0; else exit 1;}'
80+
if echo "$pgac_flex_version" | sed['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 == 2 && ([$]2 > 5 || ([$]2== 5 &&[$]3 >= 31))) exit 0; else exit 1;}'
8181
then
8282
pgac_cv_path_flex=$pgac_candidate
8383
break 2

‎configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7272,7 +7272,7 @@ else
72727272
echo'%%'> conftest.l
72737273
if$pgac_candidate -t conftest.l2>/dev/null| grep FLEX_SCANNER>/dev/null2>&1;then
72747274
pgac_flex_version=`$pgac_candidate --version2>/dev/null`
7275-
ifecho"$pgac_flex_version"| sed's/[.a-z]/ /g'|$AWK'{ if ($1 = 2 && ($2 > 5 || ($2 = 5 && $3 >= 31))) exit 0; else exit 1;}'
7275+
ifecho"$pgac_flex_version"| sed's/[.a-z]/ /g'|$AWK'{ if ($1 == 2 && ($2 > 5 || ($2== 5 && $3 >= 31))) exit 0; else exit 1;}'
72767276
then
72777277
pgac_cv_path_flex=$pgac_candidate
72787278
break 2
@@ -7370,7 +7370,7 @@ if test "$PERL"; then
73707370
{$as_echo"$as_me:${as_lineno-$LINENO}: using perl$pgac_perl_version">&5
73717371
$as_echo"$as_me: using perl$pgac_perl_version">&6;}
73727372
ifecho"$pgac_perl_version"| sed's/[.a-z_]/ /g'| \
7373-
$AWK'{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7373+
$AWK'{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
73747374
then
73757375
{$as_echo"$as_me:${as_lineno-$LINENO}: WARNING:
73767376
*** The installed version of Perl,$PERL, is too old to use with PostgreSQL.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp