From owner-freebsd-hackers Tue Mar 4 12:34:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA14242 for hackers-outgoing; Tue, 4 Mar 1997 12:34:14 -0800 (PST) Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA14229 for ; Tue, 4 Mar 1997 12:34:10 -0800 (PST) Received: (from guido@localhost) by gvr.win.tue.nl (8.8.5/8.8.2) id VAA03138; Tue, 4 Mar 1997 21:32:43 +0100 (MET) From: Guido van Rooij Message-Id: <199703042032.VAA03138@gvr.win.tue.nl> Subject: Re: gcc question In-Reply-To: <199703042018.NAA10266@phaeton.artisoft.com> from Terry Lambert at "Mar 4, 97 01:18:12 pm" To: terry@lambert.org (Terry Lambert) Date: Tue, 4 Mar 1997 21:32:43 +0100 (MET) Cc: FreeBSD-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Terry Lambert wrote: > > I've got a question about interfacing between `normal' c and -traditional. > > > > I have an API that is compiled with no -traditional flag that > > expects the folowing parameters: > > char *, char, char * > > > > I want to call this program from within something that has to be compiled > > with -traditional. When I'd call this api function the secod argument > > will be treated differently by the -traditional program and tha API > > function (for which I do not have the source). My question: how can > > I still interface between the two, without having to write a wrapper > > (becasue I think that is ugly). > > Compile the ANSI C code without a prototype in scope, and it will use > "traditional" stack type promotion calling conventions. > As I specifically told in my mail, I do not have the ansi c api source. -Guido