Re: Suppress compiler warnings on mingw

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Suppress compiler warnings on mingw
Дата
Msg-id 20080314141544.63DB.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Suppress compiler warnings on mingw  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Suppress compiler warnings on mingw  (Jeremy Drake <pgsql@jdrake.com>)
Re: Suppress compiler warnings on mingw  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
Peter Eisentraut <peter_e@gmx.net> wrote:

> ITAGAKI Takahiro wrote:
> > - Cast DWORD to unsigned integer explicitly.
> >     DWORD is always 32bit integer on both 32bit and 64bit Windows.
>
> I think if that is so, you wouldn't need to add any casts.  Instead you would
> only need to use the right format specifier.

DWORD is an alias for 'unsigned long' in 32bit Windows.
Do you know how it defined in 64bit Windows?

Postgres requires sizeof(long) = sizeof(void *), but sizeof(DWORD) is
always 4. I fear the formatter for long integer might be broken
in 64bit platform.

If we could expect C99 is always available, 'PRIu32' would be the best choice.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



В списке pgsql-patches по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Suppress compiler warnings on mingw
Следующее
От: "Tucker, James"
Дата:
Сообщение: minor init script fix