1. 11

  2. 3

    The real mistake is implementing tagged unions with varargs; Nobody is going to printf("%p",0).

    You could instead use real unions/structs and compound literal syntax if it makes sense to have a single function. They are well supported on GCC and CLANG (and in VCC you might as well use C++ anyway). If you insist on more portability than that, you can always:

    config.xLog = my_log_function;
    config.pLogArg = whatever;