[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: PATCH: Lua5.1-work3 loadlib cleanups
- From: Mike Pall <mikelu-0412@...>
- Date: Tue, 7 Dec 2004 20:32:48 +0100
Hi,
Roberto Ierusalimschy wrote:
> > the #ifdef logic in luaconf.h for loadlib support does not work properly
> > on a variety of systems.
>
> Can you be more specific?
E.g. neither HP-UX nor AIX define BSD. There is just no reasonable way
to detect all systems supporting dlfcn with CPP macros. It's a lot easier
to assume it is supported everywhere and allow for disabling it in the
config file (e.g. on embedded systems).
Also the defines for Mac OS X were never actually used because both
USE_DLOPEN and USE_DYLD get defined (one in config, the other in luaconf.h).
And the former has priority in loadlib.c. Luckily gcc on OS X does not
define BSD or you'd get into even more trouble.
> > - Set the proper directory separator for Windows.
>
> Doesn't Windows work with "/" too?
Well, sort of. You may get into trouble depending on which functions/apps
the paths end up. Mixing separators is probably a bad idea.
> > - Modify the translation of module names to C function names. A module
> > "foo.bar.baz" previously had to provide luaopen_foobarbaz() and now
> > should use luaopen_foo_bar_baz().
>
> Probably that should be configurable through luaconf...
Maybe. But there really needs to be a single standard for this one.
Changing the initial function definition for all extension modules
from different authors is not an option.
Bye,
Mike