From: John P. <joh...@st...> - 2006-11-10 00:25:22
|
Hi all, On Thu, 09 Nov 2006 23:43:17 +0100, "Stefan Bellon" <sb...@sb...> said: > Christopher Faylor wrote: > > > However, as you note, this really isn't the right mailing list to > > discuss Cygwin philosophy. But, if you send email to the Cygwin list > > expecting that there will be some special built-in way to deal with > > this issue, expect to be disappointed by the response. > > To be honest, I'm a bit disappointed by the response I got here. I > appreciate the work going into MinGW and I'm intensively making use of > MinGW, but I doubt my question was so inappropriate to ask it here, > like some of you point out. There's probably no 'perfect' place to discuss such issues, as they cut through several different areas. Here seems good to me, since you're trying to build software using MinGW that can give a certain amount of support when used in the cygwin environment. If you were building natively in cygwin, I presume that the the POSIX emulation layer would deal with this for your automatically (is that true?). But you can't rely on that here. > > Just for a second, imagine that I'm developing some kind of tool for > software development which should be usable in lots of different usage > scenarios (which I do NOT have control over!), be it with native > Windows cmd.exe shell, be it with MSYS or be it with CygWin and has to > cope with absolute paths in all three cases. Tor's ideas were good, but I do wonder if you could possible somehow 'sniff' for the Cygwin environment somehow (check the environment variables, perhaps) then invoke 'cygpath' to process the command-line arguments if necessary? This might avoid getting under the hood and reading registry values etc, and would not contravene the GPL? > > I don't see why politically and philosophically differing points of > views should rule out asking the question of how to do it properly with > MinGW and whether the wheel has already been invented. I have never had this issue completely clear in my mind: How and where are command-line arguments processed in MSYS, Cygwin, and Windows 'cmd' shell. I realise that the splitting of command line arguments happens somewhere in the operating system -- how does MSYS and Cygwin interface with that, given that they live on top of Windows? How does this stuff happen in Linux, and how is it different? Do they include their own 'splitting' methods? Or do they just apply some string transformations and then let Windows do the splitting into argv[]? If you invoke a cygwin executable from outside the cygwin shell, does it still attempt to process unix-style pathnames? What about a MSYS executable? Perhaps someone knows somewhere on the net where all this is clearly explained? > > I'd like to thank Tor, who understood the question and gave me valuable > input. Thanks a lot! -- John Pye Department of Mechanical and Manufacturing Engineering University of New South Wales, Sydney, Australia. john.pye AT student DOT unsw.edu.au |