1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix GH-15742: php_hash_sha.h incompatible with C++

Not only MSVC doesn't support this construct, but apparently it is
generally not supported by C++ compilers.

Closes GH-15745.
This commit is contained in:
Christoph M. Becker
2024-09-04 14:23:29 +02:00
parent d552fbd9f7
commit 5d1181fb3f
2 changed files with 4 additions and 1 deletions

3
NEWS
View File

@@ -30,6 +30,9 @@ PHP NEWS
- GD:
. Added gdImageClone to bundled libgd. (David Carlier)
- Hash:
. Fixed bug GH-15742 (php_hash_sha.h incompatible with C++). (cmb)
- OpenSSL:
. Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2. (Remi)

View File

@@ -45,7 +45,7 @@ typedef struct {
PHP_HASH_API void PHP_SHA256InitArgs(PHP_SHA256_CTX *, ZEND_ATTRIBUTE_UNUSED HashTable *);
PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, size_t);
#ifdef _MSC_VER
#if defined(__cplusplus) || defined(_MSC_VER)
# define PHP_STATIC_RESTRICT
#else
# define PHP_STATIC_RESTRICT static restrict