X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4116B9DCCB9 for ; Thu, 15 Dec 2005 22:47:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35876-07 for ; Thu, 15 Dec 2005 22:47:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id EB4389DCBE1 for ; Thu, 15 Dec 2005 22:47:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jBG2lXBj019501; Thu, 15 Dec 2005 21:47:33 -0500 (EST) To: "Dave Page" cc: pgsql-odbc@postgresql.org Subject: Re: Does postgresql-odbc work on 64-bit platforms? In-reply-to: References: Comments: In-reply-to "Dave Page" message dated "Thu, 15 Dec 2005 08:53:47 +0000" Date: Thu, 15 Dec 2005 21:47:33 -0500 Message-ID: <19500.1134701253@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.002 required=5 tests=[AWL=0.002] X-Spam-Score: 0.002 X-Spam-Level: X-Archive-Number: 200512/198 X-Sequence-Number: 6677 "Dave Page" 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