In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/1a9ff134512968f758f5c3d9cf66b0cb30be4b4e?hp=44918de81dce7a3a8ad6f89587d1d1f97721a393>

- Log -----------------------------------------------------------------
commit 1a9ff134512968f758f5c3d9cf66b0cb30be4b4e
Author: Steve Hay <[email protected]>
Date:   Thu Jan 25 13:38:36 2018 +0000

    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

-----------------------------------------------------------------------

Summary of changes:
 win32/config.gc    |  2 +-
 win32/config_H.gc  |  2 +-
 win32/config_sh.PL | 24 ++++++++++++++----------
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/win32/config.gc b/win32/config.gc
index f49fe865a4..46a6a7d70e 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -761,7 +761,7 @@ i_sgtty='undef'
 i_shadow='undef'
 i_socks='undef'
 i_stdbool='define'
-i_stdint='undef'
+i_stdint='define'
 i_stdlib='define'
 i_sunmath='undef'
 i_sysaccess='undef'
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 132ae61751..3af1a012b8 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -3662,7 +3662,7 @@
  *     This symbol, if defined, indicates that <stdint.h> exists and
  *     should be included.
  */
-/*#define I_STDINT             / **/
+#define I_STDINT               /**/
 
 /* I_SUNMATH:
  *     This symbol, if defined, indicates that <sunmath.h> exists and
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)';

-- 
Perl5 Master Repository

Reply via email to