Change 31721 by [EMAIL PROTECTED] on 2007/08/15 12:44:08
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
Affected files ...
... //depot/perl/ext/POSIX/t/posix.t#27 edit
Differences ...
==== //depot/perl/ext/POSIX/t/posix.t#27 (text) ====
Index: perl/ext/POSIX/t/posix.t
--- perl/ext/POSIX/t/posix.t#26~30912~ 2007-04-11 10:16:00.000000000 -0700
+++ perl/ext/POSIX/t/posix.t 2007-08-15 05:44:08.000000000 -0700
@@ -173,7 +173,7 @@
# 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 @@
$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);
}
End of Patch.