Bug #16008 Updated: #include syntax error in ext/imap/php_imap.h
| From: | derick@php.net | Date: | Mon, 11 Mar 2002 23:12:07 +0000 |
| Subject: | Bug #16008 Updated: #include syntax error in ext/imap/php_imap.h | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2263@lists.php.net to get a copy of this message | ||
ID: 16008
Updated by: derick@php.net
Reported By: stephens@ameslab.gov
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: Tru64 Unix 4.0g
PHP Version: 4.1.2
New Comment:
Fixed in CVS, thanks! It will be in 4.2.0 and higher.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-03-11 18:05:49] stephens@ameslab.gov
When IMAP support is turned on at configure stage, the out-of-the-box
file ext/imap/php_imap.h causes compile failure on lines 42, 43, 45 and
46 when using the native cc compiler. This is because the #include
statements on those lines are not started in the first column. Support
for starting preprocessor statements to the right of column one is not
supported in non-gcc compilers, thus the error.
Here is a quick Bourne shell script that will detect and fix the
error.
#!/bin/sh
#
BADFILE="ext/imap/php_imap.h"
BADIMAP=
grep ' #' $BADFILE;
if [ "x$BADIMAP" != "x" ]; then
echo "Fixing $BADFILE"
$DFILE="${BADFILE}.orig"
mv $BADFILE $DFILE
sed '/^ #/s/^ #/#/' < $DFILE >$BADFILE
fi
If you retype this rather than cut-and-paste, be careful to note the
spaces in the strings on the grep and sed lines. The use of shell vars
is so that this piece of script can be extended or looped to fix other
such bogons in the code.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16008&edit=1