Re: Errors compiling psqlodbc - Mailing list pgsql-odbc

From Rich Silva
Subject Re: Errors compiling psqlodbc
Date
Msg-id 20041017030846.HRWC6960.lakecmmtao02.coxmail.com@CALICOBASS
Whole thread Raw
In response to Errors compiling psqlodbc  ("Rich Silva" <rich.silva@softwareprose.com>)
List 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 by date:

Previous
From: Robert Treat
Date:
Subject: Re: cannot connect from Windows 2000
Next
From: Peter Eisentraut
Date:
Subject: Re: Errors compiling psqlodbc