From dd73cf942275f089312805fe7236c8b88a7c80df Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 25 Sep 2010 18:43:32 +0200 Subject: [PATCH] common/debug.h: replaced die-macro with function in die.c --- src/common/debug.h | 7 ++----- test/Makefile | 6 +++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common/debug.h b/src/common/debug.h index 080b2e9..a75e097 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -9,17 +9,14 @@ */ #ifndef __COMMON_DEBUG_H - #define __COMMON_DEBUG_H #include #include -#define __perror(...) fprintf(stderr, __VA_ARGS__) +#include "util.h" -#define die(...) \ - __perror("DIE: " __VA_ARGS__); \ - exit(1) +#define __perror(...) fprintf(stderr, __VA_ARGS__) #ifdef __DEBUG__ diff --git a/test/Makefile b/test/Makefile index 91df5dd..2505875 100644 --- a/test/Makefile +++ b/test/Makefile @@ -25,7 +25,11 @@ path : t_path.c -o test_path rbtree : - $(CC) $(CFLAGS) unit.c ../src/common/rbtree.c t_rbtree.c -o test_rbtree + $(CC) $(CFLAGS) \ + unit.c \ + ../src/common/die.c \ + ../src/common/rbtree.c \ + t_rbtree.c -o test_rbtree inotify : $(CC) -lpthread -D INOTIFY_DEBUG -D RB_DEBUG $(CFLAGS) \