Re: quotearg.c's shell_quoting_style and MinGW
Paul Eggert <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs,gmane.comp.lib.gnulib.bugs |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
On 05/06/2012 09:52 AM, Eli Zaretskii wrote: > But since 'diff' output can be fed to a shell or to another program, It's a judgment call, but in this particular case the output of diff is intended more for the user than for other programs, and there is a good argument for consistency in output format regardless of platform. > There was never such an implementation of popen on any non-Posix > platform (nor can there be, at least on Windows, because of the need > to support native file names with backslashes). The idea here is not to reimplement popen from scratch in gnulib, or to have gnulib popen support every feature that POSIX requires. The idea is only to have a popen wrapper that works assuming that its argument is quoted for the POSIX shell, using quotearg. Such arguments have a simple format that can easily be converted to mingw shell format. Once this simple conversion is done, the wrapper call the real mingw popen. This should work with file names that contain backslashes, just as it'd work for any other character.