Permalink
Browse files

Update Time-HiRes to CPAN version 1.9752

  [DELTA]

1.9752 [2018-01-04]
 - fix an error in the error message of utimensat() not available:
   it said futimens() not available
 - add --force alias for Makefile.PL --configure

1.9751 [2018-01-02]
 - in macOS/OSX/Darwin, use __has_builtin() check also for utimensat(),
   can cause errors like
   "HiRes.xs:1474:16: error: unrecognized platform name macOS"
   [rt.cpan.org #123994]
   (oversight from 1.9749)
 - do not define TIME_HIRES_STAT/d_hires_stat if none was found, instead
   of defining it to be zero, which case has no implementation in hrstatns()
   (thanks to Nigel Horne)
 - in t/utime.t try to divine if the filesystem of the tempfiles has been
   mounted with the 'noatime' option, which can prohibit updating the
   access time timestamp.  Also document this in HiRes.pm.
   (thanks to Nigel Horne, original analysis by Slaven Rezic)
 - synchronize the constant lists in HiRes.pm:@EXPORT_OK
   and Makefile.PL:doConstants and regenerate fallback/const-c.inc
   and fallback/const-xs.inc, this fixes Perl 5.6.2 issue with
   d_futimens not allegedly being a valid macro in t/utime.t
   (using Perl 5.26.1 for the regenerating, not 5.6.2)
   (thanks to Nigel Horne)
 - in t/utime.t define a nop sub done_testing for ancient Perls
   (like Perl 5.6.2)
 - in Perl 5.6.2 a bogus warning
   "Use of uninitialized value in subroutine entry"
   is issued from t/alarm.t: add a comment documenting that
  • Loading branch information...
bingos committed Jan 9, 2018
1 parent 807d97f commit de3293c06d610babde277963c152d0294afadc9e
View
@@ -1199,7 +1199,7 @@ package Maintainers;
},
'Time::HiRes' => {
'DISTRIBUTION' => 'JHI/Time-HiRes-1.9750.tar.gz',
'DISTRIBUTION' => 'JHI/Time-HiRes-1.9752.tar.gz',
'FILES' => q[dist/Time-HiRes],
},
View
@@ -1,5 +1,35 @@
Revision history for the Perl extension Time::HiRes.
1.9752 [2018-01-04]
- fix an error in the error message of utimensat() not available:
it said futimens() not available
- add --force alias for Makefile.PL --configure
1.9751 [2018-01-02]
- in macOS/OSX/Darwin, use __has_builtin() check also for utimensat(),
can cause errors like
"HiRes.xs:1474:16: error: unrecognized platform name macOS"
[rt.cpan.org #123994]
(oversight from 1.9749)
- do not define TIME_HIRES_STAT/d_hires_stat if none was found, instead
of defining it to be zero, which case has no implementation in hrstatns()
(thanks to Nigel Horne)
- in t/utime.t try to divine if the filesystem of the tempfiles has been
mounted with the 'noatime' option, which can prohibit updating the
access time timestamp. Also document this in HiRes.pm.
(thanks to Nigel Horne, original analysis by Slaven Rezic)
- synchronize the constant lists in HiRes.pm:@EXPORT_OK
and Makefile.PL:doConstants and regenerate fallback/const-c.inc
and fallback/const-xs.inc, this fixes Perl 5.6.2 issue with
d_futimens not allegedly being a valid macro in t/utime.t
(using Perl 5.26.1 for the regenerating, not 5.6.2)
(thanks to Nigel Horne)
- in t/utime.t define a nop sub done_testing for ancient Perls
(like Perl 5.6.2)
- in Perl 5.6.2 a bogus warning
"Use of uninitialized value in subroutine entry"
is issued from t/alarm.t: add a comment documenting that
1.9750 [2017-12-22]
- update META.yml and META.json for XSLoader instead of DynaLoader
[rt.cpan.org #123933]
View
@@ -44,12 +44,13 @@ our @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval
ITIMER_VIRTUAL
TIMER_ABSTIME
d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
d_nanosleep d_clock_gettime d_clock_getres d_hires_utime
d_clock d_clock_nanosleep
d_nanosleep d_clock_gettime d_clock_getres
d_clock d_clock_nanosleep d_hires_stat
d_futimens d_utimensat d_hires_utime
stat lstat utime
);
our $VERSION = '1.9750';
our $VERSION = '1.9752';
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -475,8 +476,10 @@ time stamp from t1: it may be equal or I<less>.
As L<perlfunc/utime>
but with the ability to set the access/modify file timestamps
in subsecond resolution, if the operating system and the filesystem
both support such timestamps. To override the standard utime():
in subsecond resolution, if the operating system and the filesystem,
and the mount options of the filesystem, all support such timestamps.
To override the standard utime():
use Time::HiRes qw(utime);
@@ -489,6 +492,10 @@ call the syscall with a NULL argument.
The actual achievable subsecond resolution depends on the combination
of the operating system and the filesystem.
Modifying the timestamps may not be possible at all: for example, the
C<noatime> filesystem mount option may prohibit you from changing the
access time timestamp.
Returns the number of files successfully changed.
=back
View
@@ -947,7 +947,7 @@ static int th_clock_nanosleep(clockid_t clock_id, int flags,
# define FUTIMENS_AVAILABLE 0
#endif
#ifdef HAS_UTIMENSAT
# ifdef PERL_DARWIN
# if defined(PERL_DARWIN) && __has_builtin(__builtin_available)
# define UTIMENSAT_AVAILABLE __builtin_available(macOS 10.13, *)
# else
# define UTIMENSAT_AVAILABLE 1
@@ -1479,7 +1479,7 @@ PROTOTYPE: $$@
tot++;
}
} else {
croak("futimens unimplemented in this platform");
croak("utimensat unimplemented in this platform");
}
#else /* HAS_UTIMENSAT */
croak("utimensat unimplemented in this platform");
@@ -1008,9 +1008,11 @@ sub doConstants {
$macro =~ s/^d_(.+)/TIME_HIRES_\U$1/;
} elsif ($macro =~ /^(d_hires_stat)$/) {
my $d_hires_stat = $1 if ($DEFINE =~ /-DTIME_HIRES_STAT=(\d+)/);
push @names, {name => $_, macro => "TIME_HIRES_STAT", value => $d_hires_stat,
default => ["IV", "0"]};
next;
if (defined $d_hires_stat) {
push @names, {name => $_, macro => "TIME_HIRES_STAT", value => $d_hires_stat,
default => ["IV", "0"]};
next;
}
} elsif ($macro =~ /^(d_hires_utime)$/) {
my $d_hires_utime =
($DEFINE =~ /-DHAS_FUTIMENS/ ||
@@ -1049,9 +1051,11 @@ sub doConstants {
}
sub main {
if (-f "xdefine" && !(@ARGV && $ARGV[0] eq '--configure')) {
if (-f "xdefine" && !(@ARGV && $ARGV[0] =~ /^--(?:configure|force)$/)) {
print qq[$0: The "xdefine" exists, skipping the configure step.\n];
print qq[("$^X $0 --configure" to force the configure step)\n];
print qq[Use "$^X $0 --configure"\n];
print qq[or: "$^X $0 --force\n];
print qq[to force the configure step.\n];
} else {
print "Configuring Time::HiRes...\n";
1 while unlink("define");
Oops, something went wrong.

0 comments on commit de3293c

Please sign in to comment.