aboutsummaryrefslogtreecommitdiff
path: root/src/test_multiplex.c
diff options
context:
space:
mode:
authorshaneh <shaneh@noemail.net>2011-02-09 19:55:20 +0000
committershaneh <shaneh@noemail.net>2011-02-09 19:55:20 +0000
commitbb201344cf97136bfbebd1e53c5d181f38fa9fb9 (patch)
tree2631d6915a53f23b4a076d31eb79c69e40a9c444 /src/test_multiplex.c
parentecac670a8bf174a202c8db86fdcab64d2179c86e (diff)
downloadsqlite-bb201344cf97136bfbebd1e53c5d181f38fa9fb9.tar.gz
sqlite-bb201344cf97136bfbebd1e53c5d181f38fa9fb9.zip
Make sure code *compiles* with each OMIT and ENABLE option. Mostly changes to test modules.
FossilOrigin-Name: 7cc515edc9cade2bc6c74699b3e4153bf2b74ebb
Diffstat (limited to 'src/test_multiplex.c')
-rw-r--r--src/test_multiplex.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test_multiplex.c b/src/test_multiplex.c
index fc0d60d5d..72a71621b 100644
--- a/src/test_multiplex.c
+++ b/src/test_multiplex.c
@@ -24,6 +24,20 @@
#include <assert.h>
#include "sqliteInt.h"
+/*
+** For a build without mutexes, no-op the mutex calls.
+*/
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE==0
+#define sqlite3_mutex_alloc(X) ((sqlite3_mutex*)8)
+#define sqlite3_mutex_free(X)
+#define sqlite3_mutex_enter(X)
+#define sqlite3_mutex_try(X) SQLITE_OK
+#define sqlite3_mutex_leave(X)
+#define sqlite3_mutex_held(X) ((void)(X),1)
+#define sqlite3_mutex_notheld(X) ((void)(X),1)
+#endif /* SQLITE_THREADSAFE==0 */
+
+
/************************ Shim Definitions ******************************/
/* This is the limit on the chunk size. It may be changed by calling
@@ -64,7 +78,7 @@ typedef struct multiplexConn multiplexConn;
*/
struct multiplexGroup {
sqlite3_file **pReal; /* Handles to each chunk */
- char *bOpen; /* 0 if chunk not opened */
+ char *bOpen; /* array of bools - 0 if chunk not opened */
char *zName; /* Base filename of this group */
int nName; /* Length of base filename */
int flags; /* Flags used for original opening */