PHP 5.3.2でPECLのhashがコケる件

乗るしかない、このPHPウェーブに!

$ uname -a
Linux goa 2.6.32.8 #1 SMP Tue Feb 23 11:39:02 JST 2010 x86_64 GNU/Linux

$ php -v
PHP 5.3.2 (cli) (built: Jul 30 2010 16:58:59)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
$ pecl download hash
$ tar zxf hash-1.5.tgz
$ cd hash-1.5/
$ phpize
$ ./configure
$ make
(snip)
/var/tmp/m/hash-1.5/hash.c:785: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:792: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:799: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:807: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:815: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:822: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:828: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:835: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:842: error: duplicate 'static'
/var/tmp/m/hash-1.5/hash.c:848: error: duplicate 'static'
make: *** [hash.lo] Error 1

$ echo 'ぐぬぬ'

$ sed -i.orig -e 's/^static$//g' hash.c
$ make
(snip)
Build complete.
Don't forget to run 'make test'.

$ echo '\(´u`)/'

$ make test
(snip)
=====================================================================
TIME START 2010-09-16 03:17:43
=====================================================================
PASS ADLER32 [tests/adler32.phpt]
PASS CRC32 [tests/crc32.phpt]
PASS gost [tests/gost.phpt]
PASS haval algorithm (multi-vector, multi-pass, multi-width) [tests/haval.phpt]
PASS hmac-md5 algorithm [tests/hmac-md5.phpt]
PASS md2 algorithm [tests/md2.phpt]
FAIL md4 algorithm [tests/md4.phpt]
PASS md5 algorithm [tests/md5.phpt]
PASS ripemd128 algorithm [tests/ripemd128.phpt]
PASS ripemd160 algorithm [tests/ripemd160.phpt]
PASS ripemd256 algorithm [tests/ripemd256.phpt]
PASS ripemd320 algorithm [tests/ripemd320.phpt]
PASS sha1 algorithm [tests/sha1.phpt]
PASS sha256 algorithm [tests/sha256.phpt]
PASS sha384 algorithm [tests/sha384.phpt]
PASS sha512 algorithm [tests/sha512.phpt]
PASS snefru [tests/snefru.phpt]
PASS tiger [tests/tiger.phpt]
PASS whirlpool [tests/whirlpool.phpt]
=====================================================================
TIME END 2010-09-16 03:17:44

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   23
---------------------------------------------------------------------

Number of tests :   19                19
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (  5.3%) (  5.3%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   18 ( 94.7%) ( 94.7%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
md4 algorithm [tests/md4.phpt]
=====================================================================
(snip)
Do you want to send this report now? [Yns]: Y<RET>
(snip)

$ cat tests/md4.log

---- EXPECTED OUTPUT
31d6cfe0d16ae931b73c59d7e0c089c0
bde52cb31de33e46245e05fbdbd6fb24
a448017aaf21d8525fc10ae87aa6729d
d9130a8164549fe818874806e1c7014b
d79e1c308aa5bbcdeea8ed63df412da9
043f8582f241db351ce627e153e7f0e4
e33b4ddc9c38f2199c3e7b164fcc0536
---- ACTUAL OUTPUT
886492db0d2abc5af2721d2281504dea
b840dc68104037934148a3bad26d0a12
329def589299d5bdac2624873bc4bee4
c56e47c0e6fb0cfeacfcccf7439fa41a
ab865e28d5ab83541450ffe3ed6af853
035bb952618b7d58f9333621baace53c
ab97ad5f74f168a923205f9302ebc1c4
---- FAILED

$ echo '(゚д゚;)'

$ grep "hash('md4" tests/md4.php | awk -F"'" '{print$ 4}'

a
abc
message digest
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
12345678901234567890123456789012345678901234567890123456789012345678901234567890

$ grep "hash('md4" tests/md4.php | awk -F"'" '{print $4}' | \
  perl -MDigest::MD4=md4_hex -nle 'print md4_hex($_)'
31d6cfe0d16ae931b73c59d7e0c089c0
bde52cb31de33e46245e05fbdbd6fb24
a448017aaf21d8525fc10ae87aa6729d
d9130a8164549fe818874806e1c7014b
d79e1c308aa5bbcdeea8ed63df412da9
043f8582f241db351ce627e153e7f0e4
e33b4ddc9c38f2199c3e7b164fcc0536

echo '(; Д ) ゜ ゜'