mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 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 | ** |
mistachkin | 2e72791 | 2013-11-26 01:13:18 +0000 | [diff] [blame] | 13 | ** This file contains pre-processor directives related to operating system |
| 14 | ** detection and/or setup. |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 15 | */ |
drh | 43f58d6 | 2016-07-09 16:14:45 +0000 | [diff] [blame] | 16 | #ifndef SQLITE_OS_SETUP_H |
| 17 | #define SQLITE_OS_SETUP_H |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 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 SQLITE_OS_UNIX, |
| 24 | ** SQLITE_OS_WIN, and SQLITE_OS_OTHER will defined to either 1 or 0. One of |
mistachkin | fdf9f04 | 2014-05-05 17:43:28 +0000 | [diff] [blame] | 25 | ** the three will be 1. The other two will be 0. |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 26 | */ |
| 27 | #if defined(SQLITE_OS_OTHER) |
| 28 | # if SQLITE_OS_OTHER==1 |
| 29 | # undef SQLITE_OS_UNIX |
| 30 | # define SQLITE_OS_UNIX 0 |
| 31 | # undef SQLITE_OS_WIN |
| 32 | # define SQLITE_OS_WIN 0 |
| 33 | # else |
| 34 | # undef SQLITE_OS_OTHER |
| 35 | # endif |
| 36 | #endif |
| 37 | #if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER) |
| 38 | # define SQLITE_OS_OTHER 0 |
| 39 | # ifndef 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 | # else |
| 49 | # define SQLITE_OS_UNIX 0 |
| 50 | # endif |
| 51 | #else |
| 52 | # ifndef SQLITE_OS_WIN |
| 53 | # define SQLITE_OS_WIN 0 |
| 54 | # endif |
| 55 | #endif |
| 56 | |
drh | 43f58d6 | 2016-07-09 16:14:45 +0000 | [diff] [blame] | 57 | #endif /* SQLITE_OS_SETUP_H */ |