aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2021-01-04 14:26:45 +1300
committerDavid Phillips <david@yeah.nah.nz>2021-01-04 14:26:45 +1300
commitd3c394c78ceb6babdb3caeb83cbea0206d4a8939 (patch)
treefe1ed2e93efe0c97cd49c27f2dbbb74a82f11bb7 /common.h
parenta50564584f51599205f59e476a41c34a5bcee390 (diff)
downloadparamano-d3c394c78ceb6babdb3caeb83cbea0206d4a8939.tar.xz
Prefer ,##__VA_ARGS over __VA_OPT__(.)HEAD0.72master
__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.
Diffstat (limited to 'common.h')
-rw-r--r--common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common.h b/common.h
index 6b2e92d..aa99e32 100644
--- a/common.h
+++ b/common.h
@@ -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