Re: Windows 64 bit warnings

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Windows 64 bit warnings
Дата
Msg-id
1626.1303224115@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Windows 64 bit warnings Andrew Dunstan <andrew@dunslane.net>
Re: Windows 64 bit warnings Alvaro Herrera <alvherre@commandprompt.com>
Re: Windows 64 bit warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows 64 bit warnings Magnus Hagander <magnus@hagander.net>
Re: Windows 64 bit warnings Andrew Dunstan <andrew@dunslane.net>
Re: Windows 64 bit warnings Tom Lane <tgl@sss.pgh.pa.us>
Re: Windows 64 bit warnings Michael Meskes <meskes@postgresql.org>
Re: Windows 64 bit warnings Michael Meskes <meskes@postgresql.org>
Andrew Dunstan  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) (unsigned long) (unsigned long long) (x)   #else   #define ULONGPID(x) (unsigned long) (x)   #endif
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: David Fetter
Дата:
От: Kevin Grittner
Дата:
FAQ