diff options
author | Thomas Wolff <towo@towo.net> | 2021-05-10 11:28:15 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-05-10 11:28:15 +0100 |
commit | 749c700282097cf679ff019a9674d7c762f48619 (patch) | |
tree | f865b5a1c9fe7890afb94fefbed5a41124cc8a3e /binutils/windres.c | |
parent | 802021d46df5d82ec58de8ee0b769590b7d1e4df (diff) | |
download | gdb-749c700282097cf679ff019a9674d7c762f48619.zip gdb-749c700282097cf679ff019a9674d7c762f48619.tar.gz gdb-749c700282097cf679ff019a9674d7c762f48619.tar.bz2 |
Restore old behaviour of windres so that options containing spaces are not enclosed in double quotes.
PR 4356
PR 26865
PR 27594
* windres.c (quot): Revert previous delta. Do not use double
quotes when spaces are detected in options.
* doc/binutils.texi (windres): Remove suggestion that the
--preprocessor option can take arguments.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r-- | binutils/windres.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/binutils/windres.c b/binutils/windres.c index 544cef6..2b626a2 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -710,37 +710,13 @@ quot (const char *string) buf = (char *) xmalloc (buflen); } -#if defined (_WIN32) && !defined (__CYGWIN__) - /* For Windows shells, quote "like this". */ - { - bool quoted = false; - - dest = buf; - if (strchr (string, ' ')) - { - quoted = true; - *dest++ = '"'; - } - - for (src = string; *src; src++, dest++) - { - /* Escape-protect embedded double quotes. */ - if (quoted && *src == '"') - *dest++ = '\\'; - *dest = *src; - } - - if (quoted) - *dest++ = '"'; - } -#else for (src = string, dest = buf; *src; src++, dest++) { if (*src == '(' || *src == ')' || *src == ' ') *dest++ = '\\'; *dest = *src; } -#endif + *dest = 0; return buf; } |