Xref: utzoo comp.lang.c:24372 misc.wanted:7176 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!shadooby!sharkey!itivax!scs From: scs@itivax.iti.org (Steve Simmons) Newsgroups: comp.lang.c,misc.wanted Subject: ANSI/Non-ANIS Function Declaration Macros Keywords: Unix, Wanted Message-ID: <4603@itivax.iti.org> Date: 8 Dec 89 01:20:34 GMT Followup-To: comp.lang.c Organization: Industrial Technology Institute, Ann Arbor, MI. Lines: 23 Currently I'm writing code that must compile with and without ANSI C features. Ideally this could be done with no slgging the code with lots of #ifdef constructs like #ifdef __STDC__ int *foo( int const a ) #else int *foo( a ) int a ; #endif { func body } While this works, it's got a weakness. In having two separate declarations, one can over time let them get out of sync. It's also a pain to write. Has anybody come up with a way of doing this so that I write the declarations once and once only? Bizarre constructs considered within limits. -- Steve Simmons scs@iti.org Industrial Technology Institute '"You're not a big name on Usenet until someone puts you in their .sig file." -- Anonymous'