diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2018-01-25 13:38:36 +0000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2018-01-25 13:38:36 +0000 |
commit | 1a9ff134512968f758f5c3d9cf66b0cb30be4b4e (patch) | |
tree | a3da66da2ac60e6d2d22253aa3b83d1dadd38bb8 /win32/config_sh.PL | |
parent | 44918de81dce7a3a8ad6f89587d1d1f97721a393 (diff) | |
download | perl-1a9ff134512968f758f5c3d9cf66b0cb30be4b4e.tar.gz |
Define I_STDINT for gcc, and for VC++ 2010 onwards
Fixes the Math-MPFR-4.0.0 build on 5.27.7 onwards.
See: https://www.nntp.perl.org/group/perl.perl5.porters/2018/01/msg248964.html
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r-- | win32/config_sh.PL | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 2afd65513c..652bc97edd 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -260,19 +260,20 @@ else { $opt{nvgformat} = '"g"'; } -# change the s{GM|LOCAL}TIME_{min|max} for VS2005 (aka VC 8) and -# VS2008 (aka VC 9) or higher (presuming that later versions will have -# at least the range of that). +# change some configuration variables based on compiler version if ($opt{cc} =~ /\bcl/ and $opt{ccversion} =~ /^(\d+)/) { my $ccversion = $1; - if ($ccversion >= 14) { + if ($ccversion < 13) { # VC6 + $opt{ar} ='lib'; + } + if ($ccversion >= 14) { # VC8+ $opt{sGMTIME_max} = 32535291599; $opt{sLOCALTIME_max} = 32535244799; } - if ($ccversion < 13) { #VC6 - $opt{ar} ='lib'; + if ($ccversion >= 16) { # VC10+ + $opt{i_stdint} = 'define'; } - if ($ccversion >= 19) { # VC14 + if ($ccversion >= 19) { # VC14+ $opt{stdio_base} = 'PERLIO_FILE_base(fp)'; $opt{stdio_bufsiz} = '(PERLIO_FILE_cnt(fp) + PERLIO_FILE_ptr(fp) - PERLIO_FILE_base(fp))'; $opt{stdio_cnt} = 'PERLIO_FILE_cnt(fp)'; @@ -280,15 +281,18 @@ if ($opt{cc} =~ /\bcl/ and $opt{ccversion} =~ /^(\d+)/) { $opt{i_stdbool} = 'define'; } } -#find out which MSVC this ICC is using +# find out which MSVC this ICC is using elsif ($opt{cc} =~ /\bicl/) { my $output = `cl 2>&1`; my $num_ver = $output =~ /\b(\d+(?:\.\d+)+)\b/ ? $1 : '?'; - if ($num_ver =~ /^(\d+)/ && $1 >= 14) { + if ($num_ver =~ /^(\d+)/ && $1 >= 14) { # VC8+ $opt{sGMTIME_max} = 32535291599; $opt{sLOCALTIME_max} = 32535244799; } - if ($num_ver =~ /^(\d+)/ && $1 >= 19) { # VC14 + if ($num_ver =~ /^(\d+)/ && $1 >= 16) { # VC10+ + $opt{i_stdint} = 'define'; + } + if ($num_ver =~ /^(\d+)/ && $1 >= 19) { # VC14+ $opt{stdio_base} = 'PERLIO_FILE_base(fp)'; $opt{stdio_bufsiz} = '(PERLIO_FILE_cnt(fp) + PERLIO_FILE_ptr(fp) - PERLIO_FILE_base(fp))'; $opt{stdio_cnt} = 'PERLIO_FILE_cnt(fp)'; |