From 0521215472c696b55c8c372108e6555e3ec55c96 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 23 Sep 2010 01:14:00 +0200 Subject: [PATCH] Fix bug#6820: Don't accept backslashes or quotes on compiler options. * nt/configure.bat: Err out when the argument of --cflags contains invalid characters (check implemented only for GCC). --- nt/ChangeLog | 5 +++++ nt/configure.bat | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 05f01767bd3..275b9bd6279 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2010-09-22 Juanma Barranquero + + * configure.bat: Err out when the argument of --cflags contains + invalid characters (check implemented only for GCC). (Bug#6820) + 2010-08-19 Juanma Barranquero * addpm.c (add_registry): Create App Paths of type REG_EXPAND_SZ. diff --git a/nt/configure.bat b/nt/configure.bat index fc9fae4da60..4866c9fcad5 100755 --- a/nt/configure.bat +++ b/nt/configure.bat @@ -358,9 +358,25 @@ gcc %cf% -c junk.c @echo gcc %cf% -c junk.c >>config.log gcc %cf% -c junk.c >>config.log 2>&1 set cf= -if exist junk.o goto gccOk +if exist junk.o goto chkuser echo The failed program was: >>config.log type junk.c >>config.log +goto nocompiler + +:chkuser +rm -f junk.o +echo int main (int argc, char *argv[]) {>junk.c +echo char *usercflags = "%usercflags%";>>junk.c +echo }>>junk.c +echo gcc -Werror -c junk.c >>config.log +gcc -Werror -c junk.c >>config.log 2>&1 +if exist junk.o goto gccOk +echo. +echo Error in --cflags argument: %usercflags% +echo Backslashes and quotes cannot be used with --cflags. Please use forward +echo slashes for filenames and paths (e.g. when passing directories to -I). +rm -f junk.c +goto end :nocompiler echo. -- 2.11.4.GIT