Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: ANSI/K&R functions in same source Message-ID: <14919@smoke.brl.mil> Date: 21 Jan 91 21:29:36 GMT References: <15895@crdgw1.crd.ge.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 12 In article <15895@crdgw1.crd.ge.com> doel@kirkwood.crd.ge.com () writes: >Is there a clean way to write functions which can be compiled immedaitely >on ANSI & KR compilers while retaining function prototypes on the ANSI >compilers? /* to permit a single declaration to provide a prototype or not, depending: */ /* Example usage: extern int myfunc PARAMS((int a, char *b)); */ #if __STDC__ #define PARAMS( a ) a #else #define PARAMS( a ) () #endif