lua-users home
lua-l archive

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


While trying to compile Lua 5.0(alpha) for WinCE, I found this:

On line 18 in lauxlib.c there is:

#ifndef lua_filerror

while later lua_fileerror (with double e) is used. I suppose this is a
bug (quite a small one, but still a bit irritating :)

And a suggestion: why not put the #include "lua.h" before the #ifndef
lua_filerror block? This way I'd be able to keep all WinCE-specific
defines in a single #ifdef _WIN32_WCE block in lua.h

And another, more general suggestion - is it possible to make the Lua
sources more forgiving to platforms which don't have a complete standard
C library? That is, is it possible to add conditional defines which take
"evasive actions" when something is missing from the stdlib? So that it
wouldn't be needed to modify the sources, but just add the needed
defines in the project. I've adapted the MikMod sound library for WinCE,
and though I couldn't do it without touching the sources at all, there
were several defines indicating missing header files (HAVE_FCNTL_H,
HAVE_MALLOC_H, HAVE_LIMITS_H), which helped a lot. (MikMod comes from
the Unix world, too)
I admit that WinCE may be the only platform with so limited stdlib
implementation, and it may seem that it's not worth the effort. But Lua
is very appropriate for WinCE devices, I suppose it will be largely used
there. 

Best Regards,
Ivan

(another devoted fan of Lua, lurking on this list)