develooper Front page | perl.perl5.porters | Postings from April 2018

[perl #133030] blead File::Copy fails on netbsd 6.1.5

Thread Next
Tony Cook via RT
April 16, 2018 00:55
[perl #133030] blead File::Copy fails on netbsd 6.1.5
Message ID:
On Mon, 26 Mar 2018 13:19:48 -0700, wrote:
> It is failing with
> utimensat unimplemented in this platform at ../lib/File/Copy.t line 111.
> # Looks like your test exited with 2 just after 15.
> See

The problem is Time::HiRes exports its utime() replacement if only one of two functions that depends on is available.

So if you import utime() successfully, the underlying function you need might not be available.

The first of the attached patches makes utime() available only if both are defined.  I think this is suitable for 5.28, and prevents the test failure.  It however means File::Copy will no longer preserve sub-second modification times when utime() by name is unavailable.

The second patch adds a fallback to utimes() if that's available (typically on BSDs, which is the case covered by this ticket.)

This doesn't try to work around OS X's special behaviour.

The second patch might not be suitable for 5.28.

Unrelated to this particular bug - there's also Win32 functions to accessing and updating file times to sub-second precision, which I might add at some point.


via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About