You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
676 B

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