Merge pull request #64 from czchen/feature/debug

Let --enable-debug define DEBUG instead of ENABLE_DEBUG in config.h
This commit is contained in:
Yo-An Lin 2014-07-05 16:03:46 +08:00
commit 3963bddb1f
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ AC_SUBST(DEPS_LIBS)
AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[enable debug]))
if test "x$enable_debug" = "xyes"; then
AC_DEFINE(ENABLE_DEBUG, 1, "debug")
AC_DEFINE(DEBUG, 1, "debug")
fi
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")

View file

@ -23,7 +23,7 @@ typedef unsigned char bool;
#ifdef DEBUG
#define info(fmt, ...) \
do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
do { fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
#define debug(fmt, ...) \
do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \