Skip site navigation (1) Skip section navigation (2)

Re: Suppress compiler warnings on mingw

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Suppress compiler warnings on mingw
Date: 2008-03-14 05:34:49
Message-ID: (view raw or whole thread)
Lists: pgsql-patches
Peter Eisentraut <peter_e(at)gmx(dot)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.

ITAGAKI Takahiro
NTT Open Source Software Center

In response to


pgsql-patches by date

Next:From: Tucker, JamesDate: 2008-03-14 06:20:18
Subject: minor init script fix
Previous:From: Peter EisentrautDate: 2008-03-14 04:40:45
Subject: Re: Suppress compiler warnings on mingw

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group