diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-30 12:44:37 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-30 15:47:18 +0100 |
commit | 0427dcb91300f993b80c3d77f348d5e1ffcb0d16 (patch) | |
tree | 4c43e04d8aab591602b2f6d2352047600860d57d /ext/zend_test/php_test.h | |
parent | b5481defe64c991d0e4307372d69c0ea3cd83378 (diff) | |
download | php-git-0427dcb91300f993b80c3d77f348d5e1ffcb0d16.tar.gz |
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.
Diffstat (limited to 'ext/zend_test/php_test.h')
-rw-r--r-- | ext/zend_test/php_test.h | 15 |
1 files changed, 13 insertions, 2 deletions
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 |