Path: utzoo!attcan!uunet!husc6!mailrus!ames!umd5!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.lang.c
Subject: Re: Curious about function prototypes...
Message-ID: <8088@brl-smoke.ARPA>
Date: 15 Jun 88 02:01:46 GMT
References: <654@orion.cf.uci.edu> <8073@brl-smoke.ARPA> <273@spsspyr.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) )
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 43

In article <273@spsspyr.UUCP> gunars@spsspyr.UUCP (Gunars V. Lucans) writes:
>Definitions are another matter.  Is there an alternative (other than not
>using prototypes at all) to:
>	void foo (
>	#ifdef PROTO_OK
>		      int
>	#endif
>	          arg1,
>	#ifdef PROTO_OK
>		      char *
>	#endif
>	          arg2)
>	{
>		
>	}

The above isn't even correct.  Try
	#if __STDC__
	void foo( int arg1, char *arg2 )
	#else
	void foo( arg1, arg2 )
		int arg1;
		char *arg2;
	#endif
	{
		/* body */
	}

>What is the general level of compliance to the proposed standard in existing
>UNIX compilers?  How soon can we expect the majority of them to be ANSI
>conforming, given that the market for UNIX compilers is different than that
>for MS-DOS compilers?

Obviously AT&T must be planning to release an ANSI-compatible C compiler
as soon as they can after the standard stabilizes.  Give vendors who use
the AT&T CCS as a base about 6 months to a year after that to pick it up.
Those who base their compiler on 4BSD PCC have a harder task ahead of
them, although Chris Torek and others have been trying to bring the 4BSD
CCS up to ANSI/POSIX standards (not done yet).  GNU CC is already almost
there.  Most other C vendors I know of are preparing ANSI C releases.  My
guess is that two years after the official standard you'll be able to
obtain a Standard-conforming implementation for practically all systems
worth worrying about.