[php-src] master: zend_hrtime: remove zend_hrtime_posix_clock_id (#24016)
| From: | Nicolas Grekas via GitHub | Date: | Wed, 30 Sep 2026 14:45:17 +0000 |
| Subject: | [php-src] master: zend_hrtime: remove zend_hrtime_posix_clock_id (#24016) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141791@lists.php.net to get a copy of this message | ||
Author: Nicolas Grekas (nicolas-grekas)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-09-30T16:45:14+02:00
Commit: https://github.com/php/php-src/commit/a2cb4142fd50c09b4404a111de3c27a5f5d0abd7
Raw diff: https://github.com/php/php-src/commit/a2cb4142fd50c09b4404a111de3c27a5f5d0abd7.diff
zend_hrtime: remove zend_hrtime_posix_clock_id (#24016)
Nothing reads it since GH-23790, which kept it on PHP-8.6 for ABI
compatibility only.
Changed paths:
M UPGRADING.INTERNALS
M Zend/zend_hrtime.c
M Zend/zend_hrtime.h
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 24f6a1b96674..d7263bb5cdab 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -33,6 +33,8 @@ PHP 8.7 INTERNALS UPGRADE NOTES
zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error)
from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name).
This new signature covers the most common parameters used with zend_is_callable_ex().
+- Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses CLOCK_MONOTONIC
+ on POSIX platforms.
========================
2. Build system changes
diff --git a/Zend/zend_hrtime.c b/Zend/zend_hrtime.c
index b471ee335e1d..25138e62de7d 100644
--- a/Zend/zend_hrtime.c
+++ b/Zend/zend_hrtime.c
@@ -25,8 +25,6 @@
# include <time.h>
# include <string.h>
-ZEND_API clockid_t zend_hrtime_posix_clock_id = CLOCK_MONOTONIC;
-
#elif ZEND_HRTIME_PLATFORM_WINDOWS
# define WIN32_LEAN_AND_MEAN
diff --git a/Zend/zend_hrtime.h b/Zend/zend_hrtime.h
index f7d69d19f80b..7cc0c0394cfb 100644
--- a/Zend/zend_hrtime.h
+++ b/Zend/zend_hrtime.h
@@ -70,11 +70,6 @@ ZEND_API extern double zend_hrtime_timer_scale;
# include <string.h>
ZEND_API extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
-#elif ZEND_HRTIME_PLATFORM_POSIX
-
-/* Not read anymore, kept for ABI compatibility */
-ZEND_API extern clockid_t zend_hrtime_posix_clock_id;
-
#endif
#define ZEND_NANO_IN_SEC UINT64_C(1000000000)