pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rhys Ickeringill <rhysi@omnilink.com.au>
To: pgsql-odbc@postgresql.org
Subject: psqlodbc-08.00.0101 compile error
Date: Wed, 9 Mar 2005 11:43:06 +1100
Message-ID: <003e01c52440$f550fe80$1501a8c0@omnilink.com.au> (raw)

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




view thread (4+ messages)  latest in thread

Message-ID: <003e01c52440$f550fe80$1501a8c0@omnilink.com.au>
Permalink:  ../003e01c52440$f550fe80$1501a8c0@omnilink.com.au/
Also on:    postgresql.org/message-id/003e01c52440$f550fe80$1501a8c0@omnilink.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: rhysi@omnilink.com.au
  Subject: Re: psqlodbc-08.00.0101 compile error
  In-Reply-To: <003e01c52440$f550fe80$1501a8c0@omnilink.com.au>
  References: <003e01c52440$f550fe80$1501a8c0@omnilink.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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