From owner-freebsd-hackers Tue Mar 4 12:23:34 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA13498 for hackers-outgoing; Tue, 4 Mar 1997 12:23:34 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id MAA13486 for ; Tue, 4 Mar 1997 12:23:31 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA10266; Tue, 4 Mar 1997 13:18:12 -0700 From: Terry Lambert Message-Id: <199703042018.NAA10266@phaeton.artisoft.com> Subject: Re: gcc question To: guido@gvr.win.tue.nl (Guido van Rooij) Date: Tue, 4 Mar 1997 13:18:12 -0700 (MST) Cc: FreeBSD-hackers@freebsd.org In-Reply-To: <199703041411.PAA02442@gvr.win.tue.nl> from "Guido van Rooij" at Mar 4, 97 03:11:34 pm X-Mailer: ELM [version 2.4 PL24] 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 > 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. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.