From eaecaada1267d8f181ac51a5910e65bbdeb49ca2 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 18 Jul 2024 12:14:23 +0200 Subject: [PATCH] Upgrade to 1.9777 based on perl-5.40.0-RC1 --- Time-HiRes-1.9775-Upgrade-to-1.9777.patch | 106 ++++++++++++++++++++++ perl-Time-HiRes.spec | 11 ++- 2 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 Time-HiRes-1.9775-Upgrade-to-1.9777.patch diff --git a/Time-HiRes-1.9775-Upgrade-to-1.9777.patch b/Time-HiRes-1.9775-Upgrade-to-1.9777.patch new file mode 100644 index 0000000..54a9ddc --- /dev/null +++ b/Time-HiRes-1.9775-Upgrade-to-1.9777.patch @@ -0,0 +1,106 @@ +From fc8161302a9a90e3cd69461820a1ca8911fa0722 Mon Sep 17 00:00:00 2001 +From: Jitka Plesnikova +Date: Thu, 9 May 2024 16:39:13 +0200 +Subject: [PATCH] Upgrade to 1.9777 + +--- + Changes | 2 ++ + HiRes.pm | 6 +++--- + HiRes.xs | 16 ++++++++++++---- + 3 files changed, 17 insertions(+), 7 deletions(-) + +diff --git a/Changes b/Changes +index 2b681e9..31f28fe 100644 +--- a/Changes ++++ b/Changes +@@ -17,6 +17,8 @@ Revision history for the Perl extension Time::HiRes. + https://github.com/Perl/perl5/issues/19321 + - don't use C++ guards around the perl header files, it caused C++ + build failures with MSVC. ++ - don't try to suppress C++ compatibility warnings in C++ builds, since ++ that warns. + + 1.9764 [2020-08-10] + - Fix a bunch of repeated-word typos +diff --git a/HiRes.pm b/HiRes.pm +index b8cd263..4555e8e 100644 +--- a/HiRes.pm ++++ b/HiRes.pm +@@ -50,7 +50,7 @@ our @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval + stat lstat utime + ); + +-our $VERSION = '1.9775'; ++our $VERSION = '1.9777'; + our $XS_VERSION = $VERSION; + $VERSION = eval $VERSION; + +@@ -143,8 +143,8 @@ Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers + getitimer ($which); + + use Time::HiRes qw( clock_gettime clock_getres clock_nanosleep +- ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF +- ITIMER_REALPROF ); ++ CLOCK_REALTIME ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ++ ITIMER_REALPROF ); + + $realtime = clock_gettime(CLOCK_REALTIME); + $resolution = clock_getres(CLOCK_REALTIME); +diff --git a/HiRes.xs b/HiRes.xs +index 7320cb8..b879198 100644 +--- a/HiRes.xs ++++ b/HiRes.xs +@@ -47,6 +47,14 @@ + # define GCC_DIAG_RESTORE_STMT GCC_DIAG_RESTORE NOOP + #endif + ++#ifdef __cplusplus ++# define GCC_DIAG_IGNORE_CPP_COMPAT_STMT NOOP ++# define GCC_DIAG_IGNORE_CPP_COMPAT_RESTORE_STMT NOOP ++#else ++# define GCC_DIAG_IGNORE_CPP_COMPAT_STMT GCC_DIAG_IGNORE_STMT(-Wc++-compat) ++# define GCC_DIAG_IGNORE_CPP_COMPAT_RESTORE_STMT GCC_DIAG_RESTORE_STMT ++#endif ++ + #if PERL_VERSION_GE(5,7,3) && !PERL_VERSION_GE(5,10,1) + # undef SAVEOP + # define SAVEOP() SAVEVPTR(PL_op) +@@ -1238,7 +1246,7 @@ setitimer(which, seconds, interval = 0) + /* on some platforms the 1st arg to setitimer is an enum, which + * causes -Wc++-compat to complain about passing an int instead + */ +- GCC_DIAG_IGNORE_STMT(-Wc++-compat); ++ GCC_DIAG_IGNORE_CPP_COMPAT_STMT; + if (setitimer(which, &newit, &oldit) == 0) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_value)))); +@@ -1247,7 +1255,7 @@ setitimer(which, seconds, interval = 0) + PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_interval)))); + } + } +- GCC_DIAG_RESTORE_STMT; ++ GCC_DIAG_IGNORE_CPP_COMPAT_RESTORE_STMT; + + void + getitimer(which) +@@ -1258,7 +1266,7 @@ getitimer(which) + /* on some platforms the 1st arg to getitimer is an enum, which + * causes -Wc++-compat to complain about passing an int instead + */ +- GCC_DIAG_IGNORE_STMT(-Wc++-compat); ++ GCC_DIAG_IGNORE_CPP_COMPAT_STMT; + if (getitimer(which, &nowit) == 0) { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_value)))); +@@ -1267,7 +1275,7 @@ getitimer(which) + PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_interval)))); + } + } +- GCC_DIAG_RESTORE_STMT; ++ GCC_DIAG_IGNORE_CPP_COMPAT_RESTORE_STMT; + + #endif /* #if defined(HAS_GETITIMER) && defined(HAS_SETITIMER) */ + +-- +2.45.0 + diff --git a/perl-Time-HiRes.spec b/perl-Time-HiRes.spec index 25d8f6b..db9964b 100644 --- a/perl-Time-HiRes.spec +++ b/perl-Time-HiRes.spec @@ -2,14 +2,16 @@ Name: perl-Time-HiRes Epoch: 4 -Version: 1.9775 +Version: 1.9777 Release: 503%{?dist} Summary: High resolution alarm, sleep, gettimeofday, interval timers License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Time-HiRes Source0: https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Time-HiRes-%{base_version}.tar.gz # Unbundled from perl 5.37.12 -Patch0: Time-HiRes-1.9764-Upgrade-to-1.9775.patch +Patch0: Time-HiRes-1.9764-Upgrade-to-1.9775.patch +# Unbundled from perl 5.40.0-RC1 +Patch1: Time-HiRes-1.9775-Upgrade-to-1.9777.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -95,7 +97,7 @@ make test %files %doc Changes README TODO -%{perl_vendorarch}/auto/* +%{perl_vendorarch}/auto/Time* %{perl_vendorarch}/Time* %{_mandir}/man3/Time::HiRes* @@ -103,6 +105,9 @@ make test %{_libexecdir}/%{name} %changelog +* Thu Jul 18 2024 Jitka Plesnikova - 4:1.9777-503 +- Upgrade to 1.9777 as provided in perl-5.40.0-RC1 + * Mon Jun 24 2024 Troy Dawson - 4:1.9775-503 - Bump release for June 2024 mass rebuild