Skip to content

Commit eae7e0c

Browse files
committed
Sync ext/hash installed headers
This syncs ext/hash headers installation on *nix and Windows: - php_hash_joaat.h and php_hash_fnv.h added also on Windows installation - xxhash/xxhash.h added on both installations as it is included in php_hash_xxhash.h - Include path for xxhash.h changed to relative so the php_hash_xxhash.h can be included outside of php-src - Redundant include flags removed
1 parent ec00441 commit eae7e0c

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

ext/hash/config.m4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ else
3232
fi
3333

3434
PHP_ADD_BUILD_DIR(ext/hash/murmur, 1)
35-
PHP_HASH_CFLAGS="$PHP_HASH_CFLAGS -I@ext_srcdir@/xxhash"
3635

3736
EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \
3837
hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \
@@ -42,7 +41,7 @@ EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \
4241
php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \
4342
php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \
4443
php_hash_fnv.h php_hash_joaat.h php_hash_sha3.h php_hash_murmur.h \
45-
php_hash_xxhash.h"
44+
php_hash_xxhash.h xxhash/xxhash.h"
4645

4746
PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, 0,,$PHP_HASH_CFLAGS)
4847
PHP_INSTALL_HEADERS(ext/hash, $EXT_HASH_HEADERS)

ext/hash/config.w32

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@ if (!CHECK_HEADER_ADD_INCLUDE('PMurHash.h', 'CFLAGS_HASH', hash_murmur_dir)) {
3535
}
3636
ADD_SOURCES(hash_murmur_dir, 'PMurHash.c PMurHash128.c', 'hash');
3737

38-
var hash_xxhash_dir = 'ext/hash/xxhash';
39-
if (!CHECK_HEADER_ADD_INCLUDE('xxhash.h', 'CFLAGS_HASH', hash_xxhash_dir)) {
40-
ERROR('Unable to locate xxhash headers');
41-
}
42-
4338
PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
4439
'php_hash_ripemd.h php_hash_haval.h php_hash_tiger.h ' +
4540
'php_hash_gost.h php_hash_snefru.h php_hash_whirlpool.h ' +
4641
'php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ' +
47-
'php_hash_murmur.h php_hash_xxhash.h');
42+
'php_hash_murmur.h php_hash_xxhash.h php_hash_fnv.h ' +
43+
'php_hash_joaat.h xxhash/xxhash.h');

ext/hash/php_hash_xxhash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define PHP_HASH_XXHASH_H
1919

2020
#define XXH_INLINE_ALL 1
21-
#include "xxhash.h"
21+
#include "xxhash/xxhash.h"
2222

2323
typedef struct {
2424
XXH32_state_t s;

0 commit comments

Comments
 (0)