Re: revised patch for glib compilation



On Thu, Oct 25, 2001 at 01:14:55PM +0200, Tim Janik wrote:
> it'd therefore be good, if you could send a mail to gtk-devel-list,
> outlining:
> 
> - What advantages, if any, does this have for people on platforms GModule
>   supports 
> - What additional platforms would be supported

A sales pitch for applying my patch to gmodule as a wrapper for libltdl?
Sure.

I'll take the last point first, since it is the easiest ;-)

  - libltdl works on any platform with a moderately unixy environment!
  - this includes platforms with no support for shared libraries.
  
Some of the advantages over the existing gmodule infrastructure are as
follows:

  - To my mind, the greatest advantage is that any future enhancement
    to either gmodule or libltdl will benefit the other.
  - Apparently gmodule does not work very well on cygwin... libltdl
    does work well.
  - Modules can be statically linked into an application, and yet still
    accessed with the same API (i.e. gmodule's API with my patch
    applied)
  - libltdl has API calls to add new underlying loading methods to the
    high level function calls -- for example, I am working on a loader
    for GNU M4 which will load a static (.a) module by statically
    relinking the application with the new library as a preloaded
    module.

When it comes down to it, the modular design of libltdl empowers an
application programmer to extend the functionality of the library
without requiring changes to the core.  It is easier to think of libltdl
in terms of the loading methods it supports rather than the individual
platforms it works on.  The builtin loaders in the current release are:

  - dlopen      (most Unix systems)
  - shl_load    (HP/UX)
  - LoadLibrary (Win16 and Win32)
  - load_add_on (BeOS)
  - dld_link    (GNU DLD static loader)
  - dlpreopen   (libtool's own system for already loaded static modules)

I have a bitrotted patch for dyld libraries on MacOS which I plan to
incorporate in the next point release of libtool (1.4.3), and I will
likely roll the static relink loader from M4 back into libtool some time
later.  Excepting the conspicuous absence of dyld, I believe libltdl
really can load a module on any platform that has a C compiler and
moderately standard C runtime.

I recall that Owen had some reservations about adding a dependency on
yet another library to Gnome 2.0: If this is a genuine problem, libltdl
can be built as a libtool convenience library (by configuring with
--enable-libltdl-convenience) and incoporating a copy of libltdl's code
into the gmodule shared library.  However, I think libtool is more or
less ubiquitious by now...

I hope this appeases any reservations you have about rallying behinf
libltdl as a standard code base for module loading?

Cheers,
	Gary.
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



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