From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14201 invoked by alias); 30 Jul 2003 23:31:48 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14106 invoked from network); 30 Jul 2003 23:31:42 -0000 Received: from unknown (HELO br-dmz.paradigmgeo.com) (203.52.176.30) by sources.redhat.com with SMTP; 30 Jul 2003 23:31:42 -0000 Received: from water ([192.168.180.42]) by br-dmz.paradigmgeo.com (8.12.8/8.12.8) with SMTP id h6UNHmmS021284; Thu, 31 Jul 2003 09:17:50 +1000 From: "Mike Thomas" To: "Camm Maguire" , "Fergus Henderson" Cc: , , , , Subject: RE: [Gcl-devel] Re: portable cdecl 'elliptic' function calls Date: Thu, 31 Jul 2003 06:42:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <54vftj1xzl.fsf@intech19.enhanced.com> X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-SW-Source: 2003-07/txt/msg02273.txt.bz2 Hi Camm. It must be statically linked with gcc on Windows rather than being standalone, assuming it's used there at all as it is absent from my Cygwin and MinGW32 gcc lib directories. The gcc source seems to imply it works on Windows but some docs I've read on the web don't list Windows as a target platform for libffi. (Never built gcc so can't say which.) Fergus, did you use it in the Cygwin port of Mercury? Cheers Mike Thomas | -----Original Message----- | From: gcl-devel-bounces+miketh=brisbane.paradigmgeo.com@gnu.org | [mailto:gcl-devel-bounces+miketh=brisbane.paradigmgeo.com@gnu.org]On | Behalf Of Camm Maguire | Sent: Thursday, July 31, 2003 7:55 AM | To: Fergus Henderson | Cc: gcc@gcc.gnu.org; axiom-developer@nongnu.org; | maxima@mail.ma.utexas.edu; acl2@lists.cc.utexas.edu; gcl-devel@gnu.org | Subject: [Gcl-devel] Re: portable cdecl 'elliptic' function calls | | | Greetings, and thank you for this tip! I now think I see how to do | this in GCL, and would like to build in dependency on libffi. Is this | available on everyone's systems? I'm assuming its packaged at least | everywhere gcc is available. What about solaris, Mac OS X? | | Take care, | | Fergus Henderson writes: | | > On 28-Jul-2003, Camm Maguire wrote: | > > object | > > c_apply_n(object (*fn)(), int n, object *x) | > > {object res=Cnil; | > > #if 1 | > > object *stack; | > > | > > if (!(stack=alloca(n*sizeof(*stack)))) | > > FEerror("Cannot allocate stack for elliptic call", 0); | > > memcpy(stack,x,n*sizeof(*stack)); | > > res=fn(); | > | > This code is extremely non-portable. | > | > I suggest you try using libffi, which is included in the GCC sources. | > See libffi/README. | > | > -- | > Fergus Henderson | "I have always known | that the pursuit | > The University of Melbourne | of excellence is a lethal habit" | > WWW: | -- the last words of | T. S. Garp. | > | > | > | | -- | Camm Maguire camm@enhanced.com | ========================================================================== | "The earth is but one country, and mankind its citizens." -- Baha'u'llah | | | _______________________________________________ | Gcl-devel mailing list | Gcl-devel@gnu.org | http://mail.gnu.org/mailman/listinfo/gcl-devel | |