mscv_use_32bit_time_t-older.patch
text/x-patch
Filename: mscv_use_32bit_time_t-older.patch
Type: text/x-patch
Part: 1
Message:
Re: _USE_32BIT_TIME_T Patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/tools/msvc/Project.pm | 15 | 2 |
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 66752f9..ad62272 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -471,10 +471,23 @@ sub WriteHeader
<Platforms><Platform Name="$self->{platform}"/></Platforms>
<Configurations>
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($f, 'Debug',
- { defs=>'_DEBUG;DEBUG=1;', wholeopt=>0, opt=>0, strpool=>'false', runtime=>3 });
+ { defs=>"_DEBUG;DEBUG=1;$use_32bit_time_t",
+ wholeopt=>0,
+ opt=>0,
+ strpool=>'false',
+ runtime=>3 });
$self->WriteConfiguration($f, 'Release',
- { defs=>'', wholeopt=>0, opt=>3, strpool=>'true', runtime=>2 });
+ { defs=> "$use_32bit_time_t",
+ wholeopt=>0,
+ opt=>3,
+ strpool=>'true',
+ runtime=>2 });
print $f <<EOF;
</Configurations>
EOF