mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
Use ZEND_API in zend_hrtime (#13288)
This allows actually calling zend_hrtime() from extensions on Windows. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
This commit is contained in:
parent
7d1637a48c
commit
6c4e3c0f52
@ -31,13 +31,13 @@
|
||||
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
|
||||
double zend_hrtime_timer_scale = .0;
|
||||
ZEND_API double zend_hrtime_timer_scale = .0;
|
||||
|
||||
#elif ZEND_HRTIME_PLATFORM_APPLE
|
||||
|
||||
# include <mach/mach_time.h>
|
||||
# include <string.h>
|
||||
mach_timebase_info_data_t zend_hrtime_timerlib_info = {
|
||||
ZEND_API mach_timebase_info_data_t zend_hrtime_timerlib_info = {
|
||||
.numer = 0,
|
||||
.denom = 1,
|
||||
};
|
||||
|
@ -60,13 +60,13 @@ BEGIN_EXTERN_C()
|
||||
|
||||
#if ZEND_HRTIME_PLATFORM_WINDOWS
|
||||
|
||||
extern double zend_hrtime_timer_scale;
|
||||
ZEND_API extern double zend_hrtime_timer_scale;
|
||||
|
||||
#elif ZEND_HRTIME_PLATFORM_APPLE
|
||||
|
||||
# include <mach/mach_time.h>
|
||||
# include <string.h>
|
||||
extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
|
||||
ZEND_API extern mach_timebase_info_data_t zend_hrtime_timerlib_info;
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user