Lists: | pgsql-odbc |
---|
From: | "Rhys Ickeringill" <rhysi(at)omnilink(dot)com(dot)au> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | psqlodbc-08.00.0101 compile error |
Date: | 2005-03-09 00:43:06 |
Message-ID: | 003e01c52440$f550fe80$1501a8c0@omnilink.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | "Rhys Ickeringill" <rhysi(at)omnilink(dot)com(dot)au> |
Cc: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: psqlodbc-08.00.0101 compile error |
Date: | 2005-03-18 15:43:47 |
Message-ID: | 200503181643.48114.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Am Mittwoch, 9. März 2005 01:43 schrieb Rhys Ickeringill:
> 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 )
Both Microsoft and unixODBC agree with our version, and the SQL standard says
it's SQLINTEGER *, so I'm afraid iODBC loses this vote.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | tomas(at)nocrew(dot)org (Tomas =?iso-8859-1?q?Sk=E4re?=) |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | "Rhys Ickeringill" <rhysi(at)omnilink(dot)com(dot)au>, pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: psqlodbc-08.00.0101 compile error |
Date: | 2005-03-19 09:42:23 |
Message-ID: | 80is3ormyo.fsf@junk.nocrew.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Mittwoch, 9. März 2005 01:43 schrieb Rhys Ickeringill:
> > from psqlodbc-08.00.0101's odbcapi30w.c :
> >
> > SQLPOINTER pNumAttr )
> >
> > from libiodbc-3.52.2's sqlucode.h (included by odbcapi30w.c) :
> >
> > SQLLEN *pNumAttr )
>
> Both Microsoft and unixODBC agree with our version, and the SQL standard says
> it's SQLINTEGER *, so I'm afraid iODBC loses this vote.
May I suggest an #ifdef WITH_IODBC around it?
Tomas
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tomas Skäre <tomas(at)nocrew(dot)org> |
Cc: | "Rhys Ickeringill" <rhysi(at)omnilink(dot)com(dot)au>, pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: psqlodbc-08.00.0101 compile error |
Date: | 2005-03-19 11:48:25 |
Message-ID: | 200503191248.26024.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Tomas Skäre wrote:
> > Both Microsoft and unixODBC agree with our version, and the SQL
> > standard says it's SQLINTEGER *, so I'm afraid iODBC loses this
> > vote.
>
> May I suggest an #ifdef WITH_IODBC around it?
That would be the easy way out. There are, however, two arguments
against that:
1. Previous iODBC releases apparently got this right, so we might be
breaking those releases.
2. Using SQLLEN for an attribute number is just plain wrong.
I suggest that those interested in this issue first contact the iODBC
authors and check why it was done this way.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/