From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A few warnings on Windows |
Date: | 2018-05-02 01:26:17 |
Message-ID: | CAEepm=0xscPGb=VORui=ikec5OJ17t4hJG5KjEJk7B2+wUAJXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, May 2, 2018 at 12:51 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Wed, May 2, 2018 at 11:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> We'll soon find out.
>
> Nope -- and I think that's because we only actually use stdbool.h
> instead of our own macros if we think sizeof(bool) is exactly 1. But
> we don't because pg_config.h.win32 says:
>
> #define SIZEOF_BOOL 0
>
> Perhaps that's what Peter E meant when he said "Windows could use some
> manual adjustments in pg_config.h.win32 if anyone
> cares"[1]. Should we just change this to 1? I'm going to go and test
> that now. From googling sizeof(bool) am aware that ancient VC (before
> 5.0 more than 20 years ago) had a header that defined bool as int, but
> that seems irrelevant now, right?
That compiles and runs the main checks (except tablespace which I
suppress) cleanly for me and I assume it really is using
stdbool.h this time. Hopefully plperl will be happier this way.
Since my earlier test, a new entirely independent warning arrived with
commit 41c912ca:
c:\projects\postgres\src\bin\pgbench\pgbench.c(2327): warning C4715:
'evalStandardFunc' : not all control paths return a value
[C:\projects\postgres\pgbench.vcxproj]
Patch for that attached, too.
--
Thomas Munro
http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0001-Change-SIZEOF_BOOL-to-1-for-Windows.patch | application/octet-stream | 978 bytes |
0002-Fix-compiler-warning-on-Windows.patch | application/octet-stream | 899 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2018-05-02 01:30:29 | Re: Is a modern build system acceptable for older platforms |
Previous Message | Amit Langote | 2018-05-02 01:11:13 | Re: Remove mention in docs that foreign keys on partitioned tables are not supported |