From 49cc503f54c21e4102f3772da65576fc88134ce0 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 21 Feb 2007 12:28:27 +0000 Subject: [PATCH] Revert changes to process pg_proc.h entries without OIDs. We're not supposed to have such entries, and want to be notified when we do... Leave the plain bugfix in genbki. --- src/tools/msvc/Solution.pm | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index df7f13e140..9fbb4b9b43 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -145,7 +145,7 @@ sub GenerateFiles { print H "/* fmgroids.h generated for Visual C++ */\n#ifndef FMGROIDS_H\n#define FMGROIDS_H\n\n"; open(T,">src\\backend\\utils\\fmgrtab.c") || confess "Could not open fmgrtab.c"; print T "/* fmgrtab.c generated for Visual C++ */\n#include \"postgres.h\"\n#include \"utils/fmgrtab.h\"\n\n"; - foreach my $s (sort {intval($a->{oid}) <=> intval($b->{oid})} @fmgr) { + foreach my $s (sort {$a->{oid} <=> $b->{oid}} @fmgr) { next if $seenit{$s->{prosrc}}; $seenit{$s->{prosrc}} = 1; print H "#define F_" . uc $s->{prosrc} . " $s->{oid}\n"; @@ -157,9 +157,8 @@ sub GenerateFiles { my %bmap; $bmap{'t'} = 'true'; $bmap{'f'} = 'false'; - foreach my $s (sort {intval($a->{oid}) <=> intval($b->{oid})} @fmgr) { - my $o = intval($s->{oid}); - print T " { $o, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} },\n"; + foreach my $s (sort {$a->{oid} <=> $b->{oid}} @fmgr) { + print T " { $s->{oid}, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} },\n"; } @@ -232,14 +231,6 @@ EOF } } -sub intval { - my $v = shift; - if ($v =~ /^\d+$/) { - return $v; - } - return 0; -} - sub AddProject { my ($self, $name, $type, $folder, $initialdir) = @_; -- 2.40.0