psqlodbc-08.00.0101 compile error - Mailing list pgsql-odbc

From Rhys Ickeringill
Subject psqlodbc-08.00.0101 compile error
Date
Msg-id 003e01c52440$f550fe80$1501a8c0@omnilink.com.au
Whole thread Raw
Responses Re: psqlodbc-08.00.0101 compile error
List pgsql-odbc
Hi

I've just unsuccesfully attempted to build psqlodbc-08.00.0101 on my linux
system and have got a compile error in odbcapi30w.c. I must add that I'm not
certain this is psqlodbc's problem, it may belong to iODBC...

The function 'SQLColAttributeW' signature in this file differs from the one
in "sqlucode.h" provided by libiodbc-3.52.2. Specifically, the final
parameter 'pNumAttr' definitions don't match. GCC-3.3.4 is pulling this up
as an error.

from psqlodbc-08.00.0101's odbcapi30w.c :

RETCODE SQL_API SQLColAttributeW(
    SQLHSTMT hstmt,
    SQLUSMALLINT iCol,
    SQLUSMALLINT iField,
    SQLPOINTER pCharAttr,
    SQLSMALLINT cbCharAttrMax,
    SQLSMALLINT *pcbCharAttr,
    SQLPOINTER pNumAttr )

from libiodbc-3.52.2's sqlucode.h (included by odbcapi30w.c) :

RETCODE SQL_API SQLColAttributeW(
    SQLHSTMT hstmt,
    SQLUSMALLINT iCol,
    SQLUSMALLINT iField,
    SQLPOINTER pCharAttr,
    SQLSMALLINT cbCharAttrMax,
    SQLSMALLINT *pcbCharAttr,
    SQLLEN *pNumAttr )

In libiodbc-3.52.2's sqltypes.h SQLLEN is #defined as a long, SQLPOINTER is
typedefed to void*, hence the compiler's complaint - "conflicting types for
SQLColAttributeW"

Perhaps also of concern is that within SQLColAttributeW, pNumAttr is then
passed to a function (PGAPI_ColumnPrivileges) expecting a SQLINTEGER*.

Regards,

Rhys


pgsql-odbc by date:

Previous
From: "Azar Sadigh-Ulrich"
Date:
Subject: using postgres-odbc with DBDesigner4
Next
From: Andrew
Date:
Subject: cannt compile from sources