lua-users home
lua-l archive

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

Why would it be ULL (unsigned long long)? It's just UL (unsigned long).
This matches the def. name ULONG.

On 27.11.22 17:46, bil til wrote:
Am So., 27. Nov. 2022 um 12:40 Uhr schrieb Alexander Riegler
To test c89 compatibility, i wanted to compile lua 5.4.4 on a very old version  of MSVC. The compiler complains about the line 270 of lmathlib.c "#if (ULONG_MAX>>31>>31)>=3" with "Fatal error C1012:
In limits.h ULONG_MAX is defined like this:

#if __sizeof_long == 8
   #define ULONG_MAX 0xffffffffffffffffUL
   #define ULONG_MAX 0xffffffffUL

The first case looks weird to me ... I think this should write
#define ULONG_MAX 0xffffffffffffffffULL (ULL instead of UL).