From 0427dcb91300f993b80c3d77f348d5e1ffcb0d16 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 30 Oct 2020 12:44:37 +0100 Subject: Fix bug79177.phpt wrt. JIT JIT ignores that the `zend_write` callback is overwritten, so we define our own callback and caller. We also fix the "inconsistent DLL binding" warnings on Windows, by introducing `PHP_ZEND_TEST_API`. Closes GH-6391. --- ext/zend_test/php_test.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ext/zend_test/php_test.h') diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index da57f7efc9..03e6d836e2 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -37,7 +37,18 @@ struct bug79096 { uint64_t b; }; -ZEND_API struct bug79096 bug79096(void); -ZEND_API void bug79532(off_t *array, size_t elems); +#ifdef PHP_WIN32 +# define PHP_ZEND_TEST_API __declspec(dllexport) +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define PHP_ZEND_TEST_API __attribute__ ((visibility("default"))) +#else +# define PHP_ZEND_TEST_API +#endif + +PHP_ZEND_TEST_API struct bug79096 bug79096(void); +PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems); + +extern PHP_ZEND_TEST_API int *(*bug79177_cb)(void); +PHP_ZEND_TEST_API void bug79177(void); #endif -- cgit v1.2.1