|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-11 18:12 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 08:00:01 2025 UTC |
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.