libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] [cygwin|mingw]: Add cross-compile support to cwrapper (take


From: Charles Wilson
Subject: Re: [PATCH] [cygwin|mingw]: Add cross-compile support to cwrapper (take 6)
Date: Fri, 27 Aug 2010 14:17:15 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

On 8/27/2010 2:10 PM, Ralf Wildenhues wrote:
> Another questions regarding this patch:
> 
> Do you know whether all of the conversion functions are idempotent
> (f(f(x)) = f(x))?  IOW, when the user passes names already converted,
> do we do the right things in all cases?

I'm pretty sure they are *not*, especially the pathlist ones:

e.g. cygwin->win32
/usr/bob:/fred:.  --> C:/cygwin/usr/bob;C:/cygwin/fred;.

Then, even if you ignore the fact that the 'fixup leading/trailing
pathseps' code will be confused by ';' when it is expecting ':',
'cygpath.exe -m' is quite annoyed by win32 paths

$ cygpath -p -m C:/cygwin/usr/bob;C:/cygwin/fred;.
C;C:/cygwin-1.7/cygwin/usr/bob
cygwin warning:
  MS-DOS style path detected: C:/cygwin/fred
  Preferred POSIX equivalent is: /c/cygwin/fred
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
bash: C:/cygwin/fred: No such file or directory
bash: .: filename argument required
.: usage: . filename [arguments]

Is this important?  Peter takes care in his patches to only convert at
the very last instant (so, it obviously only happens once).  The same is
true in this patch itself.

What would seem important to me is that the conversion is reversible:

if g(x) = f^-1(x), then does g(f(x)) = x, for some value of "="?  (That
is, do they refer to the same directory on the disk, even if they are
spelled differently?)  This, I think, is true.  Spelling probably only
varies in pathological cases (or when symlinks are involved, and the
"other" filesystem doesn't support them).

--
Chuck



reply via email to

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