perl-cross
perl-cross copied to clipboard
d_localtime_r_needs_tzset isn't tested, breaking time.t
time.t fails with
# Failed test 7 - changes to $ENV{TZ} respected at op/time.t line 62
op/time.t ......................................................... Failed 1/72 subtests
here because d_localtime_r_needs_tzset isn't tested by configure. If I define it manually the test passes. (This is on linux, glibc, amd64)
full log is here if needed: https://gist.github.com/moben/7ca323b2814ecaef78a823b0a5724909
That would be a runtime test, however 'define' seems to be the safe default value there. "For portable code, tzset(3) should be called before localtime_r()" — localtime_r(3)
https://github.com/arsv/perl-cross/commit/5192e4dd20dade0bf1de4057b5142733f099846f
Looks like 'undef' actually works in most cases, that's why it went unnoticed.