Allow spaces in the name of the external preprocessor used by windres.

PR 26865
	* windres.c (main): If the preprocessor name includes spaces,
	ensure that it is quoted.
This commit is contained in:
Nick Clifton
2020-11-27 14:18:20 +00:00
parent 2c6f3e56cb
commit 21c33bcbe3
2 changed files with 13 additions and 1 deletions

View File

@@ -885,7 +885,13 @@ main (int argc, char **argv)
break;
case OPTION_PREPROCESSOR:
preprocessor = optarg;
if (strchr (optarg, ' '))
{
if (asprintf (& preprocessor, "\"%s\"", optarg) == -1)
preprocessor = optarg;
}
else
preprocessor = optarg;
break;
case OPTION_PREPROCESSOR_ARG: