pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psqlodbc-08.00.0101 compile error
4+ messages / 3 participants
[nested] [flat]

* psqlodbc-08.00.0101 compile error
@ 2005-03-09 00:43 Rhys Ickeringill <rhysi@omnilink.com.au>
  2005-03-18 15:43 ` Re: psqlodbc-08.00.0101 compile error Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Rhys Ickeringill @ 2005-03-09 00:43 UTC (permalink / raw)
  To: 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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psqlodbc-08.00.0101 compile error
  2005-03-09 00:43 psqlodbc-08.00.0101 compile error Rhys Ickeringill <rhysi@omnilink.com.au>
@ 2005-03-18 15:43 ` Peter Eisentraut <peter_e@gmx.net>
  2005-03-19 09:42   ` Re: psqlodbc-08.00.0101 compile error Tomas Skäre <tomas@nocrew.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Peter Eisentraut @ 2005-03-18 15:43 UTC (permalink / raw)
  To: Rhys Ickeringill <rhysi@omnilink.com.au>; +Cc: 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/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psqlodbc-08.00.0101 compile error
  2005-03-09 00:43 psqlodbc-08.00.0101 compile error Rhys Ickeringill <rhysi@omnilink.com.au>
  2005-03-18 15:43 ` Re: psqlodbc-08.00.0101 compile error Peter Eisentraut <peter_e@gmx.net>
@ 2005-03-19 09:42   ` Tomas Skäre <tomas@nocrew.org>
  2005-03-19 11:48     ` Re: psqlodbc-08.00.0101 compile error Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: tomas@nocrew.org @ 2005-03-19 09:42 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Rhys Ickeringill <rhysi@omnilink.com.au>; pgsql-odbc

Peter Eisentraut <peter_e@gmx.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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psqlodbc-08.00.0101 compile error
  2005-03-09 00:43 psqlodbc-08.00.0101 compile error Rhys Ickeringill <rhysi@omnilink.com.au>
  2005-03-18 15:43 ` Re: psqlodbc-08.00.0101 compile error Peter Eisentraut <peter_e@gmx.net>
  2005-03-19 09:42   ` Re: psqlodbc-08.00.0101 compile error Tomas Skäre <tomas@nocrew.org>
@ 2005-03-19 11:48     ` Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Eisentraut @ 2005-03-19 11:48 UTC (permalink / raw)
  To: Tomas Skäre <tomas@nocrew.org>; +Cc: Rhys Ickeringill <rhysi@omnilink.com.au>; 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/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-03-19 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 00:43 psqlodbc-08.00.0101 compile error Rhys Ickeringill <rhysi@omnilink.com.au>
2005-03-18 15:43 ` Peter Eisentraut <peter_e@gmx.net>
2005-03-19 09:42   ` Tomas Skäre <tomas@nocrew.org>
2005-03-19 11:48     ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox