Re: Windows 64 bit warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Windows 64 bit warnings
Date
Msg-id 1626.1303224115@sss.pgh.pa.us
Whole thread Raw
In response to Re: Windows 64 bit warnings  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> If we cast the HANDLE to a long long first and then truncate it the 
> compiler is silent, it only complains if that's done in one operation.

> So maybe something like:

>     #ifdef WIN64
>     #define ULONGPID(x) (unsigned long) (unsigned long long) (x)
>     #else
>     #define ULONGPID(x) (unsigned long) (x)
>     #endif

... with a comment, please.  Perhaps
   #ifdef WIN64   /* need a series of two casts to convert HANDLE without compiler warning */   #define ULONGPID(x)
(unsignedlong) (unsigned long long) (x)   #else   #define ULONGPID(x) (unsigned long) (x)   #endif
 
        regards, tom lane


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: pgbench \for or similar loop
Next
From: "Kevin Grittner"
Date:
Subject: Build farm coverage for isolation tests