aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2019-08-22 15:36:43 +0100
committersin <sin@2f30.org>2019-08-22 17:21:29 +0100
commit022e61ed65c4b5363e9cd8767676816834c8a9fb (patch)
tree2a9808370088eaba4189fc23c0ff76f6b43683f4
parent253f5a90ffb27e6ed89cac687b7c248e664ee49a (diff)
downloadnoice-022e61ed65c4b5363e9cd8767676816834c8a9fb.tar.gz
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.
-rw-r--r--util.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/util.h b/util.h
index 01da706..6479276 100644
--- 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 *, ...);
Un proyecto texto-plano.xyz