[Top][All Lists]

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

Re: [Monotone-devel] Re: comments on win32 patches

From: Jon Bright
Subject: Re: [Monotone-devel] Re: comments on win32 patches
Date: Mon, 28 Feb 2005 11:52:56 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)


Nathaniel Smith wrote:

The files in lua/*, except lposix.c and modemuncher.c, are copies of
the lua 5.0 source distribution, from Tecgraf PUC-Rio. lposix.c and
modemuncher.c are from Claudio Terra and Luiz Henrique de Figueiredo,
both of Tecgraf PUC-Rio, but as near as I can tell those two files are
declared to be in the public domain.


I guess the functions we need are:

- exists_in_path() (only for Win32)
- iswin32() (or getplatform() or similar more generic name)

The goal of things like platform.hh is to shield the rest of the code
from having to have platform configury stuff sprinkled all through it.
Surely we could just have exists_in_path() defined in both places
(maybe _not_ in platform.hh, if it turns out that the implementation
would be identical), and leave out iswin32() altogether?

Can do. The LUA version of exists_in_path is the simpler for the Unix side, but the C version is much simpler for the Win32 side, hence the way I did it - but it's easy enough to convert the LUA Unix version to C.

- spawn()
- wait()
- the new spawn_with_pipes() when it's written.

Similarly, I'd be tempted to just have a spawn_and_wait interface, but
I suppose spawn_with_pipes needs something different... though we
should see exactly what's needed to support spawn_with_pipes(), hook
it up to netxx, etc.

I definitely think spawn() and wait() should be different functions. I can easily imagine hooks (note_commit, for example) wanting to spawn some external mail job or similar, and really not caring when it ends. I planned to look at Christof's stuff to get an idea of what's needed for spawn_with_pipes() - but it definitely doesn't want wait(), and I don't think it wants any links to netxx..

- chmod (at least for current use, only needed for Unix)
- Unfortunately, chmod needs the mode-munching stuff

Maybe we could just expose a make_executable(<path>) function?

Can do.  This function's basically null for Win32.

I don't see anything we're particularly likely to need. ;-)

Applies more to implementing code than deleting it :-)

Jon Bright
Silicon Circus Ltd.

reply via email to

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