summaryrefslogtreecommitdiff
path: root/setup_once.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-21 19:03:20 +0000
committerYang Tse <yangsita@gmail.com>2007-02-21 19:03:20 +0000
commit5f5a8ca90580d8fb12f7c3a843ce5a203942dab5 (patch)
tree104a4857b1e84d160c5601a6870c61773a3d7ffd /setup_once.h
parent908070821ebd3091cc89671ffd8ae18520694daa (diff)
downloadc-ares-5f5a8ca90580d8fb12f7c3a843ce5a203942dab5.tar.gz
c-ares-5f5a8ca90580d8fb12f7c3a843ce5a203942dab5.tar.bz2
c-ares-5f5a8ca90580d8fb12f7c3a843ce5a203942dab5.zip
curlassert macro replaced with DEBUGASSERT macro defined in setup_once.h
Diffstat (limited to 'setup_once.h')
-rw-r--r--setup_once.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/setup_once.h b/setup_once.h
index 32d8293..20ea381 100644
--- a/setup_once.h
+++ b/setup_once.h
@@ -200,9 +200,20 @@ typedef int sig_atomic_t;
*/
#ifdef CURLDEBUG
-#define DEBUGF(X) X
+#define DEBUGF(x) x
#else
-#define DEBUGF(X) do { } while (0)
+#define DEBUGF(x) do { } while (0)
+#endif
+
+
+/*
+ * Macro used to include assertion code only in debug builds.
+ */
+
+#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
+#define DEBUGASSERT(x) assert(x)
+#else
+#define DEBUGASSERT(x) do { } while (0)
#endif