Improve trace().
Turn on trace() with the TRACE macro and remove the ## token paste preprocessor operator which is unnecessary here and causes these errors: ps/common.h:176:26: error: pasting "(" and ""ps_argv[thisarg] is %s\n"" does no t give a valid preprocessing token . Send trace output to STDERR. Tracing can be enabled by adding TRACE to CPPFLAGS as follows: ./configure CPPFLAGS="-DTRACE" Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
2ba7e39f2b
commit
20c328bdcc
@ -181,8 +181,8 @@ makEXT(noop)
|
|||||||
// --- <pids> interface end ||||||||||||||||||||||||||||||||||||||||||||||
|
// --- <pids> interface end ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if TRACE
|
||||||
#define trace(...) printf(## __VA_ARGS__)
|
#define trace(...) fprintf(stderr, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define trace(...)
|
#define trace(...)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user