mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Initial pgindent and pgperltidy run for v13.
Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.
Notably, it seems some people didn't absorb the style rules of
commit c9d297751
, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
This commit is contained in:
@ -64,7 +64,8 @@ sub DeterminePlatform
|
||||
# Examine CL help output to determine if we are in 32 or 64-bit mode.
|
||||
my $output = `cl /? 2>&1`;
|
||||
$? >> 8 == 0 or die "cl command not found";
|
||||
$self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
|
||||
$self->{platform} =
|
||||
($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -143,8 +144,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;
|
||||
@ -157,7 +158,8 @@ sub GenerateFiles
|
||||
|| confess("Could not open configure.in for reading\n");
|
||||
while (<$c>)
|
||||
{
|
||||
if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\], \[([^\]]*)\], \[([^\]]+)\]/)
|
||||
if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\], \[([^\]]*)\], \[([^\]]+)\]/
|
||||
)
|
||||
{
|
||||
$ac_init_found = 1;
|
||||
|
||||
@ -165,7 +167,7 @@ sub GenerateFiles
|
||||
$package_version = $2;
|
||||
$package_bugreport = $3;
|
||||
#$package_tarname = $4;
|
||||
$package_url = $5;
|
||||
$package_url = $5;
|
||||
|
||||
if ($package_version !~ /^(\d+)(?:\.(\d+))?/)
|
||||
{
|
||||
@ -494,8 +496,8 @@ sub GenerateFiles
|
||||
inline => '__inline',
|
||||
pg_restrict => '__restrict',
|
||||
# not defined, because it'd conflict with __declspec(restrict)
|
||||
restrict => undef,
|
||||
typeof => undef,);
|
||||
restrict => undef,
|
||||
typeof => undef,);
|
||||
|
||||
if ($self->{options}->{uuid})
|
||||
{
|
||||
@ -528,9 +530,10 @@ 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);
|
||||
$self->GenerateConfigHeader('src/interfaces/ecpg/include/ecpg_config.h',
|
||||
\%define, 0);
|
||||
|
||||
$self->GenerateDefFile(
|
||||
"src/interfaces/libpq/libpqdll.def",
|
||||
@ -835,8 +838,8 @@ sub GenerateConfigHeader
|
||||
|
||||
my $config_header_in = $config_header . '.in';
|
||||
|
||||
if (IsNewer($config_header, $config_header_in) ||
|
||||
IsNewer($config_header, __FILE__))
|
||||
if ( IsNewer($config_header, $config_header_in)
|
||||
|| IsNewer($config_header, __FILE__))
|
||||
{
|
||||
my %defines_copy = %$defines;
|
||||
|
||||
@ -858,7 +861,8 @@ sub GenerateConfigHeader
|
||||
{
|
||||
if (defined $defines->{$macro})
|
||||
{
|
||||
print $o "#${ws}define $macro ", $defines->{$macro}, "\n";
|
||||
print $o "#${ws}define $macro ", $defines->{$macro},
|
||||
"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -868,7 +872,8 @@ sub GenerateConfigHeader
|
||||
}
|
||||
else
|
||||
{
|
||||
croak "undefined symbol: $macro at $config_header line $.";
|
||||
croak
|
||||
"undefined symbol: $macro at $config_header line $.";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user