lua-users home
lua-l archive

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



> Secondly, loadlib.c now skips including (the necessary) windows.h
> since the "defined(LUA_DL_DLL)" check always fails. Note that
> LUA_DL_DLL is defined in luaconf.h, but this is only included in
> loadlib.c later on through lua.h (a couple of lines below).

The old chicken-and-egg problem. Does moving that block
(#if defined (LUA_DL_DLL)) to after the inclusion of lua.h solves
the problem?

Actually, this does not solve our problem. We wanted to allow
redefinitions (through luaconf.h) *after* the inclusion of windows.h.
It seems that the best solution is to include windows.h in luaconf.h
itself.

Yes, I agree that makes sense.

And while on the subject of luaconf.h:

Would it be a good idea to move liolib.c's new section for seek/tell definitions to luaconf.h as well?

Not all Windows compilers have the _fseeki64 and _ftelli64 functions that are defined there (in a LUA_WIN section)... I ran into this 3rd issue shortly after my previous post, but noticed Kein-Hong Man had already alluded to it in his post.

It would be good to make these definitions more visible/configurable, since it's probably awkward for people to have to open up and change liolib.c to get things to work.

Ashwin.