[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/4356] windres fails on files with spaces
From: |
sattler at mixed-mode dot de |
Subject: |
[Bug binutils/4356] windres fails on files with spaces |
Date: |
20 Apr 2007 15:31:24 -0000 |
------- Additional Comments From sattler at mixed-mode dot de 2007-04-20 16:31
-------
Created an attachment (id=1730)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1730&action=view)
Put filenames from command line in quotes to handle spaces correctly
> Please could you provide an example of such a command line?
Just specify a full path with spaces in it:
C:\>windres "C:\test with spaces\gui.rc" "c:\test with spaces"\gui.obj
gcc: C:\test: No such file or directory
gcc: with: No such file or directory
gcc: spaces\gui.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
windres: no resources
Same for the parameter -I. The patch fixes those issue.
NOTE:
This is still broken for file names that use special shell characters.
This is because you use popen() instead of a combination of pipe(), fork(), a
flavour of exec() and fdopen().
The latter one does not have any of those issues because the shell is avoided
(hey, it will even be faster).
So, see this patch as hotfix for common usage. A bit more work is needed to
allow shell specific characters in file name.
HS
PS: popen() is an _evil_ command!
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4356
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.