Thread: Compilation failure with nmake and MSTDC = no in HEAD

Compilation failure with nmake and MSTDC = no in HEAD

From
Michael Paquier
Date:
Hi all,

I noticed that the build with nmake is broken when using MSDTC = no
becaus of e85fbb (libpq switch):
setup.c(448) : warning C4013: 'CALL_GetTransactionObject' undefined;
assuming extern returning int
setup.c(448) : warning C4047: '=' : 'void *' differs in levels of
indirection from 'int'
setup.c(465) : warning C4013: 'CALL_ReleaseTransactionObject'
undefined; assuming extern returning int
Attached is a patch fixing the problem, simplifying at the same time
test_connection in setup.c where I think the boolean flag withDtc is
not needed.
Regards,
--
Michael

Attachment

Re: Compilation failure with nmake and MSTDC = no in HEAD

From
Heikki Linnakangas
Date:
On 01/06/2015 07:30 AM, Michael Paquier wrote:
> Hi all,
>
> I noticed that the build with nmake is broken when using MSDTC = no
> becaus of e85fbb (libpq switch):
> setup.c(448) : warning C4013: 'CALL_GetTransactionObject' undefined;
> assuming extern returning int
> setup.c(448) : warning C4047: '=' : 'void *' differs in levels of
> indirection from 'int'
> setup.c(465) : warning C4013: 'CALL_ReleaseTransactionObject'
> undefined; assuming extern returning int
> Attached is a patch fixing the problem, simplifying at the same time
> test_connection in setup.c where I think the boolean flag withDtc is
> not needed.

That's not right. The withDtc parameter indicates whether the
test_connection function is supposed to test enlistment with DTC or not.
When you click the "Test" button on the main page on the configuration
dialog, it's supposed to just test connecting, not DTC enlistment. When
you click "Test" on the 3rd page in the "Datasource" settings dialog,
then and only then it's supposed to test DTC enlistment. With your
patch, it will always test enlistment if the driver supports it.

I put a simple #ifdef in the withDtc block in test_connection instead.
The build works now.

- Heikki



Re: Compilation failure with nmake and MSTDC = no in HEAD

From
Michael Paquier
Date:
On Tue, Jan 6, 2015 at 6:40 PM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
> I put a simple #ifdef in the withDtc block in test_connection instead. The
> build works now.
Cool. Thanks!
--
Michael