From: | Jeremy Drake <pgsql(at)jdrake(dot)com> |
---|---|
To: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Suppress compiler warnings on mingw |
Date: | 2008-03-14 15:40:30 |
Message-ID: | Pine.BSO.4.64.0803140836250.14567@resin.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Fri, 14 Mar 2008, ITAGAKI Takahiro wrote:
> DWORD is an alias for 'unsigned long' in 32bit Windows.
> Do you know how it defined in 64bit Windows?
sizeof(DWORD) is always 4, even on 64-bit windows. sizeof(long) is also
always 4. If you want the unsigned integral type that is the same size as
pointers, there are some MS-defined types you can use: DWORD_PTR,
LONG_PTR, ULONG_PTR. Or use the standard size_t and ptrdiff_t.
>
> Postgres requires sizeof(long) = sizeof(void *)
Which is why 64-bit windows is not supported. Hopefully at some point
someone can remove this restriction, but it is likely to be a major
undertaking...
>, 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
>
>
>
>
--
Worst Month of 1981 for Downhill Skiing:
August. The lines are the shortest, though.
-- Steve Rubenstein
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-03-14 15:49:48 | Re: pgbench not setting scale size correctly? |
Previous Message | Devrim GÜNDÜZ | 2008-03-14 15:31:07 | Re: minor init script fix |