We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
g++ -I. -I/home/htf/workspace/swoole -I/opt/php-8.4-zts/include/php -I/opt/php-8.4-zts/include/php/main -I/opt/php-8.4-zts/include/php/TSRM -I/opt/php-8.4-zts/include/php/Zend -I/opt/php-8.4-zts/include/php/ext -I/opt/php-8.4-zts/include/php/ext/date/lib -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/thirdparty -I/home/htf/workspace/swoole -I/home/htf/workspace/swoole/include -I/home/htf/workspace/swoole/ext-src -I/home/htf/workspace/swoole/thirdparty -I/home/htf/workspace/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O0 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -I/usr/include/postgresql -I/opt/php-8.4-zts/include/php/ext -I/usr/include -DPDO_ODBC_TYPE=\"unixODBC\" -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /home/htf/workspace/swoole/ext-src/swoole_mysql_coro.cc -MMD -MF ext-src/swoole_mysql_coro.dep -MT ext-src/swoole_mysql_coro.lo -fPIC -DPIC -o ext-src/.libs/swoole_mysql_coro.o In file included from /home/htf/workspace/swoole/ext-src/swoole_mysql_coro.cc:31: /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:51:30: error: expected primary-expression before ‘static’ 51 | # define PHP_STATIC_RESTRICT static restrict | ^~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:55:43: note: in expansion of macro ‘PHP_STATIC_RESTRICT’ 55 | void SHA256_Transform_sse2(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64], uint32_t W[PHP_STATIC_RESTRICT 64], uint32_t S[PHP_STATIC_RESTRICT 8]); | ^~~~~~~~~~~~~~~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:55:43: error: expected ‘]’ before ‘static’ 55 | void SHA256_Transform_sse2(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64], uint32_t W[PHP_STATIC_RESTRICT 64], uint32_t S[PHP_STATIC_RESTRICT 8]); | ^ | ] /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:55:43: error: expected ‘)’ before ‘static’ 55 | void SHA256_Transform_sse2(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64], uint32_t W[PHP_STATIC_RESTRICT 64], uint32_t S[PHP_STATIC_RESTRICT 8]); | ~ ^ | ) /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:51:30: error: expected initializer before ‘static’ 51 | # define PHP_STATIC_RESTRICT static restrict | ^~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:55:43: note: in expansion of macro ‘PHP_STATIC_RESTRICT’ 55 | void SHA256_Transform_sse2(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64], uint32_t W[PHP_STATIC_RESTRICT 64], uint32_t S[PHP_STATIC_RESTRICT 8]); | ^~~~~~~~~~~~~~~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:51:30: error: expected primary-expression before ‘static’ 51 | # define PHP_STATIC_RESTRICT static restrict | ^~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:67:44: note: in expansion of macro ‘PHP_STATIC_RESTRICT’ 67 | void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]); | ^~~~~~~~~~~~~~~~~~~ In file included from /home/htf/workspace/swoole/ext-src/swoole_mysql_coro.cc:31: /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:67:44: error: expected ‘]’ before ‘static’ 67 | void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]); | ^ | ] /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:67:44: error: expected ‘)’ before ‘static’ 67 | void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]); | ~ ^ | ) In file included from /home/htf/workspace/swoole/ext-src/swoole_mysql_coro.cc:31: /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:51:30: error: expected initializer before ‘static’ 51 | # define PHP_STATIC_RESTRICT static restrict | ^~~~~~ /opt/php-8.4-zts/include/php/ext/hash/php_hash_sha.h:67:44: note: in expansion of macro ‘PHP_STATIC_RESTRICT’ 67 | void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]); | ^~~~~~~~~~~~~~~~~~~ make: *** [Makefile:306:ext-src/swoole_mysql_coro.lo] Error 1
#include "php_swoole_cxx.h" #include "php_swoole_mysql_proto.h" #include "swoole_string.h" // see mysqlnd 'L64' macro redefined #undef L64 SW_EXTERN_C_BEGIN #include "ext/hash/php_hash.h" #include "ext/hash/php_hash_sha.h" #include "ext/standard/php_math.h" #ifdef SW_USE_MYSQLND #include "ext/mysqlnd/mysqlnd.h" #include "ext/mysqlnd/mysqlnd_charset.h" #endif SW_EXTERN_C_END
PHP 8.4
Ubuntu 22.04.4 LTS
The text was updated successfully, but these errors were encountered:
See
php-src/ext/hash/php_hash_sha.h
Lines 48 to 52 in fad899e
That #ifdef _MSVC might need to be #if defined(_MSVC) || defined(__cplusplus).
#ifdef _MSVC
#if defined(_MSVC) || defined(__cplusplus)
Sorry, something went wrong.
Fix phpGH-15742: php_hash_sha.h incompatible with C++
983c94e
Not only MSVC doesn't support this construct, but apparently it is generally not supported by C++ compilers.
ext/hash/php_hash_sha.h
5d1181f
cmb69
Successfully merging a pull request may close this issue.
Description
Error:
Code:
PHP Version
PHP 8.4
Operating System
Ubuntu 22.04.4 LTS
The text was updated successfully, but these errors were encountered: