Lists: | pgsql-odbc |
---|
From: | Horacio Samaniego <Horacio(at)unm(dot)edu> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | OSX ? |
Date: | 2005-11-14 19:42:38 |
Message-ID: | 3462C06D-E841-49BD-9C04-6606149FFEA5@unm.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Hi,
I 've tried to compile psqlODBC from ftp://ftp.postgresql.org/pub/
odbc/versions/src/psqlodbc-08.01.0101.tar.gz with no success... On
OSX (tiger)...
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/pgsql/include -g -O2 -
MT bind.lo -MD -MP -MF .deps/bind.Tpo -c bind.c -fno-common -DPIC -
o .libs/bind.o
bind.c:42: error: conflicting types for 'PGAPI_BindParameter'
pgapifunc.h:263: error: previous declaration of 'PGAPI_BindParameter'
was here
bind.c:144: error: conflicting types for 'PGAPI_BindCol'
pgapifunc.h:30: error: previous declaration of 'PGAPI_BindCol' was here
bind.c:285: error: conflicting types for 'PGAPI_DescribeParam'
pgapifunc.h:174: error: previous declaration of 'PGAPI_DescribeParam'
was here
bind.c:338: error: conflicting types for 'PGAPI_ParamOptions'
pgapifunc.h:212: error: previous declaration of 'PGAPI_ParamOptions'
was here
make[1]: *** [bind.lo] Error 1
make: *** [all] Error 2
any sugestion?
thanks
H
--
Horacio Samaniego
Dep Biology
University of New Mexico
Albuquerque 87106, NM
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Horacio Samaniego <Horacio(at)unm(dot)edu> |
Cc: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: OSX ? |
Date: | 2005-11-15 03:02:39 |
Message-ID: | 5615.1132023759@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Horacio Samaniego <Horacio(at)unm(dot)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