aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-16 15:45:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-04-16 15:45:51 -0300
commitc27ef1b79c5063e87efe81ef5915b23e59a47aa4 (patch)
tree0146dac9e2e495290b6d28b21151048828caf518
parent4422b9747253a065da560e6d24388c9fd98c6223 (diff)
downloadlua-c27ef1b79c5063e87efe81ef5915b23e59a47aa4.tar.gz
lua-c27ef1b79c5063e87efe81ef5915b23e59a47aa4.tar.bz2
lua-c27ef1b79c5063e87efe81ef5915b23e59a47aa4.zip
correct integer limits for Windows + small adjustments for short
option
-rw-r--r--luaconf.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/luaconf.h b/luaconf.h
index 38ee3bdf..6c9dab7b 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.197 2014/04/12 14:51:53 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.198 2014/04/14 16:58:54 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -578,18 +578,27 @@
578#elif defined(LUA_INT_LONGLONG) /* }{ long long */ 578#elif defined(LUA_INT_LONGLONG) /* }{ long long */
579 579
580#if defined(_WIN32) 580#if defined(_WIN32)
581
581#define LUA_INTEGER __int64 582#define LUA_INTEGER __int64
582#define LUA_INTEGER_FRMLEN "I64" 583#define LUA_INTEGER_FRMLEN "I64"
584
585#define LUA_MAXUNSIGNED _UI64_MAX
586#define LUA_MAXINTEGER _I64_MAX
587#define LUA_MININTEGER _I64_MIN
588
583#else 589#else
590
584#define LUA_INTEGER long long 591#define LUA_INTEGER long long
585#define LUA_INTEGER_FRMLEN "ll" 592#define LUA_INTEGER_FRMLEN "ll"
586#endif
587 593
588#define LUA_MAXUNSIGNED ULLONG_MAX 594#define LUA_MAXUNSIGNED ULLONG_MAX
589#define LUA_MAXINTEGER LLONG_MAX 595#define LUA_MAXINTEGER LLONG_MAX
590#define LUA_MININTEGER LLONG_MIN 596#define LUA_MININTEGER LLONG_MIN
591 597
592#elif defined(LUA_INT_SHORT) /* }{ short int; for tests */ 598#endif
599
600#elif defined(LUA_INT_SHORT) /* }{ short int */
601/* this option is for tests only; it is not fully functional */
593 602
594#define LUA_INTEGER short int 603#define LUA_INTEGER short int
595#define LUA_INTEGER_FRMLEN "" 604#define LUA_INTEGER_FRMLEN ""
@@ -607,6 +616,8 @@
607#undef LUAI_MAXSTACK 616#undef LUAI_MAXSTACK
608#define LUAI_MAXSTACK 15000 617#define LUAI_MAXSTACK 15000
609 618
619#define l_castS2U(x) ((LUA_UNSIGNED)(unsigned short)(x))
620
610#else /* }{ */ 621#else /* }{ */
611 622
612#error "numeric integer type not defined" 623#error "numeric integer type not defined"