aboutsummaryrefslogtreecommitdiff
path: root/ext/rtree/rtree.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2019-07-09 17:36:26 +0000
committerdan <dan@noemail.net>2019-07-09 17:36:26 +0000
commitf446a7a8cd265fb8b135fa551d53e47813ae6d8c (patch)
tree75a15caa46304b7f6516fedd4086e0a070c5cf76 /ext/rtree/rtree.c
parente0155b7af92be5eacd49d1ab94b3d8c20a3d6450 (diff)
downloadsqlite-f446a7a8cd265fb8b135fa551d53e47813ae6d8c.tar.gz
sqlite-f446a7a8cd265fb8b135fa551d53e47813ae6d8c.zip
Update rtree.c so that SQLITE_DEBUG is required to turn on assert() statements, even if it is compiled separately from the amalgamation.
FossilOrigin-Name: b6e17f0139482a22c2fc84552767bc9a293b282499e3a790de069e0e84455fb2
Diffstat (limited to 'ext/rtree/rtree.c')
-rw-r--r--ext/rtree/rtree.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index 78849bd55..ea5e737aa 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -63,10 +63,6 @@
#include "sqlite3.h"
#endif
-#include <string.h>
-#include <assert.h>
-#include <stdio.h>
-
#ifndef SQLITE_AMALGAMATION
#include "sqlite3rtree.h"
typedef sqlite3_int64 i64;
@@ -74,7 +70,17 @@ typedef sqlite3_uint64 u64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
+# define NDEBUG 1
+#endif
+#if defined(NDEBUG) && defined(SQLITE_DEBUG)
+# undef NDEBUG
#endif
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
/* The following macro is used to suppress compiler warnings.
*/