Skip site navigation (1) Skip section navigation (2)

Re: Errors compiling psqlodbc

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: (view raw, whole thread or download thread mbox)
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

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


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);)


In response to

pgsql-odbc by date

Next:From: Peter EisentrautDate: 2004-10-17 07:23:30
Subject: Re: Errors compiling psqlodbc
Previous:From: Robert TreatDate: 2004-10-17 01:43:17
Subject: Re: cannot connect from Windows 2000

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group