Re: Errors compiling psqlodbc

Поиск
Список
Период
Сортировка
От Rich Silva
Тема Re: Errors compiling psqlodbc
Дата
Msg-id 20041017030846.HRWC6960.lakecmmtao02.coxmail.com@CALICOBASS
обсуждение исходный текст
Ответ на Errors compiling psqlodbc  ("Rich Silva" <rich.silva@softwareprose.com>)
Список pgsql-odbc

A follow up on the four errors in convert.c…

 

Checking on what’s defined and what’s not… Here is some data… I’m a little confused and the code looks, well, lets call it interesting…

 

#ifdef GCC (its defined)

isqlext.h:           typedef long long int ODBCINT64;

isqlext.h:           typedef ODBCINT64 SQLBIGINT;

 

#ifdef ODBCINT64 (its defined)

#ifdef HAVE_STRTOLL (its defined)

convert.c:         #define ATOI64(val)     strtoll(val, NULL, 10)

 

(from the man page for strtoll())

long long int strtoll(const char *nptr, char **endptr, int base);

 

The original line is:

*((SQLBIGINT *) rgbValueBindRow) = ATOI64(neut_str);

 

The turns into (once you replace typedef’d and defined stuff with their equivalents:

const char *neut_str;

char *rgbValueBindRow;

*(( long long int *) rgbValueBindRow) = (long long int) strtoll (neut_str, NULL, 10);

 

I don’t like the left hand term at all, but its “form” is generally in use “up and down” this same method…

 

 


From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Rich Silva
Sent: Saturday, October 16, 2004 3:59 PM
To: pgsql-odbc@postgresql.org
Subject: [ODBC] Errors compiling psqlodbc

 

 

Hmmm, I was building the latest (07.03.0200) sources for a Linux system and I found first one then another issue…

  

./configure --with-unixodbc --prefix=/usr --sysconfdir=/etc --with-odbcver=0x0300 

 

Second issue (and still diagnosing), once I’ve configured with that define the project will not compile, generating the following errors:

convert.c: In function `copy_and_convert_field':

convert.c:1194: incompatible types in assignment

convert.c:1196: incompatible types in assignment

convert.c:1202: incompatible types in assignment

convert.c:1204: incompatible types in assignment

(example line: *((SQLBIGINT *) rgbValueBindRow) = ATOI64(neut_str);)

 

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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: cannot connect from Windows 2000
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Errors compiling psqlodbc