From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.bugs Subject: Re: Fix for _Complex_I problems Date: Tue, 12 Feb 2008 11:32:12 -0500 Message-ID: References: <534824.44153.qm@web37914.mail.mud.yahoo.com> <47A031C6.2030106@dpawson.co.uk> <87odb3uguq.fsf@ossau.uklinux.net> <47A18131.3090503@dpawson.co.uk> <871w7wiep3.fsf@ossau.uklinux.net> <87ir15aw7s.fsf@dellish.bordeaux.inria.fr> <87ve50qpms.fsf_-_@ossau.uklinux.net> <874pcjyfas.fsf@dellish.bordeaux.inria.fr> <87abmbw8du.fsf@ossau.uklinux.net> <87k5leklkb.fsf_-_@ossau.uklinux.net> <87fxw2kl5r.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202879207 22485 80.91.229.12 (13 Feb 2008 05:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 05:06:47 +0000 (UTC) Cc: Guile Bugs , ludovic.courtes@inria.fr, =?iso-8859-1?Q?=28Ludovic_Court=E8s=29?=@ir.bbn.com, Greg Troxel To: Neil Jerram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Feb 13 06:07:10 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JP9pt-0002xk-Kk for guile-bugs@m.gmane.org; Wed, 13 Feb 2008 06:07:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP9pQ-0001NU-6D for guile-bugs@m.gmane.org; Wed, 13 Feb 2008 00:06:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOy3L-0007rc-9L for bug-guile@gnu.org; Tue, 12 Feb 2008 11:32:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOy3J-0007pk-MK for bug-guile@gnu.org; Tue, 12 Feb 2008 11:32:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOy3J-0007pV-G7 for bug-guile@gnu.org; Tue, 12 Feb 2008 11:32:13 -0500 Original-Received: from fnord.ir.bbn.com ([192.1.100.210]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOy3J-0001yg-BZ for bug-guile@gnu.org; Tue, 12 Feb 2008 11:32:13 -0500 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 4D3FD52EA; Tue, 12 Feb 2008 11:32:12 -0500 (EST) X-Hashcash: 1:20:080212:ludovic.courtes@inria.fr ::pleCZq6L7XUFCsgv:0000000000000000000000000000000000004uS6 In-Reply-To: <87fxw2kl5r.fsf@ossau.uklinux.net> (Neil Jerram's message of "Sat, 09 Feb 2008 19:02:56 +0000") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) X-Hashcash: 1:20:080212:ludovic.courtes@inria.fr"::JoVD+2k7wtdxBzQ9:0000000000000000000000000000000000000V0Q X-Hashcash: 1:20:080212:gdt@ir.bbn.com::Hw9nRMFJxfEu6gAP:0006KNo X-Hashcash: 1:20:080212:tammer@tammer.net::eO6lh5pa24EzNra/:000000000000000000000000000000000000000000002RID X-Hashcash: 1:20:080212:bug-guile@gnu.org::Du4tm3kw76/gYlmH:000000000000000000000000000000000000000000004PcM X-Hashcash: 1:20:080212:neil@ossau.uklinux.net::TiebIz/49/eYrY7U:0000000000000000000000000000000000000004ZLR X-Hashcash: 1:20:080212:ludovic.courtes@inria.fr::eO6lh5pa24EzNra/:00000000000000000000000000000000000008SbI X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Wed, 13 Feb 2008 00:06:36 -0500 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3787 Archived-At: Looking over your patch again, I feel quite a bit better about it. It checks for the standard first, and - +#if defined (GUILE_I) /* For an SCM object Z which is a complex number (ie. satisfies SCM_COMPLEXP), return its value as a C level "complex double". */ #define SCM_COMPLEX_VALUE(z) \ - (SCM_COMPLEX_REAL (z) + _Complex_I * SCM_COMPLEX_IMAG (z)) + (SCM_COMPLEX_REAL (z) + GUILE_I * SCM_COMPLEX_IMAG (z)) +#endif really is very close to a remedial define of _Complex_I. So the impact on conforming systems is small, and limited to a reader of the code having to chase the GUILE_I definition. +# When compiling with GCC on some OSs (Solaris, AIX), _Complex_I doesn't work; +# in the reported cases so far, 1.0fi works well instead. I would add # This is a workaround for the failure of these systems to conform to C99. So this all seems ok to me.