fix a bug in update_continuum
[awesomized/libmemcached] / libmemcached / memcached_watchpoint.h
index 03c2b16003c1a07257a4fe3e5a9934391d034f80..10cbdbd804b73c10a1002fd6d6a5bdced5c7d8c6 100644 (file)
@@ -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 <assert.h>
+
 #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
 }