noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit 022e61ed65c4b5363e9cd8767676816834c8a9fb
parent 253f5a90ffb27e6ed89cac687b7c248e664ee49a
Author: sin <sin@2f30.org>
Date:   Thu, 22 Aug 2019 15:36:43 +0100

Ensure the debug macros use our internal dprintf() implementation

Move the debug macros after #undef dprintf in case dprintf() is
implemented as a macro on the target system.

Diffstat:
Mutil.h | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/util.h b/util.h @@ -2,6 +2,16 @@ #define LEN(x) (sizeof(x) / sizeof(*(x))) #define NR_ARGS 32 +#undef dprintf +int dprintf(int, const char *, ...); +#undef strlcat +size_t strlcat(char *, const char *, size_t); +#undef strlcpy +size_t strlcpy(char *, const char *, size_t); +int strverscmp(const char *, const char *); +int spawnvp(char *, char *, char *[]); +int spawnlp(char *, char *, char *, ...); + #ifdef DEBUG #define DEBUG_FD 8 #define DPRINTF_D(x) dprintf(DEBUG_FD, #x "=%d\n", x) @@ -16,13 +26,3 @@ #define DPRINTF_P(x) #define DPRINTF_LLU(x) #endif /* DEBUG */ - -#undef dprintf -int dprintf(int, const char *, ...); -#undef strlcat -size_t strlcat(char *, const char *, size_t); -#undef strlcpy -size_t strlcpy(char *, const char *, size_t); -int strverscmp(const char *, const char *); -int spawnvp(char *, char *, char *[]); -int spawnlp(char *, char *, char *, ...);