[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strange error with 5.4 random generator on old compiler
- From: Steffen Nurpmeso <steffen@...>
- Date: Sun, 04 Dec 2022 00:10:16 +0100
Steffen Nurpmeso wrote in
<20221203205453.zOTwX%steffen@sdaoden.eu>:
...
|For the other one i think i would go for LONG_MAX and INT_MAX,
|which surely are both usable in preprocessor; from
...
|to
...
| # if LUAI_IS32INT && LONG_MAX != INT_MAX
| /* 'long' has at least 64 bits */
This assumes that 16-bit platforms are not supported, of course.
It is a bit flaky anyhow and will need adjustments for possible
128-bit platforms. (I track some MLs, and i think on FreeBSD in
commit messages, or -hackers@, or -current@, i saw the one or the
other statement towards awareness of integer types and 128-bit.)
Maybe add another #if to check whether int itself is 64-bit.
Ciao (now silent),
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)