From: | "Rich Silva" <rich(dot)silva(at)softwareprose(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Errors compiling psqlodbc |
Date: | 2004-10-17 03:08:33 |
Message-ID: | 20041017030846.HRWC6960.lakecmmtao02.coxmail.com@CALICOBASS |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)postgresql(dot)org
[mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Rich Silva
Sent: Saturday, October 16, 2004 3:59 PM
To: pgsql-odbc(at)postgresql(dot)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);)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2004-10-17 07:23:30 | Re: Errors compiling psqlodbc |
Previous Message | Robert Treat | 2004-10-17 01:43:17 | Re: cannot connect from Windows 2000 |