rsky/php-mecab — Issue #4: Support for PHP 5.4
Author: rsky
Created: 2012-03-03 19:28:00+00:00
State: open

Cannot build for PHP 5.4.0.
```diff
/bin/sh /Users/rsk/develop/projects/pecl/php-mecab/libtool --mode=compile cc -I. -I/Users/rsk/develop/projects/pecl/php-mecab -DPHP_ATOM_INC -I/Users/rsk/develop/projects/pecl/php-mecab/include -I/Users/rsk/develop/projects/pecl/php-mecab/main -I/Users/rsk/develop/projects/pecl/php-mecab -I/opt/phps/5.4.0/include/php -I/opt/phps/5.4.0/include/php/main -I/opt/phps/5.4.0/include/php/TSRM -I/opt/phps/5.4.0/include/php/Zend -I/opt/phps/5.4.0/include/php/ext -I/opt/phps/5.4.0/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/rsk/develop/projects/pecl/php-mecab/mecab.c -o mecab.lo
mkdir .libs
cc -I. -I/Users/rsk/develop/projects/pecl/php-mecab -DPHP_ATOM_INC -I/Users/rsk/develop/projects/pecl/php-mecab/include -I/Users/rsk/develop/projects/pecl/php-mecab/main -I/Users/rsk/develop/projects/pecl/php-mecab -I/opt/phps/5.4.0/include/php -I/opt/phps/5.4.0/include/php/main -I/opt/phps/5.4.0/include/php/TSRM -I/opt/phps/5.4.0/include/php/Zend -I/opt/phps/5.4.0/include/php/ext -I/opt/phps/5.4.0/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/rsk/develop/projects/pecl/php-mecab/mecab.c -fno-common -DPIC -o .libs/mecab.o
/Users/rsk/develop/projects/pecl/php-mecab/mecab.c:1813:9: error: no member named 'safe_mode' in 'struct _php_core_globals'
if (PG(safe_mode) && !php_checkuid(full_path, NULL, CHECKUID_CHECK_FILE_AND_DIR)) {
~~~^~~~~~~~~~
/opt/phps/5.4.0/include/php/main/php_globals.h:32:30: note: expanded from macro 'PG'
# define PG(v) (core_globals.v)
~~~~~~~~~~~~ ^
/Users/rsk/develop/projects/pecl/php-mecab/mecab.c:1813:24: warning: implicit declaration of function 'php_checkuid' is invalid in C99
[-Wimplicit-function-declaration]
if (PG(safe_mode) && !php_checkuid(full_path, NULL, CHECKUID_CHECK_FILE_AND_DIR)) {
^
/Users/rsk/develop/projects/pecl/php-mecab/mecab.c:1813:54: error: use of undeclared identifier 'CHECKUID_CHECK_FILE_AND_DIR'
if (PG(safe_mode) && !php_checkuid(full_path, NULL, CHECKUID_CHECK_FILE_AND_DIR)) {
^
1 warning and 2 errors generated.
make: *** [mecab.lo] Error 1
```