@@ -167,33 +167,7 @@ AC_CHECK_FUNCS([sigsetjmp],,
167
167
[ AC_DEFINE ( [ HAVE_SIGSETJMP] , [ 1] ) ] ,,
168
168
[ #include <setjmp.h>] ) ] )
169
169
170
- dnl Test whether the stack grows downwards
171
- dnl Assumes contiguous stack
172
- AC_CACHE_CHECK ( [ whether the stack grows downwards] , [ php_cv_have_stack_limit] ,
173
- [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [
174
- #include <stdint.h>
175
-
176
- int (*volatile f)(uintptr_t);
177
-
178
- int stack_grows_downwards(uintptr_t arg) {
179
- int local;
180
- return (uintptr_t)&local < arg;
181
- }
182
-
183
- int main(void) {
184
- int local;
185
-
186
- f = stack_grows_downwards;
187
- return f((uintptr_t)&local) ? 0 : 1;
188
- }
189
- ] ) ] ,
190
- [ php_cv_have_stack_limit=yes] ,
191
- [ php_cv_have_stack_limit=no] ,
192
- [ php_cv_have_stack_limit=no] ) ] )
193
- AS_VAR_IF ( [ php_cv_have_stack_limit] , [ yes] ,
194
- [ AC_DEFINE ( [ ZEND_CHECK_STACK_LIMIT] , [ 1] ,
195
- [ Define to 1 if checking the stack limit is supported.] ) ] )
196
-
170
+ ZEND_CHECK_STACK_DIRECTION
197
171
ZEND_CHECK_FLOAT_PRECISION
198
172
ZEND_DLSYM_CHECK
199
173
ZEND_CHECK_GLOBAL_REGISTER_VARIABLES
@@ -326,6 +300,38 @@ AC_MSG_CHECKING(whether to enable zend max execution timers)
326
300
AC_MSG_RESULT ( $ZEND_MAX_EXECUTION_TIMERS )
327
301
] )
328
302
303
+ dnl
304
+ dnl ZEND_CHECK_STACK_DIRECTION
305
+ dnl
306
+ dnl Check whether the stack grows downwards, assumes contiguous stack.
307
+ dnl
308
+ AC_DEFUN ( [ ZEND_CHECK_STACK_DIRECTION] ,
309
+ [ AC_CACHE_CHECK ( [ whether the stack grows downwards] ,
310
+ [ php_cv_have_stack_limit] ,
311
+ [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [ dnl
312
+ #include <stdint.h>
313
+
314
+ int (*volatile f)(uintptr_t);
315
+
316
+ int stack_grows_downwards(uintptr_t arg) {
317
+ int local;
318
+ return (uintptr_t)&local < arg;
319
+ }
320
+
321
+ int main(void) {
322
+ int local;
323
+
324
+ f = stack_grows_downwards;
325
+ return f((uintptr_t)&local) ? 0 : 1;
326
+ }] ) ] ,
327
+ [ php_cv_have_stack_limit=yes] ,
328
+ [ php_cv_have_stack_limit=no] ,
329
+ [ php_cv_have_stack_limit=no] ) ] )
330
+ AS_VAR_IF ( [ php_cv_have_stack_limit] , [ yes] ,
331
+ [ AC_DEFINE ( [ ZEND_CHECK_STACK_LIMIT] , [ 1] ,
332
+ [ Define to 1 if checking the stack limit is supported.] ) ] )
333
+ ] )
334
+
329
335
dnl
330
336
dnl ZEND_CHECK_GLOBAL_REGISTER_VARIABLES
331
337
dnl
0 commit comments