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 _OS_SETUP_H_ 17 #define _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 SQLITE_OS_UNIX, 24 ** SQLITE_OS_WIN, and SQLITE_OS_OTHER will defined to either 1 or 0. One of 25 ** the three will be 1. The other two will be 0. 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 57 #endif /* _OS_SETUP_H_ */ 58