4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing:
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.
11 ******************************************************************************
13 ** This file contains pre-processor directives related to operating system
14 ** detection and/or setup.
16 #ifndef SQLITE_OS_SETUP_H
17 #define SQLITE_OS_SETUP_H
20 ** Figure out if we are dealing with Unix, Windows, or some other operating
23 ** After the following block of preprocess macros, all of
30 ** will defined to either 1 or 0. One of them will be 1. The others will be 0.
31 ** If none of the macros are initially defined, then select either
32 ** SQLITE_OS_UNIX or SQLITE_OS_WIN depending on the target platform.
34 ** If SQLITE_OS_OTHER=1 is specified at compile-time, then the application
35 ** must provide its own VFS implementation together with sqlite3_os_init()
36 ** and sqlite3_os_end() routines.
38 #if !defined(SQLITE_OS_KV) && !defined(SQLITE_OS_OTHER) && \
39 !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_WIN)
40 # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
41 defined(__MINGW32__) || defined(__BORLANDC__)
42 # define SQLITE_OS_WIN 1
43 # define SQLITE_OS_UNIX 0
45 # define SQLITE_OS_WIN 0
46 # define SQLITE_OS_UNIX 1
49 #if SQLITE_OS_OTHER+1>1
51 # define SQLITE_OS_KV 0
52 # undef SQLITE_OS_UNIX
53 # define SQLITE_OS_UNIX 0
55 # define SQLITE_OS_WIN 0
58 # undef SQLITE_OS_OTHER
59 # define SQLITE_OS_OTHER 0
60 # undef SQLITE_OS_UNIX
61 # define SQLITE_OS_UNIX 0
63 # define SQLITE_OS_WIN 0
64 # define SQLITE_OMIT_LOAD_EXTENSION 1
65 # define SQLITE_OMIT_WAL 1
66 # define SQLITE_OMIT_DEPRECATED 1
67 # undef SQLITE_TEMP_STORE
68 # define SQLITE_TEMP_STORE 3 /* Always use memory for temporary storage */
70 # define SQLITE_OMIT_SHARED_CACHE 1
71 # define SQLITE_OMIT_AUTOINIT 1
73 #if SQLITE_OS_UNIX+1>1
75 # define SQLITE_OS_KV 0
76 # undef SQLITE_OS_OTHER
77 # define SQLITE_OS_OTHER 0
79 # define SQLITE_OS_WIN 0
83 # define SQLITE_OS_KV 0
84 # undef SQLITE_OS_OTHER
85 # define SQLITE_OS_OTHER 0
86 # undef SQLITE_OS_UNIX
87 # define SQLITE_OS_UNIX 0
91 #endif /* SQLITE_OS_SETUP_H */