blob: 08aaa1195ac92321dcc363d8a0b18c7b968011d1 [file] [log] [blame]
mistachkinf74b9e02013-11-26 01:00:31 +00001/*
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**
mistachkin2e727912013-11-26 01:13:18 +000013** This file contains pre-processor directives related to operating system
14** detection and/or setup.
mistachkinf74b9e02013-11-26 01:00:31 +000015*/
drh43f58d62016-07-09 16:14:45 +000016#ifndef SQLITE_OS_SETUP_H
17#define SQLITE_OS_SETUP_H
mistachkinf74b9e02013-11-26 01:00:31 +000018
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
mistachkinfdf9f042014-05-05 17:43:28 +000025** the three will be 1. The other two will be 0.
mistachkinf74b9e02013-11-26 01:00:31 +000026*/
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
drh43f58d62016-07-09 16:14:45 +000057#endif /* SQLITE_OS_SETUP_H */