php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5212 "internal_functions.c", line 38: invalid source character: '\'
Submitted: 2000-06-24 02:34 UTC Modified: 2000-06-28 12:25 UTC
From: brothers at halcyon dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.0 Release OS: Dynix/Ptx
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brothers at halcyon dot com
New email:
PHP Version: OS:

 

 [2000-06-24 02:34 UTC] brothers at halcyon dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-28 12:25 UTC] sas at cvs dot php dot net
The sed expression has been fixed. Thanks for your report.
 [2010-10-21 15:20 UTC] pierrick@php.net
Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=304586
Log: Fixed bug #5212
 [2020-12-30 12:49 UTC] nikic@php.net
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=doc/fr.git;a=commit;h=bd21bb8f12f0397c0cdc205d50d965590873f05a
Log: Fixed bug #5212
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 14:01:34 2025 UTC