comparison sqlite/os_os2.h @ 1434:b6b61becdf4e trunk

[svn] - add sqlite/ directory
author nenolod
date Thu, 27 Jul 2006 22:41:31 -0700
parents
children
comparison
equal deleted inserted replaced
1433:3cbe3d14ea68 1434:b6b61becdf4e
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 defined OS-specific features for OS/2.
14 */
15 #ifndef _SQLITE_OS_OS2_H_
16 #define _SQLITE_OS_OS2_H_
17
18 /*
19 ** standard include files.
20 */
21 #include <sys/types.h>
22 #include <sys/stat.h>
23 #include <fcntl.h>
24 #include <unistd.h>
25
26 /*
27 ** Macros used to determine whether or not to use threads. The
28 ** SQLITE_UNIX_THREADS macro is defined if we are synchronizing for
29 ** Posix threads and SQLITE_W32_THREADS is defined if we are
30 ** synchronizing using Win32 threads.
31 */
32 /* this mutex implementation only available with EMX */
33 #if defined(THREADSAFE) && THREADSAFE
34 # include <sys/builtin.h>
35 # include <sys/smutex.h>
36 # define SQLITE_OS2_THREADS 1
37 #endif
38
39 /*
40 ** The OsFile structure is a operating-system independing representation
41 ** of an open file handle. It is defined differently for each architecture.
42 **
43 ** This is the definition for Unix.
44 **
45 ** OsFile.locktype takes one of the values SHARED_LOCK, RESERVED_LOCK,
46 ** PENDING_LOCK or EXCLUSIVE_LOCK.
47 */
48 typedef struct OsFile OsFile;
49 struct OsFile {
50 int h; /* The file descriptor (LHANDLE) */
51 int locked; /* True if this user holds the lock */
52 int delOnClose; /* True if file is to be deleted on close */
53 char *pathToDel; /* Name of file to delete on close */
54 unsigned char locktype; /* The type of lock held on this fd */
55 unsigned char isOpen; /* True if needs to be closed */
56 unsigned char fullSync;
57 };
58
59 /*
60 ** Maximum number of characters in a temporary file name
61 */
62 #define SQLITE_TEMPNAME_SIZE 200
63
64 /*
65 ** Minimum interval supported by sqlite3OsSleep().
66 */
67 #define SQLITE_MIN_SLEEP_MS 1
68
69 #ifndef SQLITE_DEFAULT_FILE_PERMISSIONS
70 # define SQLITE_DEFAULT_FILE_PERMISSIONS 0600
71 #endif
72
73 #endif /* _SQLITE_OS_OS2_H_ */