1 /* 2 ** 2004 May 22 3 ** 4 ** The author disclaims copyright to this source code. In place of 5 ** a legal notice, here is a blessing: 6 ** 7 ** May you do good and not evil. 8 ** May you find forgiveness for yourself and forgive others. 9 ** May you share freely, never taking more than you give. 10 ** 11 ****************************************************************************** 12 ** 13 ** This header file defines OS-specific features for Win32 14 */ 15 #ifndef _SQLITE_OS_WIN_H_ 16 #define _SQLITE_OS_WIN_H_ 17 18 #include <windows.h> 19 #include <winbase.h> 20 21 #if defined(_MSC_VER) || defined(__BORLANDC__) 22 typedef __int64 off_t; 23 #else 24 # if !defined(_CYGWIN_TYPES_H) 25 typedef long long off_t; 26 # if defined(__MINGW32__) 27 # define _OFF_T_ 28 # endif 29 # endif 30 #endif 31 32 /* 33 ** The OsFile structure is a operating-system independing representation 34 ** of an open file handle. It is defined differently for each architecture. 35 ** 36 ** This is the definition for Win32. 37 */ 38 typedef struct OsFile OsFile; 39 struct OsFile { 40 HANDLE h; /* Handle for accessing the file */ 41 int locked; /* 0: unlocked, <0: write lock, >0: read lock */ 42 }; 43 44 45 #define SQLITE_TEMPNAME_SIZE (MAX_PATH+50) 46 #define SQLITE_MIN_SLEEP_MS 1 47 48 49 #endif /* _SQLITE_OS_WIN_H_ */ 50