bug-gnulib
[Top][All Lists]
Advanced

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

Re: take 4: Add an implementation of canonicalize_file_name for MinGW


From: Bruno Haible
Subject: Re: take 4: Add an implementation of canonicalize_file_name for MinGW
Date: Sat, 26 Feb 2011 12:25:30 +0100
User-agent: KMail/1.9.9

Hi Jan,

More comments on your mail yesterday:

About [PATCH 1/3] tests: Allow GL_RM_RF-macro as a fallback for rm:

> > (as Bruno pointed out earlier, the easiest ways to test for mingw
> > are msys or cygwin cross-compilation, but it is possible to have
> > rm.exe even without those environments).  I'm still not convinced
> > that adding hacks to work around a missing rm is worth doing.
> 
> I would be very happy if you would include this hack: we would enable
> hackers to fix MinGW code along with adding and running the required
> tests, without having to tell them to buy a Microsoft Windows licence.

I don't understand. No one needs a Windows license in order to have an
rm.exe program, even in a Windows emulator. The downloads of
<http://gnuwin32.sourceforge.net/> are free, and then there's also the
GNUWin II project <http://en.wikipedia.org/wiki/GNUWin_II>.


About the form of submitted patches:

> > For git bisectability, I don't like to commit known broken tests without
> > also committing their fixes;
> 
> Okay, I have lumped my three nicely separated-out patches: the test,
> the fix, and the removal of the debug printing, back together again in
> one big patch.

Thanks.

> I figured that
> adding debug printing and removing it in the same series of patches,
> would ease this insight and so greatly higher my chances of getting
> this into gnulib before the release of Guile 2.0.

We really don't like traces of debug printing statements in the git
history. With both the tests and the fix in one patch, what I like to do
it to first apply the tests part to my checkout, then run the tests and
observe them fail, then apply the fix, then run the tests against and
see how they all succeed. But in git it is better committed as 1 commit,
because it's one issue.


About [PATCH 2/3]:

> In LilyPond we use slash throughout, Guile also does that and I think
> that most GNU (library-) code does.

You are free to do so in specific programs. But mingw means to use native
Windows filenames, like those returned by getcwd(), and they
  - use drive letters followed by colons,
  - use backslashes, not slashes,
  - don't have a slash before the drive letter.

In gnulib I think this is the sanest thing to do as well. We don't have
a "POSIX-like filename layer" in gnulib so far. It we were to have one,
it would be packaged as a module (like the 'sigpipe' module for example),
and it would likely affect many modules from 'basename' to 'stat'.

Bruno



reply via email to

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