mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
POSIX/t/time.t: tzset() works on Windows; not MingW
I ran some experiments, and found that tzset works on Windows, and is required after changing the TZ environment variable from within perl. But it did not work on MingW. Maybe there is something else needed in the Posix module that would get it to work; I didn't investigate The only way I could figure out how to distinguish in Perl space between MSVC and MingW was looking at the make command. Maybe there is a better way
This commit is contained in:
parent
93d62c0706
commit
0ff7fef53e
@ -17,11 +17,12 @@ use Test::More tests => 31;
|
||||
$ENV{TZ} = "EST5EDT";
|
||||
|
||||
# It looks like POSIX.xs claims that only VMS and Mac OS traditional
|
||||
# don't have tzset(). Win32 works to call the function, but it doesn't
|
||||
# actually do anything. Cygwin works in some places, but not others. The
|
||||
# other Win32's below are guesses.
|
||||
# don't have tzset(). MingW doesn't work. Cygwin works in some places, but
|
||||
# not others. The other Win32's below are guesses.
|
||||
my $has_tzset = $^O ne "VMS" && $^O ne "cygwin"
|
||||
&& $^O ne "MSWin32" && $^O ne "interix";
|
||||
&& ($^O ne "MSWin32" || ( $^O eq "MSWin32"
|
||||
&& $Config{make} eq 'nmake'))
|
||||
&& $^O ne "interix";
|
||||
|
||||
SKIP: {
|
||||
skip "No tzset()", 1 unless $has_tzset;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user