mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
perltidy: Add option --nooutdent-long-comments
This commit is contained in:
@ -97,35 +97,35 @@ sub Run()
|
|||||||
$CondReg ||= $s;
|
$CondReg ||= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/
|
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/
|
||||||
{
|
{
|
||||||
$s =
|
$s =
|
||||||
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4)/s;
|
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4)/s;
|
||||||
$CondReg ||= $s;
|
$CondReg ||= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/
|
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/
|
||||||
{
|
{
|
||||||
$s =
|
$s =
|
||||||
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5)/s;
|
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5)/s;
|
||||||
$CondReg ||= $s;
|
$CondReg ||= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
|
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
|
||||||
{
|
{
|
||||||
$s =
|
$s =
|
||||||
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6)/s;
|
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6)/s;
|
||||||
$CondReg ||= $s;
|
$CondReg ||= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
|
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
|
||||||
{
|
{
|
||||||
$s =
|
$s =
|
||||||
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/s;
|
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/s;
|
||||||
$CondReg ||= $s;
|
$CondReg ||= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
|
# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
|
||||||
{
|
{
|
||||||
$s =
|
$s =
|
||||||
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/s;
|
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/s;
|
||||||
|
@ -62,9 +62,9 @@ foreach my $i (@$all)
|
|||||||
my $code = $i->{code};
|
my $code = $i->{code};
|
||||||
my $ucs = $i->{ucs};
|
my $ucs = $i->{ucs};
|
||||||
|
|
||||||
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
|
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
|
||||||
# contain only one of them. XXX: Doesn't really make sense to include any of them,
|
# contain only one of them. XXX: Doesn't really make sense to include any of them,
|
||||||
# but for historical reasons, we map the first one of them.
|
# but for historical reasons, we map the first one of them.
|
||||||
if ($i->{ucs} == 0xFFFD && $i->{code} != 0xA15A)
|
if ($i->{ucs} == 0xFFFD && $i->{code} != 0xA15A)
|
||||||
{
|
{
|
||||||
$i->{direction} = TO_UNICODE;
|
$i->{direction} = TO_UNICODE;
|
||||||
|
@ -138,11 +138,11 @@ sub print_conversion_tables_direction
|
|||||||
print $out "/* src/backend/utils/mb/Unicode/$fname */\n";
|
print $out "/* src/backend/utils/mb/Unicode/$fname */\n";
|
||||||
print $out "/* This file is generated by $this_script */\n\n";
|
print $out "/* This file is generated by $this_script */\n\n";
|
||||||
|
|
||||||
# Collect regular, non-combined, mappings, and create the radix tree from them.
|
# Collect regular, non-combined, mappings, and create the radix tree from them.
|
||||||
my $charmap = &make_charmap($out, $charset, $direction, 0);
|
my $charmap = &make_charmap($out, $charset, $direction, 0);
|
||||||
print_radix_table($out, $tblname, $charmap);
|
print_radix_table($out, $tblname, $charmap);
|
||||||
|
|
||||||
# Collect combined characters, and create combined character table (if any)
|
# Collect combined characters, and create combined character table (if any)
|
||||||
my $charmap_combined = &make_charmap_combined($charset, $direction);
|
my $charmap_combined = &make_charmap_combined($charset, $direction);
|
||||||
|
|
||||||
if (scalar @{$charmap_combined} > 0)
|
if (scalar @{$charmap_combined} > 0)
|
||||||
|
@ -213,7 +213,7 @@ SKIP:
|
|||||||
# Move pg_replslot out of $pgdata and create a symlink to it.
|
# Move pg_replslot out of $pgdata and create a symlink to it.
|
||||||
$node->stop;
|
$node->stop;
|
||||||
|
|
||||||
# Set umask so test directories and files are created with group permissions
|
# Set umask so test directories and files are created with group permissions
|
||||||
umask(0027);
|
umask(0027);
|
||||||
|
|
||||||
# Enable group permissions on PGDATA
|
# Enable group permissions on PGDATA
|
||||||
@ -245,7 +245,7 @@ SKIP:
|
|||||||
is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
|
is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
|
||||||
rmtree("$tempdir/tarbackup2");
|
rmtree("$tempdir/tarbackup2");
|
||||||
|
|
||||||
# Create an unlogged table to test that forks other than init are not copied.
|
# Create an unlogged table to test that forks other than init are not copied.
|
||||||
$node->safe_psql('postgres',
|
$node->safe_psql('postgres',
|
||||||
'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;'
|
'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;'
|
||||||
);
|
);
|
||||||
@ -258,8 +258,8 @@ SKIP:
|
|||||||
'unlogged init fork in tablespace');
|
'unlogged init fork in tablespace');
|
||||||
ok(-f "$pgdata/$tblspc1UnloggedPath", 'unlogged main fork in tablespace');
|
ok(-f "$pgdata/$tblspc1UnloggedPath", 'unlogged main fork in tablespace');
|
||||||
|
|
||||||
# Create files that look like temporary relations to ensure they are ignored
|
# Create files that look like temporary relations to ensure they are ignored
|
||||||
# in a tablespace.
|
# in a tablespace.
|
||||||
my @tempRelationFiles = qw(t888_888 t888888_888888_vm.1);
|
my @tempRelationFiles = qw(t888_888 t888888_888888_vm.1);
|
||||||
my $tblSpc1Id = basename(
|
my $tblSpc1Id = basename(
|
||||||
dirname(
|
dirname(
|
||||||
|
@ -2864,7 +2864,7 @@ foreach my $run (sort keys %pgdump_runs)
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If there is a like entry, but no unlike entry, then we will test the like case
|
# If there is a like entry, but no unlike entry, then we will test the like case
|
||||||
if ($tests{$test}->{like}->{$test_key}
|
if ($tests{$test}->{like}->{$test_key}
|
||||||
&& !defined($tests{$test}->{unlike}->{$test_key}))
|
&& !defined($tests{$test}->{unlike}->{$test_key}))
|
||||||
{
|
{
|
||||||
|
@ -670,7 +670,7 @@ pgbench(
|
|||||||
|
|
||||||
pgbench(
|
pgbench(
|
||||||
|
|
||||||
# given the expected rate and the 2 ms tx duration, at most one is executed
|
# given the expected rate and the 2 ms tx duration, at most one is executed
|
||||||
'-t 10 --rate=100000 --latency-limit=1 -n -r',
|
'-t 10 --rate=100000 --latency-limit=1 -n -r',
|
||||||
0,
|
0,
|
||||||
[ qr{processed: [01]/10},
|
[ qr{processed: [01]/10},
|
||||||
|
@ -134,20 +134,20 @@ sub main
|
|||||||
|
|
||||||
chomp;
|
chomp;
|
||||||
|
|
||||||
# comment out the line below to make the result file match (blank line wise)
|
# comment out the line below to make the result file match (blank line wise)
|
||||||
# the prior version.
|
# the prior version.
|
||||||
#next if ($_ eq '');
|
#next if ($_ eq '');
|
||||||
|
|
||||||
# Dump the action for a rule -
|
# Dump the action for a rule -
|
||||||
# stmt_mode indicates if we are processing the 'stmt:'
|
# stmt_mode indicates if we are processing the 'stmt:'
|
||||||
# rule (mode==0 means normal, mode==1 means stmt:)
|
# rule (mode==0 means normal, mode==1 means stmt:)
|
||||||
# flds are the fields to use. These may start with a '$' - in
|
# flds are the fields to use. These may start with a '$' - in
|
||||||
# which case they are the result of a previous non-terminal
|
# which case they are the result of a previous non-terminal
|
||||||
#
|
#
|
||||||
# if they dont start with a '$' then they are token name
|
# if they dont start with a '$' then they are token name
|
||||||
#
|
#
|
||||||
# len is the number of fields in flds...
|
# len is the number of fields in flds...
|
||||||
# leadin is the padding to apply at the beginning (just use for formatting)
|
# leadin is the padding to apply at the beginning (just use for formatting)
|
||||||
|
|
||||||
if (/^%%/)
|
if (/^%%/)
|
||||||
{
|
{
|
||||||
@ -223,7 +223,7 @@ sub main
|
|||||||
next line;
|
next line;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Dont worry about anything if we're not in the right section of gram.y
|
# Dont worry about anything if we're not in the right section of gram.y
|
||||||
if ($yaccmode != 1)
|
if ($yaccmode != 1)
|
||||||
{
|
{
|
||||||
next line;
|
next line;
|
||||||
@ -632,8 +632,8 @@ sub preload_addons
|
|||||||
my $filename = $path . "/ecpg.addons";
|
my $filename = $path . "/ecpg.addons";
|
||||||
open(my $fh, '<', $filename) or die;
|
open(my $fh, '<', $filename) or die;
|
||||||
|
|
||||||
# there may be multiple lines starting ECPG: and then multiple lines of code.
|
# there may be multiple lines starting ECPG: and then multiple lines of code.
|
||||||
# the code need to be add to all prior ECPG records.
|
# the code need to be add to all prior ECPG records.
|
||||||
my (@needsRules, @code, $record);
|
my (@needsRules, @code, $record);
|
||||||
|
|
||||||
# there may be comments before the first ECPG line, skip them
|
# there may be comments before the first ECPG line, skip them
|
||||||
|
@ -38,11 +38,11 @@ my @allowed_ops = (
|
|||||||
# (included in :default) but aren't considered sufficiently safe
|
# (included in :default) but aren't considered sufficiently safe
|
||||||
qw[!dbmopen !setpgrp !setpriority],
|
qw[!dbmopen !setpgrp !setpriority],
|
||||||
|
|
||||||
# custom is not deemed a likely security risk as it can't be generated from
|
# custom is not deemed a likely security risk as it can't be generated from
|
||||||
# perl so would only be seen if the DBA had chosen to load a module that
|
# perl so would only be seen if the DBA had chosen to load a module that
|
||||||
# used it. Even then it's unlikely to be seen because it's typically
|
# used it. Even then it's unlikely to be seen because it's typically
|
||||||
# generated by compiler plugins that operate after PL_op_mask checks.
|
# generated by compiler plugins that operate after PL_op_mask checks.
|
||||||
# But we err on the side of caution and disable it
|
# But we err on the side of caution and disable it
|
||||||
qw[!custom],);
|
qw[!custom],);
|
||||||
|
|
||||||
printf $fh " /* ALLOWED: @allowed_ops */ \\\n";
|
printf $fh " /* ALLOWED: @allowed_ops */ \\\n";
|
||||||
|
@ -370,7 +370,7 @@ my %tests = (
|
|||||||
section_pre_data => 1, },
|
section_pre_data => 1, },
|
||||||
unlike => { no_privs => 1, }, },
|
unlike => { no_privs => 1, }, },
|
||||||
|
|
||||||
# Objects included in extension part of a schema created by this extension */
|
# Objects included in extension part of a schema created by this extension */
|
||||||
'CREATE TABLE regress_pg_dump_schema.test_table' => {
|
'CREATE TABLE regress_pg_dump_schema.test_table' => {
|
||||||
regexp => qr/^
|
regexp => qr/^
|
||||||
\QCREATE TABLE regress_pg_dump_schema.test_table (\E
|
\QCREATE TABLE regress_pg_dump_schema.test_table (\E
|
||||||
@ -498,7 +498,7 @@ foreach my $run (sort keys %pgdump_runs)
|
|||||||
# Then count all the tests run against each run
|
# Then count all the tests run against each run
|
||||||
foreach my $test (sort keys %tests)
|
foreach my $test (sort keys %tests)
|
||||||
{
|
{
|
||||||
# If there is a like entry, but no unlike entry, then we will test the like case
|
# If there is a like entry, but no unlike entry, then we will test the like case
|
||||||
if ($tests{$test}->{like}->{$test_key}
|
if ($tests{$test}->{like}->{$test_key}
|
||||||
&& !defined($tests{$test}->{unlike}->{$test_key}))
|
&& !defined($tests{$test}->{unlike}->{$test_key}))
|
||||||
{
|
{
|
||||||
|
@ -1197,12 +1197,12 @@ sub psql
|
|||||||
|
|
||||||
my $ret;
|
my $ret;
|
||||||
|
|
||||||
# Run psql and capture any possible exceptions. If the exception is
|
# Run psql and capture any possible exceptions. If the exception is
|
||||||
# because of a timeout and the caller requested to handle that, just return
|
# because of a timeout and the caller requested to handle that, just return
|
||||||
# and set the flag. Otherwise, and for any other exception, rethrow.
|
# and set the flag. Otherwise, and for any other exception, rethrow.
|
||||||
#
|
#
|
||||||
# For background, see
|
# For background, see
|
||||||
# http://search.cpan.org/~ether/Try-Tiny-0.24/lib/Try/Tiny.pm
|
# http://search.cpan.org/~ether/Try-Tiny-0.24/lib/Try/Tiny.pm
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
local $@;
|
local $@;
|
||||||
|
@ -108,7 +108,7 @@ $node_master->safe_psql('otherdb',
|
|||||||
SKIP:
|
SKIP:
|
||||||
{
|
{
|
||||||
|
|
||||||
# some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
|
# some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
|
||||||
skip "Test fails on Windows perl", 2 if $Config{osname} eq 'MSWin32';
|
skip "Test fails on Windows perl", 2 if $Config{osname} eq 'MSWin32';
|
||||||
|
|
||||||
my $pg_recvlogical = IPC::Run::start(
|
my $pg_recvlogical = IPC::Run::start(
|
||||||
|
@ -10,7 +10,7 @@ use Config;
|
|||||||
if ($Config{osname} eq 'MSWin32')
|
if ($Config{osname} eq 'MSWin32')
|
||||||
{
|
{
|
||||||
|
|
||||||
# some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
|
# some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
|
||||||
plan skip_all => "Test fails on Windows perl";
|
plan skip_all => "Test fails on Windows perl";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -115,7 +115,7 @@ sub configure_test_server_for_ssl
|
|||||||
open my $sslconf, '>', "$pgdata/sslconfig.conf";
|
open my $sslconf, '>', "$pgdata/sslconfig.conf";
|
||||||
close $sslconf;
|
close $sslconf;
|
||||||
|
|
||||||
# Copy all server certificates and keys, and client root cert, to the data dir
|
# Copy all server certificates and keys, and client root cert, to the data dir
|
||||||
copy_files("ssl/server-*.crt", $pgdata);
|
copy_files("ssl/server-*.crt", $pgdata);
|
||||||
copy_files("ssl/server-*.key", $pgdata);
|
copy_files("ssl/server-*.key", $pgdata);
|
||||||
chmod(0600, glob "$pgdata/server-*.key") or die $!;
|
chmod(0600, glob "$pgdata/server-*.key") or die $!;
|
||||||
@ -155,10 +155,10 @@ sub configure_hba_for_ssl
|
|||||||
my ($node, $serverhost, $authmethod) = @_;
|
my ($node, $serverhost, $authmethod) = @_;
|
||||||
my $pgdata = $node->data_dir;
|
my $pgdata = $node->data_dir;
|
||||||
|
|
||||||
# Only accept SSL connections from localhost. Our tests don't depend on this
|
# Only accept SSL connections from localhost. Our tests don't depend on this
|
||||||
# but seems best to keep it as narrow as possible for security reasons.
|
# but seems best to keep it as narrow as possible for security reasons.
|
||||||
#
|
#
|
||||||
# When connecting to certdb, also check the client certificate.
|
# When connecting to certdb, also check the client certificate.
|
||||||
open my $hba, '>', "$pgdata/pg_hba.conf";
|
open my $hba, '>', "$pgdata/pg_hba.conf";
|
||||||
print $hba
|
print $hba
|
||||||
"# TYPE DATABASE USER ADDRESS METHOD\n";
|
"# TYPE DATABASE USER ADDRESS METHOD\n";
|
||||||
|
@ -179,8 +179,8 @@ sub mkvcbuild
|
|||||||
$postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
|
$postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
|
||||||
$postgres->FullExportDLL('postgres.lib');
|
$postgres->FullExportDLL('postgres.lib');
|
||||||
|
|
||||||
# The OBJS scraper doesn't know about ifdefs, so remove be-secure-openssl.c
|
# The OBJS scraper doesn't know about ifdefs, so remove be-secure-openssl.c
|
||||||
# if building without OpenSSL
|
# if building without OpenSSL
|
||||||
if (!$solution->{options}->{openssl})
|
if (!$solution->{options}->{openssl})
|
||||||
{
|
{
|
||||||
$postgres->RemoveFile('src/backend/libpq/be-secure-common.c');
|
$postgres->RemoveFile('src/backend/libpq/be-secure-common.c');
|
||||||
@ -239,9 +239,9 @@ sub mkvcbuild
|
|||||||
'src/interfaces/libpq/libpq.rc');
|
'src/interfaces/libpq/libpq.rc');
|
||||||
$libpq->AddReference($libpgport);
|
$libpq->AddReference($libpgport);
|
||||||
|
|
||||||
# The OBJS scraper doesn't know about ifdefs, so remove fe-secure-openssl.c
|
# The OBJS scraper doesn't know about ifdefs, so remove fe-secure-openssl.c
|
||||||
# and sha2_openssl.c if building without OpenSSL, and remove sha2.c if
|
# and sha2_openssl.c if building without OpenSSL, and remove sha2.c if
|
||||||
# building with OpenSSL.
|
# building with OpenSSL.
|
||||||
if (!$solution->{options}->{openssl})
|
if (!$solution->{options}->{openssl})
|
||||||
{
|
{
|
||||||
$libpq->RemoveFile('src/interfaces/libpq/fe-secure-common.c');
|
$libpq->RemoveFile('src/interfaces/libpq/fe-secure-common.c');
|
||||||
@ -530,9 +530,9 @@ sub mkvcbuild
|
|||||||
|
|
||||||
my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*';
|
my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*';
|
||||||
|
|
||||||
# ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
|
# ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
|
||||||
# Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided.
|
# Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided.
|
||||||
# In this case, prefer .lib.
|
# In this case, prefer .lib.
|
||||||
my @perl_libs =
|
my @perl_libs =
|
||||||
reverse sort grep { /perl\d+\.lib$|libperl\d+\.a$/ }
|
reverse sort grep { /perl\d+\.lib$|libperl\d+\.a$/ }
|
||||||
glob($perl_path);
|
glob($perl_path);
|
||||||
|
@ -345,15 +345,15 @@ sub Save
|
|||||||
{
|
{
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
# If doing DLL and haven't specified a DEF file, do a full export of all symbols
|
# If doing DLL and haven't specified a DEF file, do a full export of all symbols
|
||||||
# in the project.
|
# in the project.
|
||||||
if ($self->{type} eq "dll" && !$self->{def})
|
if ($self->{type} eq "dll" && !$self->{def})
|
||||||
{
|
{
|
||||||
$self->FullExportDLL($self->{name} . ".lib");
|
$self->FullExportDLL($self->{name} . ".lib");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Warning 4197 is about double exporting, disable this per
|
# Warning 4197 is about double exporting, disable this per
|
||||||
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
|
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
|
||||||
$self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
|
$self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
|
||||||
|
|
||||||
# Dump the project
|
# Dump the project
|
||||||
|
@ -54,7 +54,7 @@ sub CreateSolution
|
|||||||
return new VS2015Solution(@_);
|
return new VS2015Solution(@_);
|
||||||
}
|
}
|
||||||
|
|
||||||
# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
|
# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
|
||||||
elsif (($visualStudioVersion ge '14.10')
|
elsif (($visualStudioVersion ge '14.10')
|
||||||
or ($visualStudioVersion eq '15.00'))
|
or ($visualStudioVersion eq '15.00'))
|
||||||
{
|
{
|
||||||
@ -101,7 +101,7 @@ sub CreateProject
|
|||||||
return new VC2015Project(@_);
|
return new VC2015Project(@_);
|
||||||
}
|
}
|
||||||
|
|
||||||
# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
|
# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
|
||||||
elsif (($visualStudioVersion ge '14.10')
|
elsif (($visualStudioVersion ge '14.10')
|
||||||
or ($visualStudioVersion eq '15.00'))
|
or ($visualStudioVersion eq '15.00'))
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ sub _GetVisualStudioVersion
|
|||||||
{
|
{
|
||||||
my ($major, $minor) = @_;
|
my ($major, $minor) = @_;
|
||||||
|
|
||||||
# visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison.
|
# visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison.
|
||||||
if ($major > 14)
|
if ($major > 14)
|
||||||
{
|
{
|
||||||
carp
|
carp
|
||||||
|
@ -36,40 +36,40 @@ sub extract_syms
|
|||||||
while (<$f>)
|
while (<$f>)
|
||||||
{
|
{
|
||||||
|
|
||||||
# Expected symbol lines look like:
|
# Expected symbol lines look like:
|
||||||
#
|
#
|
||||||
# 0 1 2 3 4 5 6
|
# 0 1 2 3 4 5 6
|
||||||
# IDX SYMBOL SECT SYMTYPE SYMSTATIC SYMNAME
|
# IDX SYMBOL SECT SYMTYPE SYMSTATIC SYMNAME
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
# 02E 00000130 SECTA notype External | _standbyState
|
# 02E 00000130 SECTA notype External | _standbyState
|
||||||
# 02F 00000009 SECT9 notype Static | _LocalRecoveryInProgress
|
# 02F 00000009 SECT9 notype Static | _LocalRecoveryInProgress
|
||||||
# 064 00000020 SECTC notype () Static | _XLogCheckBuffer
|
# 064 00000020 SECTC notype () Static | _XLogCheckBuffer
|
||||||
# 065 00000000 UNDEF notype () External | _BufferGetTag
|
# 065 00000000 UNDEF notype () External | _BufferGetTag
|
||||||
#
|
#
|
||||||
# See http://msdn.microsoft.com/en-us/library/b842y285.aspx
|
# See http://msdn.microsoft.com/en-us/library/b842y285.aspx
|
||||||
#
|
#
|
||||||
# We're not interested in the symbol index or offset.
|
# We're not interested in the symbol index or offset.
|
||||||
#
|
#
|
||||||
# SECT[ION] is only examined to see whether the symbol is defined in a
|
# SECT[ION] is only examined to see whether the symbol is defined in a
|
||||||
# COFF section of the local object file; if UNDEF, it's a symbol to be
|
# COFF section of the local object file; if UNDEF, it's a symbol to be
|
||||||
# resolved at link time from another object so we can't export it.
|
# resolved at link time from another object so we can't export it.
|
||||||
#
|
#
|
||||||
# SYMTYPE is always notype for C symbols as there's no typeinfo and no
|
# SYMTYPE is always notype for C symbols as there's no typeinfo and no
|
||||||
# way to get the symbol type from name (de)mangling. However, we care
|
# way to get the symbol type from name (de)mangling. However, we care
|
||||||
# if "notype" is suffixed by "()" or not. The presence of () means the
|
# if "notype" is suffixed by "()" or not. The presence of () means the
|
||||||
# symbol is a function, the absence means it isn't.
|
# symbol is a function, the absence means it isn't.
|
||||||
#
|
#
|
||||||
# SYMSTATIC indicates whether it's a compilation-unit local "static"
|
# SYMSTATIC indicates whether it's a compilation-unit local "static"
|
||||||
# symbol ("Static"), or whether it's available for use from other
|
# symbol ("Static"), or whether it's available for use from other
|
||||||
# compilation units ("External"). We export all symbols that aren't
|
# compilation units ("External"). We export all symbols that aren't
|
||||||
# static as part of the whole program DLL interface to produce UNIX-like
|
# static as part of the whole program DLL interface to produce UNIX-like
|
||||||
# default linkage.
|
# default linkage.
|
||||||
#
|
#
|
||||||
# SYMNAME is, obviously, the symbol name. The leading underscore
|
# SYMNAME is, obviously, the symbol name. The leading underscore
|
||||||
# indicates that the _cdecl calling convention is used. See
|
# indicates that the _cdecl calling convention is used. See
|
||||||
# http://www.unixwiz.net/techtips/win32-callconv.html
|
# http://www.unixwiz.net/techtips/win32-callconv.html
|
||||||
# http://www.codeproject.com/Articles/1388/Calling-Conventions-Demystified
|
# http://www.codeproject.com/Articles/1388/Calling-Conventions-Demystified
|
||||||
#
|
#
|
||||||
s/notype \(\)/func/g;
|
s/notype \(\)/func/g;
|
||||||
s/notype/data/g;
|
s/notype/data/g;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
--entab-leading-whitespace=4
|
--entab-leading-whitespace=4
|
||||||
--keep-old-blank-lines=2
|
--keep-old-blank-lines=2
|
||||||
--maximum-line-length=78
|
--maximum-line-length=78
|
||||||
|
--nooutdent-long-comments
|
||||||
--nooutdent-long-quotes
|
--nooutdent-long-quotes
|
||||||
--nospace-for-semicolon
|
--nospace-for-semicolon
|
||||||
--opening-brace-on-new-line
|
--opening-brace-on-new-line
|
||||||
|
Reference in New Issue
Block a user