Re: Compilation failure with nmake and MSTDC = no in HEAD - Mailing list pgsql-odbc

From Heikki Linnakangas
Subject Re: Compilation failure with nmake and MSTDC = no in HEAD
Date
Msg-id 54ABAD8B.8000205@vmware.com
Whole thread Raw
In response to Compilation failure with nmake and MSTDC = no in HEAD  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Compilation failure with nmake and MSTDC = no in HEAD  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-odbc
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



pgsql-odbc by date:

Previous
From: Michael Paquier
Date:
Subject: Compilation failure with nmake and MSTDC = no in HEAD
Next
From: Michael Paquier
Date:
Subject: Re: Compilation failure with nmake and MSTDC = no in HEAD