pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Horacio Samaniego <Horacio@unm.edu>
Cc: pgsql-odbc@postgresql.org
Subject: Re: OSX ?
Date: Mon, 14 Nov 2005 22:02:39 -0500
Message-ID: <5615.1132023759@sss.pgh.pa.us> (raw)
In-Reply-To: <3462C06D-E841-49BD-9C04-6606149FFEA5@unm.edu>
References: <3462C06D-E841-49BD-9C04-6606149FFEA5@unm.edu>

Horacio Samaniego <Horacio@unm.edu> writes:
> I 've tried to compile psqlODBC from  ftp://ftp.postgresql.org/pub/ 
> odbc/versions/src/psqlodbc-08.01.0101.tar.gz  with no success...

Hm, it fails for me too.  I'm not sure if it's OS X's fault or
psqlodbc's fault, but the problem seems to be here:

pgapifunc.h declares PGAPI_BindParameter as taking

     SQLUINTEGER cbColDef,
     ...
     SQLINTEGER cbValueMax,
     SQLINTEGER *pcbValue);

The actual definition of PGAPI_BindParameter in bind.c uses different
typedefs:

     UDWORD cbColDef,
     ...
     SDWORD cbValueMax,
     SDWORD * pcbValue)

Darwin's /usr/include/sqltypes.h has

/*
 *  API declaration data types
 */
typedef signed int              SQLINTEGER;
typedef unsigned int            SQLUINTEGER;

/*
 *  SQL portable types for C
 */
typedef long int                SDWORD;
typedef unsigned long int       UDWORD;

and gcc is entirely within its rights to complain that "int" != "long int".

*Somebody* is not on the right page here.  I would tend to fault
psqlodbc for inconsistent declarations, but if it works on other
platforms (as it seems to) maybe there is a general convention
that SQLINTEGER == SDWORD etc?  If so, Apple didn't get the word.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <5615.1132023759@sss.pgh.pa.us>
Permalink:  ../5615.1132023759@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5615.1132023759@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, Horacio@unm.edu
  Subject: Re: OSX ?
  In-Reply-To: <5615.1132023759@sss.pgh.pa.us>
  References: <3462C06D-E841-49BD-9C04-6606149FFEA5@unm.edu> <5615.1132023759@sss.pgh.pa.us>

* 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