Re: BUG #13788: compile error in generic_msvc.h

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #13788: compile error in generic_msvc.h
Дата
Msg-id 20151202165026.GK5136@alap3.anarazel.de
обсуждение исходный текст
Ответ на BUG #13788: compile error in generic_msvc.h  (paul.moore@centrify.com)
Ответы Re: BUG #13788: compile error in generic_msvc.h  (Paul Moore <paul.moore@centrify.com>)
Список pgsql-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
sameerror 

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).

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13789: pg_admin produces table definitiona instead of a view
Следующее
От: Alex Maslennikov
Дата:
Сообщение: Re: BUG #13789: pg_admin produces table definitiona instead of a view