Message ID | BANLkTinqRu+2UzMVJEmqGA7WOfPRizyzUA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, May 18, 2011 at 8:36 PM, Uros Bizjak <ubizjak@gmail.com> wrote: > 2011-05-18 Uros Bizjak <ubizjak@gmail.com> > > * config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Fix macro > argument expansion. > > Patch was compile tested by crosscompiling to ming32 target. I went ahead and commit this patch to mainline SVN under obvious rule. Uros.
2011/5/20 Uros Bizjak <ubizjak@gmail.com>: > On Wed, May 18, 2011 at 8:36 PM, Uros Bizjak <ubizjak@gmail.com> wrote: > >> 2011-05-18 Uros Bizjak <ubizjak@gmail.com> >> >> * config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Fix macro >> argument expansion. >> >> Patch was compile tested by crosscompiling to ming32 target. > > I went ahead and commit this patch to mainline SVN under obvious rule. > > Uros. Sorry didn't noticed this thread. Yes, patch is ok. Thanks, Kai
Index: mingw32.h =================================================================== --- mingw32.h (revision 173864) +++ mingw32.h (working copy) @@ -160,11 +160,12 @@ along with GCC; see the file COPYING3. #undef OUTPUT_QUOTED_STRING #define OUTPUT_QUOTED_STRING(FILE, STRING) \ do { \ + const char *_string = (const char *) (STRING); \ char c; \ \ - putc ('\"', asm_file); \ + putc ('\"', (FILE)); \ \ - while ((c = *string++) != 0) \ + while ((c = *_string++) != 0) \ { \ if (c == '\\') \ c = '/'; \ @@ -172,14 +173,14 @@ do { \ if (ISPRINT (c)) \ { \ if (c == '\"') \ - putc ('\\', asm_file); \ - putc (c, asm_file); \ + putc ('\\', (FILE)); \ + putc (c, (FILE)); \ } \ else \ - fprintf (asm_file, "\\%03o", (unsigned char) c); \ + fprintf ((FILE), "\\%03o", (unsigned char) c); \ } \ \ - putc ('\"', asm_file); \ + putc ('\"', (FILE)); \ } while (0) /* Define as short unsigned for compatibility with MS runtime. */