X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7B9B053AE1 for ; Fri, 1 Apr 2005 21:17:48 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47125-04 for ; Fri, 1 Apr 2005 20:17:38 +0000 (GMT) Received: from firewall.innovision.com (64-126-22-242.biztype2.everestkc.net [64.126.22.242]) by svr1.postgresql.org (Postfix) with ESMTP id 4C23853240 for ; Fri, 1 Apr 2005 21:17:37 +0100 (BST) Received: from [10.10.10.189] (unverified [10.10.10.189]) by innovision.com (SurgeMail 2.2g3) with ESMTP id 583 for ; Fri, 01 Apr 2005 14:17:37 -0600 Message-ID: <424DABF2.9030703@innovision.com> Date: Fri, 01 Apr 2005 14:15:46 -0600 From: Marvin Bellamy User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-interfaces@postgresql.org Subject: Re: libpq: Newbie help w/ data type conversions on References: <424ADDC0.8070603@innovision.com> <24826.202.47.227.25.1112239744.squirrel@202.47.227.25> <424C7925.9060002@innovision.com> <13236.202.47.227.25.1112321585.squirrel@202.47.227.25> In-Reply-To: <13236.202.47.227.25.1112321585.squirrel@202.47.227.25> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server: High Performance Mail Server - http://surgemail.com X-Authenticated-User: mbellamy@innovision.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/2 X-Sequence-Number: 5418 jtv@xs4all.nl wrote: >Marvin Bellamy wrote: > > > >>I'm building for MSVC 7.1.3088, VS .NET 2003 on Win XP. I copied the >>compiler headers and pointed the common file attributes to my PostgreSQL >>install and I get this error: >> >>[snip] >>..\src\util.cxx(60) : warning C4244: 'initializing' : conversion from >>'double' to 'const float', possible loss of data >>..\src\util.cxx(60) : error C2124: divide or mod by zero >> >> > >Ah, that's a bit of workaround code for compilers that don't have proper >ways of producing NANs. The sample configuration headers for your >compiler don't say yet whether those proper ways are available, so the >code assumes the worst and reverts to divide-by-zero (strictly at compile >time, mind you, so neither the warning or the error is really appropriate) >to generate NaNs. > >Easiest fix: define the PQXX_HAVE_QUIET_NAN preprocessor macro. If that >doesn't work (i.e. if the compiler doesn't provide quiet_NaN()), define >PQXX_HAVE_NAN instead. I can release an update over the coming days that >fixes this, once I'm sure about what works. > > > Defining the PQXX_HAVE_QUIET_NAN macro allowed the build to complete successfully. Thanks!