Skip to content

Commit 8cd345a

Browse files
committed
Heedlessly enable thread LS cache for ext/hash.
It's always static now and as such always has access to the cached TLS pointer.
1 parent 6a54282 commit 8cd345a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/hash/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ else
3333
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c"
3434
])
3535
EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c hash_sha3.c"
36-
PHP_HASH_CFLAGS="-I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded"
36+
PHP_HASH_CFLAGS="-I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
3737

3838
PHP_ADD_BUILD_DIR(ext/hash/$SHA3_DIR, 1)
3939
fi

ext/hash/config.w32

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (!CHECK_HEADER_ADD_INCLUDE('KeccakHash.h', 'CFLAGS_HASH', hash_sha3_dir)) {
2828
ERROR('Unable to locate SHA3 headers');
2929
}
3030

31-
ADD_FLAG('CFLAGS_HASH', '/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded');
31+
ADD_FLAG('CFLAGS_HASH', '/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
3232

3333
PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
3434
'php_hash_ripemd.h php_hash_haval.h php_hash_tiger.h ' +

0 commit comments

Comments
 (0)