Skip to content

Commit f9c13dc

Browse files
author
Ion Bazan
committed
fix
1 parent 64b8658 commit f9c13dc

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

timecop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ zend_module_entry timecop_module_entry = {
332332
};
333333
/* }}} */
334334

335-
#if defined(COMPILE_DL_TIMECOP) && PHP_MAJOR_VERSION >= 7
336-
# ifdef ZTS
335+
#if defined(COMPILE_DL_TIMECOP)
336+
# if defined(ZTS) && PHP_MAJOR_VERSION >= 7
337337
ZEND_TSRMLS_CACHE_DEFINE();
338338
# endif
339339
ZEND_GET_MODULE(timecop)

timecop.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ SOFTWARE.
3535
#include "php_ini.h"
3636
#include "ext/standard/info.h"
3737

38-
#if !defined(PHP_VERSION_ID) || PHP_VERSION_ID < 50300
39-
#include "ext/date/lib/timelib.h"
40-
#endif
41-
42-
extern zend_module_entry timecop_module_entry;
43-
#define phpext_timecop_ptr &timecop_module_entry
44-
4538
#ifdef PHP_WIN32
4639
# define PHP_TIMECOP_API __declspec(dllexport)
4740
#elif defined(__GNUC__) && __GNUC__ >= 4
@@ -63,6 +56,10 @@ extern zend_module_entry timecop_module_entry;
6356
#include "Zend/zend_interfaces.h"
6457
#include "tc_timeval.h"
6558

59+
60+
extern zend_module_entry timecop_module_entry;
61+
#define phpext_timecop_ptr &timecop_module_entry
62+
6663
PHP_MINIT_FUNCTION(timecop);
6764
PHP_MSHUTDOWN_FUNCTION(timecop);
6865
PHP_RINIT_FUNCTION(timecop);
@@ -120,7 +117,7 @@ typedef enum timecop_mode_t {
120117
ZEND_BEGIN_MODULE_GLOBALS(timecop)
121118
long func_override;
122119
long sync_request_time;
123-
#if PHP_VERSION_ID >= 70000
120+
#if PHP_MAJOR_VERSION >= 7
124121
zval orig_request_time;
125122
#else
126123
zval *orig_request_time;

0 commit comments

Comments
 (0)