About as close as you'll get is one of the following:
int functionA()
{
#if RAND
/* stuff that happens only when RAND is defined */
#endif
/* stuff that happens whether RAND is defined or not */
}
Or maybe this:
#if RAND
#define FUNCA() functionA_priv()
#else
#define FUNCA() functionA()
#endif
int FUNCA()
{
/* the non-RAND version of functionA().
* It's called functionA_priv() when RAND is defined, or
* functionA() if it isn't */
}
#if RAND
int functionA()
{
/* The RAND version of functionA(). Only defined if RAND
* is defined, and calls the other version of functionA()
* using the name functionA_priv() via the FUNCA() macro */
FUNCA();
}
#endif
The use of the FUNCA() macro in the second version allows the normal version of functionA() to call itself recursively using the FUNCA() macro instead of functionA() if necessary, since FUNCA() will provide the right identifier regardless of which name is used for the function.