lua-users home
lua-l archive

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


On 7/30/2011 7:53 AM, Tom N Harris wrote:
On 07/29/2011 07:51 AM, KHMan wrote:

WinXP, MinGW gcc 4.5.2 (TDM)

In luaconf.h, LUA_WIN does not define LUA_USE_LONGLONG. So in
lstrlib.c,
LUA_INTFRM uses 'l'/long instead of 'll'/long long.

IIRC, 'll' does not work for msvcrt.dll.


For what it's worth, Microsoft added "long long" and "%lld"
support in Visual C++ 2005 and msvcr80.dll.

I stand corrected. Microsoft has indeed come a long way in terms of ISO C/C++ support and standards participation. I was more familiar with a past, less standards-complaint VC++ era ;-)

It is possible for gcc to link against other versions, but because
of the startup code you have to use -nodefaultlibs and manually
list the standard libraries. Otherwise you end up importing from
both msvcr80.dll and msvcrt.dll.

The downside is you have to embed manifests and distribute the
runtime with the application.

I guess C-people already implicitly ascribe C-like limits to such things as "%d" in Lua, plus given the intention of Lua as an embedded language... I avoid corner cases like plague.

Perhaps this is worth putting up something on the Lua wiki...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia