[PATCH 2/2] include: Use long for LONG type on Windows targets iff not building Wine.

Alex Henrie alexhenrie24 at gmail.com
Tue Apr 28 14:39:37 CDT 2020


On Tue, Apr 28, 2020 at 1:16 PM Chip Davis <cdavis at codeweavers.com> wrote:
>
> April 28, 2020 2:15 PM, "Alex Henrie" <alexhenrie24 at 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?

-Alex

[1] https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types



More information about the wine-devel mailing list