common/debug.h: replaced die-macro with function in die.c
This commit is contained in:
parent
b137dd64f5
commit
dd73cf9422
2 changed files with 7 additions and 6 deletions
|
|
@ -9,17 +9,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __COMMON_DEBUG_H
|
#ifndef __COMMON_DEBUG_H
|
||||||
|
|
||||||
#define __COMMON_DEBUG_H
|
#define __COMMON_DEBUG_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define __perror(...) fprintf(stderr, __VA_ARGS__)
|
#include "util.h"
|
||||||
|
|
||||||
#define die(...) \
|
#define __perror(...) fprintf(stderr, __VA_ARGS__)
|
||||||
__perror("DIE: " __VA_ARGS__); \
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
#ifdef __DEBUG__
|
#ifdef __DEBUG__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,11 @@ path :
|
||||||
t_path.c -o test_path
|
t_path.c -o test_path
|
||||||
|
|
||||||
rbtree :
|
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 :
|
inotify :
|
||||||
$(CC) -lpthread -D INOTIFY_DEBUG -D RB_DEBUG $(CFLAGS) \
|
$(CC) -lpthread -D INOTIFY_DEBUG -D RB_DEBUG $(CFLAGS) \
|
||||||
|
|
|
||||||
Reference in a new issue