psqlodbc-08.00.0101 compile error

Поиск
Список
Период
Сортировка
От Rhys Ickeringill
Тема psqlodbc-08.00.0101 compile error
Дата
Msg-id 003e01c52440$f550fe80$1501a8c0@omnilink.com.au
обсуждение исходный текст
Ответы Re: psqlodbc-08.00.0101 compile error  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: "Azar Sadigh-Ulrich"
Дата:
Сообщение: using postgres-odbc with DBDesigner4
Следующее
От: Andrew
Дата:
Сообщение: cannt compile from sources