xref: /sqlite-3.40.0/src/os_setup.h (revision 89ccfac0)
1 /*
2 ** 2013 November 25
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 file contains pre-processor directives related to operating system
14 ** detection and/or setup.
15 */
16 #ifndef SQLITE_OS_SETUP_H
17 #define SQLITE_OS_SETUP_H
18 
19 /*
20 ** Figure out if we are dealing with Unix, Windows, or some other operating
21 ** system.
22 **
23 ** After the following block of preprocess macros, all of
24 **
25 **    SQLITE_OS_KV
26 **    SQLITE_OS_OTHER
27 **    SQLITE_OS_UNIX
28 **    SQLITE_OS_WIN
29 **
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.
33 **
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.
37 */
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
44 #  else
45 #    define SQLITE_OS_WIN 0
46 #    define SQLITE_OS_UNIX 1
47 #  endif
48 #endif
49 #if SQLITE_OS_OTHER+1>1
50 #  undef SQLITE_OS_KV
51 #  define SQLITE_OS_KV 0
52 #  undef SQLITE_OS_UNIX
53 #  define SQLITE_OS_UNIX 0
54 #  undef SQLITE_OS_WIN
55 #  define SQLITE_OS_WIN 0
56 #endif
57 #if SQLITE_OS_KV+1>1
58 #  undef SQLITE_OS_OTHER
59 #  define SQLITE_OS_OTHER 0
60 #  undef SQLITE_OS_UNIX
61 #  define SQLITE_OS_UNIX 0
62 #  undef SQLITE_OS_WIN
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 */
69 #  define SQLITE_DQS 0
70 #  define SQLITE_OMIT_SHARED_CACHE 1
71 #  define SQLITE_OMIT_AUTOINIT 1
72 #endif
73 #if SQLITE_OS_UNIX+1>1
74 #  undef SQLITE_OS_KV
75 #  define SQLITE_OS_KV 0
76 #  undef SQLITE_OS_OTHER
77 #  define SQLITE_OS_OTHER 0
78 #  undef SQLITE_OS_WIN
79 #  define SQLITE_OS_WIN 0
80 #endif
81 #if SQLITE_OS_WIN+1>1
82 #  undef SQLITE_OS_KV
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
88 #endif
89 
90 
91 #endif /* SQLITE_OS_SETUP_H */
92