]> granicus.if.org Git - php/commitdiff
tweak the zendparse symbol to be exported with newer bison
authorAnatol Belski <ab@php.net>
Sat, 27 Jun 2015 22:10:41 +0000 (00:10 +0200)
committerAnatol Belski <ab@php.net>
Sat, 27 Jun 2015 22:10:41 +0000 (00:10 +0200)
makedist

index 41392273b725f46e47fdc9289b75d418894408ee..1552f9efb31e9239dcb8e2d0b4b1ae7a6a4acbaa 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -103,6 +103,13 @@ rm -fr autom4te.cache/
 # touching everything to be packaged
 find $MY_OLDPWD/php-$VER -exec touch -c {} \;
 
+# tweak zendparse to be exported through ZEND_API
+# NOTE this has to be revisited once bison supports foreign skeletons
+#      and that bison version is used. Read /usr/share/bison/README for more
+sed -i 's,^int zendparse\(.*\),ZEND_API int zendparse\1,g' $MY_OLDPWD/php-$VER/Zend/zend_language_parser.c
+sed -i 's,^int zendparse\(.*\),ZEND_API int zendparse\1,g' $MY_OLDPWD/php-$VER/Zend/zend_language_parser.h
+sed -i 's,^#ifndef YYTOKENTYPE,#include "zend.h"\n#ifndef YYTOKENTYPE,g' $MY_OLDPWD/php-$VER/Zend/zend_language_parser.h
+
 # download pear 
 $ECHO_N "makedist: Attempting to download PEAR's phar archive"
 if test ! -x wget; then