Back to index

lightning-sunbird  0.9+nobinonly
os.h
Go to the documentation of this file.
00001 /*
00002 ** 2001 September 16
00003 **
00004 ** The author disclaims copyright to this source code.  In place of
00005 ** a legal notice, here is a blessing:
00006 **
00007 **    May you do good and not evil.
00008 **    May you find forgiveness for yourself and forgive others.
00009 **    May you share freely, never taking more than you give.
00010 **
00011 ******************************************************************************
00012 **
00013 ** This header file (together with is companion C source-code file
00014 ** "os.c") attempt to abstract the underlying operating system so that
00015 ** the SQLite library will work on both POSIX and windows systems.
00016 */
00017 #ifndef _SQLITE_OS_H_
00018 #define _SQLITE_OS_H_
00019 
00020 /*
00021 ** Figure out if we are dealing with Unix, Windows, or some other
00022 ** operating system.
00023 */
00024 #if !defined(OS_UNIX) && !defined(OS_BEOS) && !defined(OS_OTHER)
00025 # define OS_OTHER 0
00026 # ifndef OS_WIN
00027 #   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
00028 #     define OS_WIN 1
00029 #     define OS_UNIX 0
00030 #     define OS_OS2 0
00031 #     define OS_BEOS 0
00032 #   elif defined(__BEOS__)
00033 #     define OS_BEOS 1
00034 #     define OS_WIN 0
00035 #     define OS_OS2 0
00036 #     define OS_UNIX 0
00037 #   elif defined(_EMX_) || defined(_OS2) || defined(OS2) || defined(OS_OS2)
00038 #     define OS_WIN 0
00039 #     define OS_UNIX 0
00040 #     define OS_OS2 1
00041 #     define OS_BEOS 0
00042 #   else
00043 #     define OS_WIN 0
00044 #     define OS_UNIX 1
00045 #     define OS_OS2 0
00046 #     define OS_BEOS 0
00047 #  endif
00048 # else
00049 #  define OS_UNIX 0
00050 #  define OS_OS2 0
00051 # endif
00052 #else
00053 # ifndef OS_WIN
00054 #  define OS_WIN 0
00055 # endif
00056 #endif
00057 
00058 
00059 /*
00060 ** Define the maximum size of a temporary filename
00061 */
00062 #if OS_WIN
00063 # include <windows.h>
00064 # define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
00065 #elif OS_OS2
00066 # define INCL_DOSDATETIME
00067 # define INCL_DOSFILEMGR
00068 # define INCL_DOSERRORS
00069 # define INCL_DOSMISC
00070 # define INCL_DOSPROCESS
00071 # include <os2.h>
00072 # define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)
00073 #else
00074 # define SQLITE_TEMPNAME_SIZE 200
00075 #endif
00076 
00077 /* If the SET_FULLSYNC macro is not defined above, then make it
00078 ** a no-op
00079 */
00080 #ifndef SET_FULLSYNC
00081 # define SET_FULLSYNC(x,y)
00082 #endif
00083 
00084 /*
00085 ** Temporary files are named starting with this prefix followed by 16 random
00086 ** alphanumeric characters, and no file extension. They are stored in the
00087 ** OS's standard temporary file directory, and are deleted prior to exit.
00088 ** If sqlite is being embedded in another program, you may wish to change the
00089 ** prefix to reflect your program's name, so that if your program exits
00090 ** prematurely, old temporary files can be easily identified. This can be done
00091 ** using -DTEMP_FILE_PREFIX=myprefix_ on the compiler command line.
00092 */
00093 #ifndef TEMP_FILE_PREFIX
00094 # define TEMP_FILE_PREFIX "sqlite_"
00095 #endif
00096 
00097 /*
00098 ** Define the interfaces for Unix, Windows, and OS/2.
00099 */
00100 #if OS_UNIX
00101 #define sqlite3OsOpenReadWrite      sqlite3UnixOpenReadWrite
00102 #define sqlite3OsOpenExclusive      sqlite3UnixOpenExclusive
00103 #define sqlite3OsOpenReadOnly       sqlite3UnixOpenReadOnly
00104 #define sqlite3OsDelete             sqlite3UnixDelete
00105 #define sqlite3OsFileExists         sqlite3UnixFileExists
00106 #define sqlite3OsFullPathname       sqlite3UnixFullPathname
00107 #define sqlite3OsIsDirWritable      sqlite3UnixIsDirWritable
00108 #define sqlite3OsSyncDirectory      sqlite3UnixSyncDirectory
00109 #define sqlite3OsTempFileName       sqlite3UnixTempFileName
00110 #define sqlite3OsRandomSeed         sqlite3UnixRandomSeed
00111 #define sqlite3OsSleep              sqlite3UnixSleep
00112 #define sqlite3OsCurrentTime        sqlite3UnixCurrentTime
00113 #define sqlite3OsEnterMutex         sqlite3UnixEnterMutex
00114 #define sqlite3OsLeaveMutex         sqlite3UnixLeaveMutex
00115 #define sqlite3OsInMutex            sqlite3UnixInMutex
00116 #define sqlite3OsThreadSpecificData sqlite3UnixThreadSpecificData
00117 #define sqlite3OsMalloc             sqlite3GenericMalloc
00118 #define sqlite3OsRealloc            sqlite3GenericRealloc
00119 #define sqlite3OsFree               sqlite3GenericFree
00120 #define sqlite3OsAllocationSize     sqlite3GenericAllocationSize
00121 #endif
00122 #if OS_WIN
00123 #define sqlite3OsOpenReadWrite      sqlite3WinOpenReadWrite
00124 #define sqlite3OsOpenExclusive      sqlite3WinOpenExclusive
00125 #define sqlite3OsOpenReadOnly       sqlite3WinOpenReadOnly
00126 #define sqlite3OsDelete             sqlite3WinDelete
00127 #define sqlite3OsFileExists         sqlite3WinFileExists
00128 #define sqlite3OsFullPathname       sqlite3WinFullPathname
00129 #define sqlite3OsIsDirWritable      sqlite3WinIsDirWritable
00130 #define sqlite3OsSyncDirectory      sqlite3WinSyncDirectory
00131 #define sqlite3OsTempFileName       sqlite3WinTempFileName
00132 #define sqlite3OsRandomSeed         sqlite3WinRandomSeed
00133 #define sqlite3OsSleep              sqlite3WinSleep
00134 #define sqlite3OsCurrentTime        sqlite3WinCurrentTime
00135 #define sqlite3OsEnterMutex         sqlite3WinEnterMutex
00136 #define sqlite3OsLeaveMutex         sqlite3WinLeaveMutex
00137 #define sqlite3OsInMutex            sqlite3WinInMutex
00138 #define sqlite3OsThreadSpecificData sqlite3WinThreadSpecificData
00139 #define sqlite3OsMalloc             sqlite3GenericMalloc
00140 #define sqlite3OsRealloc            sqlite3GenericRealloc
00141 #define sqlite3OsFree               sqlite3GenericFree
00142 #define sqlite3OsAllocationSize     sqlite3GenericAllocationSize
00143 #endif
00144 #if OS_OS2
00145 #define sqlite3OsOpenReadWrite      sqlite3Os2OpenReadWrite
00146 #define sqlite3OsOpenExclusive      sqlite3Os2OpenExclusive
00147 #define sqlite3OsOpenReadOnly       sqlite3Os2OpenReadOnly
00148 #define sqlite3OsDelete             sqlite3Os2Delete
00149 #define sqlite3OsFileExists         sqlite3Os2FileExists
00150 #define sqlite3OsFullPathname       sqlite3Os2FullPathname
00151 #define sqlite3OsIsDirWritable      sqlite3Os2IsDirWritable
00152 #define sqlite3OsSyncDirectory      sqlite3Os2SyncDirectory
00153 #define sqlite3OsTempFileName       sqlite3Os2TempFileName
00154 #define sqlite3OsRandomSeed         sqlite3Os2RandomSeed
00155 #define sqlite3OsSleep              sqlite3Os2Sleep
00156 #define sqlite3OsCurrentTime        sqlite3Os2CurrentTime
00157 #define sqlite3OsEnterMutex         sqlite3Os2EnterMutex
00158 #define sqlite3OsLeaveMutex         sqlite3Os2LeaveMutex
00159 #define sqlite3OsInMutex            sqlite3Os2InMutex
00160 #define sqlite3OsThreadSpecificData sqlite3Os2ThreadSpecificData
00161 #define sqlite3OsMalloc             sqlite3GenericMalloc
00162 #define sqlite3OsRealloc            sqlite3GenericRealloc
00163 #define sqlite3OsFree               sqlite3GenericFree
00164 #define sqlite3OsAllocationSize     sqlite3GenericAllocationSize
00165 #endif
00166 #if OS_BEOS
00167 #define sqlite3OsOpenReadWrite      sqlite3BeOpenReadWrite
00168 #define sqlite3OsOpenExclusive      sqlite3BeOpenExclusive
00169 #define sqlite3OsOpenReadOnly       sqlite3BeOpenReadOnly
00170 #define sqlite3OsDelete             sqlite3BeDelete
00171 #define sqlite3OsFileExists         sqlite3BeFileExists
00172 #define sqlite3OsFullPathname       sqlite3BeFullPathname
00173 #define sqlite3OsIsDirWritable      sqlite3BeIsDirWritable
00174 #define sqlite3OsSyncDirectory      sqlite3BeSyncDirectory
00175 #define sqlite3OsTempFileName       sqlite3BeTempFileName
00176 #define sqlite3OsRandomSeed         sqlite3BeRandomSeed
00177 #define sqlite3OsSleep              sqlite3BeSleep
00178 #define sqlite3OsCurrentTime        sqlite3BeCurrentTime
00179 #define sqlite3OsEnterMutex         sqlite3BeEnterMutex
00180 #define sqlite3OsLeaveMutex         sqlite3BeLeaveMutex
00181 #define sqlite3OsInMutex            sqlite3BeInMutex
00182 #define sqlite3OsThreadSpecificData sqlite3BeThreadSpecificData
00183 #define sqlite3OsMalloc             sqlite3GenericMalloc
00184 #define sqlite3OsRealloc            sqlite3GenericRealloc
00185 #define sqlite3OsFree               sqlite3GenericFree
00186 #define sqlite3OsAllocationSize     sqlite3GenericAllocationSize
00187 #endif
00188 
00189 /*
00190 ** If using an alternative OS interface, then we must have an "os_other.h"
00191 ** header file available for that interface.  Presumably the "os_other.h"
00192 ** header file contains #defines similar to those above.
00193 */
00194 #if OS_OTHER
00195 # include "os_other.h"
00196 #endif
00197 
00198 
00199 
00200 /*
00201 ** Forward declarations
00202 */
00203 typedef struct OsFile OsFile;
00204 typedef struct IoMethod IoMethod;
00205 
00206 /*
00207 ** An instance of the following structure contains pointers to all
00208 ** methods on an OsFile object.
00209 */
00210 struct IoMethod {
00211   int (*xClose)(OsFile**);
00212   int (*xOpenDirectory)(OsFile*, const char*);
00213   int (*xRead)(OsFile*, void*, int amt);
00214   int (*xWrite)(OsFile*, const void*, int amt);
00215   int (*xSeek)(OsFile*, i64 offset);
00216   int (*xTruncate)(OsFile*, i64 size);
00217   int (*xSync)(OsFile*, int);
00218   void (*xSetFullSync)(OsFile *id, int setting);
00219   int (*xFileHandle)(OsFile *id);
00220   int (*xFileSize)(OsFile*, i64 *pSize);
00221   int (*xLock)(OsFile*, int);
00222   int (*xUnlock)(OsFile*, int);
00223   int (*xLockState)(OsFile *id);
00224   int (*xCheckReservedLock)(OsFile *id);
00225 };
00226 
00227 /*
00228 ** The OsFile object describes an open disk file in an OS-dependent way.
00229 ** The version of OsFile defined here is a generic version.  Each OS
00230 ** implementation defines its own subclass of this structure that contains
00231 ** additional information needed to handle file I/O.  But the pMethod
00232 ** entry (pointing to the virtual function table) always occurs first
00233 ** so that we can always find the appropriate methods.
00234 */
00235 struct OsFile {
00236   IoMethod const *pMethod;
00237 };
00238 
00239 /*
00240 ** The following values may be passed as the second argument to
00241 ** sqlite3OsLock(). The various locks exhibit the following semantics:
00242 **
00243 ** SHARED:    Any number of processes may hold a SHARED lock simultaneously.
00244 ** RESERVED:  A single process may hold a RESERVED lock on a file at
00245 **            any time. Other processes may hold and obtain new SHARED locks.
00246 ** PENDING:   A single process may hold a PENDING lock on a file at
00247 **            any one time. Existing SHARED locks may persist, but no new
00248 **            SHARED locks may be obtained by other processes.
00249 ** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.
00250 **
00251 ** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a
00252 ** process that requests an EXCLUSIVE lock may actually obtain a PENDING
00253 ** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to
00254 ** sqlite3OsLock().
00255 */
00256 #define NO_LOCK         0
00257 #define SHARED_LOCK     1
00258 #define RESERVED_LOCK   2
00259 #define PENDING_LOCK    3
00260 #define EXCLUSIVE_LOCK  4
00261 
00262 /*
00263 ** File Locking Notes:  (Mostly about windows but also some info for Unix)
00264 **
00265 ** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because
00266 ** those functions are not available.  So we use only LockFile() and
00267 ** UnlockFile().
00268 **
00269 ** LockFile() prevents not just writing but also reading by other processes.
00270 ** A SHARED_LOCK is obtained by locking a single randomly-chosen 
00271 ** byte out of a specific range of bytes. The lock byte is obtained at 
00272 ** random so two separate readers can probably access the file at the 
00273 ** same time, unless they are unlucky and choose the same lock byte.
00274 ** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.
00275 ** There can only be one writer.  A RESERVED_LOCK is obtained by locking
00276 ** a single byte of the file that is designated as the reserved lock byte.
00277 ** A PENDING_LOCK is obtained by locking a designated byte different from
00278 ** the RESERVED_LOCK byte.
00279 **
00280 ** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available,
00281 ** which means we can use reader/writer locks.  When reader/writer locks
00282 ** are used, the lock is placed on the same range of bytes that is used
00283 ** for probabilistic locking in Win95/98/ME.  Hence, the locking scheme
00284 ** will support two or more Win95 readers or two or more WinNT readers.
00285 ** But a single Win95 reader will lock out all WinNT readers and a single
00286 ** WinNT reader will lock out all other Win95 readers.
00287 **
00288 ** The following #defines specify the range of bytes used for locking.
00289 ** SHARED_SIZE is the number of bytes available in the pool from which
00290 ** a random byte is selected for a shared lock.  The pool of bytes for
00291 ** shared locks begins at SHARED_FIRST. 
00292 **
00293 ** These #defines are available in sqlite_aux.h so that adaptors for
00294 ** connecting SQLite to other operating systems can use the same byte
00295 ** ranges for locking.  In particular, the same locking strategy and
00296 ** byte ranges are used for Unix.  This leaves open the possiblity of having
00297 ** clients on win95, winNT, and unix all talking to the same shared file
00298 ** and all locking correctly.  To do so would require that samba (or whatever
00299 ** tool is being used for file sharing) implements locks correctly between
00300 ** windows and unix.  I'm guessing that isn't likely to happen, but by
00301 ** using the same locking range we are at least open to the possibility.
00302 **
00303 ** Locking in windows is manditory.  For this reason, we cannot store
00304 ** actual data in the bytes used for locking.  The pager never allocates
00305 ** the pages involved in locking therefore.  SHARED_SIZE is selected so
00306 ** that all locks will fit on a single page even at the minimum page size.
00307 ** PENDING_BYTE defines the beginning of the locks.  By default PENDING_BYTE
00308 ** is set high so that we don't have to allocate an unused page except
00309 ** for very large databases.  But one should test the page skipping logic 
00310 ** by setting PENDING_BYTE low and running the entire regression suite.
00311 **
00312 ** Changing the value of PENDING_BYTE results in a subtly incompatible
00313 ** file format.  Depending on how it is changed, you might not notice
00314 ** the incompatibility right away, even running a full regression test.
00315 ** The default location of PENDING_BYTE is the first byte past the
00316 ** 1GB boundary.
00317 **
00318 */
00319 #ifndef SQLITE_TEST
00320 #define PENDING_BYTE      0x40000000  /* First byte past the 1GB boundary */
00321 #else
00322 extern unsigned int sqlite3_pending_byte;
00323 #define PENDING_BYTE sqlite3_pending_byte
00324 #endif
00325 
00326 #define RESERVED_BYTE     (PENDING_BYTE+1)
00327 #define SHARED_FIRST      (PENDING_BYTE+2)
00328 #define SHARED_SIZE       510
00329 
00330 /*
00331 ** Prototypes for operating system interface routines.
00332 */
00333 int sqlite3OsClose(OsFile**);
00334 int sqlite3OsOpenDirectory(OsFile*, const char*);
00335 int sqlite3OsRead(OsFile*, void*, int amt);
00336 int sqlite3OsWrite(OsFile*, const void*, int amt);
00337 int sqlite3OsSeek(OsFile*, i64 offset);
00338 int sqlite3OsTruncate(OsFile*, i64 size);
00339 int sqlite3OsSync(OsFile*, int);
00340 void sqlite3OsSetFullSync(OsFile *id, int setting);
00341 int sqlite3OsFileHandle(OsFile *id);
00342 int sqlite3OsFileSize(OsFile*, i64 *pSize);
00343 int sqlite3OsLock(OsFile*, int);
00344 int sqlite3OsUnlock(OsFile*, int);
00345 int sqlite3OsLockState(OsFile *id);
00346 int sqlite3OsCheckReservedLock(OsFile *id);
00347 int sqlite3OsOpenReadWrite(const char*, OsFile**, int*);
00348 int sqlite3OsOpenExclusive(const char*, OsFile**, int);
00349 int sqlite3OsOpenReadOnly(const char*, OsFile**);
00350 int sqlite3OsDelete(const char*);
00351 int sqlite3OsFileExists(const char*);
00352 char *sqlite3OsFullPathname(const char*);
00353 int sqlite3OsIsDirWritable(char*);
00354 int sqlite3OsSyncDirectory(const char*);
00355 int sqlite3OsTempFileName(char*);
00356 int sqlite3OsRandomSeed(char*);
00357 int sqlite3OsSleep(int ms);
00358 int sqlite3OsCurrentTime(double*);
00359 void sqlite3OsEnterMutex(void);
00360 void sqlite3OsLeaveMutex(void);
00361 int sqlite3OsInMutex(int);
00362 ThreadData *sqlite3OsThreadSpecificData(int);
00363 void *sqlite3OsMalloc(int);
00364 void *sqlite3OsRealloc(void *, int);
00365 void sqlite3OsFree(void *);
00366 int sqlite3OsAllocationSize(void *);
00367 
00368 /*
00369 ** If the SQLITE_ENABLE_REDEF_IO macro is defined, then the OS-layer
00370 ** interface routines are not called directly but are invoked using
00371 ** pointers to functions.  This allows the implementation of various
00372 ** OS-layer interface routines to be modified at run-time.  There are
00373 ** obscure but legitimate reasons for wanting to do this.  But for
00374 ** most users, a direct call to the underlying interface is preferable
00375 ** so the the redefinable I/O interface is turned off by default.
00376 */
00377 #ifdef SQLITE_ENABLE_REDEF_IO
00378 
00379 /*
00380 ** When redefinable I/O is enabled, a single global instance of the
00381 ** following structure holds pointers to the routines that SQLite 
00382 ** uses to talk with the underlying operating system.  Modify this
00383 ** structure (before using any SQLite API!) to accomodate perculiar
00384 ** operating system interfaces or behaviors.
00385 */
00386 struct sqlite3OsVtbl {
00387   int (*xOpenReadWrite)(const char*, OsFile**, int*);
00388   int (*xOpenExclusive)(const char*, OsFile**, int);
00389   int (*xOpenReadOnly)(const char*, OsFile**);
00390 
00391   int (*xDelete)(const char*);
00392   int (*xFileExists)(const char*);
00393   char *(*xFullPathname)(const char*);
00394   int (*xIsDirWritable)(char*);
00395   int (*xSyncDirectory)(const char*);
00396   int (*xTempFileName)(char*);
00397 
00398   int (*xRandomSeed)(char*);
00399   int (*xSleep)(int ms);
00400   int (*xCurrentTime)(double*);
00401 
00402   void (*xEnterMutex)(void);
00403   void (*xLeaveMutex)(void);
00404   int (*xInMutex)(int);
00405   ThreadData *(*xThreadSpecificData)(int);
00406 
00407   void *(*xMalloc)(int);
00408   void *(*xRealloc)(void *, int);
00409   void (*xFree)(void *);
00410   int (*xAllocationSize)(void *);
00411 };
00412 
00413 /* Macro used to comment out routines that do not exists when there is
00414 ** no disk I/O 
00415 */
00416 #ifdef SQLITE_OMIT_DISKIO
00417 # define IF_DISKIO(X)  0
00418 #else
00419 # define IF_DISKIO(X)  X
00420 #endif
00421 
00422 #ifdef _SQLITE_OS_C_
00423   /*
00424   ** The os.c file implements the global virtual function table.
00425   */
00426   struct sqlite3OsVtbl sqlite3Os = {
00427     IF_DISKIO( sqlite3OsOpenReadWrite ),
00428     IF_DISKIO( sqlite3OsOpenExclusive ),
00429     IF_DISKIO( sqlite3OsOpenReadOnly ),
00430     IF_DISKIO( sqlite3OsDelete ),
00431     IF_DISKIO( sqlite3OsFileExists ),
00432     IF_DISKIO( sqlite3OsFullPathname ),
00433     IF_DISKIO( sqlite3OsIsDirWritable ),
00434     IF_DISKIO( sqlite3OsSyncDirectory ),
00435     IF_DISKIO( sqlite3OsTempFileName ),
00436     sqlite3OsRandomSeed,
00437     sqlite3OsSleep,
00438     sqlite3OsCurrentTime,
00439     sqlite3OsEnterMutex,
00440     sqlite3OsLeaveMutex,
00441     sqlite3OsInMutex,
00442     sqlite3OsThreadSpecificData,
00443     sqlite3OsMalloc,
00444     sqlite3OsRealloc,
00445     sqlite3OsFree,
00446     sqlite3OsAllocationSize
00447   };
00448 #else
00449   /*
00450   ** Files other than os.c just reference the global virtual function table. 
00451   */
00452   extern struct sqlite3OsVtbl sqlite3Os;
00453 #endif /* _SQLITE_OS_C_ */
00454 
00455 
00456 /* This additional API routine is available with redefinable I/O */
00457 struct sqlite3OsVtbl *sqlite3_os_switch(void);
00458 
00459 
00460 /*
00461 ** Redefine the OS interface to go through the virtual function table
00462 ** rather than calling routines directly.
00463 */
00464 #undef sqlite3OsOpenReadWrite
00465 #undef sqlite3OsOpenExclusive
00466 #undef sqlite3OsOpenReadOnly
00467 #undef sqlite3OsDelete
00468 #undef sqlite3OsFileExists
00469 #undef sqlite3OsFullPathname
00470 #undef sqlite3OsIsDirWritable
00471 #undef sqlite3OsSyncDirectory
00472 #undef sqlite3OsTempFileName
00473 #undef sqlite3OsRandomSeed
00474 #undef sqlite3OsSleep
00475 #undef sqlite3OsCurrentTime
00476 #undef sqlite3OsEnterMutex
00477 #undef sqlite3OsLeaveMutex
00478 #undef sqlite3OsInMutex
00479 #undef sqlite3OsThreadSpecificData
00480 #undef sqlite3OsMalloc
00481 #undef sqlite3OsRealloc
00482 #undef sqlite3OsFree
00483 #undef sqlite3OsAllocationSize
00484 #define sqlite3OsOpenReadWrite      sqlite3Os.xOpenReadWrite
00485 #define sqlite3OsOpenExclusive      sqlite3Os.xOpenExclusive
00486 #define sqlite3OsOpenReadOnly       sqlite3Os.xOpenReadOnly
00487 #define sqlite3OsDelete             sqlite3Os.xDelete
00488 #define sqlite3OsFileExists         sqlite3Os.xFileExists
00489 #define sqlite3OsFullPathname       sqlite3Os.xFullPathname
00490 #define sqlite3OsIsDirWritable      sqlite3Os.xIsDirWritable
00491 #define sqlite3OsSyncDirectory      sqlite3Os.xSyncDirectory
00492 #define sqlite3OsTempFileName       sqlite3Os.xTempFileName
00493 #define sqlite3OsRandomSeed         sqlite3Os.xRandomSeed
00494 #define sqlite3OsSleep              sqlite3Os.xSleep
00495 #define sqlite3OsCurrentTime        sqlite3Os.xCurrentTime
00496 #define sqlite3OsEnterMutex         sqlite3Os.xEnterMutex
00497 #define sqlite3OsLeaveMutex         sqlite3Os.xLeaveMutex
00498 #define sqlite3OsInMutex            sqlite3Os.xInMutex
00499 #define sqlite3OsThreadSpecificData sqlite3Os.xThreadSpecificData
00500 #define sqlite3OsMalloc             sqlite3Os.xMalloc
00501 #define sqlite3OsRealloc            sqlite3Os.xRealloc
00502 #define sqlite3OsFree               sqlite3Os.xFree
00503 #define sqlite3OsAllocationSize     sqlite3Os.xAllocationSize
00504 
00505 #endif /* SQLITE_ENABLE_REDEF_IO */
00506 
00507 #endif /* _SQLITE_OS_H_ */