From: Andres Freund <andres@anarazel.de>
To: Paul Moore <paul.moore@centrify.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13788: compile error in generic_msvc.h
Date: Wed, 2 Dec 2015 17:50:26 +0100
Message-ID: <20151202165026.GK5136@alap3.anarazel.de> (raw)
In-Reply-To: <BN4PR07MB2131DF8027DFBFD628475070F10E0@BN4PR07MB2131.namprd07.prod.outlook.com>
References: <20151201165457.2760.18019@wrigleys.postgresql.org>
<5176.1449005701@sss.pgh.pa.us>
<BN4PR07MB2131DF8027DFBFD628475070F10E0@BN4PR07MB2131.namprd07.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2015-12-02 16:13:07 +0000, Paul Moore wrote:
> The 32 bit functions are defined on unsigned types
>
> From winbase.h
>
> FORCEINLINE
> unsigned
> InterlockedCompareExchange(
> _Inout_ _Interlocked_operand_ unsigned volatile *Destination,
> _In_ unsigned Exchange,
> _In_ unsigned Comperand
> )
> {
> return (unsigned) _InterlockedCompareExchange((volatile long*) Destination, (long) Exchange, (long) Comperand);
> }
>
> The cast fixes the 64 bit case.
>
> Full disclosure, I am compiling as c++. I think that might be the cause. I tried in a c project and did not get the same error
Given that win64 buildfarm members have happily been compiling this code
I suspect that's the cause. Are you including the headers with extern
"C" or not?
You're using SPI directly from C++? You got to be *very* careful doing
that - postgres uses longjmp which isn't necessarily compatible with C++
(doesn't call destructors to be called and such).
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, paul.moore@centrify.com, tgl@sss.pgh.pa.us
Subject: Re: BUG #13788: compile error in generic_msvc.h
In-Reply-To: <20151202165026.GK5136@alap3.anarazel.de>
References: <20151201165457.2760.18019@wrigleys.postgresql.org> <5176.1449005701@sss.pgh.pa.us> <BN4PR07MB2131DF8027DFBFD628475070F10E0@BN4PR07MB2131.namprd07.prod.outlook.com> <20151202165026.GK5136@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox