diff options
Diffstat (limited to 'src/tools')
26 files changed, 732 insertions, 690 deletions
diff --git a/src/tools/PerfectHash.pm b/src/tools/PerfectHash.pm index d1446385bef..e54905a3ef8 100644 --- a/src/tools/PerfectHash.pm +++ b/src/tools/PerfectHash.pm @@ -96,7 +96,7 @@ sub generate_hash_function { $hash_mult2 = $_; # "foreach $hash_mult2" doesn't work @subresult = _construct_hash_table( - $keys_ref, $hash_mult1, $hash_mult2, + $keys_ref, $hash_mult1, $hash_mult2, $hash_seed1, $hash_seed2); last FIND_PARAMS if @subresult; } @@ -108,8 +108,8 @@ sub generate_hash_function # Extract info from _construct_hash_table's result array. my $elemtype = $subresult[0]; - my @hashtab = @{ $subresult[1] }; - my $nhash = scalar(@hashtab); + my @hashtab = @{ $subresult[1] }; + my $nhash = scalar(@hashtab); # OK, construct the hash function definition including the hash table. my $f = ''; @@ -138,11 +138,11 @@ sub generate_hash_function $f .= sprintf "\tconst unsigned char *k = (const unsigned char *) key;\n"; $f .= sprintf "\tsize_t\t\tkeylen = %d;\n", $options{fixed_key_length} if (defined $options{fixed_key_length}); - $f .= sprintf "\tuint32\t\ta = %d;\n", $hash_seed1; + $f .= sprintf "\tuint32\t\ta = %d;\n", $hash_seed1; $f .= sprintf "\tuint32\t\tb = %d;\n\n", $hash_seed2; $f .= sprintf "\twhile (keylen--)\n\t{\n"; $f .= sprintf "\t\tunsigned char c = *k++"; - $f .= sprintf " | 0x20" if $case_fold; # see comment below + $f .= sprintf " | 0x20" if $case_fold; # see comment below $f .= sprintf ";\n\n"; $f .= sprintf "\t\ta = a * %d + c;\n", $hash_mult1; $f .= sprintf "\t\tb = b * %d + c;\n", $hash_mult2; @@ -344,7 +344,7 @@ sub _construct_hash_table && $hmin + 0x7F >= $nedges) { # int8 will work - $elemtype = 'int8'; + $elemtype = 'int8'; $unused_flag = 0x7F; } elsif ($hmin >= -0x7FFF @@ -352,7 +352,7 @@ sub _construct_hash_table && $hmin + 0x7FFF >= $nedges) { # int16 will work - $elemtype = 'int16'; + $elemtype = 'int16'; $unused_flag = 0x7FFF; } elsif ($hmin >= -0x7FFFFFFF @@ -360,7 +360,7 @@ sub _construct_hash_table && $hmin + 0x3FFFFFFF >= $nedges) { # int32 will work - $elemtype = 'int32'; + $elemtype = 'int32'; $unused_flag = 0x3FFFFFFF; } else diff --git a/src/tools/check_bison_recursion.pl b/src/tools/check_bison_recursion.pl index c856f6ac300..18f14ad1272 100755 --- a/src/tools/check_bison_recursion.pl +++ b/src/tools/check_bison_recursion.pl @@ -52,16 +52,16 @@ while (<>) { # first rule for nonterminal - $rule_number = $1; + $rule_number = $1; $cur_nonterminal = $2; - $rhs = $3; + $rhs = $3; } elsif (m/^\s*(\d+)\s+\|\s+(.*)$/) { # additional rule for nonterminal $rule_number = $1; - $rhs = $2; + $rhs = $2; } } diff --git a/src/tools/ci/windows_build_config.pl b/src/tools/ci/windows_build_config.pl index 59268a0bb60..b0d4360c748 100644 --- a/src/tools/ci/windows_build_config.pl +++ b/src/tools/ci/windows_build_config.pl @@ -4,10 +4,10 @@ use warnings; our $config; $config->{"tap_tests"} = 1; -$config->{"asserts"} = 1; +$config->{"asserts"} = 1; $config->{"openssl"} = "c:/openssl/1.1/"; -$config->{"perl"} = "c:/strawberry/$ENV{DEFAULT_PERL_VERSION}/perl/"; -$config->{"python"} = "c:/python/"; +$config->{"perl"} = "c:/strawberry/$ENV{DEFAULT_PERL_VERSION}/perl/"; +$config->{"python"} = "c:/python/"; 1; diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl index e870a01233f..30c38c757b2 100755 --- a/src/tools/copyright.pl +++ b/src/tools/copyright.pl @@ -16,8 +16,8 @@ use File::Find; use File::Basename; use Tie::File; -my $pgdg = 'PostgreSQL Global Development Group'; -my $cc = 'Copyright \(c\)'; +my $pgdg = 'PostgreSQL Global Development Group'; +my $cc = 'Copyright \(c\)'; my $ccliteral = 'Copyright (c)'; # year-1900 is what localtime(time) puts in element 5 diff --git a/src/tools/gen_export.pl b/src/tools/gen_export.pl index 68b3ab86614..ed60abe9562 100644 --- a/src/tools/gen_export.pl +++ b/src/tools/gen_export.pl @@ -8,12 +8,15 @@ my $input; my $output; GetOptions( - 'format:s' => \$format, - 'libname:s' => \$libname, + 'format:s' => \$format, + 'libname:s' => \$libname, 'input:s' => \$input, - 'output:s' => \$output) or die "wrong arguments"; + 'output:s' => \$output) or die "wrong arguments"; -if (not ($format eq 'aix' or $format eq 'darwin' or $format eq 'gnu' or $format eq 'win')) +if (not( $format eq 'aix' + or $format eq 'darwin' + or $format eq 'gnu' + or $format eq 'win')) { die "$0: $format is not yet handled (only aix, darwin, gnu, win are)\n"; } diff --git a/src/tools/gen_keywordlist.pl b/src/tools/gen_keywordlist.pl index 345dff6677f..97a9ff1b301 100644 --- a/src/tools/gen_keywordlist.pl +++ b/src/tools/gen_keywordlist.pl @@ -38,15 +38,15 @@ use lib $FindBin::RealBin; use PerfectHash; my $output_path = ''; -my $extern = 0; -my $case_fold = 1; -my $varname = 'ScanKeywords'; +my $extern = 0; +my $case_fold = 1; +my $varname = 'ScanKeywords'; GetOptions( - 'output:s' => \$output_path, - 'extern' => \$extern, + 'output:s' => \$output_path, + 'extern' => \$extern, 'case-fold!' => \$case_fold, - 'varname:s' => \$varname) || usage(); + 'varname:s' => \$varname) || usage(); my $kw_input_file = shift @ARGV || die "No input file.\n"; @@ -59,10 +59,10 @@ if ($output_path ne '' && substr($output_path, -1) ne '/') $kw_input_file =~ /(\w+)\.h$/ || die "Input file must be named something.h.\n"; my $base_filename = $1 . '_d'; -my $kw_def_file = $output_path . $base_filename . '.h'; +my $kw_def_file = $output_path . $base_filename . '.h'; -open(my $kif, '<', $kw_input_file) || die "$kw_input_file: $!\n"; -open(my $kwdef, '>', $kw_def_file) || die "$kw_def_file: $!\n"; +open(my $kif, '<', $kw_input_file) || die "$kw_input_file: $!\n"; +open(my $kwdef, '>', $kw_def_file) || die "$kw_def_file: $!\n"; # Opening boilerplate for keyword definition header. printf $kwdef <<EOM, $base_filename, uc $base_filename, uc $base_filename; @@ -135,7 +135,7 @@ print $kwdef qq|";\n\n|; printf $kwdef "static const uint16 %s_kw_offsets[] = {\n", $varname; -my $offset = 0; +my $offset = 0; my $max_len = 0; foreach my $name (@keywords) { @@ -171,11 +171,11 @@ printf $kwdef qq|static %s\n|, $f; printf $kwdef "static " if !$extern; printf $kwdef "const ScanKeywordList %s = {\n", $varname; -printf $kwdef qq|\t%s_kw_string,\n|, $varname; -printf $kwdef qq|\t%s_kw_offsets,\n|, $varname; -printf $kwdef qq|\t%s,\n|, $funcname; -printf $kwdef qq|\t%s_NUM_KEYWORDS,\n|, uc $varname; -printf $kwdef qq|\t%d\n|, $max_len; +printf $kwdef qq|\t%s_kw_string,\n|, $varname; +printf $kwdef qq|\t%s_kw_offsets,\n|, $varname; +printf $kwdef qq|\t%s,\n|, $funcname; +printf $kwdef qq|\t%s_NUM_KEYWORDS,\n|, uc $varname; +printf $kwdef qq|\t%d\n|, $max_len; printf $kwdef "};\n\n"; printf $kwdef "#endif\t\t\t\t\t\t\t/* %s_H */\n", uc $base_filename; diff --git a/src/tools/git_changelog b/src/tools/git_changelog index b3892f46511..14b94720282 100755 --- a/src/tools/git_changelog +++ b/src/tools/git_changelog @@ -69,24 +69,24 @@ my @BRANCHES = qw(master # Might want to make this parameter user-settable. my $timestamp_slop = 24 * 60 * 60; -my $brief = 0; -my $details_after = 0; -my $post_date = 0; -my $master_only = 0; +my $brief = 0; +my $details_after = 0; +my $post_date = 0; +my $master_only = 0; my $non_master_only = 0; -my $oldest_first = 0; +my $oldest_first = 0; my $since; my @output_buffer; my $output_line = ''; Getopt::Long::GetOptions( - 'brief' => \$brief, - 'details-after' => \$details_after, - 'master-only' => \$master_only, + 'brief' => \$brief, + 'details-after' => \$details_after, + 'master-only' => \$master_only, 'non-master-only' => \$non_master_only, - 'post-date' => \$post_date, - 'oldest-first' => \$oldest_first, - 'since=s' => \$since) || usage(); + 'post-date' => \$post_date, + 'oldest-first' => \$oldest_first, + 'since=s' => \$since) || usage(); usage() if @ARGV; my @git = qw(git log --format=fuller --date=iso); @@ -104,7 +104,7 @@ my %rel_tags; if ($line =~ m|^([a-f0-9]+)\s+commit\s+refs/tags/(\S+)|) { my $commit = $1; - my $tag = $2; + my $tag = $2; if ( $tag =~ /^REL_\d+_\d+$/ || $tag =~ /^REL\d+_\d+$/ || $tag =~ /^REL\d+_\d+_\d+$/) @@ -152,10 +152,10 @@ for my $branch (@BRANCHES) push_commit(\%commit) if %commit; $last_tag = $rel_tags{$1} if defined $rel_tags{$1}; %commit = ( - 'branch' => $branch, - 'commit' => $1, + 'branch' => $branch, + 'commit' => $1, 'last_tag' => $last_tag, - 'message' => '',); + 'message' => '',); if ($line =~ /^commit\s+\S+\s+(\S+)/) { $last_parent = $1; @@ -195,7 +195,7 @@ for my $branch (@BRANCHES) for my $cc (@{ $all_commits_by_branch{'master'} }) { my $commit = $cc->{'commit'}; - my $c = $cc->{'commits'}->[0]; + my $c = $cc->{'commits'}->[0]; $last_tag = $rel_tags{$commit} if defined $rel_tags{$commit}; if (defined $sprout_tags{$commit}) { @@ -243,7 +243,7 @@ while (1) if (!defined $best_branch || $leader->{'timestamp'} > $best_timestamp) { - $best_branch = $branch; + $best_branch = $branch; $best_timestamp = $leader->{'timestamp'}; } } @@ -291,8 +291,8 @@ print @output_buffer if ($oldest_first); sub push_commit { my ($c) = @_; - my $ht = hash_commit($c); - my $ts = parse_datetime($c->{'date'}); + my $ht = hash_commit($c); + my $ts = parse_datetime($c->{'date'}); my $cc; # Note that this code will never merge two commits on the same branch, @@ -316,10 +316,10 @@ sub push_commit if (!defined $cc) { $cc = { - 'author' => $c->{'author'}, - 'message' => $c->{'message'}, - 'commit' => $c->{'commit'}, - 'commits' => [], + 'author' => $c->{'author'}, + 'message' => $c->{'message'}, + 'commit' => $c->{'commit'}, + 'commits' => [], 'timestamp' => $ts }; push @{ $all_commits{$ht} }, $cc; @@ -327,9 +327,9 @@ sub push_commit # stash only the fields we'll need later my $smallc = { - 'branch' => $c->{'branch'}, - 'commit' => $c->{'commit'}, - 'date' => $c->{'date'}, + 'branch' => $c->{'branch'}, + 'commit' => $c->{'commit'}, + 'date' => $c->{'date'}, 'last_tag' => $c->{'last_tag'} }; push @{ $cc->{'commits'} }, $smallc; @@ -385,9 +385,9 @@ sub output_details output_str( "%s [%s] %s\n", - substr($c->{'date'}, 0, 10), + substr($c->{'date'}, 0, 10), substr($c->{'commit'}, 0, 9), - substr($1, 0, 56)); + substr($1, 0, 56)); } else { diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl index 0cf71dbc258..45b4e73bff1 100755 --- a/src/tools/mark_pgdllimport.pl +++ b/src/tools/mark_pgdllimport.pl @@ -28,7 +28,7 @@ use warnings; for my $include_file (@ARGV) { open(my $rfh, '<', $include_file) || die "$include_file: $!"; - my $buffer = ''; + my $buffer = ''; my $num_pgdllimport_added = 0; while (my $raw_line = <$rfh>) diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index bf28cd8470d..05548d7c0aa 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -17,22 +17,22 @@ use File::Find (); use Exporter; our (@ISA, @EXPORT_OK); -@ISA = qw(Exporter); +@ISA = qw(Exporter); @EXPORT_OK = qw(Install); my $insttype; my @client_contribs = ('oid2name', 'pgbench', 'vacuumlo'); my @client_program_files = ( - 'clusterdb', 'createdb', 'createuser', 'dropdb', - 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', - 'libpgtypes', 'libpq', 'pg_amcheck', 'pg_basebackup', - 'pg_config', 'pg_dump', 'pg_dumpall', 'pg_isready', + 'clusterdb', 'createdb', 'createuser', 'dropdb', + 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', + 'libpgtypes', 'libpq', 'pg_amcheck', 'pg_basebackup', + 'pg_config', 'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', 'pg_recvlogical', 'pg_restore', 'psql', - 'reindexdb', 'vacuumdb', @client_contribs); + 'reindexdb', 'vacuumdb', @client_contribs); sub lcopy { - my $src = shift; + my $src = shift; my $target = shift; if (-f $target) @@ -104,7 +104,7 @@ sub Install CopySolutionOutput($conf, $target); my $sample_files = []; - my @top_dir = ("src"); + my @top_dir = ("src"); @top_dir = ("src\\bin", "src\\interfaces") if ($insttype eq "client"); File::Find::find( { @@ -146,9 +146,9 @@ sub Install $target . '/share/'); CopyFiles( 'Information schema data', $target . '/share/', - 'src/backend/catalog/', 'sql_features.txt'); + 'src/backend/catalog/', 'sql_features.txt'); CopyFiles( - 'Error code data', $target . '/share/', + 'Error code data', $target . '/share/', 'src/backend/utils/', 'errcodes.txt'); GenerateTimezoneFiles($target, $conf); GenerateTsearchFiles($target); @@ -162,10 +162,10 @@ sub Install $target . '/share/tsearch_data/'); my $pl_extension_files = []; - my @pldirs = ('src/pl/plpgsql/src'); - push @pldirs, "src/pl/plperl" if $config->{perl}; + my @pldirs = ('src/pl/plpgsql/src'); + push @pldirs, "src/pl/plperl" if $config->{perl}; push @pldirs, "src/pl/plpython" if $config->{python}; - push @pldirs, "src/pl/tcl" if $config->{tcl}; + push @pldirs, "src/pl/tcl" if $config->{tcl}; File::Find::find( { wanted => sub { @@ -200,8 +200,8 @@ sub EnsureDirectories sub CopyFiles { - my $what = shift; - my $target = shift; + my $what = shift; + my $target = shift; my $basedir = shift; print "Copying $what"; @@ -218,8 +218,8 @@ sub CopyFiles sub CopySetOfFiles { - my $what = shift; - my $flist = shift; + my $what = shift; + my $flist = shift; my $target = shift; print "Copying $what" if $what; foreach (@$flist) @@ -234,7 +234,7 @@ sub CopySetOfFiles sub CopySolutionOutput { - my $conf = shift; + my $conf = shift; my $target = shift; my $rem = qr{Project\("\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942\}"\) = "([^"]+)"}; @@ -361,8 +361,8 @@ sub CopySolutionOutput sub GenerateTimezoneFiles { my $target = shift; - my $conf = shift; - my $mf = read_file("src/timezone/Makefile"); + my $conf = shift; + my $mf = read_file("src/timezone/Makefile"); $mf =~ s{\\\r?\n}{}g; $mf =~ /^TZDATAFILES\s*:?=\s*(.*)$/m @@ -389,7 +389,8 @@ sub GenerateTsearchFiles my $target = shift; print "Generating tsearch script..."; - system('perl', 'src/backend/snowball/snowball_create.pl', + system( + 'perl', 'src/backend/snowball/snowball_create.pl', '--input', 'src/backend/snowball/', '--outdir', "$target/share/"); print "\n"; @@ -409,11 +410,11 @@ sub CopyContribFiles while (my $d = readdir($D)) { # These configuration-based exclusions must match vcregress.pl - next if ($d eq "uuid-ossp" && !defined($config->{uuid})); - next if ($d eq "sslinfo" && !defined($config->{openssl})); - next if ($d eq "pgcrypto" && !defined($config->{openssl})); - next if ($d eq "xml2" && !defined($config->{xml})); - next if ($d =~ /_plperl$/ && !defined($config->{perl})); + next if ($d eq "uuid-ossp" && !defined($config->{uuid})); + next if ($d eq "sslinfo" && !defined($config->{openssl})); + next if ($d eq "pgcrypto" && !defined($config->{openssl})); + next if ($d eq "xml2" && !defined($config->{xml})); + next if ($d =~ /_plperl$/ && !defined($config->{perl})); next if ($d =~ /_plpython$/ && !defined($config->{python})); next if ($d eq "sepgsql"); @@ -494,7 +495,7 @@ sub CopySubdirFiles { $flist = ''; if ($mf =~ /^HEADERS\s*=\s*(.*)$/m) { $flist .= $1 } - my @modlist = (); + my @modlist = (); my %fmodlist = (); while ($mf =~ /^HEADERS_([^\s=]+)\s*=\s*(.*)$/mg) { @@ -559,7 +560,7 @@ sub CopySubdirFiles sub ParseAndCleanRule { my $flist = shift; - my $mf = shift; + my $mf = shift; # Strip out $(addsuffix) rules if (index($flist, '$(addsuffix ') >= 0) @@ -573,10 +574,10 @@ sub ParseAndCleanRule { $pcount++ if (substr($flist, $i, 1) eq '('); $pcount-- if (substr($flist, $i, 1) eq ')'); - last if ($pcount < 0); + last if ($pcount < 0); } $flist = - substr($flist, 0, index($flist, '$(addsuffix ')) + substr($flist, 0, index($flist, '$(addsuffix ')) . substr($flist, $i + 1); } return $flist; @@ -591,8 +592,8 @@ sub CopyIncludeFiles CopyFiles( 'Public headers', $target . '/include/', - 'src/include/', 'postgres_ext.h', - 'pg_config.h', 'pg_config_ext.h', + 'src/include/', 'postgres_ext.h', + 'pg_config.h', 'pg_config_ext.h', 'pg_config_os.h', 'pg_config_manual.h'); lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/') || croak 'Could not copy libpq-fs.h'; @@ -669,8 +670,8 @@ sub CopyIncludeFiles sub GenerateNLSFiles { - my $target = shift; - my $nlspath = shift; + my $target = shift; + my $nlspath = shift; my $majorver = shift; print "Installing NLS files..."; diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 4b8917e34f9..be17790e32d 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -19,11 +19,11 @@ no warnings qw(redefine); ## no critic sub _new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); $self->{filenameExtension} = '.vcxproj'; - $self->{ToolsVersion} = '4.0'; + $self->{ToolsVersion} = '4.0'; return $self; } @@ -51,7 +51,7 @@ EOF { # remove trailing backslash if necessary. $sdkVersion =~ s/\\$//; - print $f <<EOF + print $f <<EOF; <WindowsTargetPlatformVersion>$sdkVersion</WindowsTargetPlatformVersion> EOF } @@ -84,8 +84,8 @@ EOF $self->WriteItemDefinitionGroup( $f, 'Debug', { - defs => "_DEBUG;DEBUG=1", - opt => 'Disabled', + defs => "_DEBUG;DEBUG=1", + opt => 'Disabled', strpool => 'false', runtime => 'MultiThreadedDebugDLL' }); @@ -93,8 +93,8 @@ EOF $f, 'Release', { - defs => "", - opt => 'Full', + defs => "", + opt => 'Full', strpool => 'true', runtime => 'MultiThreadedDLL' }); @@ -141,14 +141,14 @@ sub WriteFiles print $f <<EOF; <ItemGroup> EOF - my @grammarFiles = (); + my @grammarFiles = (); my @resourceFiles = (); my %uniquefiles; foreach my $fileNameWithPath (sort keys %{ $self->{files} }) { confess "Bad format filename '$fileNameWithPath'\n" unless ($fileNameWithPath =~ m!^(.*)/([^/]+)\.(c|cpp|y|l|rc)$!); - my $dir = $1; + my $dir = $1; my $fileName = $2; if ($fileNameWithPath =~ /\.y$/ or $fileNameWithPath =~ /\.l$/) { @@ -312,8 +312,7 @@ sub WriteItemDefinitionGroup my $targetmachine = $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64'; - my $arch = - $self->{platform} eq 'Win32' ? 'x86' : 'x86_64'; + my $arch = $self->{platform} eq 'Win32' ? 'x86' : 'x86_64'; my $includes = join ';', @{ $self->{includes} }, ""; @@ -421,12 +420,12 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{vcver} = '14.00'; + $self->{vcver} = '14.00'; $self->{PlatformToolset} = 'v140'; - $self->{ToolsVersion} = '14.0'; + $self->{ToolsVersion} = '14.0'; return $self; } @@ -446,12 +445,12 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{vcver} = '15.00'; + $self->{vcver} = '15.00'; $self->{PlatformToolset} = 'v141'; - $self->{ToolsVersion} = '15.0'; + $self->{ToolsVersion} = '15.0'; return $self; } @@ -471,12 +470,12 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{vcver} = '16.00'; + $self->{vcver} = '16.00'; $self->{PlatformToolset} = 'v142'; - $self->{ToolsVersion} = '16.0'; + $self->{ToolsVersion} = '16.0'; return $self; } @@ -496,12 +495,12 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{vcver} = '17.00'; + $self->{vcver} = '17.00'; $self->{PlatformToolset} = 'v143'; - $self->{ToolsVersion} = '17.0'; + $self->{ToolsVersion} = '17.0'; return $self; } diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 958206f3155..9e05eb91b1a 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -23,7 +23,7 @@ use List::Util qw(first); use Exporter; our (@ISA, @EXPORT_OK); -@ISA = qw(Exporter); +@ISA = qw(Exporter); @EXPORT_OK = qw(Mkvcbuild); my $solution; @@ -35,21 +35,21 @@ my $libpq; my @unlink_on_exit; # Set of variables for modules in contrib/ and src/test/modules/ -my $contrib_defines = {}; -my @contrib_uselibpq = (); -my @contrib_uselibpgport = (); +my $contrib_defines = {}; +my @contrib_uselibpq = (); +my @contrib_uselibpgport = (); my @contrib_uselibpgcommon = (); -my $contrib_extralibs = { 'libpq_pipeline' => ['ws2_32.lib'] }; -my $contrib_extraincludes = {}; -my $contrib_extrasource = {}; -my @contrib_excludes = ( - 'bool_plperl', 'commit_ts', - 'hstore_plperl', 'hstore_plpython', - 'intagg', 'jsonb_plperl', - 'jsonb_plpython', 'ltree_plpython', - 'sepgsql', 'brin', +my $contrib_extralibs = { 'libpq_pipeline' => ['ws2_32.lib'] }; +my $contrib_extraincludes = {}; +my $contrib_extrasource = {}; +my @contrib_excludes = ( + 'bool_plperl', 'commit_ts', + 'hstore_plperl', 'hstore_plpython', + 'intagg', 'jsonb_plperl', + 'jsonb_plpython', 'ltree_plpython', + 'sepgsql', 'brin', 'test_extensions', 'test_misc', - 'test_pg_dump', 'snapshot_too_old', + 'test_pg_dump', 'snapshot_too_old', 'unsafe_tests'); # Set of variables for frontend modules @@ -57,25 +57,25 @@ my $frontend_defines = { 'pgbench' => 'FD_SETSIZE=1024' }; my @frontend_uselibpq = ('pg_amcheck', 'pg_ctl', 'pg_upgrade', 'pgbench', 'psql', 'initdb'); my @frontend_uselibpgport = ( - 'pg_amcheck', 'pg_archivecleanup', + 'pg_amcheck', 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', - 'pg_upgrade', 'pg_waldump', + 'pg_upgrade', 'pg_waldump', 'pgbench'); my @frontend_uselibpgcommon = ( - 'pg_amcheck', 'pg_archivecleanup', + 'pg_amcheck', 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', - 'pg_upgrade', 'pg_waldump', + 'pg_upgrade', 'pg_waldump', 'pgbench'); my $frontend_extralibs = { - 'initdb' => ['ws2_32.lib'], + 'initdb' => ['ws2_32.lib'], 'pg_amcheck' => ['ws2_32.lib'], 'pg_restore' => ['ws2_32.lib'], - 'pgbench' => ['ws2_32.lib'], - 'psql' => ['ws2_32.lib'] + 'pgbench' => ['ws2_32.lib'], + 'psql' => ['ws2_32.lib'] }; my $frontend_extraincludes = { 'initdb' => ['src/timezone'], - 'psql' => ['src/backend'] + 'psql' => ['src/backend'] }; my $frontend_extrasource = { 'psql' => ['src/bin/psql/psqlscanslash.l'], @@ -83,7 +83,7 @@ my $frontend_extrasource = { [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] }; my @frontend_excludes = ( - 'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', + 'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'pg_waldump', 'scripts'); sub mkvcbuild @@ -191,7 +191,7 @@ sub mkvcbuild 'src/backend/port/win32_sema.c'); $postgres->ReplaceFile('src/backend/port/pg_shmem.c', 'src/backend/port/win32_shmem.c'); - $postgres->AddFiles('src/port', @pgportfiles); + $postgres->AddFiles('src/port', @pgportfiles); $postgres->AddFiles('src/common', @pgcommonbkndfiles); $postgres->AddDir('src/timezone'); @@ -204,7 +204,7 @@ sub mkvcbuild $postgres->AddFiles('src/backend/utils/misc', 'guc-file.l'); $postgres->AddFiles( 'src/backend/replication', 'repl_scanner.l', - 'repl_gram.y', 'syncrep_scanner.l', + 'repl_gram.y', 'syncrep_scanner.l', 'syncrep_gram.y'); $postgres->AddFiles('src/backend/utils/adt', 'jsonpath_scan.l', 'jsonpath_gram.y'); @@ -334,7 +334,7 @@ sub mkvcbuild my $libecpgcompat = $solution->AddProject( 'libecpg_compat', 'dll', - 'interfaces', 'src/interfaces/ecpg/compatlib'); + 'interfaces', 'src/interfaces/ecpg/compatlib'); $libecpgcompat->AddIncludeDir('src/interfaces/ecpg/include'); $libecpgcompat->AddIncludeDir('src/interfaces/libpq'); $libecpgcompat->UseDef('src/interfaces/ecpg/compatlib/compatlib.def'); @@ -536,19 +536,19 @@ sub mkvcbuild # Add transform modules dependent on plpython my $hstore_plpython = AddTransformModule( 'hstore_plpython' . $pymajorver, 'contrib/hstore_plpython', - 'plpython' . $pymajorver, 'src/pl/plpython', - 'hstore', 'contrib'); + 'plpython' . $pymajorver, 'src/pl/plpython', + 'hstore', 'contrib'); $hstore_plpython->AddDefine( 'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"'); my $jsonb_plpython = AddTransformModule( 'jsonb_plpython' . $pymajorver, 'contrib/jsonb_plpython', - 'plpython' . $pymajorver, 'src/pl/plpython'); + 'plpython' . $pymajorver, 'src/pl/plpython'); $jsonb_plpython->AddDefine( 'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"'); my $ltree_plpython = AddTransformModule( 'ltree_plpython' . $pymajorver, 'contrib/ltree_plpython', - 'plpython' . $pymajorver, 'src/pl/plpython', - 'ltree', 'contrib'); + 'plpython' . $pymajorver, 'src/pl/plpython', + 'ltree', 'contrib'); $ltree_plpython->AddDefine( 'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"'); } @@ -612,9 +612,9 @@ sub mkvcbuild if ($solution->{platform} eq 'Win32') { my $source_file = 'conftest.c'; - my $obj = 'conftest.obj'; - my $exe = 'conftest.exe'; - my @conftest = ($source_file, $obj, $exe); + my $obj = 'conftest.obj'; + my $exe = 'conftest.exe'; + my @conftest = ($source_file, $obj, $exe); push @unlink_on_exit, @conftest; unlink $source_file; open my $o, '>', $source_file @@ -689,8 +689,8 @@ sub mkvcbuild }; my $define_32bit_time = '_USE_32BIT_TIME_T'; - my $ok_now = $try_define->(undef); - my $ok_32bit = $try_define->($define_32bit_time); + my $ok_now = $try_define->(undef); + my $ok_32bit = $try_define->($define_32bit_time); unlink @conftest; if (!$ok_now && !$ok_32bit) { @@ -790,14 +790,14 @@ sub mkvcbuild # Add transform modules dependent on plperl my $bool_plperl = AddTransformModule( 'bool_plperl', 'contrib/bool_plperl', - 'plperl', 'src/pl/plperl'); + 'plperl', 'src/pl/plperl'); my $hstore_plperl = AddTransformModule( 'hstore_plperl', 'contrib/hstore_plperl', - 'plperl', 'src/pl/plperl', - 'hstore', 'contrib'); + 'plperl', 'src/pl/plperl', + 'hstore', 'contrib'); my $jsonb_plperl = AddTransformModule( 'jsonb_plperl', 'contrib/jsonb_plperl', - 'plperl', 'src/pl/plperl'); + 'plperl', 'src/pl/plperl'); foreach my $f (@perl_embed_ccflags) { @@ -880,7 +880,7 @@ sub mkvcbuild # Add a simple frontend project (exe) sub AddSimpleFrontend { - my $n = shift; + my $n = shift; my $uselibpq = shift; my $p = $solution->AddProject($n, 'exe', 'bin'); @@ -901,12 +901,12 @@ sub AddSimpleFrontend # Add a simple transform module sub AddTransformModule { - my $n = shift; - my $n_src = shift; + my $n = shift; + my $n_src = shift; my $pl_proj_name = shift; - my $pl_src = shift; - my $type_name = shift; - my $type_src = shift; + my $pl_src = shift; + my $type_name = shift; + my $type_src = shift; my $type_proj = undef; if ($type_name) @@ -969,9 +969,9 @@ sub AddTransformModule # Add a simple contrib project sub AddContrib { - my $subdir = shift; - my $n = shift; - my $mf = Project::read_file("$subdir/$n/Makefile"); + my $subdir = shift; + my $n = shift; + my $mf = Project::read_file("$subdir/$n/Makefile"); my @projects = (); if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg) @@ -1084,7 +1084,7 @@ sub AddContrib sub GenerateContribSqlFiles { - my $n = shift; + my $n = shift; my $mf = shift; $mf =~ s{\\\r?\n}{}g; if ($mf =~ /^DATA_built\s*=\s*(.*)$/mg) @@ -1100,7 +1100,7 @@ sub GenerateContribSqlFiles { $pcount++ if (substr($l, $i, 1) eq '('); $pcount-- if (substr($l, $i, 1) eq ')'); - last if ($pcount < 0); + last if ($pcount < 0); } $l = substr($l, 0, index($l, '$(addsuffix ')) . substr($l, $i + 1); @@ -1108,14 +1108,14 @@ sub GenerateContribSqlFiles foreach my $d (split /\s+/, $l) { - my $in = "$d.in"; + my $in = "$d.in"; my $out = "$d"; if (Solution::IsNewer("contrib/$n/$out", "contrib/$n/$in")) { print "Building $out from $in (contrib/$n)...\n"; my $cont = Project::read_file("contrib/$n/$in"); - my $dn = $out; + my $dn = $out; $dn =~ s/\.sql$//; $cont =~ s/MODULE_PATHNAME/\$libdir\/$dn/g; my $o; @@ -1133,10 +1133,10 @@ sub AdjustContribProj { my $proj = shift; AdjustModule( - $proj, $contrib_defines, - \@contrib_uselibpq, \@contrib_uselibpgport, + $proj, $contrib_defines, + \@contrib_uselibpq, \@contrib_uselibpgport, \@contrib_uselibpgcommon, $contrib_extralibs, - $contrib_extrasource, $contrib_extraincludes); + $contrib_extrasource, $contrib_extraincludes); return; } @@ -1144,24 +1144,24 @@ sub AdjustFrontendProj { my $proj = shift; AdjustModule( - $proj, $frontend_defines, - \@frontend_uselibpq, \@frontend_uselibpgport, + $proj, $frontend_defines, + \@frontend_uselibpq, \@frontend_uselibpgport, \@frontend_uselibpgcommon, $frontend_extralibs, - $frontend_extrasource, $frontend_extraincludes); + $frontend_extrasource, $frontend_extraincludes); return; } sub AdjustModule { - my $proj = shift; - my $module_defines = shift; - my $module_uselibpq = shift; - my $module_uselibpgport = shift; + my $proj = shift; + my $module_defines = shift; + my $module_uselibpq = shift; + my $module_uselibpgport = shift; my $module_uselibpgcommon = shift; - my $module_extralibs = shift; - my $module_extrasource = shift; - my $module_extraincludes = shift; - my $n = $proj->{name}; + my $module_extralibs = shift; + my $module_extrasource = shift; + my $module_extraincludes = shift; + my $n = $proj->{name}; if ($module_defines->{$n}) { diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 1453979a763..0507ad08c5c 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -23,20 +23,20 @@ sub _new }; confess("Bad project type: $type\n") unless exists $good_types->{$type}; my $self = { - name => $name, - type => $type, - guid => $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE', - files => {}, - references => [], - libraries => [], - suffixlib => [], - includes => [], - prefixincludes => '', - defines => ';', - solution => $solution, - disablewarnings => '4018;4244;4273;4101;4102;4090;4267', + name => $name, + type => $type, + guid => $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE', + files => {}, + references => [], + libraries => [], + suffixlib => [], + includes => [], + prefixincludes => '', + defines => ';', + solution => $solution, + disablewarnings => '4018;4244;4273;4101;4102;4090;4267', disablelinkerwarnings => '', - platform => $solution->{platform}, + platform => $solution->{platform}, }; bless($self, $classname); @@ -63,7 +63,7 @@ sub AddDependantFiles sub AddFiles { my $self = shift; - my $dir = shift; + my $dir = shift; while (my $f = shift) { @@ -76,11 +76,11 @@ sub AddFiles # name but a different file extension and add those files too. sub FindAndAddAdditionalFiles { - my $self = shift; + my $self = shift; my $fname = shift; $fname =~ /(.*)(\.[^.]+)$/; my $filenoext = $1; - my $fileext = $2; + my $fileext = $2; # For .c files, check if either a .l or .y file of the same name # exists and add that too. @@ -229,8 +229,8 @@ sub FullExportDLL my ($self, $libname) = @_; $self->{builddef} = 1; - $self->{def} = "./__CFGNAME__/$self->{name}/$self->{name}.def"; - $self->{implib} = "__CFGNAME__/$self->{name}/$libname"; + $self->{def} = "./__CFGNAME__/$self->{name}/$self->{name}.def"; + $self->{implib} = "__CFGNAME__/$self->{name}/$libname"; return; } @@ -263,13 +263,13 @@ sub AddDir } while ($mf =~ m{^(?:EXTRA_)?OBJS[^=]*=\s*(.*)$}m) { - my $s = $1; + my $s = $1; my $filter_re = qr{\$\(filter ([^,]+),\s+\$\(([^\)]+)\)\)}; while ($s =~ /$filter_re/) { # Process $(filter a b c, $(VAR)) expressions - my $list = $1; + my $list = $1; my $filter = $2; $list =~ s/\.o/\.c/g; my @pieces = split /\s+/, $list; @@ -321,8 +321,8 @@ sub AddDir qr{^([^:\n\$]+\.c)\s*:\s*(?:%\s*: )?\$(\([^\)]+\))\/(.*)\/[^\/]+\n}m; while ($mf =~ m{$replace_re}m) { - my $match = $1; - my $top = $2; + my $match = $1; + my $top = $2; my $target = $3; my @pieces = split /\s+/, $match; foreach my $fn (@pieces) diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index ef10cda5766..b6d31c35835 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -18,14 +18,14 @@ no warnings qw(redefine); ## no critic sub _new { my $classname = shift; - my $options = shift; - my $self = { - projects => {}, - options => $options, - VisualStudioVersion => undef, + my $options = shift; + my $self = { + projects => {}, + options => $options, + VisualStudioVersion => undef, MinimumVisualStudioVersion => undef, - vcver => undef, - platform => undef, + vcver => undef, + platform => undef, }; bless($self, $classname); @@ -105,7 +105,7 @@ sub IsNewer sub copyFile { my ($src, $dest) = @_; - open(my $i, '<', $src) || croak "Could not open $src"; + open(my $i, '<', $src) || croak "Could not open $src"; open(my $o, '>', $dest) || croak "Could not open $dest"; while (<$i>) { @@ -147,8 +147,8 @@ sub GetOpenSSLVersion sub GenerateFiles { - my $self = shift; - my $bits = $self->{platform} eq 'Win32' ? 32 : 64; + my $self = shift; + my $bits = $self->{platform} eq 'Win32' ? 32 : 64; my $ac_init_found = 0; my $package_name; my $package_version; @@ -168,8 +168,8 @@ sub GenerateFiles { $ac_init_found = 1; - $package_name = $1; - $package_version = $2; + $package_name = $1; + $package_version = $2; $package_bugreport = $3; #$package_tarname = $4; $package_url = $5; @@ -184,7 +184,7 @@ sub GenerateFiles elsif (/\bAC_DEFINE\(OPENSSL_API_COMPAT, \[([0-9xL]+)\]/) { $ac_define_openssl_api_compat_found = 1; - $openssl_api_compat = $1; + $openssl_api_compat = $1; } } close($c); @@ -205,285 +205,285 @@ sub GenerateFiles # Every symbol in pg_config.h.in must be accounted for here. Set # to undef if the symbol should not be defined. my %define = ( - ALIGNOF_DOUBLE => 8, - ALIGNOF_INT => 4, - ALIGNOF_LONG => 4, - ALIGNOF_LONG_LONG_INT => 8, - ALIGNOF_PG_INT128_TYPE => undef, - ALIGNOF_SHORT => 2, - AC_APPLE_UNIVERSAL_BUILD => undef, - BLCKSZ => 1024 * $self->{options}->{blocksize}, - CONFIGURE_ARGS => '"' . $self->GetFakeConfigure() . '"', - DEF_PGPORT => $port, - DEF_PGPORT_STR => qq{"$port"}, - DLSUFFIX => '".dll"', - ENABLE_GSS => $self->{options}->{gss} ? 1 : undef, - ENABLE_NLS => $self->{options}->{nls} ? 1 : undef, - ENABLE_THREAD_SAFETY => 1, - HAVE_APPEND_HISTORY => undef, + ALIGNOF_DOUBLE => 8, + ALIGNOF_INT => 4, + ALIGNOF_LONG => 4, + ALIGNOF_LONG_LONG_INT => 8, + ALIGNOF_PG_INT128_TYPE => undef, + ALIGNOF_SHORT => 2, + AC_APPLE_UNIVERSAL_BUILD => undef, + BLCKSZ => 1024 * $self->{options}->{blocksize}, + CONFIGURE_ARGS => '"' . $self->GetFakeConfigure() . '"', + DEF_PGPORT => $port, + DEF_PGPORT_STR => qq{"$port"}, + DLSUFFIX => '".dll"', + ENABLE_GSS => $self->{options}->{gss} ? 1 : undef, + ENABLE_NLS => $self->{options}->{nls} ? 1 : undef, + ENABLE_THREAD_SAFETY => 1, + HAVE_APPEND_HISTORY => undef, HAVE_ASN1_STRING_GET0_DATA => undef, - HAVE_ATOMICS => 1, - HAVE_ATOMIC_H => undef, - HAVE_BACKTRACE_SYMBOLS => undef, - HAVE_BIO_GET_DATA => undef, - HAVE_BIO_METH_NEW => undef, - HAVE_COMPUTED_GOTO => undef, - HAVE_COPYFILE => undef, - HAVE_COPYFILE_H => undef, - HAVE_CRTDEFS_H => undef, - HAVE_CRYPTO_LOCK => undef, - HAVE_DECL_FDATASYNC => 0, - HAVE_DECL_F_FULLFSYNC => 0, + HAVE_ATOMICS => 1, + HAVE_ATOMIC_H => undef, + HAVE_BACKTRACE_SYMBOLS => undef, + HAVE_BIO_GET_DATA => undef, + HAVE_BIO_METH_NEW => undef, + HAVE_COMPUTED_GOTO => undef, + HAVE_COPYFILE => undef, + HAVE_COPYFILE_H => undef, + HAVE_CRTDEFS_H => undef, + HAVE_CRYPTO_LOCK => undef, + HAVE_DECL_FDATASYNC => 0, + HAVE_DECL_F_FULLFSYNC => 0, HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => 0, - HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => 0, - HAVE_DECL_LLVMGETHOSTCPUNAME => 0, - HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0, - HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0, - HAVE_DECL_POSIX_FADVISE => 0, - HAVE_DECL_PREADV => 0, - HAVE_DECL_PWRITEV => 0, - HAVE_DECL_STRLCAT => 0, - HAVE_DECL_STRLCPY => 0, - HAVE_DECL_STRNLEN => 1, - HAVE_EDITLINE_HISTORY_H => undef, - HAVE_EDITLINE_READLINE_H => undef, - HAVE_EXECINFO_H => undef, - HAVE_EXPLICIT_BZERO => undef, - HAVE_FSEEKO => 1, - HAVE_GCC__ATOMIC_INT32_CAS => undef, - HAVE_GCC__ATOMIC_INT64_CAS => undef, - HAVE_GCC__SYNC_CHAR_TAS => undef, - HAVE_GCC__SYNC_INT32_CAS => undef, - HAVE_GCC__SYNC_INT32_TAS => undef, - HAVE_GCC__SYNC_INT64_CAS => undef, - HAVE_GETIFADDRS => undef, - HAVE_GETOPT => undef, - HAVE_GETOPT_H => undef, - HAVE_GETOPT_LONG => undef, - HAVE_GETPEEREID => undef, - HAVE_GETPEERUCRED => undef, - HAVE_GSSAPI_EXT_H => undef, - HAVE_GSSAPI_GSSAPI_EXT_H => undef, - HAVE_GSSAPI_GSSAPI_H => undef, - HAVE_GSSAPI_H => undef, - HAVE_HMAC_CTX_FREE => undef, - HAVE_HMAC_CTX_NEW => undef, - HAVE_HISTORY_H => undef, - HAVE_HISTORY_TRUNCATE_FILE => undef, - HAVE_IFADDRS_H => undef, - HAVE_INET_ATON => undef, - HAVE_INET_PTON => 1, - HAVE_INT_TIMEZONE => 1, - HAVE_INT64 => undef, - HAVE_INT8 => undef, - HAVE_INTTYPES_H => undef, - HAVE_INT_OPTERR => undef, - HAVE_INT_OPTRESET => undef, - HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef, - HAVE_KQUEUE => undef, - HAVE_LANGINFO_H => undef, - HAVE_LDAP_INITIALIZE => undef, - HAVE_LIBCRYPTO => undef, - HAVE_LIBLDAP => undef, - HAVE_LIBLZ4 => undef, - HAVE_LIBM => undef, - HAVE_LIBPAM => undef, - HAVE_LIBREADLINE => undef, - HAVE_LIBSELINUX => undef, - HAVE_LIBSSL => undef, - HAVE_LIBWLDAP32 => undef, - HAVE_LIBXML2 => undef, - HAVE_LIBXSLT => undef, - HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef, - HAVE_LIBZSTD => undef, - HAVE_LOCALE_T => 1, - HAVE_LONG_INT_64 => undef, - HAVE_LONG_LONG_INT_64 => 1, - HAVE_MBARRIER_H => undef, - HAVE_MBSTOWCS_L => 1, - HAVE_MEMORY_H => 1, - HAVE_MEMSET_S => undef, - HAVE_MKDTEMP => undef, - HAVE_OPENSSL_INIT_SSL => undef, - HAVE_OSSP_UUID_H => undef, - HAVE_PAM_PAM_APPL_H => undef, - HAVE_POSIX_FADVISE => undef, - HAVE_POSIX_FALLOCATE => undef, - HAVE_PPOLL => undef, - HAVE_PTHREAD => undef, - HAVE_PTHREAD_BARRIER_WAIT => undef, + HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => 0, + HAVE_DECL_LLVMGETHOSTCPUNAME => 0, + HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0, + HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0, + HAVE_DECL_POSIX_FADVISE => 0, + HAVE_DECL_PREADV => 0, + HAVE_DECL_PWRITEV => 0, + HAVE_DECL_STRLCAT => 0, + HAVE_DECL_STRLCPY => 0, + HAVE_DECL_STRNLEN => 1, + HAVE_EDITLINE_HISTORY_H => undef, + HAVE_EDITLINE_READLINE_H => undef, + HAVE_EXECINFO_H => undef, + HAVE_EXPLICIT_BZERO => undef, + HAVE_FSEEKO => 1, + HAVE_GCC__ATOMIC_INT32_CAS => undef, + HAVE_GCC__ATOMIC_INT64_CAS => undef, + HAVE_GCC__SYNC_CHAR_TAS => undef, + HAVE_GCC__SYNC_INT32_CAS => undef, + HAVE_GCC__SYNC_INT32_TAS => undef, + HAVE_GCC__SYNC_INT64_CAS => undef, + HAVE_GETIFADDRS => undef, + HAVE_GETOPT => undef, + HAVE_GETOPT_H => undef, + HAVE_GETOPT_LONG => undef, + HAVE_GETPEEREID => undef, + HAVE_GETPEERUCRED => undef, + HAVE_GSSAPI_EXT_H => undef, + HAVE_GSSAPI_GSSAPI_EXT_H => undef, + HAVE_GSSAPI_GSSAPI_H => undef, + HAVE_GSSAPI_H => undef, + HAVE_HMAC_CTX_FREE => undef, + HAVE_HMAC_CTX_NEW => undef, + HAVE_HISTORY_H => undef, + HAVE_HISTORY_TRUNCATE_FILE => undef, + HAVE_IFADDRS_H => undef, + HAVE_INET_ATON => undef, + HAVE_INET_PTON => 1, + HAVE_INT_TIMEZONE => 1, + HAVE_INT64 => undef, + HAVE_INT8 => undef, + HAVE_INTTYPES_H => undef, + HAVE_INT_OPTERR => undef, + HAVE_INT_OPTRESET => undef, + HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef, + HAVE_KQUEUE => undef, + HAVE_LANGINFO_H => undef, + HAVE_LDAP_INITIALIZE => undef, + HAVE_LIBCRYPTO => undef, + HAVE_LIBLDAP => undef, + HAVE_LIBLZ4 => undef, + HAVE_LIBM => undef, + HAVE_LIBPAM => undef, + HAVE_LIBREADLINE => undef, + HAVE_LIBSELINUX => undef, + HAVE_LIBSSL => undef, + HAVE_LIBWLDAP32 => undef, + HAVE_LIBXML2 => undef, + HAVE_LIBXSLT => undef, + HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef, + HAVE_LIBZSTD => undef, + HAVE_LOCALE_T => 1, + HAVE_LONG_INT_64 => undef, + HAVE_LONG_LONG_INT_64 => 1, + HAVE_MBARRIER_H => undef, + HAVE_MBSTOWCS_L => 1, + HAVE_MEMORY_H => 1, + HAVE_MEMSET_S => undef, + HAVE_MKDTEMP => undef, + HAVE_OPENSSL_INIT_SSL => undef, + HAVE_OSSP_UUID_H => undef, + HAVE_PAM_PAM_APPL_H => undef, + HAVE_POSIX_FADVISE => undef, + HAVE_POSIX_FALLOCATE => undef, + HAVE_PPOLL => undef, + HAVE_PTHREAD => undef, + HAVE_PTHREAD_BARRIER_WAIT => undef, HAVE_PTHREAD_IS_THREADED_NP => undef, - HAVE_PTHREAD_PRIO_INHERIT => undef, - HAVE_READLINE_H => undef, - HAVE_READLINE_HISTORY_H => undef, - HAVE_READLINE_READLINE_H => undef, - HAVE_RL_COMPLETION_MATCHES => undef, - HAVE_RL_COMPLETION_SUPPRESS_QUOTE => undef, - HAVE_RL_FILENAME_COMPLETION_FUNCTION => undef, - HAVE_RL_FILENAME_QUOTE_CHARACTERS => undef, - HAVE_RL_FILENAME_QUOTING_FUNCTION => undef, - HAVE_RL_RESET_SCREEN_SIZE => undef, - HAVE_RL_VARIABLE_BIND => undef, - HAVE_SECURITY_PAM_APPL_H => undef, - HAVE_SETPROCTITLE => undef, - HAVE_SETPROCTITLE_FAST => undef, - HAVE_SOCKLEN_T => 1, - HAVE_SPINLOCKS => 1, - HAVE_SSL_CTX_SET_CERT_CB => undef, - HAVE_STDBOOL_H => 1, - HAVE_STDINT_H => 1, - HAVE_STDLIB_H => 1, - HAVE_STRCHRNUL => undef, - HAVE_STRERROR_R => undef, - HAVE_STRINGS_H => undef, - HAVE_STRING_H => 1, - HAVE_STRLCAT => undef, - HAVE_STRLCPY => undef, - HAVE_STRNLEN => 1, - HAVE_STRSIGNAL => undef, - HAVE_STRUCT_OPTION => undef, - HAVE_STRUCT_SOCKADDR_SA_LEN => undef, - HAVE_STRUCT_TM_TM_ZONE => undef, - HAVE_SYNC_FILE_RANGE => undef, - HAVE_SYNCFS => undef, - HAVE_SYSLOG => undef, - HAVE_SYS_EPOLL_H => undef, - HAVE_SYS_EVENT_H => undef, - HAVE_SYS_PERSONALITY_H => undef, - HAVE_SYS_PRCTL_H => undef, - HAVE_SYS_PROCCTL_H => undef, - HAVE_SYS_SIGNALFD_H => undef, - HAVE_SYS_STAT_H => 1, - HAVE_SYS_TYPES_H => 1, - HAVE_SYS_UCRED_H => undef, - HAVE_TERMIOS_H => undef, - HAVE_TYPEOF => undef, - HAVE_UCRED_H => undef, - HAVE_UINT64 => undef, - HAVE_UINT8 => undef, - HAVE_UNION_SEMUN => undef, - HAVE_UNISTD_H => 1, - HAVE_USELOCALE => undef, - HAVE_UUID_BSD => undef, - HAVE_UUID_E2FS => undef, - HAVE_UUID_OSSP => undef, - HAVE_UUID_H => undef, - HAVE_UUID_UUID_H => undef, - HAVE_WCSTOMBS_L => 1, - HAVE_VISIBILITY_ATTRIBUTE => undef, - HAVE_X509_GET_SIGNATURE_NID => 1, - HAVE_X509_GET_SIGNATURE_INFO => undef, - HAVE_X86_64_POPCNTQ => undef, - HAVE__BOOL => undef, - HAVE__BUILTIN_BSWAP16 => undef, - HAVE__BUILTIN_BSWAP32 => undef, - HAVE__BUILTIN_BSWAP64 => undef, - HAVE__BUILTIN_CLZ => undef, - HAVE__BUILTIN_CONSTANT_P => undef, - HAVE__BUILTIN_CTZ => undef, - HAVE__BUILTIN_FRAME_ADDRESS => undef, - HAVE__BUILTIN_OP_OVERFLOW => undef, - HAVE__BUILTIN_POPCOUNT => undef, - HAVE__BUILTIN_TYPES_COMPATIBLE_P => undef, - HAVE__BUILTIN_UNREACHABLE => undef, - HAVE__CONFIGTHREADLOCALE => 1, - HAVE__CPUID => 1, - HAVE__GET_CPUID => undef, - HAVE__STATIC_ASSERT => undef, - INT64_MODIFIER => qq{"ll"}, - LOCALE_T_IN_XLOCALE => undef, - MAXIMUM_ALIGNOF => 8, - MEMSET_LOOP_LIMIT => 1024, - OPENSSL_API_COMPAT => $openssl_api_compat, - PACKAGE_BUGREPORT => qq{"$package_bugreport"}, - PACKAGE_NAME => qq{"$package_name"}, - PACKAGE_STRING => qq{"$package_name $package_version"}, - PACKAGE_TARNAME => lc qq{"$package_name"}, - PACKAGE_URL => qq{"$package_url"}, - PACKAGE_VERSION => qq{"$package_version"}, - PG_INT128_TYPE => undef, - PG_INT64_TYPE => 'long long int', - PG_KRB_SRVNAM => qq{"postgres"}, - PG_MAJORVERSION => qq{"$majorver"}, + HAVE_PTHREAD_PRIO_INHERIT => undef, + HAVE_READLINE_H => undef, + HAVE_READLINE_HISTORY_H => undef, + HAVE_READLINE_READLINE_H => undef, + HAVE_RL_COMPLETION_MATCHES => undef, + HAVE_RL_COMPLETION_SUPPRESS_QUOTE => undef, + HAVE_RL_FILENAME_COMPLETION_FUNCTION => undef, + HAVE_RL_FILENAME_QUOTE_CHARACTERS => undef, + HAVE_RL_FILENAME_QUOTING_FUNCTION => undef, + HAVE_RL_RESET_SCREEN_SIZE => undef, + HAVE_RL_VARIABLE_BIND => undef, + HAVE_SECURITY_PAM_APPL_H => undef, + HAVE_SETPROCTITLE => undef, + HAVE_SETPROCTITLE_FAST => undef, + HAVE_SOCKLEN_T => 1, + HAVE_SPINLOCKS => 1, + HAVE_SSL_CTX_SET_CERT_CB => undef, + HAVE_STDBOOL_H => 1, + HAVE_STDINT_H => 1, + HAVE_STDLIB_H => 1, + HAVE_STRCHRNUL => undef, + HAVE_STRERROR_R => undef, + HAVE_STRINGS_H => undef, + HAVE_STRING_H => 1, + HAVE_STRLCAT => undef, + HAVE_STRLCPY => undef, + HAVE_STRNLEN => 1, + HAVE_STRSIGNAL => undef, + HAVE_STRUCT_OPTION => undef, + HAVE_STRUCT_SOCKADDR_SA_LEN => undef, + HAVE_STRUCT_TM_TM_ZONE => undef, + HAVE_SYNC_FILE_RANGE => undef, + HAVE_SYNCFS => undef, + HAVE_SYSLOG => undef, + HAVE_SYS_EPOLL_H => undef, + HAVE_SYS_EVENT_H => undef, + HAVE_SYS_PERSONALITY_H => undef, + HAVE_SYS_PRCTL_H => undef, + HAVE_SYS_PROCCTL_H => undef, + HAVE_SYS_SIGNALFD_H => undef, + HAVE_SYS_STAT_H => 1, + HAVE_SYS_TYPES_H => 1, + HAVE_SYS_UCRED_H => undef, + HAVE_TERMIOS_H => undef, + HAVE_TYPEOF => undef, + HAVE_UCRED_H => undef, + HAVE_UINT64 => undef, + HAVE_UINT8 => undef, + HAVE_UNION_SEMUN => undef, + HAVE_UNISTD_H => 1, + HAVE_USELOCALE => undef, + HAVE_UUID_BSD => undef, + HAVE_UUID_E2FS => undef, + HAVE_UUID_OSSP => undef, + HAVE_UUID_H => undef, + HAVE_UUID_UUID_H => undef, + HAVE_WCSTOMBS_L => 1, + HAVE_VISIBILITY_ATTRIBUTE => undef, + HAVE_X509_GET_SIGNATURE_NID => 1, + HAVE_X509_GET_SIGNATURE_INFO => undef, + HAVE_X86_64_POPCNTQ => undef, + HAVE__BOOL => undef, + HAVE__BUILTIN_BSWAP16 => undef, + HAVE__BUILTIN_BSWAP32 => undef, + HAVE__BUILTIN_BSWAP64 => undef, + HAVE__BUILTIN_CLZ => undef, + HAVE__BUILTIN_CONSTANT_P => undef, + HAVE__BUILTIN_CTZ => undef, + HAVE__BUILTIN_FRAME_ADDRESS => undef, + HAVE__BUILTIN_OP_OVERFLOW => undef, + HAVE__BUILTIN_POPCOUNT => undef, + HAVE__BUILTIN_TYPES_COMPATIBLE_P => undef, + HAVE__BUILTIN_UNREACHABLE => undef, + HAVE__CONFIGTHREADLOCALE => 1, + HAVE__CPUID => 1, + HAVE__GET_CPUID => undef, + HAVE__STATIC_ASSERT => undef, + INT64_MODIFIER => qq{"ll"}, + LOCALE_T_IN_XLOCALE => undef, + MAXIMUM_ALIGNOF => 8, + MEMSET_LOOP_LIMIT => 1024, + OPENSSL_API_COMPAT => $openssl_api_compat, + PACKAGE_BUGREPORT => qq{"$package_bugreport"}, + PACKAGE_NAME => qq{"$package_name"}, + PACKAGE_STRING => qq{"$package_name $package_version"}, + PACKAGE_TARNAME => lc qq{"$package_name"}, + PACKAGE_URL => qq{"$package_url"}, + PACKAGE_VERSION => qq{"$package_version"}, + PG_INT128_TYPE => undef, + PG_INT64_TYPE => 'long long int', + PG_KRB_SRVNAM => qq{"postgres"}, + PG_MAJORVERSION => qq{"$majorver"}, PG_MAJORVERSION_NUM => $majorver, PG_MINORVERSION_NUM => $minorver, PG_PRINTF_ATTRIBUTE => undef, - PG_USE_STDBOOL => 1, - PG_VERSION => qq{"$package_version$extraver"}, - PG_VERSION_NUM => sprintf("%d%04d", $majorver, $minorver), + PG_USE_STDBOOL => 1, + PG_VERSION => qq{"$package_version$extraver"}, + PG_VERSION_NUM => sprintf("%d%04d", $majorver, $minorver), PG_VERSION_STR => qq{"PostgreSQL $package_version$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"}, - PROFILE_PID_DIR => undef, + PROFILE_PID_DIR => undef, PTHREAD_CREATE_JOINABLE => undef, - RELSEG_SIZE => (1024 / $self->{options}->{blocksize}) * + RELSEG_SIZE => (1024 / $self->{options}->{blocksize}) * $self->{options}->{segsize} * 1024, - SIZEOF_BOOL => 1, - SIZEOF_LONG => 4, - SIZEOF_OFF_T => undef, - SIZEOF_SIZE_T => $bits / 8, - SIZEOF_VOID_P => $bits / 8, - STDC_HEADERS => 1, - STRERROR_R_INT => undef, - USE_ARMV8_CRC32C => undef, + SIZEOF_BOOL => 1, + SIZEOF_LONG => 4, + SIZEOF_OFF_T => undef, + SIZEOF_SIZE_T => $bits / 8, + SIZEOF_VOID_P => $bits / 8, + STDC_HEADERS => 1, + STRERROR_R_INT => undef, + USE_ARMV8_CRC32C => undef, USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => undef, USE_ASSERT_CHECKING => $self->{options}->{asserts} ? 1 : undef, - USE_BONJOUR => undef, - USE_BSD_AUTH => undef, + USE_BONJOUR => undef, + USE_BSD_AUTH => undef, USE_ICU => $self->{options}->{icu} ? 1 : undef, - USE_LIBXML => undef, - USE_LIBXSLT => undef, - USE_LZ4 => undef, - USE_LDAP => $self->{options}->{ldap} ? 1 : undef, - USE_LLVM => undef, + USE_LIBXML => undef, + USE_LIBXSLT => undef, + USE_LZ4 => undef, + USE_LDAP => $self->{options}->{ldap} ? 1 : undef, + USE_LLVM => undef, USE_NAMED_POSIX_SEMAPHORES => undef, - USE_OPENSSL => undef, - USE_PAM => undef, - USE_SLICING_BY_8_CRC32C => undef, - USE_SSE42_CRC32C => undef, + USE_OPENSSL => undef, + USE_PAM => undef, + USE_SLICING_BY_8_CRC32C => undef, + USE_SSE42_CRC32C => undef, USE_SSE42_CRC32C_WITH_RUNTIME_CHECK => 1, - USE_SYSTEMD => undef, - USE_SYSV_SEMAPHORES => undef, - USE_SYSV_SHARED_MEMORY => undef, - USE_UNNAMED_POSIX_SEMAPHORES => undef, - USE_WIN32_SEMAPHORES => 1, - USE_WIN32_SHARED_MEMORY => 1, - USE_ZSTD => undef, - WCSTOMBS_L_IN_XLOCALE => undef, - WORDS_BIGENDIAN => undef, - XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize}, + USE_SYSTEMD => undef, + USE_SYSV_SEMAPHORES => undef, + USE_SYSV_SHARED_MEMORY => undef, + USE_UNNAMED_POSIX_SEMAPHORES => undef, + USE_WIN32_SEMAPHORES => 1, + USE_WIN32_SHARED_MEMORY => 1, + USE_ZSTD => undef, + WCSTOMBS_L_IN_XLOCALE => undef, + WORDS_BIGENDIAN => undef, + XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize}, _FILE_OFFSET_BITS => undef, _LARGEFILE_SOURCE => undef, - _LARGE_FILES => undef, - inline => '__inline', - pg_restrict => '__restrict', + _LARGE_FILES => undef, + inline => '__inline', + pg_restrict => '__restrict', # not defined, because it'd conflict with __declspec(restrict) restrict => undef, - typeof => undef,); + typeof => undef,); if ($self->{options}->{uuid}) { $define{HAVE_UUID_OSSP} = 1; - $define{HAVE_UUID_H} = 1; + $define{HAVE_UUID_H} = 1; } if ($self->{options}->{xml}) { $define{HAVE_LIBXML2} = 1; - $define{USE_LIBXML} = 1; + $define{USE_LIBXML} = 1; } if ($self->{options}->{xslt}) { $define{HAVE_LIBXSLT} = 1; - $define{USE_LIBXSLT} = 1; + $define{USE_LIBXSLT} = 1; } if ($self->{options}->{lz4}) { $define{HAVE_LIBLZ4} = 1; - $define{USE_LZ4} = 1; + $define{USE_LZ4} = 1; } if ($self->{options}->{zstd}) { $define{HAVE_LIBZSTD} = 1; - $define{USE_ZSTD} = 1; + $define{USE_ZSTD} = 1; } if ($self->{options}->{openssl}) { @@ -503,11 +503,11 @@ sub GenerateFiles || ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')) { $define{HAVE_ASN1_STRING_GET0_DATA} = 1; - $define{HAVE_BIO_GET_DATA} = 1; - $define{HAVE_BIO_METH_NEW} = 1; - $define{HAVE_HMAC_CTX_FREE} = 1; - $define{HAVE_HMAC_CTX_NEW} = 1; - $define{HAVE_OPENSSL_INIT_SSL} = 1; + $define{HAVE_BIO_GET_DATA} = 1; + $define{HAVE_BIO_METH_NEW} = 1; + $define{HAVE_HMAC_CTX_FREE} = 1; + $define{HAVE_HMAC_CTX_NEW} = 1; + $define{HAVE_OPENSSL_INIT_SSL} = 1; } # Symbols needed with OpenSSL 1.0.2 and above. @@ -519,7 +519,7 @@ sub GenerateFiles } } - $self->GenerateConfigHeader('src/include/pg_config.h', \%define, 1); + $self->GenerateConfigHeader('src/include/pg_config.h', \%define, 1); $self->GenerateConfigHeader('src/include/pg_config_ext.h', \%define, 0); $self->GenerateConfigHeader('src/interfaces/ecpg/include/ecpg_config.h', \%define, 0); @@ -580,7 +580,9 @@ sub GenerateFiles { print "Generating lwlocknames.c and lwlocknames.h...\n"; my $lmgr = 'src/backend/storage/lmgr'; - system("perl $lmgr/generate-lwlocknames.pl --outdir $lmgr $lmgr/lwlocknames.txt"); + system( + "perl $lmgr/generate-lwlocknames.pl --outdir $lmgr $lmgr/lwlocknames.txt" + ); } if (IsNewer( 'src/include/storage/lwlocknames.h', @@ -642,21 +644,22 @@ sub GenerateFiles ); } - if (IsNewer('contrib/fuzzystrmatch/daitch_mokotoff.h', - 'contrib/fuzzystrmatch/daitch_mokotoff_header.pl')) + if (IsNewer( + 'contrib/fuzzystrmatch/daitch_mokotoff.h', + 'contrib/fuzzystrmatch/daitch_mokotoff_header.pl')) { print "Generating daitch_mokotoff.h...\n"; - system( - 'perl contrib/fuzzystrmatch/daitch_mokotoff_header.pl ' . - 'contrib/fuzzystrmatch/daitch_mokotoff.h' - ); + system( 'perl contrib/fuzzystrmatch/daitch_mokotoff_header.pl ' + . 'contrib/fuzzystrmatch/daitch_mokotoff.h'); } if (IsNewer('src/bin/psql/sql_help.h', 'src/bin/psql/create_help.pl')) { print "Generating sql_help.h...\n"; my $psql = 'src/bin/psql'; - system("perl $psql/create_help.pl --docdir doc/src/sgml/ref --outdir $psql --basename sql_help"); + system( + "perl $psql/create_help.pl --docdir doc/src/sgml/ref --outdir $psql --basename sql_help" + ); } if (IsNewer('src/common/kwlist_d.h', 'src/include/parser/kwlist.h')) @@ -710,7 +713,9 @@ sub GenerateFiles { print "Generating preproc.y...\n"; my $ecpg = 'src/interfaces/ecpg'; - system("perl $ecpg/preproc/parse.pl --srcdir $ecpg/preproc --parser src/backend/parser/gram.y --output $ecpg/preproc/preproc.y"); + system( + "perl $ecpg/preproc/parse.pl --srcdir $ecpg/preproc --parser src/backend/parser/gram.y --output $ecpg/preproc/preproc.y" + ); } unless (-f "src/port/pg_config_paths.h") @@ -825,7 +830,9 @@ EOF if ($need_node_support) { - system("perl src/backend/nodes/gen_node_support.pl --outdir src/backend/nodes @node_files"); + system( + "perl src/backend/nodes/gen_node_support.pl --outdir src/backend/nodes @node_files" + ); open(my $f, '>', 'src/backend/nodes/node-support-stamp') || confess "Could not touch node-support-stamp"; close($f); @@ -880,7 +887,7 @@ sub GenerateConfigHeader { if (m/^#(\s*)undef\s+(\w+)/) { - my $ws = $1; + my $ws = $1; my $macro = $2; if (exists $defines->{$macro}) { @@ -974,23 +981,23 @@ sub AddProject if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") { # Win32 here, with a debugging library set. - $dbgsuffix = 1; - $libsslpath = '\lib\VC\libssl32.lib'; + $dbgsuffix = 1; + $libsslpath = '\lib\VC\libssl32.lib'; $libcryptopath = '\lib\VC\libcrypto32.lib'; } elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") { # Win64 here, with a debugging library set. - $dbgsuffix = 1; - $libsslpath = '\lib\VC\libssl64.lib'; + $dbgsuffix = 1; + $libsslpath = '\lib\VC\libssl64.lib'; $libcryptopath = '\lib\VC\libcrypto64.lib'; } else { # On both Win32 and Win64 the same library # names are used without a debugging context. - $dbgsuffix = 0; - $libsslpath = '\lib\libssl.lib'; + $dbgsuffix = 0; + $libsslpath = '\lib\libssl.lib'; $libcryptopath = '\lib\libcrypto.lib'; } @@ -1193,23 +1200,23 @@ sub GetFakeConfigure my $self = shift; my $cfg = '--enable-thread-safety'; - $cfg .= ' --enable-cassert' if ($self->{options}->{asserts}); - $cfg .= ' --enable-nls' if ($self->{options}->{nls}); + $cfg .= ' --enable-cassert' if ($self->{options}->{asserts}); + $cfg .= ' --enable-nls' if ($self->{options}->{nls}); $cfg .= ' --enable-tap-tests' if ($self->{options}->{tap_tests}); - $cfg .= ' --with-ldap' if ($self->{options}->{ldap}); + $cfg .= ' --with-ldap' if ($self->{options}->{ldap}); $cfg .= ' --without-zlib' unless ($self->{options}->{zlib}); $cfg .= ' --with-extra-version' if ($self->{options}->{extraver}); - $cfg .= ' --with-ssl=openssl' if ($self->{options}->{openssl}); - $cfg .= ' --with-uuid' if ($self->{options}->{uuid}); - $cfg .= ' --with-libxml' if ($self->{options}->{xml}); - $cfg .= ' --with-libxslt' if ($self->{options}->{xslt}); - $cfg .= ' --with-lz4' if ($self->{options}->{lz4}); - $cfg .= ' --with-zstd' if ($self->{options}->{zstd}); - $cfg .= ' --with-gssapi' if ($self->{options}->{gss}); - $cfg .= ' --with-icu' if ($self->{options}->{icu}); - $cfg .= ' --with-tcl' if ($self->{options}->{tcl}); - $cfg .= ' --with-perl' if ($self->{options}->{perl}); - $cfg .= ' --with-python' if ($self->{options}->{python}); + $cfg .= ' --with-ssl=openssl' if ($self->{options}->{openssl}); + $cfg .= ' --with-uuid' if ($self->{options}->{uuid}); + $cfg .= ' --with-libxml' if ($self->{options}->{xml}); + $cfg .= ' --with-libxslt' if ($self->{options}->{xslt}); + $cfg .= ' --with-lz4' if ($self->{options}->{lz4}); + $cfg .= ' --with-zstd' if ($self->{options}->{zstd}); + $cfg .= ' --with-gssapi' if ($self->{options}->{gss}); + $cfg .= ' --with-icu' if ($self->{options}->{icu}); + $cfg .= ' --with-tcl' if ($self->{options}->{tcl}); + $cfg .= ' --with-perl' if ($self->{options}->{perl}); + $cfg .= ' --with-python' if ($self->{options}->{python}); my $port = $self->{options}->{'--with-pgport'}; $cfg .= " --with-pgport=$port" if defined($port); @@ -1232,13 +1239,13 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{solutionFileVersion} = '12.00'; - $self->{vcver} = '14.00'; - $self->{visualStudioName} = 'Visual Studio 2015'; - $self->{VisualStudioVersion} = '14.0.24730.2'; + $self->{solutionFileVersion} = '12.00'; + $self->{vcver} = '14.00'; + $self->{visualStudioName} = 'Visual Studio 2015'; + $self->{VisualStudioVersion} = '14.0.24730.2'; $self->{MinimumVisualStudioVersion} = '10.0.40219.1'; return $self; @@ -1260,13 +1267,13 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{solutionFileVersion} = '12.00'; - $self->{vcver} = '15.00'; - $self->{visualStudioName} = 'Visual Studio 2017'; - $self->{VisualStudioVersion} = '15.0.26730.3'; + $self->{solutionFileVersion} = '12.00'; + $self->{vcver} = '15.00'; + $self->{visualStudioName} = 'Visual Studio 2017'; + $self->{VisualStudioVersion} = '15.0.26730.3'; $self->{MinimumVisualStudioVersion} = '10.0.40219.1'; return $self; @@ -1288,13 +1295,13 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{solutionFileVersion} = '12.00'; - $self->{vcver} = '16.00'; - $self->{visualStudioName} = 'Visual Studio 2019'; - $self->{VisualStudioVersion} = '16.0.28729.10'; + $self->{solutionFileVersion} = '12.00'; + $self->{vcver} = '16.00'; + $self->{visualStudioName} = 'Visual Studio 2019'; + $self->{VisualStudioVersion} = '16.0.28729.10'; $self->{MinimumVisualStudioVersion} = '10.0.40219.1'; return $self; @@ -1316,13 +1323,13 @@ no warnings qw(redefine); ## no critic sub new { my $classname = shift; - my $self = $classname->SUPER::_new(@_); + my $self = $classname->SUPER::_new(@_); bless($self, $classname); - $self->{solutionFileVersion} = '12.00'; - $self->{vcver} = '17.00'; - $self->{visualStudioName} = 'Visual Studio 2022'; - $self->{VisualStudioVersion} = '17.0.31903.59'; + $self->{solutionFileVersion} = '12.00'; + $self->{vcver} = '17.00'; + $self->{visualStudioName} = 'Visual Studio 2022'; + $self->{VisualStudioVersion} = '17.0.31903.59'; $self->{MinimumVisualStudioVersion} = '10.0.40219.1'; return $self; diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index ecbd066bd92..9df2ab4282a 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -19,7 +19,7 @@ use Solution; use MSBuildProject; our (@ISA, @EXPORT); -@ISA = qw(Exporter); +@ISA = qw(Exporter); @EXPORT = qw(CreateSolution CreateProject DetermineVisualStudioVersion); no warnings qw(redefine); ## no critic diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl index 28a593145be..9853e5c3d83 100644 --- a/src/tools/msvc/build.pl +++ b/src/tools/msvc/build.pl @@ -54,9 +54,9 @@ do "./src/tools/msvc/config.pl" if (-f "src/tools/msvc/config.pl"); my $vcver = Mkvcbuild::mkvcbuild($config); # check what sort of build we are doing -my $bconf = $ENV{CONFIG} || "Release"; -my $msbflags = $ENV{MSBFLAGS} || ""; -my $buildwhat = $ARGV[1] || ""; +my $bconf = $ENV{CONFIG} || "Release"; +my $msbflags = $ENV{MSBFLAGS} || ""; +my $buildwhat = $ARGV[1] || ""; if (defined($ARGV[0])) { diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 70b44d15316..8945e772c2e 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -10,23 +10,23 @@ our $config = { # blocksize => 8, # --with-blocksize, 8kB by default # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default - ldap => 1, # --with-ldap - extraver => undef, # --with-extra-version=<string> - gss => undef, # --with-gssapi=<path> - icu => undef, # --with-icu=<path> - lz4 => undef, # --with-lz4=<path> - zstd => undef, # --with-zstd=<path> - nls => undef, # --enable-nls=<path> + ldap => 1, # --with-ldap + extraver => undef, # --with-extra-version=<string> + gss => undef, # --with-gssapi=<path> + icu => undef, # --with-icu=<path> + lz4 => undef, # --with-lz4=<path> + zstd => undef, # --with-zstd=<path> + nls => undef, # --enable-nls=<path> tap_tests => undef, # --enable-tap-tests - tcl => undef, # --with-tcl=<path> - perl => undef, # --with-perl=<path> - python => undef, # --with-python=<path> - openssl => undef, # --with-ssl=openssl with <path> - uuid => undef, # --with-uuid=<path> - xml => undef, # --with-libxml=<path> - xslt => undef, # --with-libxslt=<path> - iconv => undef, # (not in configure, path to iconv) - zlib => undef # --with-zlib=<path> + tcl => undef, # --with-tcl=<path> + perl => undef, # --with-perl=<path> + python => undef, # --with-python=<path> + openssl => undef, # --with-ssl=openssl with <path> + uuid => undef, # --with-uuid=<path> + xml => undef, # --with-libxml=<path> + xslt => undef, # --with-libxslt=<path> + iconv => undef, # (not in configure, path to iconv) + zlib => undef # --with-zlib=<path> }; 1; diff --git a/src/tools/msvc/dummylib/Win32/Registry.pm b/src/tools/msvc/dummylib/Win32/Registry.pm index 90f37add276..e14636eb317 100644 --- a/src/tools/msvc/dummylib/Win32/Registry.pm +++ b/src/tools/msvc/dummylib/Win32/Registry.pm @@ -10,7 +10,7 @@ use vars qw($HKEY_LOCAL_MACHINE); use Exporter (); our (@EXPORT, @ISA); -@ISA = qw(Exporter); +@ISA = qw(Exporter); @EXPORT = qw($HKEY_LOCAL_MACHINE); 1; diff --git a/src/tools/msvc/dummylib/Win32API/File.pm b/src/tools/msvc/dummylib/Win32API/File.pm index 0ea7cbe8268..7baf34c4e52 100644 --- a/src/tools/msvc/dummylib/Win32API/File.pm +++ b/src/tools/msvc/dummylib/Win32API/File.pm @@ -10,8 +10,8 @@ use constant { SEM_FAILCRITICALERRORS => 1, SEM_NOGPFAULTERRORBOX => 2 }; sub SetErrormode { } use Exporter; our (@ISA, @EXPORT_OK, %EXPORT_TAGS); -@ISA = qw(Exporter); -@EXPORT_OK = qw(SetErrorMode SEM_FAILCRITICALERRORS SEM_NOGPFAULTERRORBOX); +@ISA = qw(Exporter); +@EXPORT_OK = qw(SetErrorMode SEM_FAILCRITICALERRORS SEM_NOGPFAULTERRORBOX); %EXPORT_TAGS = (SEM_ => [qw(SEM_FAILCRITICALERRORS SEM_NOGPFAULTERRORBOX)]); 1; diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl index e7cbefcbc3d..cf83d7d056e 100644 --- a/src/tools/msvc/gendef.pl +++ b/src/tools/msvc/gendef.pl @@ -155,7 +155,7 @@ my $deffile; my $tempdir = '.'; GetOptions( - 'arch:s' => \$arch, + 'arch:s' => \$arch, 'deffile:s' => \$deffile, 'tempdir:s' => \$tempdir,) or usage(); diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl index 014b14ec3d1..25df6699b5e 100644 --- a/src/tools/msvc/pgbison.pl +++ b/src/tools/msvc/pgbison.pl @@ -13,7 +13,7 @@ use File::Basename; do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; -my ($bisonver) = `bison -V`; # grab first line +my ($bisonver) = `bison -V`; # grab first line $bisonver = (split(/\s+/, $bisonver))[3]; # grab version number unless ($bisonver ge '2.3') diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 372f6d1b65f..78170d105d2 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -25,7 +25,7 @@ my $startdir = getcwd(); chdir "../../.." if (-d "../../../src/tools/msvc"); -my $topdir = getcwd(); +my $topdir = getcwd(); my $tmp_installdir = "$topdir/tmp_install"; do './src/tools/msvc/config_default.pl'; @@ -64,16 +64,16 @@ else # use a capital C here because config.pl has $config my $Config = -e "release/postgres/postgres.exe" ? "Release" : "Debug"; -copy("$Config/refint/refint.dll", "src/test/regress"); -copy("$Config/autoinc/autoinc.dll", "src/test/regress"); -copy("$Config/regress/regress.dll", "src/test/regress"); +copy("$Config/refint/refint.dll", "src/test/regress"); +copy("$Config/autoinc/autoinc.dll", "src/test/regress"); +copy("$Config/regress/regress.dll", "src/test/regress"); copy("$Config/dummy_seclabel/dummy_seclabel.dll", "src/test/regress"); # Configuration settings used by TAP tests -$ENV{with_ssl} = $config->{openssl} ? 'openssl' : 'no'; -$ENV{with_ldap} = $config->{ldap} ? 'yes' : 'no'; -$ENV{with_icu} = $config->{icu} ? 'yes' : 'no'; -$ENV{with_gssapi} = $config->{gss} ? 'yes' : 'no'; +$ENV{with_ssl} = $config->{openssl} ? 'openssl' : 'no'; +$ENV{with_ldap} = $config->{ldap} ? 'yes' : 'no'; +$ENV{with_icu} = $config->{icu} ? 'yes' : 'no'; +$ENV{with_gssapi} = $config->{gss} ? 'yes' : 'no'; $ENV{with_krb_srvnam} = $config->{krb_srvnam} || 'postgres'; $ENV{with_readline} = 'no'; @@ -99,17 +99,17 @@ $temp_config = "--temp-config=\"$ENV{TEMP_CONFIG}\"" chdir "src/test/regress"; my %command = ( - CHECK => \&check, - PLCHECK => \&plcheck, - INSTALLCHECK => \&installcheck, - ECPGCHECK => \&ecpgcheck, - CONTRIBCHECK => \&contribcheck, - MODULESCHECK => \&modulescheck, + CHECK => \&check, + PLCHECK => \&plcheck, + INSTALLCHECK => \&installcheck, + ECPGCHECK => \&ecpgcheck, + CONTRIBCHECK => \&contribcheck, + MODULESCHECK => \&modulescheck, ISOLATIONCHECK => \&isolationcheck, - BINCHECK => \&bincheck, - RECOVERYCHECK => \&recoverycheck, - UPGRADECHECK => \&upgradecheck, # no-op - TAPTEST => \&taptest,); + BINCHECK => \&bincheck, + RECOVERYCHECK => \&recoverycheck, + UPGRADECHECK => \&upgradecheck, # no-op + TAPTEST => \&taptest,); my $proc = $command{$what}; @@ -124,7 +124,7 @@ exit 0; # Helper function for set_command_env, to set one environment command. sub set_single_env { - my $envname = shift; + my $envname = shift; my $envdefault = shift; # If a command is defined by the environment, just use it. @@ -145,9 +145,9 @@ sub set_single_env sub set_command_env { set_single_env('GZIP_PROGRAM', 'gzip'); - set_single_env('LZ4', 'lz4'); - set_single_env('OPENSSL', 'openssl'); - set_single_env('ZSTD', 'zstd'); + set_single_env('LZ4', 'lz4'); + set_single_env('OPENSSL', 'openssl'); + set_single_env('ZSTD', 'zstd'); } sub installcheck_internal @@ -156,8 +156,8 @@ sub installcheck_internal # for backwards compatibility, "serial" runs the tests in # parallel_schedule one by one. my $maxconn = $maxconn; - $maxconn = "--max-connections=1" if $schedule eq 'serial'; - $schedule = 'parallel' if $schedule eq 'serial'; + $maxconn = "--max-connections=1" if $schedule eq 'serial'; + $schedule = 'parallel' if $schedule eq 'serial'; my @args = ( "../../../$Config/pg_regress/pg_regress", @@ -187,8 +187,8 @@ sub check # for backwards compatibility, "serial" runs the tests in # parallel_schedule one by one. my $maxconn = $maxconn; - $maxconn = "--max-connections=1" if $schedule eq 'serial'; - $schedule = 'parallel' if $schedule eq 'serial'; + $maxconn = "--max-connections=1" if $schedule eq 'serial'; + $schedule = 'parallel' if $schedule eq 'serial'; InstallTemp(); chdir "${topdir}/src/test/regress"; @@ -201,7 +201,7 @@ sub check "--encoding=${encoding}", "--no-locale", "--temp-instance=./tmp_check"); - push(@args, $maxconn) if $maxconn; + push(@args, $maxconn) if $maxconn; push(@args, $temp_config) if $temp_config; system(@args); my $status = $? >> 8; @@ -219,7 +219,7 @@ sub ecpgcheck InstallTemp(); chdir "$topdir/src/interfaces/ecpg/test"; my $schedule = "ecpg"; - my @args = ( + my @args = ( "../../../../$Config/pg_regress_ecpg/pg_regress_ecpg", "--bindir=", "--dbname=ecpg1_regression,ecpg2_regression", @@ -287,8 +287,8 @@ sub tap_check # adjust the environment for just this test local %ENV = %ENV; - $ENV{PERL5LIB} = "$topdir/src/test/perl;$ENV{PERL5LIB}"; - $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress"; + $ENV{PERL5LIB} = "$topdir/src/test/perl;$ENV{PERL5LIB}"; + $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress"; $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll"; $ENV{TESTDATADIR} = "$dir/tmp_check"; @@ -467,11 +467,11 @@ sub contribcheck foreach my $module (glob("*")) { # these configuration-based exclusions must match Install.pm - next if ($module eq "uuid-ossp" && !defined($config->{uuid})); - next if ($module eq "sslinfo" && !defined($config->{openssl})); - next if ($module eq "pgcrypto" && !defined($config->{openssl})); - next if ($module eq "xml2" && !defined($config->{xml})); - next if ($module =~ /_plperl$/ && !defined($config->{perl})); + next if ($module eq "uuid-ossp" && !defined($config->{uuid})); + next if ($module eq "sslinfo" && !defined($config->{openssl})); + next if ($module eq "pgcrypto" && !defined($config->{openssl})); + next if ($module eq "xml2" && !defined($config->{xml})); + next if ($module =~ /_plperl$/ && !defined($config->{perl})); next if ($module =~ /_plpython$/ && !defined($config->{python})); next if ($module eq "sepgsql"); @@ -501,7 +501,7 @@ sub recoverycheck { InstallTemp(); - my $dir = "$topdir/src/test/recovery"; + my $dir = "$topdir/src/test/recovery"; my $status = tap_check($dir); exit $status if $status; return; @@ -608,7 +608,7 @@ sub fetchTests my $pgptests = $config->{zlib} - ? GetTests("ZLIB_TST", $m) + ? GetTests("ZLIB_TST", $m) : GetTests("ZLIB_OFF_TST", $m); $t =~ s/\$\(CF_PGP_TESTS\)/$pgptests/; } @@ -620,7 +620,7 @@ sub fetchTests sub GetTests { my $testname = shift; - my $m = shift; + my $m = shift; if ($m =~ /^$testname\s*=\s*(.*)$/gm) { return $1; diff --git a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl index b40b3fdbbf7..0032fdd7534 100644 --- a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl +++ b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl @@ -41,7 +41,7 @@ while (my $test_src = glob("$src_dir/tests/*.0")) command_ok( [ 'pg_bsd_indent', $test_src, - "$test.out", "-P$src_dir/tests/$test.pro" + "$test.out", "-P$src_dir/tests/$test.pro" ], "pg_bsd_indent succeeds on $test"); # check result matches, adding any diff to $diff_file diff --git a/src/tools/pginclude/pgcheckdefines b/src/tools/pginclude/pgcheckdefines index b1ebec677e3..a9fe79ebe58 100755 --- a/src/tools/pginclude/pgcheckdefines +++ b/src/tools/pginclude/pgcheckdefines @@ -116,7 +116,7 @@ foreach my $file (@hfiles, @cfiles) my $subdir = $fpath; chop $subdir; my $top_builddir = ".."; - my $tmp = $fpath; + my $tmp = $fpath; while (($tmp = dirname($tmp)) ne '.') { $top_builddir = $top_builddir . "/.."; @@ -168,7 +168,7 @@ foreach my $file (@hfiles, @cfiles) # number of dots varies according to nesting depth. # my @includes = (); - my $COMPILE = "$CC $CPPFLAGS $CFLAGS -H -E $fname"; + my $COMPILE = "$CC $CPPFLAGS $CFLAGS -H -E $fname"; open $pipe, '-|', "$COMPILE 2>&1 >/dev/null" or die "can't fork: $!"; while (<$pipe>) diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index 58692d073b8..bce63d95daf 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -21,22 +21,21 @@ my $indent_opts = my $devnull = File::Spec->devnull; -my ($typedefs_file, $typedef_str, - @excludes, $indent, $build, - $show_diff, $silent_diff, $help, - @commits,); +my ($typedefs_file, $typedef_str, @excludes, + $indent, $build, $show_diff, + $silent_diff, $help, @commits,); $help = 0; my %options = ( - "help" => \$help, - "commit=s" => \@commits, - "typedefs=s" => \$typedefs_file, + "help" => \$help, + "commit=s" => \@commits, + "typedefs=s" => \$typedefs_file, "list-of-typedefs=s" => \$typedef_str, - "excludes=s" => \@excludes, - "indent=s" => \$indent, - "show-diff" => \$show_diff, - "silent-diff" => \$silent_diff,); + "excludes=s" => \@excludes, + "indent=s" => \$indent, + "show-diff" => \$show_diff, + "silent-diff" => \$silent_diff,); GetOptions(%options) || usage("bad command line argument"); usage() if $help; @@ -61,7 +60,7 @@ my $sourcedir = locate_sourcedir(); if ($sourcedir) { my $exclude_candidate = "$sourcedir/exclude_file_patterns"; - push (@excludes, $exclude_candidate) if -f $exclude_candidate; + push(@excludes, $exclude_candidate) if -f $exclude_candidate; } # The typedef list that's mechanically extracted by the buildfarm may omit @@ -117,12 +116,12 @@ sub locate_sourcedir return $sub if -d $sub; # try to find it from an ancestor directory $sub = "../src/tools/pgindent"; - foreach (1..4) + foreach (1 .. 4) { return $sub if -d $sub; $sub = "../$sub"; } - return; # undef if nothing found + return; # undef if nothing found } sub load_typedefs @@ -204,7 +203,7 @@ sub read_source sub write_source { - my $source = shift; + my $source = shift; my $source_filename = shift; open(my $src_fh, '>', $source_filename) @@ -231,7 +230,7 @@ sub pre_indent # Prevent indenting of code in 'extern "C"' blocks. # we replace the braces with comments which we'll reverse later my $extern_c_start = '/* Open extern "C" */'; - my $extern_c_stop = '/* Close extern "C" */'; + my $extern_c_stop = '/* Close extern "C" */'; $source =~ s!(^#ifdef[ \t]+__cplusplus.*\nextern[ \t]+"C"[ \t]*\n)\{[ \t]*$!$1$extern_c_start!gm; $source =~ s!(^#ifdef[ \t]+__cplusplus.*\n)\}[ \t]*$!$1$extern_c_stop!gm; @@ -271,7 +270,7 @@ sub post_indent sub run_indent { - my $source = shift; + my $source = shift; my $error_message = shift; my $cmd = "$indent $indent_opts -U" . $filtered_typedefs_fh->filename; @@ -297,7 +296,7 @@ sub run_indent sub show_diff { - my $indented = shift; + my $indented = shift; my $source_filename = shift; my $post_fh = new File::Temp(TEMPLATE => "pgdiffXXXXX"); @@ -313,7 +312,7 @@ sub show_diff sub usage { - my $message = shift; + my $message = shift; my $helptext = <<'EOF'; Usage: pgindent [OPTION]... [FILE|DIR]... @@ -346,8 +345,7 @@ $filtered_typedefs_fh = load_typedefs(); check_indent(); -my $wanted = sub -{ +my $wanted = sub { my ($dev, $ino, $mode, $nlink, $uid, $gid); (($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_)) && -f _ @@ -356,7 +354,7 @@ my $wanted = sub }; # any non-option arguments are files or directories to be processed -File::Find::find({wanted => $wanted}, @ARGV) if @ARGV; +File::Find::find({ wanted => $wanted }, @ARGV) if @ARGV; # commit file locations are relative to the source root chdir "$sourcedir/../../.." if @commits && $sourcedir; @@ -364,11 +362,11 @@ chdir "$sourcedir/../../.." if @commits && $sourcedir; # process named commits by comparing each with their immediate ancestor foreach my $commit (@commits) { - my $prev="$commit~"; - my @affected=`git diff --diff-filter=ACMR --name-only $prev $commit`; + my $prev = "$commit~"; + my @affected = `git diff --diff-filter=ACMR --name-only $prev $commit`; die "git error" if $?; chomp(@affected); - push(@files,@affected); + push(@files, @affected); } warn "No files to process" unless @files; @@ -402,8 +400,8 @@ foreach my $source_filename (@files) $otherfile =~ s/\.y$/.l/; next if $otherfile ne $source_filename && -f $otherfile; - my $source = read_source($source_filename); - my $orig_source = $source; + my $source = read_source($source_filename); + my $orig_source = $source; my $error_message = ''; $source = pre_indent($source); diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index 06da7cd4284..260854747b4 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -132,6 +132,7 @@ ArchiveModuleInit ArchiveModuleState ArchiveOpts ArchiveShutdownCB +ArchiveStartupCB ArchiveStreamState ArchiverOutput ArchiverStage @@ -240,6 +241,7 @@ Barrier BaseBackupCmd BaseBackupTargetHandle BaseBackupTargetType +BasicArchiveData BeginDirectModify_function BeginForeignInsert_function BeginForeignModify_function @@ -264,7 +266,6 @@ BitmapOr BitmapOrPath BitmapOrState Bitmapset -BlobInfo Block BlockId BlockIdData @@ -381,6 +382,7 @@ ClientData ClonePtrType ClosePortalStmt ClosePtrType +ClosestMatchState Clump ClusterInfo ClusterParams @@ -396,6 +398,7 @@ CoercionForm CoercionPathType CollAliasData CollInfo +CollParam CollateClause CollateExpr CollateStrength @@ -540,16 +543,17 @@ DR_intorel DR_printtup DR_sqlfunction DR_transientrel -DSA DWORD DataDumperPtr DataPageDeleteStack DatabaseInfo DateADT +DateTimeErrorExtra Datum DatumTupleFields DbInfo DbInfoArr +DbLocaleInfo DeClonePtrType DeadLockState DeallocateStmt @@ -565,6 +569,7 @@ DeleteStmt DependencyGenerator DependencyGeneratorData DependencyType +DeserialIOData DestReceiver DictISpell DictInt @@ -626,13 +631,13 @@ Edge EditableObjectType ElementsState EnableTimeoutParams -EndBlobPtrType -EndBlobsPtrType EndDataPtrType EndDirectModify_function EndForeignInsert_function EndForeignModify_function EndForeignScan_function +EndLOPtrType +EndLOsPtrType EndOfWalRecoveryInfo EndSampleScan_function EnumItem @@ -660,7 +665,6 @@ ExceptionLabelMap ExceptionMap ExecAuxRowMark ExecEvalBoolSubroutine -ExecEvalJsonExprContext ExecEvalSubroutine ExecForeignBatchInsert_function ExecForeignDelete_function @@ -706,9 +710,9 @@ ExprEvalOp ExprEvalOpLookup ExprEvalRowtypeCache ExprEvalStep +ExprSetupInfo ExprState ExprStateEvalFunc -ExtendBufferedFlags ExtendBufferedWhat ExtensibleNode ExtensibleNodeEntry @@ -720,7 +724,6 @@ FDWCollateState FD_SET FILE FILETIME -FPI FSMAddress FSMPage FSMPageData @@ -743,6 +746,7 @@ FinalPathExtraData FindColsContext FindSplitData FindSplitStrat +First FixedParallelExecutorState FixedParallelState FixedParamState @@ -898,6 +902,7 @@ FreePageBtreeLeafKey FreePageBtreeSearchResult FreePageManager FreePageSpanLeader +From FromCharDateMode FromExpr FullTransactionId @@ -943,6 +948,7 @@ GISTTYPE GIST_SPLITVEC GMReaderTupleBuffer GROUP +GUCHashEntry GV Gather GatherMerge @@ -1008,6 +1014,7 @@ GistVacState GlobalTransaction GlobalVisHorizonKind GlobalVisState +GrantRoleOptions GrantRoleStmt GrantStmt GrantTargetType @@ -1075,6 +1082,7 @@ HashInstrumentation HashJoin HashJoinState HashJoinTable +HashJoinTableData HashJoinTuple HashMemoryChunk HashMetaPage @@ -1114,10 +1122,12 @@ ID INFIX INT128 INTERFACE_INFO +IO IOContext IOFuncSelector IOObject IOOp +IO_STATUS_BLOCK IPCompareMethod ITEM IV @@ -1216,7 +1226,6 @@ IterateForeignScan_function IterateJsonStringValuesState JEntry JHashState -JOBOBJECTINFOCLASS JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_UI_RESTRICTIONS JOBOBJECT_SECURITY_LIMIT_INFORMATION @@ -1229,38 +1238,30 @@ JitProviderReleaseContextCB JitProviderResetAfterErrorCB Join JoinCostWorkspace +JoinDomain JoinExpr JoinHashEntry JoinPath JoinPathExtraData JoinState +JoinTreeItem JoinType JsObject JsValue JsonAggConstructor JsonAggState -JsonArgument JsonArrayAgg JsonArrayConstructor JsonArrayQueryConstructor JsonBaseObjectInfo -JsonBehavior -JsonBehaviorType -JsonCoercion -JsonCommon JsonConstructorExpr JsonConstructorExprState JsonConstructorType JsonEncoding -JsonExpr -JsonExprOp JsonFormat JsonFormatType -JsonFunc -JsonFuncExpr JsonHashEntry JsonIsPredicate -JsonItemCoercions JsonIterateStringValuesAction JsonKeyValue JsonLexContext @@ -1275,10 +1276,8 @@ JsonObjectConstructor JsonOutput JsonParseContext JsonParseErrorType -JsonParseExpr JsonPath JsonPathBool -JsonPathDatatypeStatus JsonPathExecContext JsonPathExecResult JsonPathGinAddPathItemFunc @@ -1291,16 +1290,11 @@ JsonPathGinPathItem JsonPathItem JsonPathItemType JsonPathKeyword -JsonPathMutableContext JsonPathParseItem JsonPathParseResult JsonPathPredicateCallback JsonPathString -JsonPathVarCallback -JsonPathVariableEvalContext -JsonQuotes JsonReturning -JsonScalarExpr JsonSemAction JsonTokenType JsonTransformStringValuesAction @@ -1314,7 +1308,6 @@ JsonValueExpr JsonValueList JsonValueListIterator JsonValueType -JsonWrapper Jsonb JsonbAggState JsonbContainer @@ -1329,6 +1322,7 @@ JsonbTypeCategory JsonbValue JumbleState JunkFilter +KAXCompressReason KeyAction KeyActions KeyArray @@ -1343,17 +1337,34 @@ LINE LLVMAttributeRef LLVMBasicBlockRef LLVMBuilderRef +LLVMErrorRef LLVMIntPredicate +LLVMJITEventListenerRef LLVMJitContext LLVMJitHandle LLVMMemoryBufferRef LLVMModuleRef -LLVMOrcJITStackRef -LLVMOrcModuleHandle -LLVMOrcTargetAddress +LLVMOrcCLookupSet +LLVMOrcCSymbolMapPair +LLVMOrcCSymbolMapPairs +LLVMOrcDefinitionGeneratorRef +LLVMOrcExecutionSessionRef +LLVMOrcJITDylibLookupFlags +LLVMOrcJITDylibRef +LLVMOrcJITTargetAddress +LLVMOrcJITTargetMachineBuilderRef +LLVMOrcLLJITBuilderRef +LLVMOrcLLJITRef +LLVMOrcLookupKind +LLVMOrcLookupStateRef +LLVMOrcMaterializationUnitRef +LLVMOrcObjectLayerRef +LLVMOrcResourceTrackerRef +LLVMOrcSymbolStringPoolRef +LLVMOrcThreadSafeContextRef +LLVMOrcThreadSafeModuleRef LLVMPassManagerBuilderRef LLVMPassManagerRef -LLVMSharedModuleRef LLVMTargetMachineRef LLVMTargetRef LLVMTypeRef @@ -1370,12 +1381,9 @@ LOCKTAG LONG LONG_PTR LOOP +LPARAM LPBYTE -LPCTSTR LPCWSTR -LPDWORD -LPFILETIME -LPSECURITY_ATTRIBUTES LPSERVICE_STATUS LPSTR LPTHREAD_START_ROUTINE @@ -1391,18 +1399,17 @@ LWLock LWLockHandle LWLockMode LWLockPadded -LZ4CompressorState LZ4F_compressionContext_t LZ4F_decompressOptions_t LZ4F_decompressionContext_t LZ4F_errorCode_t LZ4F_preferences_t -LZ4File +LZ4State LabelProvider LagTracker LargeObjectDesc -LastAttnumInfo Latch +LauncherLastStartTimesEntry LerpFunc LexDescr LexemeEntry @@ -1423,6 +1430,7 @@ ListParsedLex ListenAction ListenActionKind ListenStmt +LoInfo LoadStmt LocalBufferLookupEnt LocalPgBackendStatus @@ -1479,7 +1487,6 @@ LogicalRepBeginData LogicalRepCommitData LogicalRepCommitPreparedTxnData LogicalRepCtxStruct -LogicalRepMode LogicalRepMsgType LogicalRepPartMapEntry LogicalRepPreparedTxnData @@ -1575,6 +1582,7 @@ MultirangeIOData MultirangeParseState MultirangeType NDBOX +NLSVERSIONINFOEX NODE NTSTATUS NUMCacheEntry @@ -1608,10 +1616,12 @@ NotificationList NotifyStmt Nsrt NtDllRoutine +NtFlushBuffersFileEx_t NullIfExpr NullTest NullTestType NullableDatum +NullingRelsMatch Numeric NumericAggState NumericDigit @@ -1670,7 +1680,7 @@ OprCacheKey OprInfo OprProofCacheEntry OprProofCacheKey -OutputContext +OuterJoinClauseInfo OutputPluginCallbacks OutputPluginOptions OutputPluginOutputType @@ -1680,7 +1690,6 @@ OverridingKind PACE_HEADER PACL PATH -PBOOL PCtxtHandle PERL_CONTEXT PERL_SI @@ -1743,10 +1752,9 @@ PGresAttValue PGresParamDesc PGresult PGresult_data -PHANDLE +PIO_STATUS_BLOCK PLAINTREE PLAssignStmt -PLUID_AND_ATTRIBUTES PLcword PLpgSQL_case_when PLpgSQL_condition @@ -1863,7 +1871,6 @@ PROCLOCK PROCLOCKTAG PROC_HDR PSID -PSID_AND_ATTRIBUTES PSQL_COMP_CASE PSQL_ECHO PSQL_ECHO_HIDDEN @@ -1872,7 +1879,6 @@ PTEntryArray PTIterationArray PTOKEN_PRIVILEGES PTOKEN_USER -PULONG PUTENVPROC PVIndStats PVIndVacStatus @@ -1972,6 +1978,7 @@ PartitionRangeDatum PartitionRangeDatumKind PartitionScheme PartitionSpec +PartitionStrategy PartitionTupleRouting PartitionedRelPruneInfo PartitionedRelPruningData @@ -1982,11 +1989,8 @@ PathClauseUsage PathCostComparison PathHashStack PathKey -PathKeyInfo PathKeysComparison PathTarget -PathkeyMutatorState -PathkeySortCost PatternInfo PatternInfoArray Pattern_Prefix_Status @@ -2022,6 +2026,7 @@ PgFdwModifyState PgFdwOption PgFdwPathExtraData PgFdwRelationInfo +PgFdwSamplingMethod PgFdwScanState PgIfAddrCallback PgStatShared_Archiver @@ -2105,13 +2110,11 @@ PortalStrategy PostParseColumnRefHook PostgresPollingStatusType PostingItem -PostponedQual PreParseColumnRefHook PredClass PredIterInfo PredIterInfoData PredXactList -PredXactListElement PredicateLockData PredicateLockTargetType PrefetchBufferResult @@ -2183,7 +2186,6 @@ QPRS_STATE QTN2QTState QTNode QUERYTYPE -QUERY_SECURITY_CONTEXT_TOKEN_FN QualCost QualItem Query @@ -2216,6 +2218,7 @@ RI_QueryKey RTEKind RTEPermissionInfo RWConflict +RWConflictData RWConflictPoolHeader Range RangeBound @@ -2251,7 +2254,8 @@ RecheckForeignScan_function RecordCacheEntry RecordCompareData RecordIOData -RecoveryLockListsEntry +RecoveryLockEntry +RecoveryLockXidEntry RecoveryPauseState RecoveryState RecoveryTargetTimeLineGoal @@ -2275,6 +2279,7 @@ ReindexStmt ReindexType RelFileLocator RelFileLocatorBackend +RelFileNumber RelIdCacheEnt RelInfo RelInfoArr @@ -2363,6 +2368,7 @@ ResultState ReturnSetInfo ReturnStmt RevmapContents +RevokeRoleGrantAction RewriteMappingDataEntry RewriteMappingFile RewriteRule @@ -2370,6 +2376,7 @@ RewriteState RmgrData RmgrDescData RmgrId +RoleNameEntry RoleNameItem RoleSpec RoleSpecType @@ -2384,6 +2391,7 @@ RowMarkType RowSecurityDesc RowSecurityPolicy RtlGetLastNtStatus_t +RtlNtStatusToDosError_t RuleInfo RuleLock RuleStmt @@ -2470,6 +2478,7 @@ SeqTable SeqTableData SerCommitSeqNo SerialControl +SerialIOData SerializableXactHandle SerializedActiveRelMaps SerializedClientConnectionInfo @@ -2610,9 +2619,9 @@ SplitTextOutputData SplitVar SplitedPageLayout StackElem -StartBlobPtrType -StartBlobsPtrType StartDataPtrType +StartLOPtrType +StartLOsPtrType StartReplicationCmd StartupStatusEnum StatEntry @@ -2660,6 +2669,7 @@ SubscriptionInfo SubscriptionRelState SupportRequestCost SupportRequestIndexCondition +SupportRequestOptimizeWindowClause SupportRequestRows SupportRequestSelectivity SupportRequestSimplify @@ -2676,6 +2686,7 @@ SyscacheCallbackFunction SystemRowsSamplerData SystemSamplerData SystemTimeSamplerData +TAPtype TAR_MEMBER TBMIterateResult TBMIteratingState @@ -2728,6 +2739,7 @@ TSVectorStat TState TStatus TStoreState +TU_UpdateIndexes TXNEntryFile TYPCATEGORY T_Action @@ -2880,12 +2892,10 @@ TypeCat TypeFuncClass TypeInfo TypeName -U U32 U8 UChar UCharIterator -UColAttribute UColAttributeValue UCollator UConverter @@ -2910,16 +2920,19 @@ UpdateStmt UpperRelationKind UpperUniquePath UserAuth +UserContext UserMapping UserOpts VacAttrStats VacAttrStatsP VacDeadItems VacErrPhase +VacObjFilter VacOptValue VacuumParams VacuumRelation VacuumStmt +ValidIOData ValidateIndexState ValuesScan ValuesScanState @@ -2940,6 +2953,8 @@ VariableSpace VariableStatData VariableSubstituteHook Variables +Vector32 +Vector8 VersionedQuery Vfd ViewCheckOption @@ -2956,7 +2971,6 @@ WALInsertLock WALInsertLockPadded WALOpenSegment WALReadError -WalRcvWakeupReason WALSegmentCloseCB WALSegmentContext WALSegmentOpenCB @@ -2986,6 +3000,7 @@ WalRcvExecResult WalRcvExecStatus WalRcvState WalRcvStreamOptions +WalRcvWakeupReason WalReceiverConn WalReceiverFunctionsType WalSnd @@ -2995,6 +3010,7 @@ WalSndState WalTimeSample WalUsage WalWriteMethod +WalWriteMethodOps Walfile WindowAgg WindowAggPath @@ -3093,17 +3109,16 @@ YYLTYPE YYSTYPE YY_BUFFER_STATE ZSTD_CCtx +ZSTD_CStream ZSTD_DCtx +ZSTD_DStream +ZSTD_cParameter ZSTD_inBuffer ZSTD_outBuffer +ZstdCompressorState _SPI_connection _SPI_plan -__AssignProcessToJobObject -__CreateJobObject -__CreateRestrictedToken -__IsProcessInJob -__QueryInformationJobObject -__SetInformationJobObject +__m128i __time64_t _dev_t _ino_t @@ -3111,8 +3126,8 @@ _locale_t _resultmap _stringlist acquireLocksOnSubLinks_context +add_nulling_relids_context adjust_appendrel_attrs_context -aff_regex_struct allocfunc amadjustmembers_function ambeginscan_function @@ -3139,6 +3154,7 @@ amvalidate_function array_iter array_unnest_fctx assign_collations_context +auth_password_hook_typ autovac_table av_relation avl_dbase @@ -3189,7 +3205,6 @@ cached_re_str canonicalize_state cashKEY catalogid_hash -cfp check_agg_arguments_context check_function_callback check_network_data @@ -3197,7 +3212,6 @@ check_object_relabel_type check_password_hook_type check_ungrouped_columns_context chr -clock_t cmpEntriesArg codes_t collation_cache_entry @@ -3206,6 +3220,7 @@ colormaprange compare_context config_var_value contain_aggs_of_level_context +contain_placeholder_references_context convert_testexpr_context copy_data_dest_cb copy_data_source_cb @@ -3238,6 +3253,10 @@ dlist_head dlist_iter dlist_mutable_iter dlist_node +dm_code +dm_codes +dm_letter +dm_node ds_state dsa_area dsa_area_control @@ -3310,7 +3329,6 @@ fmStringInfo fmgr_hook_type foreign_glob_cxt foreign_loc_cxt -freeaddrinfo_ptr_t freefunc fsec_t gbt_vsrt_arg @@ -3325,8 +3343,6 @@ get_attavgwidth_hook_type get_index_stats_hook_type get_relation_info_hook_type get_relation_stats_hook_type -getaddrinfo_ptr_t -getnameinfo_ptr_t gid_t gin_leafpage_items_state ginxlogCreatePostingTree @@ -3348,9 +3364,13 @@ gistxlogPageSplit gistxlogPageUpdate grouping_sets_data gseg_picksplit_item +gss_OID_set gss_buffer_desc gss_cred_id_t +gss_cred_usage_t gss_ctx_id_t +gss_key_value_element_desc +gss_key_value_set_desc gss_name_t gtrgm_consistent_cache gzFile @@ -3366,7 +3386,6 @@ hstoreUniquePairs_t hstoreUpgrade_t hyperLogLogState ifState -ilist import_error_callback_arg indexed_tlist inet @@ -3482,6 +3501,7 @@ pagetable_iterator pairingheap pairingheap_comparator pairingheap_node +pam_handle_t parallel_worker_main_type parse_error_callback_arg parser_context @@ -3564,6 +3584,7 @@ pgthreadlock_t pid_t pivot_field planner_hook_type +planstate_tree_walker_callback plperl_array_info plperl_call_data plperl_interp_desc @@ -3572,6 +3593,7 @@ plperl_proc_key plperl_proc_ptr plperl_query_desc plperl_query_entry +plpgsql_CastExprHashEntry plpgsql_CastHashEntry plpgsql_CastHashKey plpgsql_HashEnt @@ -3618,6 +3640,7 @@ pull_varattnos_context pull_varnos_context pull_vars_context pullup_replace_vars_context +pushdown_safe_type pushdown_safety_info qc_hash_func qsort_arg_comparator @@ -3631,7 +3654,9 @@ rbt_allocfunc rbt_combiner rbt_comparator rbt_freefunc -reduce_outer_joins_state +reduce_outer_joins_partial_state +reduce_outer_joins_pass1_state +reduce_outer_joins_pass2_state reference regex_arc_t regex_t @@ -3656,6 +3681,7 @@ relopts_validator remoteConn remoteConnHashEnt remoteDep +remove_nulling_relids_context rendezvousHashEntry replace_rte_variables_callback replace_rte_variables_context @@ -3665,6 +3691,7 @@ rewrite_event rf_context rm_detail_t role_auth_extra +rolename_hash row_security_policy_hook_type rsv_callback saophash_hash @@ -3758,6 +3785,8 @@ toast_compress_header tokenize_error_callback_arg transferMode transfer_thread_arg +tree_mutator_callback +tree_walker_callback trgm trgm_mb_char trivalue @@ -3772,6 +3801,8 @@ type tzEntry u_char u_int +ua_page_items +ua_page_stats uchr uid_t uint128 @@ -3779,10 +3810,12 @@ uint16 uint16_t uint32 uint32_t +uint32x4_t uint64 uint64_t uint8 uint8_t +uint8x16_t uintptr_t unicodeStyleBorderFormat unicodeStyleColumnFormat @@ -3865,7 +3898,6 @@ xl_heap_confirm xl_heap_delete xl_heap_freeze_page xl_heap_freeze_plan -xl_heap_freeze_tuple xl_heap_header xl_heap_inplace xl_heap_insert @@ -3900,6 +3932,7 @@ xl_standby_lock xl_standby_locks xl_tblspc_create_rec xl_tblspc_drop_rec +xl_testcustomrmgrs_message xl_xact_abort xl_xact_assignment xl_xact_commit @@ -3927,6 +3960,8 @@ xmlNodePtr xmlNodeSetPtr xmlParserCtxtPtr xmlParserInputPtr +xmlSaveCtxt +xmlSaveCtxtPtr xmlStructuredErrorFunc xmlTextWriter xmlTextWriterPtr @@ -3944,4 +3979,3 @@ yyscan_t z_stream z_streamp zic_t -ZSTD_CStream diff --git a/src/tools/win32tzlist.pl b/src/tools/win32tzlist.pl index 079c3705a70..657f7d4879c 100755 --- a/src/tools/win32tzlist.pl +++ b/src/tools/win32tzlist.pl @@ -48,8 +48,8 @@ foreach my $keyname (@subkeys) unless ($vals{Std} && $vals{Dlt} && $vals{Display}); push @system_zones, { - 'std' => $vals{Std}->[2], - 'dlt' => $vals{Dlt}->[2], + 'std' => $vals{Std}->[2], + 'dlt' => $vals{Dlt}->[2], 'display' => clean_displayname($vals{Display}->[2]), }; } @@ -80,9 +80,9 @@ while ($pgtz =~ push @file_zones, { 'display' => clean_displayname($1), - 'std' => $2, - 'dlt' => $3, - 'match' => $4, + 'std' => $2, + 'dlt' => $3, + 'match' => $4, }; } |