make-alpha
[Top][All Lists]
Advanced

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

Re: Loadable module support


From: Paul Smith
Subject: Re: Loadable module support
Date: Sun, 15 Jan 2012 15:13:42 -0500

On Sun, 2012-01-15 at 21:12 +0200, Eli Zaretskii wrote:
> > From: Paul Smith <address@hidden>
> > Date: Sat, 14 Jan 2012 23:22:32 -0500
> > 
> > This design is informed by the way POSIX systems work (dlopen(),
> > dlsym()).  I wonder how this would work, or not work, with alternative
> > dynamic loaders such as Windows (I assume MacOS uses POSIX semantics as
> > well)?
> 
> Windows has an API similar to `dlopen', called LoadLibrary, and an API
> similar to `dlsym', called GetProcAddress.  So it should be easy to
> have an abstract interface that will have different implementations in
> the Posix and Windows ports.

That sounds like it will work.

> Btw, are you going to use libffi for this facility?

I wasn't planning on it in the GNU make code itself, because the only
interface that we use is just to invoke an init function with a
well-known name in the loaded module.  My first inclination would be for
the init function to not take any arguments at all.  No need for FFI
here that I can see.  But obviously any loadable module could _itself_
use FFI, if necessary, to interface with some other facility and/or to
allow another facility to invoke make functions.

Even if I adopt the extra idea of passing a string argument to the setup
function, I don't know that we need FFI just to pass a single string...?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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