diff options
author | markj <markj@FreeBSD.org> | 2013-12-25 22:36:27 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-12-25 22:36:27 +0000 |
commit | d6a22c4af9f2bcdadc20850e58adf24c37c7407e (patch) | |
tree | 5bdcf42531efa1c8eb5b6b739eb9edfa90adb34a /lib/libproc/_libproc.h | |
parent | e9055f74febe9413802e444141d5e339838b6f36 (diff) | |
download | FreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.zip FreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.tar.gz |
MFC r256661 r257222 r257235 r257248 r257298.
MFC r256661:
Fix the libproc build when DEBUG is defined.
MFC r257222:
Clean up the debug printing in libproc a bit. In particular:
* Don't print any error messages to stderr unless DEBUG is defined.
* Add a DPRINTFX macro for use when errno isn't set.
* Print the error string from libelf when appropriate.
MFC r257235:
Remove an incorrect debug printf.
MFC r257248:
Fix the build with gcc.
MFC r257298:
Revert r257248 and fix the problem in a way that doesn't violate style(9).
Diffstat (limited to 'lib/libproc/_libproc.h')
-rw-r--r-- | lib/libproc/_libproc.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libproc/_libproc.h b/lib/libproc/_libproc.h index aee1ac1..8099ba1 100644 --- a/lib/libproc/_libproc.h +++ b/lib/libproc/_libproc.h @@ -49,7 +49,9 @@ struct proc_handle { }; #ifdef DEBUG -#define DPRINTF(fmt, ...) warn(fmt, __VA_ARGS__) +#define DPRINTF(...) warn(__VA_ARGS__) +#define DPRINTFX(...) warnx(__VA_ARGS__) #else -#define DPRINTF(fmt, ...) +#define DPRINTF(...) do { } while (0) +#define DPRINTFX(...) do { } while (0) #endif |