Re: OSX ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: OSX ?
Дата
Msg-id 5615.1132023759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на OSX ?  (Horacio Samaniego <Horacio@unm.edu>)
Список 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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Horacio Samaniego
Дата:
Сообщение: OSX ?
Следующее
От: "Anoop Kumar"
Дата:
Сообщение: Re: Recommended ODBC version for compilation