1f74b9e09Smistachkin /* 2f74b9e09Smistachkin ** 2013 November 25 3f74b9e09Smistachkin ** 4f74b9e09Smistachkin ** The author disclaims copyright to this source code. In place of 5f74b9e09Smistachkin ** a legal notice, here is a blessing: 6f74b9e09Smistachkin ** 7f74b9e09Smistachkin ** May you do good and not evil. 8f74b9e09Smistachkin ** May you find forgiveness for yourself and forgive others. 9f74b9e09Smistachkin ** May you share freely, never taking more than you give. 10f74b9e09Smistachkin ** 11f74b9e09Smistachkin ****************************************************************************** 12f74b9e09Smistachkin ** 132e727917Smistachkin ** This file contains pre-processor directives related to operating system 142e727917Smistachkin ** detection and/or setup. 15f74b9e09Smistachkin */ 1643f58d6aSdrh #ifndef SQLITE_OS_SETUP_H 1743f58d6aSdrh #define SQLITE_OS_SETUP_H 18f74b9e09Smistachkin 19f74b9e09Smistachkin /* 20f74b9e09Smistachkin ** Figure out if we are dealing with Unix, Windows, or some other operating 21f74b9e09Smistachkin ** system. 22f74b9e09Smistachkin ** 237585f49aSdrh ** After the following block of preprocess macros, all of 247585f49aSdrh ** 257585f49aSdrh ** SQLITE_OS_KV 267585f49aSdrh ** SQLITE_OS_OTHER 277585f49aSdrh ** SQLITE_OS_UNIX 287585f49aSdrh ** SQLITE_OS_WIN 297585f49aSdrh ** 307585f49aSdrh ** will defined to either 1 or 0. One of them will be 1. The others will be 0. 317585f49aSdrh ** If none of the macros are initially defined, then select either 327585f49aSdrh ** SQLITE_OS_UNIX or SQLITE_OS_WIN depending on the target platform. 337585f49aSdrh ** 347585f49aSdrh ** If SQLITE_OS_OTHER=1 is specified at compile-time, then the application 357585f49aSdrh ** must provide its own VFS implementation together with sqlite3_os_init() 367585f49aSdrh ** and sqlite3_os_end() routines. 37f74b9e09Smistachkin */ 387585f49aSdrh #if !defined(SQLITE_OS_KV) && !defined(SQLITE_OS_OTHER) && \ 397585f49aSdrh !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_WIN) 40f74b9e09Smistachkin # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \ 41f74b9e09Smistachkin defined(__MINGW32__) || defined(__BORLANDC__) 42f74b9e09Smistachkin # define SQLITE_OS_WIN 1 43f74b9e09Smistachkin # define SQLITE_OS_UNIX 0 44f74b9e09Smistachkin # else 45f74b9e09Smistachkin # define SQLITE_OS_WIN 0 46f74b9e09Smistachkin # define SQLITE_OS_UNIX 1 47f74b9e09Smistachkin # endif 48f74b9e09Smistachkin #endif 497585f49aSdrh #if SQLITE_OS_OTHER+1>1 507585f49aSdrh # undef SQLITE_OS_KV 517585f49aSdrh # define SQLITE_OS_KV 0 527585f49aSdrh # undef SQLITE_OS_UNIX 537585f49aSdrh # define SQLITE_OS_UNIX 0 547585f49aSdrh # undef SQLITE_OS_WIN 55f74b9e09Smistachkin # define SQLITE_OS_WIN 0 56f74b9e09Smistachkin #endif 577585f49aSdrh #if SQLITE_OS_KV+1>1 587585f49aSdrh # undef SQLITE_OS_OTHER 597585f49aSdrh # define SQLITE_OS_OTHER 0 607585f49aSdrh # undef SQLITE_OS_UNIX 617585f49aSdrh # define SQLITE_OS_UNIX 0 627585f49aSdrh # undef SQLITE_OS_WIN 637585f49aSdrh # define SQLITE_OS_WIN 0 647585f49aSdrh # define SQLITE_OMIT_LOAD_EXTENSION 1 657585f49aSdrh # define SQLITE_OMIT_WAL 1 66*89ccfac0Sstephan # define SQLITE_OMIT_DEPRECATED 1 677585f49aSdrh # undef SQLITE_TEMP_STORE 687585f49aSdrh # define SQLITE_TEMP_STORE 3 /* Always use memory for temporary storage */ 697585f49aSdrh # define SQLITE_DQS 0 707585f49aSdrh # define SQLITE_OMIT_SHARED_CACHE 1 717585f49aSdrh # define SQLITE_OMIT_AUTOINIT 1 72f74b9e09Smistachkin #endif 737585f49aSdrh #if SQLITE_OS_UNIX+1>1 747585f49aSdrh # undef SQLITE_OS_KV 757585f49aSdrh # define SQLITE_OS_KV 0 767585f49aSdrh # undef SQLITE_OS_OTHER 777585f49aSdrh # define SQLITE_OS_OTHER 0 787585f49aSdrh # undef SQLITE_OS_WIN 797585f49aSdrh # define SQLITE_OS_WIN 0 807585f49aSdrh #endif 817585f49aSdrh #if SQLITE_OS_WIN+1>1 827585f49aSdrh # undef SQLITE_OS_KV 837585f49aSdrh # define SQLITE_OS_KV 0 847585f49aSdrh # undef SQLITE_OS_OTHER 857585f49aSdrh # define SQLITE_OS_OTHER 0 867585f49aSdrh # undef SQLITE_OS_UNIX 877585f49aSdrh # define SQLITE_OS_UNIX 0 887585f49aSdrh #endif 897585f49aSdrh 90f74b9e09Smistachkin 9143f58d6aSdrh #endif /* SQLITE_OS_SETUP_H */ 92