From: [EMAIL PROTECTED] Operating system: Tru64 Unix 4.0g PHP version: 4.1.2 PHP Bug Type: Compile Failure Bug description: #include syntax error in ext/imap/php_imap.h
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 bug report at http://bugs.php.net/?id=16008&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16008&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16008&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16008&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16008&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16008&r=support Expected behavior: http://bugs.php.net/fix.php?id=16008&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16008&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16008&r=submittedtwice