chiark / gitweb /
where-vessels: correctly display now-unsmashed but previously-smashed sizes
[ypp-sc-tools.db-live.git] / yarrg / common.h
index fdae435493488e71402c567bff9965022e2f4684..5decee20e1e2b12c657f63068f2b4de2def27ec9 100644 (file)
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include <unistd.h>
 #include <dirent.h>
 #include <inttypes.h>
@@ -83,10 +84,14 @@ enum {
 
 #endif /*DEBUG_FLAG_LIST*/
 
+#ifndef debug_flags
 extern unsigned debug_flags;
+#endif
 
 void debug_flush(void);
-#define debug stderr
+#ifndef debug
+# define debug stderr
+#endif
 
 #define FMT(f,a) __attribute__((format(printf,f,a)))
 #define SCANFMT(f,a) __attribute__((format(scanf,f,a)))
@@ -137,6 +142,7 @@ void waitpid_check_exitstatus(pid_t pid, const char *what, int sigpipeok);
 
 
 void *mmalloc(size_t sz);
+void *mcalloc(size_t sz);
 void *mrealloc(void *p, size_t sz);
 
 char *masprintf(const char *fmt, ...) FMT(1,2);