aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-08-25 17:27:36 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-08-25 17:27:36 -0400
commit7327cb6420106d60d3a1a817648b145d602fbc52 (patch)
treef4b7cb65885e6552eeb7a1c8c88fb515df5a4232 /src
parent28190bacfd4657954c2cd594cc1c3e6b691538b9 (diff)
downloadpostgresql-7327cb6420106d60d3a1a817648b145d602fbc52.tar.gz
postgresql-7327cb6420106d60d3a1a817648b145d602fbc52.zip
Port backup check on psql lexer to MSVC.
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/pgflex.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl
index 332d422f649..36636ccaf35 100644
--- a/src/tools/msvc/pgflex.pl
+++ b/src/tools/msvc/pgflex.pl
@@ -65,6 +65,20 @@ if ($? == 0)
print $cfile $ccode;
close($cfile);
}
+ if ($flexflags =~ /\s-b\s/)
+ {
+ my $lexback = dirname($input) . "/lex.backup";
+ open($lfile,$lexback) || die "opening $lexback for reading: $!";
+ my $lexbacklines = <$lfile>;
+ close($lfile);
+ my $linecount = $lexbacklines =~ tr /\n/\n/;
+ if ($linecount != 1)
+ {
+ print "Scanner requires backup, see lex.backup.\n";
+ exit 1;
+ }
+ unlink $lexback;
+ }
exit 0;