[FFmpeg-cvslog] r17667 - trunk/configure
Reimar Döffinger
Reimar.Doeffinger
Sun Mar 1 19:06:30 CET 2009
On Sat, Feb 28, 2009 at 08:56:19PM +0100, mru wrote:
> Author: mru
> Date: Sat Feb 28 20:56:19 2009
> New Revision: 17667
>
> Log:
> configure: {enable,disable}_safe functions that sanitise arguments
>
> Modified:
> trunk/configure
>
> Modified: trunk/configure
> ==============================================================================
> --- trunk/configure Sat Feb 28 20:34:50 2009 (r17666)
> +++ trunk/configure Sat Feb 28 20:56:19 2009 (r17667)
> @@ -325,6 +325,14 @@ disable_weak(){
> set_weak no $*
> }
>
> +enable_safe(){
> + enable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
> +}
> +
> +disable_safe(){
> + disable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
> +}
> +
> do_enable_deep(){
> for var; do
> enabled $var && continue
> @@ -566,9 +574,7 @@ check_header(){
> log check_header "$@"
> header=$1
> shift
> - var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
> - disable $var
> - check_cpp "$@" <<EOF && enable $var
> + check_cpp "$@" <<EOF && enable_safe $header || disable_safe $header
> #include <$header>
> int x;
> EOF
I suspect that this actually broke check_headers, if the check fails, disable_safe
will be run, which runs echo and the return value of check_headers is
thus the return value of that echo command (instead of the actual
check).
At least that's what happens on MinGW, though it might be a bug (I don't
really think so though)...
More information about the ffmpeg-cvslog
mailing list