On 6/28/2011 2:49 PM, Corinna Vinschen wrote:
I still don't see the problem. In how far is it valid to assume that
sizeof(long) == sizeof(LONG)? long is a compiler intrinsic, LONG is
defined in a Windows header. I don't see that the SDK claims that
there's a guarantee that long == LONG. So, AFAICS, nothing speaks
against changing the w32api header to define LONG in a target dependent
way, for instance, and without gurantee for correctness:
#ifdef __X86_64__
typedef int LONG;
typedef unsigned int ULONG, DWORD;
#else
typedef long LONG;
typedef unsigned long ULONG, DWORD;
#endif
In principle, I agree with you. The worry is that one of the named apps
is explicitly, in its own code, currently using 'long' to hold a value,
which is passed to a w32api call where it gets converted (implicitly) to
a LONG, DWORD, or void*. Or vice versa.