xref: /netbsd-src/external/bsd/ntp/dist/include/ntp_debug.h (revision ba65fde2d7fefa7d39838fa5fa855e62bd606b5e)
1 /*	$NetBSD: ntp_debug.h,v 1.1.1.2 2012/01/31 21:23:13 kardel Exp $	*/
2 
3 /*
4  * Header
5  *
6  * Created: Sat Aug 20 14:23:01 2005
7  *
8  * Copyright (C) 2005 by Frank Kardel
9  */
10 #ifndef NTP_DEBUG_H
11 #define NTP_DEBUG_H
12 
13 /*
14  * macros for debugging output - cut down on #ifdef pollution in the code
15  */
16 
17 #ifdef DEBUG
18 #define DPRINTF(_lvl_, _arg_)				\
19 	do { 						\
20 		if (debug >= (_lvl_))			\
21 			printf _arg_;			\
22 	} while (0)
23 #else
24 #define DPRINTF(_lvl_, _arg_)	do {} while (0)
25 #endif
26 
27 #endif
28 /*
29  * Log
30  */
31