[Top][All Lists]

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

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

From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: comments on win32 patches
Date: Mon, 28 Feb 2005 01:38:15 -0800
User-agent: Mutt/1.5.6+20040907i

On Mon, Feb 28, 2005 at 08:44:35AM +0100, Jon Bright wrote:
> Nathaniel Smith wrote:
> >- our lposix.c is diverging quite a bit from upstream.  Would it be
> >possible, do you think, to move the "spawn-and-wait" and
> >"exists-in-path" and "chmod" functionality to platform.hh, and remove
> >lposix.c (and modemuncher.c, I suppose) altogether?  Would have to add
> >some glue to to expose the functions to lua, but we already do
> >that for mkstemp.
> (Is lposix.c actually part of upstream?  Looking at the LUA site, there 
> are no docs for it)

It's not part of Lua upstream, but it has its own, different upstream
:-).  From AUTHORS:

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?

>  - 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.

>  - 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?

> Are we not going to need any of the other features in the future?

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

-- Nathaniel

Linguistics is arguably the most hotly contested property in the academic
realm. It is soaked with the blood of poets, theologians, philosophers,
philologists, psychologists, biologists and neurologists, along with
whatever blood can be got out of grammarians. - Russ Rymer

reply via email to

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