Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!ksand@apple.com From: ksand@apple.com (Kent Sandvik) Newsgroups: comp.unix.aux Subject: Re: Porting MPW C code to A/UX, Can some one give me a hand? Message-ID: <13920@goofy.Apple.COM> Date: 7 Jun 91 01:27:15 GMT References: <1991Jun6.071753.4907@newshost.anu.edu.au> Sender: usenet@Apple.COM Organization: Apple Lines: 27 In article <1991Jun6.071753.4907@newshost.anu.edu.au>, djp862@anu.oz.au ("David J Peterson") writes: > > > I'm trying to port some code written in MPW C to A/UX and am having > some trouble with the variable argument declarations in MPW C. > > In MPW the function are prototyped as: > > function( int, ... ) /* one int, and then none to ? _ints_ */ > > The functions are expecting a list of integers (not a character > string) to be passed as the variable argument list. MPW C has no > problem compiling this, but A/UX cc (and gcc) just chokes with "number > of arguments doesn't match prototype" on the function definition line > (not the prototype). > > Does anyone know how to kick A/UX into accepting this? (the > -traditional flag in gcc doesn't do it). This is an ANSI C:ish thing, so I guess any gcc flags that turn on the ANSI behaviour should parse this context. I guess that both the ... and the Apple special command-; to generate ... should work, but I'm not sure about that either so check for that. Kent