From: Steve Hay Date: Wed, 15 Aug 2007 12:44:08 +0000 (+0000) Subject: Skip the POSIX::strftime() time test with a 60sec parameter on Vista: X-Git-Tag: accepted/trunk/20130322.191538~14762 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abbe0d1a8ce49d06f6c93492504db498c69c6b5a;p=platform%2Fupstream%2Fperl.git Skip the POSIX::strftime() time test with a 60sec parameter on Vista: it seems to have the same problem as when built with the VC8 CRT (Fixes perl #44589) Also, change the %D to the equivalent %m/%d/%y because %D isn't supported at all by Microsoft's CRT and just converts to nothing with VC6's CRT and causes another invalid parameter error with VC8 and Vista p4raw-id: //depot/perl@31721 --- diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index 395daa0..93e2602 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -173,7 +173,7 @@ ok( &POSIX::acos(1.0) == 0.0, 'dynamic loading' ); # didn't detect it. If this fails, try adding # -DSTRUCT_TM_HASZONE to your cflags when compiling ext/POSIX/POSIX.c. # See ext/POSIX/hints/sunos_4.pl and ext/POSIX/hints/linux.pl -print POSIX::strftime("ok 21 # %H:%M, on %D\n", localtime()); +print POSIX::strftime("ok 21 # %H:%M, on %m/%d/%y\n", localtime()); next_test(); # If that worked, validate the mini_mktime() routine's normalisation of @@ -187,8 +187,10 @@ sub try_strftime { $lc = &POSIX::setlocale(&POSIX::LC_TIME, 'C') if $Config{d_setlocale}; try_strftime("Wed Feb 28 00:00:00 1996 059", 0,0,0, 28,1,96); SKIP: { - skip("VC++ 8 regards 60 seconds as an invalid parameter", 1) - if $Config{cc} eq 'cl' and $Config{ccversion} =~ /^(\d+)/ and $1 >= 14; + skip("VC++ 8 and Vista's CRTs regard 60 seconds as an invalid parameter", 1) + if ($Is_W32 and ($Config{cc} eq 'cl' and + $Config{ccversion} =~ /^(\d+)/ and $1 >= 14) or + ((Win32::GetOSVersion())[1] >= 6)); try_strftime("Thu Feb 29 00:00:60 1996 060", 60,0,-24, 30,1,96); }