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 04:49 AM, Bruno Haible wrote: > 1) Change the three locations in src/diff3.c, src/sdiff.c, src/util.c to > use the gnulib modules 'execute' and 'spawn-pipe'.... This would add (by my count) 72 source files to diff, and would add some complexity to diffutils proper. I'd rather keep things simple if we can (my most recent change to diff was to *remove* a gnulib module, yay! ...), or at least substitute a simpler set of gnulib modules that would require less fiddling with diffutils proper. > - If you apply these changes also to the HAVE_WORKING_FORK code branch, > it will speed up the subprocess invocation also on Unix, by > bypassing /bin/sh. /bin/sh is already bypassed on Unix, since the code invokes execvp or execl in that case, so I don't see how these changes would benefit Unix performance. The motivation for the existing code is to have something that is simple and easy to understand in portable terms and works efficiently on GNU and similar systems, and to do something similar (though efficiency is less of a concern) on systems that lack 'fork'. These other systems include not just Microsoft Windows, but also other platforms such as OpenVMS. What about the other idea, to add gnulib support for popen and for system to have them quote properly for mingw? That would require no changes to diffutils proper (other than a one-line addition to bootstrap.conf) and would presumably need far fewer than 72 source files.