pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
OSX ?
3+ messages / 3 participants
[nested] [flat]

* OSX ?
@ 2005-11-14 19:42  Horacio Samaniego <Horacio@unm.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: Horacio Samaniego @ 2005-11-14 19:42 UTC (permalink / raw)
  To: 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

http://www.unm.edu/~horacio






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

* Re: OSX ?
@ 2005-11-15 03:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Horacio Samaniego <Horacio@unm.edu>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-11-15 03:02 UTC (permalink / raw)
  To: Horacio Samaniego <Horacio@unm.edu>; +Cc: pgsql-odbc

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



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

* Re: OSX ?
@ 2005-11-15 08:30  Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Page @ 2005-11-15 08:30 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Horacio Samaniego <Horacio@unm.edu>; +Cc: pgsql-odbc

 

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org 
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Tom Lane
> Sent: 15 November 2005 03:03
> To: Horacio Samaniego
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] OSX ? 
> 
> 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.

On Windows in SQLTypes we have:

typedef long            SQLINTEGER;
typedef unsigned long   SQLUINTEGER;

And

typedef long int                SDWORD;
typedef unsigned long int       UDWORD;

In this case I'd tend to go with Microsoft's definitions given that it's
their spec.

I do intend to work on porting psqlODBC to OSX in the not-to-distant
future, however it's not going to be right away I'm afraid, and for the
moment it will only be on Panther (which doesn't support Unicode ODBC).

Regards, Dave.



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


end of thread, other threads:[~2005-11-15 08:30 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-14 19:42 OSX ? Horacio Samaniego <Horacio@unm.edu>
2005-11-15 03:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-11-15 08:30 Re: OSX ? Dave Page <dpage@vale-housing.co.uk>

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