octave-maintainers
[Top][All Lists]
Advanced

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

Re: dirchownmod and savewd modules uses unavailable functions under Wind


From: Eric Blake
Subject: Re: dirchownmod and savewd modules uses unavailable functions under Windows
Date: Thu, 07 Jun 2012 06:59:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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