diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2022-05-30 07:51:17 +0000 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2022-05-30 07:51:17 +0000 |
commit | dddb2be9e60531f232bb9eb44c25e810112cbe42 (patch) | |
tree | 80a7d00f1b25513208a43e4222dc7df2bc2adeba /src/debug.h | |
parent | ff0694bbdd7222a9daf47ef45ffaad70e290463c (diff) | |
parent | d4422354726405530957a23b56001e891998e867 (diff) | |
download | slirp-dddb2be9e60531f232bb9eb44c25e810112cbe42.zip slirp-dddb2be9e60531f232bb9eb44c25e810112cbe42.tar.gz slirp-dddb2be9e60531f232bb9eb44c25e810112cbe42.tar.bz2 |
Merge branch 'msvc' into 'master'
msvc fixes
Closes #60
See merge request slirp/libslirp!124
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/debug.h b/src/debug.h index 0f9f3ef..f4da00c 100644 --- a/src/debug.h +++ b/src/debug.h @@ -14,45 +14,52 @@ extern int slirp_debug; -#define DEBUG_CALL(fmt, ...) \ +#define DEBUG_CALL(name) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ - g_debug(fmt "...", ##__VA_ARGS__); \ + g_debug(name "..."); \ } \ } while (0) -#define DEBUG_VERBOSE_CALL(fmt, ...) \ +#define DEBUG_VERBOSE_CALL(name) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_VERBOSE_CALL)) { \ - g_debug(fmt "...", ##__VA_ARGS__); \ + g_debug(name "..."); \ } \ } while (0) -#define DEBUG_ARG(fmt, ...) \ +#define DEBUG_RAW_CALL(...) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ - g_debug(" " fmt, ##__VA_ARGS__); \ + g_debug(__VA_ARGS__); \ } \ } while (0) -#define DEBUG_MISC(fmt, ...) \ +#define DEBUG_ARG(...) \ + do { \ + if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \ + g_debug(" " __VA_ARGS__); \ + } \ + } while (0) + +#define DEBUG_MISC(...) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \ - g_debug(fmt, ##__VA_ARGS__); \ + g_debug(__VA_ARGS__); \ } \ } while (0) -#define DEBUG_ERROR(fmt, ...) \ +#define DEBUG_ERROR(...) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \ - g_debug(fmt, ##__VA_ARGS__); \ + g_debug(__VA_ARGS__); \ } \ } while (0) -#define DEBUG_TFTP(fmt, ...) \ +#define DEBUG_TFTP(...) \ do { \ if (G_UNLIKELY(slirp_debug & DBG_TFTP)) { \ - g_debug(fmt, ##__VA_ARGS__); \ + g_debug(__VA_ARGS__); \ } \ } while (0) |