bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/26865] New: windres: --preprocessor option won't respect s


From: katayama.hirofumi.mz at gmail dot com
Subject: [Bug binutils/26865] New: windres: --preprocessor option won't respect space in file path
Date: Wed, 11 Nov 2020 09:37:58 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26865

            Bug ID: 26865
           Summary: windres: --preprocessor option won't respect space in
                    file path
           Product: binutils
           Version: 2.36 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: katayama.hirofumi.mz at gmail dot com
  Target Milestone: ---

I am creating a resource editor RisohEditor that uses the windres program of
binutils: https://github.com/katahiromz/RisohEditor

RisohEditor uses --preprocessor option of windres. However --preprocessor
option won't be processed correctly. I think double quotations is lacking...

Looking at binutils-2.35.1/binutils/windres.c:

    case RES_FORMAT_RC:
      resources = read_rc_file (input_filename, preprocessor, preprocargs,
                                language, use_temp_file);

Looking at binutils-2.35.1/binutils/resrc.c:

  if (preprocessor)
    {
      cmd = xmalloc (strlen (preprocessor)
                     + strlen (preprocargs)
                     + strlen (filename)
                     + strlen (fnquotes) * 2
                     + 10);
      sprintf (cmd, "%s %s %s%s%s", preprocessor, preprocargs,
               fnquotes, filename, fnquotes);

      cpp_pipe = open_input_stream (cmd);
    }

Double quotations were not used in building a command line.

Also, it seems like look_for_default function didn't respect space in file
path...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]