This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Cygwin 64 bit?


On 01/18/2012 11:54 AM, Corinna Vinschen wrote:
> Apart from the fact that Microsoft defines DWORD as unsigned long, which leads to 
> the question how close to the orignal source the Mingw64 headers are supposed to be,

Okay question on LP64 mode, but there are no original LLP64 sources, though, and
there likely won't be.

> there's also the problem that not all Windows functions and struct/union definitions
> use the Windows types.  For example the esent.h header defines the
> struct JET_SIGNATURE like this:
> 
>   typedef struct _JET_SIGNATURE {
>     unsigned long ulRandom;
>     JET_LOGTIME logtimeCreate;
>     char szComputerName[JET_MAX_COMPUTERNAME_LENGTH + 1];
>   } JET_SIGNATURE;
> 
> and this is equivalent to how it's defined in the Visual C++ header.
> So, just redefining LONG, ULONG, DWORD, etc is only half the solution
> unfortunately.

With the pragma, I think you'd still get a -Wall/-Wformat warning
in LLP64 for

 JET_SIGNATURE js;
 printf ("%ld", fs.ulRandom);

so you can't have a perfect match, and some things will always
need adjustment.  The question is then, is

#if LLP64
     unsigned int ulRandom;
#else
     unsigned long ulRandom;
#endif

any worse?

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]