diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t index f3a162a99bf9..ce9090cb48e5 100644 --- a/ext/POSIX/t/math.t +++ b/ext/POSIX/t/math.t @@ -83,9 +83,6 @@ SKIP: { if ($^O =~ /VMS/) { skip "running in $^O, C99 math support uneven"; } - if ($Config{cc} =~ /\b(?:cl|icl)/) { - skip "Microsoft compiler - C99 math support uneven"; - } near(M_SQRT2, 1.4142135623731, "M_SQRT2", 1e-9); near(M_E, 2.71828182845905, "M_E", 1e-9); @@ -293,7 +290,10 @@ SKIP: { like(NAN, qr/^NaN/, "NAN is Perl's NaN"); cmp_ok(NAN, '!=', NAN, "NAN != NAN"); ok(!(NAN == NAN), "NAN == NAN"); - ok(!signbit(NAN), "signbit(NAN)"); + # we have a fallback copysign(), but it doesn't work for NaN + skip('no copysign', 2) unless $Config{d_copysign}; + ok(!signbit(copysign(NAN, 1.0)), "signbit(copysign(NAN, 1.0)))"); + ok(signbit(copysign(NAN, -1.0)), "signbit(copysign(NAN, -1.0)))"); } done_testing(); diff --git a/hints/linux.sh b/hints/linux.sh index 5202b28b099b..a3e476e4f6a9 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -111,7 +111,9 @@ case "`${cc:-cc} -V 2>&1`" in # 'Sun' and the 'C': Examples: # cc: Sun C 5.9 Linux_i386 Patch 124871-01 2007/07/31 # cc: Sun Ceres C 5.10 Linux_i386 2008/07/10 - test "$optimize" || optimize='-xO2' + # cc: Studio 12.6 Sun C 5.15 Linux_i386 2017/05/30 + # GH #21535 - apparent optimization bug in workshop cc + test "$optimize" || optimize='-O1' cccdlflags='-KPIC' lddlflags='-G -Bdynamic' # Sun C doesn't support gcc attributes, but, in many cases, doesn't @@ -123,6 +125,15 @@ case "`${cc:-cc} -V 2>&1`" in d_attribute_pure='undef' d_attribute_unused='undef' d_attribute_warn_unused_result='undef' + case "$cc" in + *c99) # Without -Xa c99 errors on some Linux system headers + # in particular zero sized arrays at the end of structs + case "$ccflags" in + *-Xa*) ;; + *) ccflags="$ccflags -Xa" ;; + esac + ;; + esac ;; esac diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index 15928c7d6d9d..e20d8d27a064 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -365,11 +365,7 @@ EOM d_attribute_unused='undef' d_attribute_warn_unused_result='undef' case "$cc" in - *c99) # c99 rejects bare '-O'. - case "$optimize" in - ''|-O) optimize=-O3 ;; - esac - # Without -Xa c99 doesn't see + *c99) # Without -Xa c99 doesn't see # many OS interfaces. case "$ccflags" in *-Xa*) ;; @@ -377,6 +373,10 @@ EOM esac ;; esac + # GH #21535 - apparent optimization bug in workshop cc + case "$optimize" in + ''|-O) optimize=-O1 ;; + esac ;; esac fi diff --git a/win32/config.vc b/win32/config.vc index 7ee5bd98e5d2..b22466a35c64 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -93,14 +93,14 @@ d__fwalk='undef' d_accept4='undef' d_access='define' d_accessx='undef' -d_acosh='undef' +d_acosh='define' d_aintl='undef' d_alarm='define' d_archlib='define' d_asctime64='undef' d_asctime_r='undef' -d_asinh='undef' -d_atanh='undef' +d_asinh='define' +d_atanh='define' d_atolf='undef' d_atoll='undef' d_attribute_always_inline='undef' @@ -133,8 +133,8 @@ d_class='undef' d_clearenv='undef' d_closedir='define' d_cmsghdr_s='undef' -d_copysign='undef' -d_copysignl='undef' +d_copysign='define' +d_copysignl='define' d_cplusplus='undef' d_crypt='define' d_crypt_r='undef' @@ -186,7 +186,7 @@ d_eofnblk='define' d_erf='undef' d_erfc='undef' d_eunice='undef' -d_exp2='undef' +d_exp2='define' d_expm1='undef' d_faststdio='define' d_fchdir='undef' @@ -529,7 +529,7 @@ d_siginfo_si_pid='undef' d_siginfo_si_status='undef' d_siginfo_si_uid='undef' d_siginfo_si_value='undef' -d_signbit='undef' +d_signbit='define' d_sigprocmask='undef' d_sigsetjmp='undef' d_sin6_scope_id='define' @@ -593,7 +593,7 @@ d_tcgetpgrp='undef' d_tcsetpgrp='undef' d_telldir='define' d_telldirproto='define' -d_tgamma='undef' +d_tgamma='define' d_thread_local='undef' d_thread_safe_nl_langinfo_l='undef' d_time='define'