X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_watchpoint.h;h=10cbdbd804b73c10a1002fd6d6a5bdced5c7d8c6;hb=8a0a471e3b703274de52e9d61c8d0c4ee714e068;hp=03c2b16003c1a07257a4fe3e5a9934391d034f80;hpb=765cbda088d67af78051836b13f4faf0bc164679;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached_watchpoint.h b/libmemcached/memcached_watchpoint.h index 03c2b160..10cbdbd8 100644 --- a/libmemcached/memcached_watchpoint.h +++ b/libmemcached/memcached_watchpoint.h @@ -14,8 +14,9 @@ extern "C" { #endif /* Some personal debugging functions */ -#ifdef MEMCACHED_INTERNAL -#ifdef HAVE_DEBUG +#if defined(MEMCACHED_INTERNAL) && defined(HAVE_DEBUG) +#include + #define WATCHPOINT fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout); #define WATCHPOINT_ERROR(A) fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); #define WATCHPOINT_IFERROR(A) if(A != MEMCACHED_SUCCESS)fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); @@ -34,8 +35,8 @@ extern "C" { #define WATCHPOINT_ERRNO(A) #define WATCHPOINT_ASSERT_PRINT(A,B,C) #define WATCHPOINT_ASSERT(A) -#endif -#endif /* MEMCACHED_INTERNAL */ + +#endif /* MEMCACHED_INTERNAL && HAVE_DEBUG */ #ifdef __cplusplus }