# Depend on the specific file (.c for each .o) and on all headers
src/%.o: src/%.c ${HEADERS}
echo "CC $<"
- $(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/$(shell basename $< .c)/ { print NR }' loglevels.tmp))" -c -o $@ $<
+ $(CC) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR }' loglevels.tmp))" -c -o $@ $<
all: src/cfgparse.y.o src/cfgparse.yy.o src/cmdparse.y.o src/cmdparse.yy.o ${FILES}
echo "LINK i3"
* but only if the corresponding debug loglevel was activated.
*
*/
-void debuglog(int lev, char *fmt, ...);
+void debuglog(uint64_t lev, char *fmt, ...);
/**
* Logs the given message to stdout while prefixing the current time to it.
/* loglevels.h is autogenerated at make time */
#include "loglevels.h"
-static uint32_t loglevel = 0;
+static uint64_t loglevel = 0;
static bool verbose = true;
/**
void add_loglevel(const char *level) {
/* Handle the special loglevel "all" */
if (strcasecmp(level, "all") == 0) {
- loglevel = UINT32_MAX;
+ loglevel = UINT64_MAX;
return;
}
* This is to be called by DLOG() which includes filename/linenumber
*
*/
-void debuglog(int lev, char *fmt, ...) {
+void debuglog(uint64_t lev, char *fmt, ...) {
va_list args;
if ((loglevel & lev) == 0)