pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Page <dpage@vale-housing.co.uk>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Does postgresql-odbc work on 64-bit platforms?
Date: Thu, 15 Dec 2005 21:47:33 -0500
Message-ID: <19500.1134701253@sss.pgh.pa.us> (raw)
In-Reply-To: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4E7E9D3@ratbert.vale-housing.co.uk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4E7E9D3@ratbert.vale-housing.co.uk>

"Dave Page" <dpage@vale-housing.co.uk> writes:
>> I just had occasion to build 08.01.0102 on an x86_64 machine, and I
>> noted quite a large number of warnings about "cast from pointer to
>> integer of different size" and vice versa.  These are pretty scary.

> If you can help (or can find some Redhat manpower) that would be
> appreciated - I certainly don't have a 64 bit box right now and am
> pretty thin on time as well having committed myself to too many
> projects. Again. :-(

I looked over the warnings and they all seem to arise from casting
pointers to or from SQLUINTEGER.  I presume the latter is meant to
be 32 bits, so the failure on 64-bit machines is hardly surprising.
It's not clear to me what the appropriate fixes are --- fixing this
appears to require changing the APIs of the functions involved, and
I don't know what the ramifications would be.

I've attached a list of the current warnings (current as of 08.01.0102
sources).

The two warnings in PGAPI_SetConnectOption definitely look like crash
cases to me.  The others might be fixable by changing, eg,
            if ((SQLUINTEGER) Value == SQL_OV_ODBC2)
to
            if (Value == (PTR) SQL_OV_ODBC2)

			regards, tom lane


options.c: In function 'PGAPI_SetConnectOption':
options.c:494: warning: cast to pointer from integer of different size
options.c:500: warning: cast to pointer from integer of different size
odbcapi30.c: In function 'SQLSetEnvAttr':
odbcapi30.c:425: warning: cast from pointer to integer of different size
odbcapi30.c:446: warning: cast from pointer to integer of different size
odbcapi30.c:453: warning: cast from pointer to integer of different size
pgapi30.c: In function 'ARDSetField':
pgapi30.c:479: warning: cast from pointer to integer of different size
pgapi30.c:488: warning: cast from pointer to integer of different size
pgapi30.c:491: warning: cast from pointer to integer of different size
pgapi30.c:536: warning: cast from pointer to integer of different size
pgapi30.c:545: warning: cast from pointer to integer of different size
pgapi30.c:561: warning: cast from pointer to integer of different size
pgapi30.c:578: warning: cast from pointer to integer of different size
pgapi30.c:581: warning: cast from pointer to integer of different size
pgapi30.c:584: warning: cast from pointer to integer of different size
pgapi30.c: In function 'APDSetField':
pgapi30.c:654: warning: cast from pointer to integer of different size
pgapi30.c:663: warning: cast from pointer to integer of different size
pgapi30.c:666: warning: cast from pointer to integer of different size
pgapi30.c:686: warning: cast from pointer to integer of different size
pgapi30.c:695: warning: cast from pointer to integer of different size
pgapi30.c:711: warning: cast from pointer to integer of different size
pgapi30.c:724: warning: cast from pointer to integer of different size
pgapi30.c:730: warning: cast from pointer to integer of different size
pgapi30.c:733: warning: cast from pointer to integer of different size
pgapi30.c: In function 'IPDSetField':
pgapi30.c:819: warning: cast from pointer to integer of different size
pgapi30.c:827: warning: cast from pointer to integer of different size
pgapi30.c:846: warning: cast from pointer to integer of different size
pgapi30.c:855: warning: cast from pointer to integer of different size
pgapi30.c:871: warning: cast from pointer to integer of different size
pgapi30.c:874: warning: cast from pointer to integer of different size
pgapi30.c:877: warning: cast from pointer to integer of different size
pgapi30.c: In function 'PGAPI_SetConnectAttr':
pgapi30.c:1550: warning: cast from pointer to integer of different size
pgapi30.c:1560: warning: cast from pointer to integer of different size
pgapi30.c: In function 'PGAPI_SetStmtAttr':
pgapi30.c:1697: warning: cast from pointer to integer of different size
pgapi30.c:1726: warning: cast from pointer to integer of different size
pgapi30.c:1738: warning: cast from pointer to integer of different size
pgapi30.c:1753: warning: cast from pointer to integer of different size
pgapi30.c:1756: warning: cast from pointer to integer of different size



view thread (11+ messages)  latest in thread

Message-ID: <19500.1134701253@sss.pgh.pa.us>
Permalink:  ../19500.1134701253@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19500.1134701253@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dpage@vale-housing.co.uk
  Subject: Re: Does postgresql-odbc work on 64-bit platforms?
  In-Reply-To: <19500.1134701253@sss.pgh.pa.us>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4E7E9D3@ratbert.vale-housing.co.uk> <19500.1134701253@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox