On 06/06/2012 04:39 PM, Michael Goffioul wrote: > Hi, > > While compiling octave under MSVC with current gnulib, I got the following > problems (leading undefined references at link stage): > > 1) dirchownmod uses fchown, but this is not available on Windows and > there's no replacement in gnulib
It should be possible to implement fchown for mingw by tracking fd => filename correspondence and calling chown(name). In fact, we already have a start of code that does just this, since we already have hooks that allow one to open(".",O_RDONLY), it's just that the current fd=>filename correspondence isn't hooked in very well, and I think Bruno has had suggestions in the past on how to improve the situation. > 2) savewd uses waitpid, but it doesn't have a dependency on gnulib's > waitpid module > 3) savewd uses fork, but this is not available on Windows and there's no > replacement in gnulib As I see it, you are _not_ trying to use savewd directly, so much as you are trying to use mkdir_with_parents. Right now, mkdir_with_parents uses savewd for the platforms that have to rely on chdir fallbacks for changing directory permissions; but if we implement fchown for mingw in such a way that fchown does not depend on chdir (possible with an fd=>filename correspondence), then the mingw usage of mkdir_with_parents will not need to use savewd. We may still need to drag in the savewd module for other platforms, at which point we should at least make the savewd module so that it compiles but always returns an error when used on mingw, rather than the current state of not even compiling. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature