diff options
author | David Phillips <david@yeah.nah.nz> | 2021-01-04 14:26:45 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2021-01-04 14:26:45 +1300 |
commit | d3c394c78ceb6babdb3caeb83cbea0206d4a8939 (patch) | |
tree | fe1ed2e93efe0c97cd49c27f2dbbb74a82f11bb7 | |
parent | a50564584f51599205f59e476a41c34a5bcee390 (diff) | |
download | paramano-d3c394c78ceb6babdb3caeb83cbea0206d4a8939.tar.xz |
__VA_OPT__ is not well supported by compilers other than gcc (see clang), most
likely as it is not yet standardised, and appears much newer than ,##. Even
though ,## is not standardised either, it is more likely to be supported by a
given compiler.
-rw-r--r-- | common.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,10 +12,10 @@ int get_int(const char* string); #define STR_LINE STRING(__LINE__) /* </ew> */ -#define info(format, ...) printf("INFO : "__FILE__"@%s():"STR_LINE": "format, __func__ __VA_OPT__(,) __VA_ARGS__) +#define info(format, ...) printf("INFO : "__FILE__"@%s:"STR_LINE": "format, __func__, ##__VA_ARGS__) #ifdef DEBUG -#define debug(format, ...) fprintf(stderr, "DEBUG: "__FILE__"@%s():"STR_LINE": "format, __func__ __VA_OPT__(,) __VA_ARGS__) +#define debug(format, ...) fprintf(stderr, "DEBUG: "__FILE__"@%s:"STR_LINE": "format, __func__, ##__VA_ARGS__) #else #define debug(...) #endif |