aboutsummaryrefslogtreecommitdiff
path: root/src/os.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2005-06-07 22:22:50 +0000
committerdrh <drh@noemail.net>2005-06-07 22:22:50 +0000
commit0ccebe7e2d2ffd312b03f738ce8c36ec9be0fac9 (patch)
treed1f62735222da980e8b38982c857376c202c9acc /src/os.h
parent80f93bf41f79a0865559783005f0d72a36fbdf53 (diff)
downloadsqlite-0ccebe7e2d2ffd312b03f738ce8c36ec9be0fac9.tar.gz
sqlite-0ccebe7e2d2ffd312b03f738ce8c36ec9be0fac9.zip
Changes to support linking without a parser and without a disk I/O interface. (CVS 2504)
FossilOrigin-Name: 62a7353d4af4886b1561832e8b36e8e788b38834
Diffstat (limited to 'src/os.h')
-rw-r--r--src/os.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/os.h b/src/os.h
index e4010072d..4854964fb 100644
--- a/src/os.h
+++ b/src/os.h
@@ -23,7 +23,8 @@
** N.B. MacOS means Mac Classic (or Carbon). Treat Darwin (OS X) as Unix.
** The MacOS build is designed to use CodeWarrior (tested with v8)
*/
-#if !defined(OS_UNIX) && !defined(OS_TEST) && !defined(OS_MEM)
+#if !defined(OS_UNIX) && !defined(OS_TEST) && !defined(OS_OTHER)
+# define OS_OTHER 0
# ifndef OS_WIN
# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
# define OS_WIN 1
@@ -40,9 +41,6 @@
# define OS_WIN 0
# endif
#endif
-#ifndef OS_MEM
-# define OS_MEM 0
-#endif
/*
** Invoke the appropriate operating-system specific header file.
@@ -56,8 +54,13 @@
#if OS_WIN
# include "os_win.h"
#endif
-#if OS_MEM
-# include "os_mem.h"
+
+/* os_other.c and os_other.h are not delivered with SQLite. These files
+** are place-holders that can be filled in by third-party developers to
+** implement backends to their on proprietary operating systems.
+*/
+#if OS_OTHER
+# include "os_other.h"
#endif
/* If the SET_FULLSYNC macro is not defined above, then make it
@@ -181,15 +184,19 @@ int sqlite3OsSeek(OsFile*, i64 offset);
int sqlite3OsSync(OsFile*);
int sqlite3OsTruncate(OsFile*, i64 size);
int sqlite3OsFileSize(OsFile*, i64 *pSize);
+char *sqlite3OsFullPathname(const char*);
+int sqlite3OsLock(OsFile*, int);
+int sqlite3OsUnlock(OsFile*, int);
+int sqlite3OsCheckReservedLock(OsFile *id);
+
+
+/* The interface for file I/O is above. Other miscellaneous functions
+** are below */
+
int sqlite3OsRandomSeed(char*);
int sqlite3OsSleep(int ms);
int sqlite3OsCurrentTime(double*);
-int sqlite3OsFileModTime(OsFile*, double*);
void sqlite3OsEnterMutex(void);
void sqlite3OsLeaveMutex(void);
-char *sqlite3OsFullPathname(const char*);
-int sqlite3OsLock(OsFile*, int);
-int sqlite3OsUnlock(OsFile*, int);
-int sqlite3OsCheckReservedLock(OsFile *id);
#endif /* _SQLITE_OS_H_ */