Order of Evaluation for #define Macros
You need to turn your macro itself into a macro. Sounds odd, I know.  But take the following example:

#define foo bar, baz
#define foobar(X, Y, Z) something(X, Y, Z);
#define boofar(...) foobar(__VA_ARGS__)

boofar(foo, 4)


boofar is a macro that takes a variable argument list.  That expands out into a call for your actual macro call, expanding foo in the process.  Then your actual macro gets expanded out with the real arguments already in here. The point here is that foo is expanded before being passed to the macro that needs the multiple arguments that are inside foo.

So the expansion chain is actually:

boofar(foo, 4) -&gt;
foobar(bar, baz, 4) -&gt;
something(bar, baz, 4);


Running it through cpp and you get:

# 1 "t.c"
# 1 "&lt;built-in&gt;"
# 1 "&lt;command-line&gt;"
# 31 "&lt;command-line&gt;"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "&lt;command-line&gt;" 2
# 1 "t.c"




something(bar, baz, 4);