lua-users home
lua-l archive

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


>From lua-l@tecgraf.puc-rio.br  Wed Jun 21 10:34:31 2000
>From: "John Fletcher" <J.P.Fletcher@aston.ac.uk>
>
>I have met the limit=-192 error as well. I think I could wait for the 
>4.0 beta to get rid of such things.

This is a problem in the C preprocessor.
ANSI C says that all expressions in a #if are evaluated in 32 bits, but
the older C compilers seem to do as they please.
In llimits.h, these compilers get the following comparisons wrong:

#if MAXARG_U > MAX_INT
#if MAXARG_S > MAX_INT
#if MAXARG_A > MAX_INT

So, to fix 4.0 alpha, just do

#define MAXARG_U        MAX_INT
#define MAXARG_S        MAX_INT
#define MAXARG_A        MAX_INT

--lhf