I wanted to write:
#include <Origin.h>
#include <stdarg.h>
void test()
{
int value = -1;
debug("Value = %i",value);
}
void debug(char *fmt, ...)
{
#ifdef DEBUG
va_list argp;
fprintf(stderr, "Debug: ");
va_start(argp, fmt);
vfprintf(stderr, fmt, argp);
va_end(argp);
fprintf(stderr, "\n");
#endif // #ifdef DEBUG
}
I'd certainly be willing to settle for using printf and vprintf instead of fprintf and vfprintf.
It seems that a workaround would be to find the source for stdarg.h and all the header files it depends on and copy/save those files to my development directory manually. Hopefully that's not necessary.