Re: pgsql: Refactor libpqwalreceiver

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Refactor libpqwalreceiver
Date: 2016-12-02 11:40:00
Message-ID: 123cf50a-7b4d-34e4-2045-df58b0352d92@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 02/12/16 05:17, Alvaro Herrera wrote:
> Tom Lane wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> Refactor libpqwalreceiver
>>
>> Buildfarm results indicate this broke the Windows build.
>
> src/backend/replication/walreceiver.c(296): error C2039: 'pgwin32_connect' : is not a member of 'WalReceiverFunctionsType' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> c:\prog\bf\root\HEAD\pgsql.build\src\include\replication/walreceiver.h(163) : see declaration of 'WalReceiverFunctionsType'
> src/backend/replication/walreceiver.c(1152): warning C4003: not enough actual parameters for macro 'send' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> src/backend/replication/walreceiver.c(1152): error C2039: 'pgwin32_send' : is not a member of 'WalReceiverFunctionsType' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> c:\prog\bf\root\HEAD\pgsql.build\src\include\replication/walreceiver.h(163) : see declaration of 'WalReceiverFunctionsType'
> src/backend/replication/walreceiver.c(1152): error C2059: syntax error : ')' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> src/backend/replication/walreceiver.c(1230): warning C4003: not enough actual parameters for macro 'send' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> src/backend/replication/walreceiver.c(1230): error C2039: 'pgwin32_send' : is not a member of 'WalReceiverFunctionsType' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
> c:\prog\bf\root\HEAD\pgsql.build\src\include\replication/walreceiver.h(163) : see declaration of 'WalReceiverFunctionsType'
> src/backend/replication/walreceiver.c(1230): error C2059: syntax error : ')' [c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]
>
> That's because win32.h has this line:
>
> #define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
>
> which breaks the use of "connect" as a struct member name (same with send).
> The easiest fix seems to rename the struct members.
>

Hi,

Yes, that seems to be the case.

Something as simple as attached should do.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
Prefix-WalReceiverFunctionsType-members-with-walrcv_.patch application/x-patch 3.3 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2016-12-02 12:41:41 pgsql: Fix Windows build for 78c8c814390f
Previous Message Alvaro Herrera 2016-12-02 04:17:47 Re: pgsql: Refactor libpqwalreceiver