I want a C macro that will expand into a function with an extra parameter based on a condition.
Something like this:
#define EXTRA 7
#ifdef ADD_ONE_MORE_ARG
#define dothis(...) dothat(EXTRA,...)
#endif
Such that dothis(5);
is expanded into dothat(EXTRA, 5);
but I can't remember the syntax. The answer I found here didn't help. Thanks.