RFC: Cygwin 64 bit?

Charles Wilson cygwin@cwilson.fastmail.fm
Tue Jun 28 19:35:00 GMT 2011


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.

That's would be a bug in the application, and it should be fixed.

But...somebody will have to do that work, for each/all of the named
apps.  And that takes time and effort.

However, I agree with the consensus that we should do things the linux
way -- this extra effort will just be one of the costs of that decision,
and we should tally up these known costs, as best we can, before
committing to the L[L]P64 project.  Just so we all recognize what we're
getting in to.

--
Chuck



More information about the Cygwin-developers mailing list