summaryrefslogtreecommitdiff
path: root/src/php_snuffleupagus.h
diff options
context:
space:
mode:
authorjvoisin2024-07-09 15:17:19 +0200
committerjvoisin2024-07-09 15:45:22 +0200
commit8b85382f29288bd4a8400844934241003e24bb4c (patch)
tree3941e1a338b39d164463c43091f1c47563baaafa /src/php_snuffleupagus.h
parent1f349eaebdad6e84e32fa32c3511e5a6d3c92110 (diff)
Fix compilation for PHP84+
PHP changed some includes for PHP8.4. This commit also adds php8.4-rc to the CI This fixes #497 and #496 Reported-by: rainerjung
Diffstat (limited to 'src/php_snuffleupagus.h')
-rw-r--r--src/php_snuffleupagus.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h
index 6e035d4..b4d1be1 100644
--- a/src/php_snuffleupagus.h
+++ b/src/php_snuffleupagus.h
@@ -42,6 +42,7 @@
42#include "ext/standard/php_string.h" 42#include "ext/standard/php_string.h"
43#include "ext/standard/php_var.h" 43#include "ext/standard/php_var.h"
44#include "ext/session/php_session.h" 44#include "ext/session/php_session.h"
45#include "ext/hash/php_hash.h"
45#include "php.h" 46#include "php.h"
46#include "php_ini.h" 47#include "php_ini.h"
47#include "rfc1867.h" 48#include "rfc1867.h"
@@ -58,9 +59,11 @@
58#error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \ 59#error Snuffleupagus only works with PHP7+. You shouldn't use PHP5 anyway, \
59 since it's not supported anymore: https://secure.php.net/supported-versions.php 60 since it's not supported anymore: https://secure.php.net/supported-versions.php
60#endif 61#endif
62
61#if PHP_VERSION_ID < 70200 63#if PHP_VERSION_ID < 70200
62typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); 64typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
63#endif 65#endif
66
64#if PHP_VERSION_ID >= 80000 67#if PHP_VERSION_ID >= 80000
65#define TSRMLS_FETCH() 68#define TSRMLS_FETCH()
66#define TSRMLS_C 69#define TSRMLS_C
@@ -70,6 +73,13 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
70#endif 73#endif
71#endif 74#endif
72 75
76#if PHP_VERSION_ID < 80200
77#include "ext/standard/php_rand.h"
78#include "ext/standard/php_random.h"
79#else
80#include "ext/random/php_random.h"
81#endif
82
73#define SP_CONFIG_VALID 1 83#define SP_CONFIG_VALID 1
74#define SP_CONFIG_INVALID 0 84#define SP_CONFIG_INVALID 0
75#define SP_CONFIG_NONE -1 85#define SP_CONFIG_NONE -1