aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-06-25 17:19:00 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-06-25 17:19:00 +0000
commitc0fa4c5f328fc8d11ef6afa90489293940ff60ae (patch)
tree8e1e8f7d56fffb9cdeeb6ee1044b670a7b9b9a36 /src/os_unix.c
parent6b39c2e40b857ef84952bf87143533ac85df3099 (diff)
downloadsqlite-c0fa4c5f328fc8d11ef6afa90489293940ff60ae.tar.gz
sqlite-c0fa4c5f328fc8d11ef6afa90489293940ff60ae.zip
Remove internal function sqlite3OsDefaultVfs(). The built-in VFS layers now register their VFS implementations by calling sqlite3_vfs_register() from within sqlite3_os_init(). (CVS 5307)
FossilOrigin-Name: 8fa33b79d7369ec5777fd9ad3349f0fa31b98fd6
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 906e4b635..d65126762 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -12,7 +12,7 @@
**
** This file contains code that is specific to Unix systems.
**
-** $Id: os_unix.c,v 1.188 2008/06/18 17:09:10 danielk1977 Exp $
+** $Id: os_unix.c,v 1.189 2008/06/25 17:19:01 danielk1977 Exp $
*/
#include "sqliteInt.h"
#if OS_UNIX /* This file is used on unix only */
@@ -2780,12 +2780,9 @@ static int unixGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
}
/*
-** Return a pointer to the sqlite3DefaultVfs structure. We use
-** a function rather than give the structure global scope because
-** some compilers (MSVC) do not allow forward declarations of
-** initialized structures.
+** Initialize and deinitialize the operating system interface.
*/
-sqlite3_vfs *sqlite3OsDefaultVfs(void){
+int sqlite3_os_init(void){
static sqlite3_vfs unixVfs = {
1, /* iVersion */
sizeof(unixFile), /* szOsFile */
@@ -2807,16 +2804,11 @@ sqlite3_vfs *sqlite3OsDefaultVfs(void){
unixCurrentTime, /* xCurrentTime */
unixGetLastError /* xGetLastError */
};
-
- return &unixVfs;
+ sqlite3_vfs_register(&unixVfs, 1);
+ return SQLITE_OK;
+}
+int sqlite3_os_end(void){
+ return SQLITE_OK;
}
-
-/*
-** Initialize and deinitialize the operating system interface.
-** These are stubs for now - populate with real code later...
-*/
-int sqlite3_os_init(void){ return SQLITE_OK; }
-int sqlite3_os_end(void){ return SQLITE_OK; }
-
#endif /* OS_UNIX */