diff options
author | shaneh <shaneh@noemail.net> | 2011-04-04 21:48:01 +0000 |
---|---|---|
committer | shaneh <shaneh@noemail.net> | 2011-04-04 21:48:01 +0000 |
commit | 3a2d29f8f46554ba3c74bc17964a4dd844a9ac1d (patch) | |
tree | 0b113b4e9a4a762f69d7e719aba6e48f12fe6154 /src | |
parent | 6a64d6788452870759825dc74872f388c082599b (diff) | |
download | sqlite-3a2d29f8f46554ba3c74bc17964a4dd844a9ac1d.tar.gz sqlite-3a2d29f8f46554ba3c74bc17964a4dd844a9ac1d.zip |
Changes for consistent use of SQLITE_OS_UNIX and removal of legacy OS_UNIX from testfixture source;
FossilOrigin-Name: 78b6eee200cab363be520d771375e44898f80e01
Diffstat (limited to 'src')
-rw-r--r-- | src/test4.c | 2 | ||||
-rw-r--r-- | src/test7.c | 2 | ||||
-rw-r--r-- | src/test_demovfs.c | 6 | ||||
-rw-r--r-- | src/test_osinst.c | 4 | ||||
-rw-r--r-- | src/test_server.c | 4 | ||||
-rw-r--r-- | src/test_syscall.c | 2 | ||||
-rw-r--r-- | src/test_thread.c | 8 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/test4.c b/src/test4.c index 49447d351..5c94370a3 100644 --- a/src/test4.c +++ b/src/test4.c @@ -13,7 +13,7 @@ */ #include "sqliteInt.h" #include "tcl.h" -#if defined(SQLITE_OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE +#if SQLITE_OS_UNIX && SQLITE_THREADSAFE #include <stdlib.h> #include <string.h> #include <pthread.h> diff --git a/src/test7.c b/src/test7.c index 3383d868d..852cd1db5 100644 --- a/src/test7.c +++ b/src/test7.c @@ -20,7 +20,7 @@ ** the SQLITE_SERVER option. */ #if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE) && \ - defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE + SQLITE_OS_UNIX && SQLITE_THREADSAFE #include <stdlib.h> #include <string.h> diff --git a/src/test_demovfs.c b/src/test_demovfs.c index 8c51192b4..e56e8065c 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -115,7 +115,7 @@ ** operations. */ -#if !defined(SQLITE_TEST) || defined(SQLITE_OS_UNIX) +#if !defined(SQLITE_TEST) || SQLITE_OS_UNIX #include <sqlite3.h> @@ -637,14 +637,14 @@ sqlite3_vfs *sqlite3_demovfs(void){ return &demovfs; } -#endif /* !defined(SQLITE_TEST) || defined(SQLITE_OS_UNIX) */ +#endif /* !defined(SQLITE_TEST) || SQLITE_OS_UNIX */ #ifdef SQLITE_TEST #include <tcl.h> -#ifdef SQLITE_OS_UNIX +#if SQLITE_OS_UNIX static int register_demovfs( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ diff --git a/src/test_osinst.c b/src/test_osinst.c index 25e9bcbfb..50d6250e6 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -213,14 +213,14 @@ static sqlite3_io_methods vfslog_io_methods = { vfslogShmUnmap /* xShmUnmap */ }; -#if defined(SQLITE_OS_UNIX) && !defined(NO_GETTOD) +#if SQLITE_OS_UNIX && !defined(NO_GETTOD) #include <sys/time.h> static sqlite3_uint64 vfslog_time(){ struct timeval sTime; gettimeofday(&sTime, 0); return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000; } -#elif defined(SQLITE_OS_WIN) +#elif SQLITE_OS_WIN #include <windows.h> #include <time.h> static sqlite3_uint64 vfslog_time(){ diff --git a/src/test_server.c b/src/test_server.c index 3eb754442..f7b596c78 100644 --- a/src/test_server.c +++ b/src/test_server.c @@ -206,7 +206,7 @@ ** and only if the SQLITE_SERVER macro is defined. */ #if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE) -#if defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE +#if SQLITE_OS_UNIX && SQLITE_THREADSAFE /* ** We require only pthreads and the public interface of SQLite. @@ -487,5 +487,5 @@ void sqlite3_server_stop(void){ pthread_mutex_unlock(&g.serverMutex); } -#endif /* defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE */ +#endif /* SQLITE_OS_UNIX && SQLITE_THREADSAFE */ #endif /* defined(SQLITE_SERVER) */ diff --git a/src/test_syscall.c b/src/test_syscall.c index e3cdcfdfc..b8b05c590 100644 --- a/src/test_syscall.c +++ b/src/test_syscall.c @@ -76,7 +76,7 @@ #include <assert.h> #include "sqliteInt.h" -#ifdef SQLITE_OS_UNIX +#if SQLITE_OS_UNIX /* From test1.c */ extern const char *sqlite3TestErrorName(int); diff --git a/src/test_thread.c b/src/test_thread.c index af38d9184..ef191bc2d 100644 --- a/src/test_thread.c +++ b/src/test_thread.c @@ -53,7 +53,7 @@ struct EvalEvent { static Tcl_ObjCmdProc sqlthread_proc; static Tcl_ObjCmdProc clock_seconds_proc; -#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) +#if SQLITE_OS_UNIX && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) static Tcl_ObjCmdProc blocking_step_proc; static Tcl_ObjCmdProc blocking_prepare_v2_proc; #endif @@ -116,7 +116,7 @@ static Tcl_ThreadCreateType tclScriptThread(ClientData pSqlThread){ interp = Tcl_CreateInterp(); Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0); Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, pSqlThread, 0); -#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) +#if SQLITE_OS_UNIX && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) Tcl_CreateObjCommand(interp, "sqlite3_blocking_step", blocking_step_proc,0,0); Tcl_CreateObjCommand(interp, "sqlite3_blocking_prepare_v2", blocking_prepare_v2_proc, (void *)1, 0); @@ -392,7 +392,7 @@ static int clock_seconds_proc( ** should be considered if these functions are to be extended (i.e. to ** support windows) in the future. */ -#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) +#if SQLITE_OS_UNIX && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) /* BEGIN_SQLITE_BLOCKING_STEP */ /* This example uses the pthreads API */ @@ -614,7 +614,7 @@ static int blocking_prepare_v2_proc( int SqlitetestThread_Init(Tcl_Interp *interp){ Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, 0, 0); Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0); -#if defined(SQLITE_OS_UNIX) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) +#if SQLITE_OS_UNIX && defined(SQLITE_ENABLE_UNLOCK_NOTIFY) Tcl_CreateObjCommand(interp, "sqlite3_blocking_step", blocking_step_proc,0,0); Tcl_CreateObjCommand(interp, "sqlite3_blocking_prepare_v2", blocking_prepare_v2_proc, (void *)1, 0); |