diff options
author | Nick Clifton <nickc@redhat.com> | 2020-11-27 14:18:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-11-27 14:19:56 +0000 |
commit | 21c33bcbe36377abf01614fb1b9be439a3b6de20 (patch) | |
tree | 0b7121c3795d661b881bad20826e688c84647a7d /binutils/windres.c | |
parent | 2c6f3e56cbba35365ce0f558e9bfbb122a63a63d (diff) | |
download | gdb-21c33bcbe36377abf01614fb1b9be439a3b6de20.zip gdb-21c33bcbe36377abf01614fb1b9be439a3b6de20.tar.gz gdb-21c33bcbe36377abf01614fb1b9be439a3b6de20.tar.bz2 |
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.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r-- | binutils/windres.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/binutils/windres.c b/binutils/windres.c index 5c83dab..df3e01f 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -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: |