mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Restore setting of _USE_32BIT_TIME_T to 32 bit MSVC builds.
This was removed in commit cd004067742ee16ee63e55abfb4acbd5f09fbaab, we're not quite sure why, but there have been reports of crashes due to AS Perl being built with it when we are not, and it certainly seems like the right thing to do. There is still some uncertainty as to why it sometimes fails and sometimes doesn't. Original patch from Owais Khani, substantially reworked and extended by Andrew Dunstan.
This commit is contained in:
parent
e46794420e
commit
2d03874901
@ -61,16 +61,22 @@ EOF
|
|||||||
print $f <<EOF;
|
print $f <<EOF;
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# We have to use this flag on 32 bit targets because the 32bit perls
|
||||||
|
# are built with it and sometimes crash if we don't.
|
||||||
|
my $use_32bit_time_t =
|
||||||
|
$self->{platform} eq 'Win32' ? '_USE_32BIT_TIME_T;' : '';
|
||||||
|
|
||||||
$self->WriteItemDefinitionGroup(
|
$self->WriteItemDefinitionGroup(
|
||||||
$f, 'Debug',
|
$f, 'Debug',
|
||||||
{ defs => '_DEBUG;DEBUG=1;',
|
{ defs => "_DEBUG;DEBUG=1;$use_32bit_time_t",
|
||||||
opt => 'Disabled',
|
opt => 'Disabled',
|
||||||
strpool => 'false',
|
strpool => 'false',
|
||||||
runtime => 'MultiThreadedDebugDLL' });
|
runtime => 'MultiThreadedDebugDLL' });
|
||||||
$self->WriteItemDefinitionGroup(
|
$self->WriteItemDefinitionGroup(
|
||||||
$f,
|
$f,
|
||||||
'Release',
|
'Release',
|
||||||
{ defs => '',
|
{ defs => "$use_32bit_time_t",
|
||||||
opt => 'Full',
|
opt => 'Full',
|
||||||
strpool => 'true',
|
strpool => 'true',
|
||||||
runtime => 'MultiThreadedDLL' });
|
runtime => 'MultiThreadedDLL' });
|
||||||
|
@ -32,9 +32,16 @@ sub WriteHeader
|
|||||||
<Platforms><Platform Name="$self->{platform}"/></Platforms>
|
<Platforms><Platform Name="$self->{platform}"/></Platforms>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# We have to use this flag on 32 bit targets because the 32bit perls
|
||||||
|
# are built with it and sometimes crash if we don't.
|
||||||
|
my $use_32bit_time_t =
|
||||||
|
$self->{platform} eq 'Win32' ? '_USE_32BIT_TIME_T;' : '';
|
||||||
|
|
||||||
|
|
||||||
$self->WriteConfiguration(
|
$self->WriteConfiguration(
|
||||||
$f, 'Debug',
|
$f, 'Debug',
|
||||||
{ defs => '_DEBUG;DEBUG=1;',
|
{ defs => "_DEBUG;DEBUG=1;$use_32bit_time_t",
|
||||||
wholeopt => 0,
|
wholeopt => 0,
|
||||||
opt => 0,
|
opt => 0,
|
||||||
strpool => 'false',
|
strpool => 'false',
|
||||||
@ -42,7 +49,7 @@ EOF
|
|||||||
$self->WriteConfiguration(
|
$self->WriteConfiguration(
|
||||||
$f,
|
$f,
|
||||||
'Release',
|
'Release',
|
||||||
{ defs => '',
|
{ defs => "$use_32bit_time_t",
|
||||||
wholeopt => 0,
|
wholeopt => 0,
|
||||||
opt => 3,
|
opt => 3,
|
||||||
strpool => 'true',
|
strpool => 'true',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user