perltidy_before.patch
text/plain
Filename: perltidy_before.patch
Type: text/plain
Part: 0
diff -Napcdr -x .git postgresql/src/tools/msvc/Install.pm postgresql_dev/src/tools/msvc/Install.pm
*** postgresql/src/tools/msvc/Install.pm Tue Jul 5 05:55:29 2011
--- postgresql_dev/src/tools/msvc/Install.pm Wed Jul 6 23:36:56 2011
*************** sub Install
*** 56,65 ****
my $majorver = DetermineMajorVersion();
print "Installing version $majorver for $conf in $target\n";
! EnsureDirectories($target, 'bin', 'lib', 'share', 'share/timezonesets',
! 'share/extension', 'share/contrib',
! 'doc', 'doc/extension', 'doc/contrib',
! 'symbols', 'share/tsearch_data');
CopySolutionOutput($conf, $target);
lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');
--- 56,66 ----
my $majorver = DetermineMajorVersion();
print "Installing version $majorver for $conf in $target\n";
! EnsureDirectories(
! $target, 'bin', 'lib', 'share',
! 'share/timezonesets','share/extension', 'share/contrib','doc',
! 'doc/extension', 'doc/contrib','symbols', 'share/tsearch_data'
! );
CopySolutionOutput($conf, $target);
lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');
*************** sub Install
*** 113,123 ****
CopyContribFiles($config,$target);
CopyIncludeFiles($target);
! my $pl_extension_files = [];
! 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};
File::Find::find(
{
wanted =>sub {
--- 114,124 ----
CopyContribFiles($config,$target);
CopyIncludeFiles($target);
! my $pl_extension_files = [];
! 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};
File::Find::find(
{
wanted =>sub {
*************** sub Install
*** 127,136 ****
},
@pldirs
);
! CopySetOfFiles(
! 'PL Extension files', $pl_extension_files,
! $target . '/share/extension/'
! );
GenerateNLSFiles($target,$config->{nls},$majorver) if ($config->{nls});
--- 128,134 ----
},
@pldirs
);
! CopySetOfFiles('PL Extension files', $pl_extension_files,$target . '/share/extension/');
GenerateNLSFiles($target,$config->{nls},$majorver) if ($config->{nls});
*************** sub CopyContribFiles
*** 350,358 ****
foreach my $f (split /\s+/,$flist)
{
! lcopy('contrib/' . $d . '/' . $f . '.control',
! $target . '/share/extension/' . $f . '.control')
! || croak("Could not copy file $f.control in contrib $d");
print '.';
}
}
--- 348,357 ----
foreach my $f (split /\s+/,$flist)
{
! lcopy(
! 'contrib/' . $d . '/' . $f . '.control',
! $target . '/share/extension/' . $f . '.control'
! )|| croak("Could not copy file $f.control in contrib $d");
print '.';
}
}
*************** sub CopyContribFiles
*** 369,375 ****
foreach my $f (split /\s+/,$flist)
{
lcopy('contrib/' . $d . '/' . $f,
! $target . '/share/' . $moduledir . '/' . basename($f))
|| croak("Could not copy file $f in contrib $d");
print '.';
}
--- 368,374 ----
foreach my $f (split /\s+/,$flist)
{
lcopy('contrib/' . $d . '/' . $f,
! $target . '/share/' . $moduledir . '/' . basename($f))
|| croak("Could not copy file $f in contrib $d");
print '.';
}
*************** sub CopyContribFiles
*** 383,390 ****
foreach my $f (split /\s+/,$flist)
{
! lcopy('contrib/' . $d . '/' . $f,
! $target . '/share/tsearch_data/' . basename($f))
|| croak("Could not copy file $f in contrib $d");
print '.';
}
--- 382,388 ----
foreach my $f (split /\s+/,$flist)
{
! lcopy('contrib/' . $d . '/' . $f,$target . '/share/tsearch_data/' . basename($f))
|| croak("Could not copy file $f in contrib $d");
print '.';
}
*************** sub CopyContribFiles
*** 402,409 ****
if ($d eq 'spi');
foreach my $f (split /\s+/,$flist)
{
! lcopy('contrib/' . $d . '/' . $f,
! $target . '/doc/' . $moduledir . '/' . $f)
|| croak("Could not copy file $f in contrib $d");
print '.';
}
--- 400,406 ----
if ($d eq 'spi');
foreach my $f (split /\s+/,$flist)
{
! lcopy('contrib/' . $d . '/' . $f,$target . '/doc/' . $moduledir . '/' . $f)
|| croak("Could not copy file $f in contrib $d");
print '.';
}
*************** sub CopyIncludeFiles
*** 473,486 ****
$target . '/include/server/',
'src/include/', 'pg_config.h', 'pg_config_os.h'
);
! CopyFiles('Grammar header', $target . '/include/server/parser/',
! 'src/backend/parser/', 'gram.h');
CopySetOfFiles('',[ glob("src\\include\\*.h") ],$target . '/include/server/');
my $D;
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
! # some xcopy progs don't like mixed slash style paths
! (my $ctarget = $target) =~ s!/!\\!g;
while (my $d = readdir($D))
{
next if ($d =~ /^\./);
--- 470,483 ----
$target . '/include/server/',
'src/include/', 'pg_config.h', 'pg_config_os.h'
);
! CopyFiles('Grammar header', $target . '/include/server/parser/','src/backend/parser/',
! 'gram.h');
CopySetOfFiles('',[ glob("src\\include\\*.h") ],$target . '/include/server/');
my $D;
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
! # some xcopy progs don't like mixed slash style paths
! (my $ctarget = $target) =~ s!/!\\!g;
while (my $d = readdir($D))
{
next if ($d =~ /^\./);
diff -Napcdr -x .git postgresql/src/tools/msvc/Mkvcbuild.pm postgresql_dev/src/tools/msvc/Mkvcbuild.pm
*** postgresql/src/tools/msvc/Mkvcbuild.pm Tue Jul 5 05:55:29 2011
--- postgresql_dev/src/tools/msvc/Mkvcbuild.pm Wed Jul 6 23:36:56 2011
*************** sub mkvcbuild
*** 172,177 ****
--- 172,178 ----
if ($solution->{options}->{python})
{
+
# Attempt to get python version and location.
# Assume python.exe in specified dir.
open(P,
*************** sub mkvcbuild
*** 190,197 ****
if (!(defined($pyprefix) && defined($pyver)));
my $pymajorver = substr($pyver, 0, 1);
! my $plpython = $solution->AddProject('plpython' . $pymajorver, 'dll',
! 'PLs', 'src\pl\plpython');
$plpython->AddIncludeDir($pyprefix . '\include');
$plpython->AddLibrary($pyprefix . "\\Libs\\python$pyver.lib");
$plpython->AddReference($postgres);
--- 191,198 ----
if (!(defined($pyprefix) && defined($pyver)));
my $pymajorver = substr($pyver, 0, 1);
! my $plpython =
! $solution->AddProject('plpython' . $pymajorver, 'dll','PLs', 'src\pl\plpython');
$plpython->AddIncludeDir($pyprefix . '\include');
$plpython->AddLibrary($pyprefix . "\\Libs\\python$pyver.lib");
$plpython->AddReference($postgres);
diff -Napcdr -x .git postgresql/src/tools/msvc/Solution.pm postgresql_dev/src/tools/msvc/Solution.pm
*** postgresql/src/tools/msvc/Solution.pm Tue Jul 5 05:55:29 2011
--- postgresql_dev/src/tools/msvc/Solution.pm Wed Jul 6 23:36:57 2011
*************** s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x)
*** 273,295 ****
);
}
! if ($self->{options}->{python} && IsNewer('src\pl\plpython\spiexceptions.h','src\include\backend\errcodes.txt'))
{
print "Generating spiexceptions.h...\n";
! system('perl src\pl\plpython\generate-spiexceptions.pl src\backend\utils\errcodes.txt > src\pl\plpython\spiexceptions.h');
}
if (IsNewer('src\include\utils\errcodes.h','src\backend\utils\errcodes.txt'))
{
print "Generating errcodes.h...\n";
! system('perl src\backend\utils\generate-errcodes.pl src\backend\utils\errcodes.txt > src\backend\utils\errcodes.h');
copyFile('src\backend\utils\errcodes.h','src\include\utils\errcodes.h');
}
if (IsNewer('src\pl\plpgsql\src\plerrcodes.h','src\backend\utils\errcodes.txt'))
{
print "Generating plerrcodes.h...\n";
! system('perl src\pl\plpgsql\src\generate-plerrcodes.pl src\backend\utils\errcodes.txt > src\pl\plpgsql\src\plerrcodes.h');
}
if (IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
--- 273,302 ----
);
}
! if ($self->{options}->{python}
! && IsNewer('src\pl\plpython\spiexceptions.h','src\include\backend\errcodes.txt'))
{
print "Generating spiexceptions.h...\n";
! system(
! 'perl src\pl\plpython\generate-spiexceptions.pl src\backend\utils\errcodes.txt > src\pl\plpython\spiexceptions.h'
! );
}
if (IsNewer('src\include\utils\errcodes.h','src\backend\utils\errcodes.txt'))
{
print "Generating errcodes.h...\n";
! system(
! 'perl src\backend\utils\generate-errcodes.pl src\backend\utils\errcodes.txt > src\backend\utils\errcodes.h'
! );
copyFile('src\backend\utils\errcodes.h','src\include\utils\errcodes.h');
}
if (IsNewer('src\pl\plpgsql\src\plerrcodes.h','src\backend\utils\errcodes.txt'))
{
print "Generating plerrcodes.h...\n";
! system(
! 'perl src\pl\plpgsql\src\generate-plerrcodes.pl src\backend\utils\errcodes.txt > src\pl\plpgsql\src\plerrcodes.h'
! );
}
if (IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
diff -Napcdr -x .git postgresql/src/tools/msvc/builddoc.pl postgresql_dev/src/tools/msvc/builddoc.pl
*** postgresql/src/tools/msvc/builddoc.pl Tue Jul 5 05:55:29 2011
--- postgresql_dev/src/tools/msvc/builddoc.pl Wed Jul 6 23:36:56 2011
*************** use strict;
*** 9,15 ****
use File::Copy;
use Cwd qw(abs_path getcwd);
-
my $startdir = getcwd();
my $openjade = 'openjade-1.3.1';
--- 9,14 ----
*************** die "bad DOCROOT '$docroot'" unless ($do
*** 27,44 ****
my @notfound;
foreach my $dir ('docbook', $openjade, $dsssl)
{
! push(@notfound,$dir) unless -d "$docroot/$dir";
}
missing() if @notfound;
my $arg = shift;
renamefiles();
-
chdir 'doc/src/sgml';
! $ENV{SGML_CATALOG_FILES} = "$docroot/$openjade/dsssl/catalog;" .
! "$docroot/docbook/docbook.cat";
my $cmd;
--- 26,41 ----
my @notfound;
foreach my $dir ('docbook', $openjade, $dsssl)
{
! push(@notfound,$dir) unless -d "$docroot/$dir";
}
missing() if @notfound;
my $arg = shift;
renamefiles();
chdir 'doc/src/sgml';
! $ENV{SGML_CATALOG_FILES} = "$docroot/$openjade/dsssl/catalog;" ."$docroot/docbook/docbook.cat";
my $cmd;
*************** my $cmd;
*** 46,86 ****
# can't die on "failure"
$cmd =
! "perl mk_feature_tables.pl YES " .
! "../../../src/backend/catalog/sql_feature_packages.txt " .
! "../../../src/backend/catalog/sql_features.txt " .
! "> features-supported.sgml";
! system($cmd); die "features_supported" if $?;
! $cmd =
! "perl mk_feature_tables.pl NO " .
! "\"../../../src/backend/catalog/sql_feature_packages.txt\" " .
! "\"../../../src/backend/catalog/sql_features.txt\" " .
! "> features-unsupported.sgml";
! system($cmd); die "features_unsupported" if $?;
$cmd =
! "perl generate-errcodes-table.pl \"../../../src/backend/utils/errcodes.txt\" " .
! "> errcodes-table.sgml";
! system($cmd); die "errcodes-table" if $?;
print "Running first build...\n";
$cmd =
! "\"$docroot/$openjade/bin/openjade\" -V html-index -wall " .
! "-wno-unused-param -wno-empty -D . -c \"$docroot/$dsssl/catalog\" " .
! "-d stylesheet.dsl -i output-html -t sgml postgres.sgml 2>&1 " .
! "| findstr /V \"DTDDECL catalog entries are not supported\" ";
system($cmd); # die "openjade" if $?;
print "Running collateindex...\n";
! $cmd =
! "perl \"$docroot/$dsssl/bin/collateindex.pl\" -f -g -i bookindex " .
! "-o bookindex.sgml HTML.index";
! system($cmd); die "collateindex" if $?;
mkdir "html";
print "Running second build...\n";
$cmd =
! "\"$docroot/$openjade/bin/openjade\" -wall -wno-unused-param -wno-empty " .
! "-D . -c \"$docroot/$dsssl/catalog\" -d stylesheet.dsl -t sgml " .
! "-i output-html -i include-index postgres.sgml 2>&1 " .
! "| findstr /V \"DTDDECL catalog entries are not supported\" ";
system($cmd); # die "openjade" if $?;
--- 43,85 ----
# can't die on "failure"
$cmd =
! "perl mk_feature_tables.pl YES "
! ."../../../src/backend/catalog/sql_feature_packages.txt "
! ."../../../src/backend/catalog/sql_features.txt "
! ."> features-supported.sgml";
! system($cmd);
! die "features_supported" if $?;
$cmd =
! "perl mk_feature_tables.pl NO "
! ."\"../../../src/backend/catalog/sql_feature_packages.txt\" "
! ."\"../../../src/backend/catalog/sql_features.txt\" "
! ."> features-unsupported.sgml";
! system($cmd);
! die "features_unsupported" if $?;
! $cmd ="perl generate-errcodes-table.pl \"../../../src/backend/utils/errcodes.txt\" "
! ."> errcodes-table.sgml";
! system($cmd);
! die "errcodes-table" if $?;
print "Running first build...\n";
$cmd =
! "\"$docroot/$openjade/bin/openjade\" -V html-index -wall "
! ."-wno-unused-param -wno-empty -D . -c \"$docroot/$dsssl/catalog\" "
! ."-d stylesheet.dsl -i output-html -t sgml postgres.sgml 2>&1 "
! ."| findstr /V \"DTDDECL catalog entries are not supported\" ";
system($cmd); # die "openjade" if $?;
print "Running collateindex...\n";
! $cmd ="perl \"$docroot/$dsssl/bin/collateindex.pl\" -f -g -i bookindex "
! ."-o bookindex.sgml HTML.index";
! system($cmd);
! die "collateindex" if $?;
mkdir "html";
print "Running second build...\n";
$cmd =
! "\"$docroot/$openjade/bin/openjade\" -wall -wno-unused-param -wno-empty "
! ."-D . -c \"$docroot/$dsssl/catalog\" -d stylesheet.dsl -t sgml "
! ."-i output-html -i include-index postgres.sgml 2>&1 "
! ."| findstr /V \"DTDDECL catalog entries are not supported\" ";
system($cmd); # die "openjade" if $?;
*************** exit;
*** 94,122 ****
sub renamefiles
{
! # Rename ISO entity files
! my $savedir = getcwd();
! chdir "$docroot/docbook";
! foreach my $f (glob('ISO*'))
! {
! next if $f =~ /\.gml$/i;
! my $nf = $f;
! $nf =~ s/ISO(.*)/ISO-$1.gml/;
! move $f, $nf;
! }
! chdir $savedir;
!
}
sub missing
{
! print STDERR "could not find $docroot/$_\n" foreach (@notfound);
! exit 1;
}
sub noversion
{
! print STDERR "Could not find version.sgml. ",
! "Please run mkvcbuild.pl first!\n";
! exit 1;
}
--- 93,121 ----
sub renamefiles
{
!
! # Rename ISO entity files
! my $savedir = getcwd();
! chdir "$docroot/docbook";
! foreach my $f (glob('ISO*'))
! {
! next if $f =~ /\.gml$/i;
! my $nf = $f;
! $nf =~ s/ISO(.*)/ISO-$1.gml/;
! move $f, $nf;
! }
! chdir $savedir;
!
}
sub missing
{
! print STDERR "could not find $docroot/$_\n" foreach (@notfound);
! exit 1;
}
sub noversion
{
! print STDERR "Could not find version.sgml. ","Please run mkvcbuild.pl first!\n";
! exit 1;
}
diff -Napcdr -x .git postgresql/src/tools/msvc/vcregress.pl postgresql_dev/src/tools/msvc/vcregress.pl
*** postgresql/src/tools/msvc/vcregress.pl Tue Jul 5 05:55:29 2011
--- postgresql_dev/src/tools/msvc/vcregress.pl Wed Jul 6 23:36:56 2011
*************** my %command = (
*** 72,78 ****
INSTALLCHECK => \&installcheck,
ECPGCHECK => \&ecpgcheck,
CONTRIBCHECK => \&contribcheck,
! ISOLATIONCHECK => \&isolationcheck,
);
my $proc = $command{$what};
--- 72,78 ----
INSTALLCHECK => \&installcheck,
ECPGCHECK => \&ecpgcheck,
CONTRIBCHECK => \&contribcheck,
! ISOLATIONCHECK => \&isolationcheck,
);
my $proc = $command{$what};
*************** sub ecpgcheck
*** 140,153 ****
sub isolationcheck
{
! chdir "../isolation";
! copy("../../../$Config/isolationtester/isolationtester.exe",".");
my @args = (
! "../../../$Config/pg_isolation_regress/pg_isolation_regress",
! "--psqldir=../../../$Config/psql",
! "--inputdir=.",
! "--schedule=./isolation_schedule"
! );
push(@args,$maxconn) if $maxconn;
system(@args);
my $status = $? >>8;
--- 140,152 ----
sub isolationcheck
{
! chdir "../isolation";
! copy("../../../$Config/isolationtester/isolationtester.exe",".");
my @args = (
! "../../../$Config/pg_isolation_regress/pg_isolation_regress",
! "--psqldir=../../../$Config/psql",
! "--inputdir=.","--schedule=./isolation_schedule"
! );
push(@args,$maxconn) if $maxconn;
system(@args);
my $status = $? >>8;