diff options
author | drh <drh@noemail.net> | 2006-01-07 16:06:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-01-07 16:06:07 +0000 |
commit | 3f4590226fd8efca835ed68de8bbf5f8c9a4a8f0 (patch) | |
tree | ceda917d316e257649943f3af2cf0d5b282a3d94 /src/os.c | |
parent | dba99bcc964233d7b8ac7d480c929c7874a03f83 (diff) | |
download | sqlite-3f4590226fd8efca835ed68de8bbf5f8c9a4a8f0.tar.gz sqlite-3f4590226fd8efca835ed68de8bbf5f8c9a4a8f0.zip |
Enable redefinable I/O if the SQLITE_ENABLE_REDEF_IO macro exists. (CVS 2883)
FossilOrigin-Name: e170e15766389e978991b42a0d2ec303162aaad6
Diffstat (limited to 'src/os.c')
-rw-r--r-- | src/os.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -13,6 +13,7 @@ ** This file contains OS interface code that is common to all ** architectures. */ +#define _SQLITE_OS_C_ 1 #include "sqliteInt.h" #include "os.h" @@ -69,3 +70,18 @@ int sqlite3OsLockState(OsFile *id){ int sqlite3OsCheckReservedLock(OsFile *id){ return id->pMethod->xCheckReservedLock(id); } + +#ifdef SQLITE_ENABLE_REDEF_IO +/* +** A function to return a pointer to the virtual function table. +** This routine really does not accomplish very much since the +** virtual function table is a global variable and anybody who +** can call this function can just as easily access the variable +** for themselves. Nevertheless, we include this routine for +** backwards compatibility with an earlier redefinable I/O +** interface design. +*/ +struct sqlite3OsVtbl *sqlite3_os_switch(void){ + return &sqlite3Os; +} +#endif |