Re: A few warnings on Windows - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: A few warnings on Windows
Date
Msg-id CAEepm=0xscPGb=VORui=ikec5OJ17t4hJG5KjEJk7B2+wUAJXA@mail.gmail.com
Whole thread Raw
In response to Re: A few warnings on Windows  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: A few warnings on Windows
List pgsql-hackers
On Wed, May 2, 2018 at 12:51 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Wed, May 2, 2018 at 11:39 AM, Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Next
From: Andrew Dunstan
Date:
Subject: Re: Is a modern build system acceptable for older platforms