|
28 | 28 | #if PHP_VERSION_ID >= 70000
|
29 | 29 | #define NXT_PHP7 1
|
30 | 30 | #endif
|
| 31 | +#if PHP_VERSION_ID >= 80000 |
| 32 | +#define NXT_PHP8 1 |
| 33 | +#endif |
31 | 34 |
|
32 | 35 | /* PHP 8 */
|
33 | 36 | #ifndef TSRMLS_CC
|
@@ -61,7 +64,9 @@ typedef struct {
|
61 | 64 | } nxt_php_run_ctx_t;
|
62 | 65 |
|
63 | 66 |
|
64 |
| -#ifdef NXT_PHP7 |
| 67 | +#if NXT_PHP8 |
| 68 | +typedef int (*nxt_php_disable_t)(const char *p, size_t size); |
| 69 | +#elif NXT_PHP7 |
65 | 70 | typedef int (*nxt_php_disable_t)(char *p, size_t size);
|
66 | 71 | #else
|
67 | 72 | typedef int (*nxt_php_disable_t)(char *p, uint TSRMLS_DC);
|
@@ -105,11 +110,15 @@ nxt_inline void nxt_php_set_str(nxt_unit_request_info_t *req, const char *name,
|
105 | 110 | static void nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
|
106 | 111 | const char *str, uint32_t len, zval *track_vars_array TSRMLS_DC);
|
107 | 112 | static void nxt_php_register_variables(zval *track_vars_array TSRMLS_DC);
|
| 113 | +#if NXT_PHP8 |
| 114 | +static void nxt_php_log_message(const char *message, int syslog_type_int); |
| 115 | +#else |
108 | 116 | #ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
109 | 117 | static void nxt_php_log_message(char *message, int syslog_type_int);
|
110 | 118 | #else
|
111 | 119 | static void nxt_php_log_message(char *message TSRMLS_DC);
|
112 | 120 | #endif
|
| 121 | +#endif |
113 | 122 |
|
114 | 123 | #ifdef NXT_PHP7
|
115 | 124 | static size_t nxt_php_unbuffered_write(const char *str,
|
@@ -1240,13 +1249,18 @@ nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
|
1240 | 1249 | }
|
1241 | 1250 |
|
1242 | 1251 |
|
| 1252 | +#if NXT_PHP8 |
| 1253 | +static void |
| 1254 | +nxt_php_log_message(const char *message, int syslog_type_int) |
| 1255 | +#else |
1243 | 1256 | #ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
1244 | 1257 | static void
|
1245 | 1258 | nxt_php_log_message(char *message, int syslog_type_int)
|
1246 | 1259 | #else
|
1247 | 1260 | static void
|
1248 | 1261 | nxt_php_log_message(char *message TSRMLS_DC)
|
1249 | 1262 | #endif
|
| 1263 | +#endif |
1250 | 1264 | {
|
1251 | 1265 | nxt_php_run_ctx_t *ctx;
|
1252 | 1266 |
|
|
0 commit comments