diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2017-02-19 13:33:37 +0000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-02-19 15:30:26 +0000 |
commit | 1f664ef5314fb6e438137c44c95cf5ecdbdb5e9b (patch) | |
tree | 0c788a9cfa8bc4f6e1561230cfaf8e85a421ab99 /win32/config_sh.PL | |
parent | b3dc9cf3c7fae44f9823063eb1c1a3d593421b03 (diff) | |
download | perl-1f664ef5314fb6e438137c44c95cf5ecdbdb5e9b.tar.gz |
Add support for VS2015 (VC++ 14.0)
Due to the rewritten CRT in this version of Visual C++ it is no longer
possible (or at least not at all easy) to make use of the ioinfo struct,
which commit b47a847f62 (re-)introduced in order to fix RT#120091/118059.
Therefore, we effectively revert commit b47a847f62 for VS2015 onwards on
the basis that being able to build with VS2015 onwards is more important
than the RT#120091/118059 bug fix. This does unfortunately mean that perls
built with <=VS2013 will not be compatible with perls built with >=VS2015,
but they may well not have been compatible anyway because of the CRT
rewrite, and certainly wouldn't be compatible if perl builds with VS2015
were not supported!
See RT#125714 for more discussion about this.
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r-- | win32/config_sh.PL | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL index c4a311266d..8d6f7383fa 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -277,6 +277,13 @@ if ($opt{cc} =~ /\bcl/ and $opt{ccversion} =~ /^(\d+)/) { if($ccversion < 13) { #VC6 $opt{ar} ='lib'; } + 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)'; + $opt{stdio_ptr} = 'PERLIO_FILE_ptr(fp)'; + $opt{i_stdbool} = 'define'; + } } #find out which MSVC this ICC is using elsif ($opt{cc} =~ /\bicl/) { @@ -286,6 +293,13 @@ elsif ($opt{cc} =~ /\bicl/) { $opt{sGMTIME_max} = 32535291599; $opt{sLOCALTIME_max} = 32535244799; } + 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)'; + $opt{stdio_ptr} = 'PERLIO_FILE_ptr(fp)'; + $opt{i_stdbool} = 'define'; + } $opt{ar} ='xilib'; } |