On Tue, Apr 28, 2020 at 2:50 PM Chip Davis cdavis@codeweavers.com wrote:
April 28, 2020 2:39 PM, "Alex Henrie" alexhenrie24@gmail.com wrote:
On Tue, Apr 28, 2020 at 1:16 PM Chip Davis cdavis@codeweavers.com wrote:
April 28, 2020 2:15 PM, "Alex Henrie" alexhenrie24@gmail.com wrote:
This might be a dumb question, but why not define LONG to be int32_t on all platforms?
Uhh, because 'int32_t' isn't necessarily 'long' on Windows?
According to MSDN, LONG is a 32-bit signed integer.[1] Is the problem that if a program uses LONG in a function declaration and then long in the function definition, it wouldn't compile if LONG is defined to be int, even on a 32-bit MSVC-like platform where both int and long represent 32-bit signed integers?
Pretty much. Well that, and you'll see warnings if you use an expression of type 'LONG' with a printf(3) format spec like "%ld".
That makes sense. Thanks for the explanation!
-Alex