On Thu, Jul 30, 2020 at 12:04 PM Derrick Stolee <stolee@xxxxxxxxx> wrote: > > This is actually ((1 << 31) - 1) because "unsigned long" is 32-bits > > on Windows. But it's better to not use magic numbers and instead use > > operations like this. > > Nevermind. This breaks the build on 32-bit machines (even adding a few > "L" characters). I'll replace my magic decimal number with a magic > hexadecimal number. You would need something along these lines: #define WHATEVER ((long)((1UL << 31) - 1)) i.e., make the constant 1 be "unsigned long" so that the shift is well defined, then subtract 1, then convert back to signed long. I say "something along" because there are several more ways to write it. I'm not really a big fan of most of them, and 0x7FFFFFFF (or in lowercase) is my own preference here too. Chris