From: Alibek Omarov Date: Thu, 22 Jan 2026 22:35:18 +0000 (+0500) Subject: windres: quote the angled brackets to avoid confusing shell X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b7ca8278cd4caba66172622551f0840f82e905f;p=thirdparty%2Fbinutils-gdb.git windres: quote the angled brackets to avoid confusing shell When invoking windres with a preprocessor parameter that contains angled brackets, the shell will try to interpret them, leading to an error. For example with an empty test.rc file: $ i686-w64-mingw32-windres '-DTEST=' -o test.o -i test.rc sh: 1: cannot open foo: No such file i686-w64-mingw32-windres: preprocessing failed. After patch it correctly complains about no resources baked in: $ ./i686-w64-mingw32-windres '-DTEST=' -o test.o -i test.rc ./i686-w64-mingw32-windres: no resources Signed-off-by: Alibek Omarov --- diff --git a/binutils/windres.c b/binutils/windres.c index e7dd61aad4f..11cf3d5652c 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -692,7 +692,7 @@ quot (const char *string) for (src = string, dest = buf; *src; src++, dest++) { - if (*src == '(' || *src == ')' || *src == ' ') + if (*src == '(' || *src == ')' || *src == ' ' || *src == '<' || *src == '>') *dest++ = '\\'; *dest = *src; }