/ Check-in [26a203d8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the test harness so that it does not try to link against sqlite3_mutex_alloc() if compiled with -DSQLITE_THREADSAFE=0. (CVS 5430)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:26a203d894edd0091ac60862956e42d22167011e
User & Date: drh 2008-07-17 17:34:20
Context
2008-07-17
18:39
Simplify the b-tree logic by taking advantage of the fact that all b-trees are either intkey+leafdata or zerodata. (CVS 5431) check-in: 29d3bfd7 user: drh tags: trunk
17:34
Fix the test harness so that it does not try to link against sqlite3_mutex_alloc() if compiled with -DSQLITE_THREADSAFE=0. (CVS 5430) check-in: 26a203d8 user: drh tags: trunk
2008-07-16
19:30
Get rid of the debug output, and make pre-C99 compilers happy with sqlite3_os_init() on OS/2. (CVS 5429) check-in: 08fe49f6 user: pweilbacher tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_mutex.c.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
296
297
298
299
300
301
302

303
304
305
306
307

308
309
310
311
312
313
314
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 
** $Id: test_mutex.c,v 1.9 2008/07/10 20:41:50 drh Exp $
*/

#include "tcl.h"
#include "sqlite3.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
................................................................................
*/
static int test_alloc_mutex(
  void * clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){

  sqlite3_mutex *p = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
  char zBuf[100];
  sqlite3_mutex_free(p);
  sqlite3_snprintf(sizeof(zBuf), zBuf, "%p", p);
  Tcl_AppendResult(interp, zBuf, (char*)0);

  return TCL_OK;
}

/*
** sqlite3_config OPTION
**
** OPTION can be either one of the keywords:







|







 







>





>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 
** $Id: test_mutex.c,v 1.10 2008/07/17 17:34:20 drh Exp $
*/

#include "tcl.h"
#include "sqlite3.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
................................................................................
*/
static int test_alloc_mutex(
  void * clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){
#if SQLITE_THREADSAFE
  sqlite3_mutex *p = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
  char zBuf[100];
  sqlite3_mutex_free(p);
  sqlite3_snprintf(sizeof(zBuf), zBuf, "%p", p);
  Tcl_AppendResult(interp, zBuf, (char*)0);
#endif
  return TCL_OK;
}

/*
** sqlite3_config OPTION
**
** OPTION can be either one of the keywords: