develooper Front page | perl.perl5.porters | Postings from January 2019

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

Thread Previous
Craig A. Berry
January 2, 2019 03:46
Re: [perl #133030] blead File::Copy fails on netbsd 6.1.5
Message ID:
On Tue, Jan 1, 2019 at 4:37 PM Tony Cook via RT
<> wrote:
> On Sun, 15 Apr 2018 17:55:04 -0700, tonyc wrote:
> > This doesn't try to work around OS X's special behaviour.
> I tried adding sub-second times for OS X 10.13, but apparently it doesn't support it.

I did a quick:

$ cc -E /usr/include/sys/stat.h > stat_expanded.h

on 10.13.6 and the time components of the stat struct are of type
struct timespec rather than time_t, so I'm not sure why exactly
sub-second times would be missing.

> On Darwin:
> pallas:t tony$ ./perl -I../lib -MTime::Hires=stat -le 'print +(stat shift)[9]' /Volumes/tony/test.txt
> 1546381854
> The local filesystem (HFS+) doesn't support sub-second timestamps.

The native filesystem for the last couple of releases is APFS, not
HFS+.  It seems unlikely a filesystem designed post-ZFS and post-btrfs
with inspiration from both of them would be missing sub-second times.
Building Time::HiRes on my system says:

You seem to have subsecond timestamp setting.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...found.
Trying struct stat st_atimensec...NOT found.
Trying struct stat st_atime_n...NOT found.
Trying struct stat st_atim.tv_nsec...NOT found.
Trying struct stat st_uatime...NOT found.
You seem to have subsecond timestamp reading.
(Your struct stat has them, but the filesystems must help.)

But I get the same thing you do even on an APFS volume.  So there's
something else going on.  I haven't had time to dig into what.

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