overkill on portability macros

Dan Connolly (connolly@pixel.convex.com)
Sun, 07 Jun 92 01:15:34 CDT

Message-Id: <9206070615.AA15478@pixel.convex.com>
To: www-talk@nxoc01.cern.ch
Subject: overkill on portability macros
Date: Sun, 07 Jun 92 01:15:34 CDT
From: Dan Connolly <connolly@pixel.convex.com>

Are these abuses of the preprocessor really necessary?

PRIVATE char from_hex ARGS1(char, c)
Ok, I've seen PRIVATE before (though I don't know what it's
for. Some sort of MS DOS near/far thing?)

But ANSI C and PCC share syntax for _defining_ functions.
The preprocessor dancing is necessary for _declaring_ functions
like so:

int foo __ARGS__((int x, int y, int z));

but in the .c files, you can just do the usual

int foo(x,y,z)
int x;
int y;
int z;

and ANSI an PCC compilers alike will be happy, with one
exception: varargs. Functions with

int foo(int x, ...);

style declarations need corresponding

int foo(int x, ...)

style definitions.