Debian Codegraph @

include/libcork/ipset/logging.h

raw
1 /* -*- coding: utf-8 -*-
2 * ----------------------------------------------------------------------
3 * Copyright © 2010, libcorkipset authors
4 * All rights reserved.
5 *
6 * Please see the COPYING file in this distribution for license details.
7 * ----------------------------------------------------------------------
8 */
9
10 #ifndef LIBCORK_IPSET_LOGGING_H
11 #define LIBCORK_IPSET_LOGGING_H
12
13
14 #if !defined(IPSET_DEBUG)
15 #define IPSET_DEBUG 0
16 #endif
17
18 #if IPSET_DEBUG
19 #include <stdio.h>
20 #define DEBUG(...) \
21 do { \
22 fprintf(stderr, __VA_ARGS__); \
23 fprintf(stderr, "\n"); \
24 } while (0)
25 #else
26 #define DEBUG(...) /* no debug messages */
27 #endif
28
29
30 #endif /* LIBCORK_IPSET_LOGGING_H */