PHP 4.0 Bug #5212: "internal_functions.c", line 38: invalid source character: '\'

From: Date: Sat, 24 Jun 2000 00:34:18 +0000
Subject: PHP 4.0 Bug #5212: "internal_functions.c", line 38: invalid source character: '\'
Groups: php.dev 
Request: Send a blank email to php-dev+get-22173@lists.php.net to get a copy of this message
From: brothers@halcyon.com Operating system: Dynix/Ptx PHP version: 4.0.0 Release PHP Bug Type: Compile Failure Bug description: "internal_functions.c", line 38: invalid source character: '\' On Sequent Dynix/Ptx 4.4.4 sed needs extra help recognizing an escaped escape character preceding "n" in a substitution rule in genif.sh. This causes internal_functions.c to be generated with "backslash-enn" literals still embedded, leading to compiler errors. Here is the symptom. A hackaround that works on this platform follows at the very end. cc -DHAVE_CONFIG_H -I. -I/opt/apache_1.3.12/php-4.0.0/ -I/opt/apache_1.3.12/php-4.0.0 -I/opt/apache_1.3.12/php-4.0.0/Zend -I/opt/apache_1.3.12/php-4.0.0 -I/opt/apache_1.3.12/php-4.0.0/ext/mysql/libmysql -I/opt/apache_1.3.12/php-4.0.0/ext/xml/expat/xmltok -I/opt/apache_1.3.12/php-4.0.0/ext/xml/expat/xmlparse -DXML_BYTE_ORDER=12 -Wc,+abi-socket -g -c internal_functions.c && touch internal_functions.lo "internal_functions.c", line 32: warning: tokens ignored at end of directive line "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: undefined symbol: n "internal_functions.c", line 38: warning: improper pointer/integer combination: op "=" "internal_functions.c", line 38: non-constant initializer: op "NAME" "internal_functions.c", line 38: syntax error before or at: phpext_standard_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: identifier redeclared: n "internal_functions.c", line 38: syntax error before or at: phpext_session_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: syntax error before or at: phpext_posix_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: syntax error before or at: phpext_pcre_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: syntax error before or at: phpext_mysql_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: syntax error before or at: phpext_db_ptr "internal_functions.c", line 38: warning: old-style declaration; add "int" "internal_functions.c", line 38: invalid source character: '\' "internal_functions.c", line 39: warning: old-style declaration; add "int" "internal_functions.c", line 39: syntax error before or at: } "internal_functions.c", line 39: warning: syntax error: empty declaration "internal_functions.c", line 46: warning: null dimension: sizeof() "internal_functions.c", line 51: warning: null dimension: sizeof() "internal_functions.c", line 56: warning: null dimension: sizeof() *** Error code 1 Make: . Stop. *** Error code 1 Make: . Stop. % Here is the hackaround, a tiny change I made to restore proper function. Whether genif.sh will work on other platforms with this in place is unknown. Change line 39-40 of genif.sh from this substitution rule < -e 's/\\n/\ </g' to this > -e 's/[\\]n/\ >/g' This evidently stops Sequent's sed from trying so hard to recognize a newline pattern. The original syntax substituted the input line's actual newline for a new newline on my system, ignoring the embedded "\n". If you make this change to genif.sh _after_ seeing the above error, you must "rm internal_functions.c" before rerunning make.

« previous php.dev (#22173) next »