aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorThomas Wolff <towo@towo.net>2021-05-10 11:28:15 +0100
committerNick Clifton <nickc@redhat.com>2021-05-10 11:28:15 +0100
commit749c700282097cf679ff019a9674d7c762f48619 (patch)
treef865b5a1c9fe7890afb94fefbed5a41124cc8a3e /binutils
parent802021d46df5d82ec58de8ee0b769590b7d1e4df (diff)
downloadfsf-binutils-gdb-749c700282097cf679ff019a9674d7c762f48619.zip
fsf-binutils-gdb-749c700282097cf679ff019a9674d7c762f48619.tar.gz
fsf-binutils-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')
-rw-r--r--binutils/ChangeLog10
-rw-r--r--binutils/doc/binutils.texi7
-rw-r--r--binutils/windres.c26
3 files changed, 14 insertions, 29 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ae27252..38ae189 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,13 @@
+2021-05-10 Thomas Wolff <towo@towo.net>
+
+ 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.
+
2021-05-10 Alan Modra <amodra@gmail.com>
* dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 9578c08..504c3ea 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -4278,8 +4278,7 @@ format, which is the first one listed by the @option{--help} option.
@item --preprocessor @var{program}
When @command{windres} reads an @code{rc} file, it runs it through the C
preprocessor first. This option may be used to specify the preprocessor
-to use, including any leading arguments. The default preprocessor
-argument is @code{gcc}.
+to use. The default preprocessor is @code{gcc}.
@item --preprocessor-arg @var{option}
When @command{windres} reads an @code{rc} file, it runs it through
@@ -4290,8 +4289,8 @@ preprocessor command line.
If the @option{--preprocessor} option has not been specified then a
default set of preprocessor arguments will be used, with any
@option{--preprocessor-arg} options being placed after them on the
-command line. These default arguments are @code{-E -xc-header
--DRC_INVOKED}.
+command line. These default arguments are @code{-E},
+@code{-xc-header} and @code{-DRC_INVOKED}.
@item -I @var{directory}
@itemx --include-dir @var{directory}
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;
}