aboutsummaryrefslogtreecommitdiff
path: root/src/os_setup.h
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2013-11-26 01:00:31 +0000
committermistachkin <mistachkin@noemail.net>2013-11-26 01:00:31 +0000
commitf74b9e0965bdf30ca8911ca28a5f7ad6e11d6b22 (patch)
tree943bc22c010b262a8d009f8e194cdcba29394a4f /src/os_setup.h
parent9598ae2c11591b356fe114d049febd541146b3e8 (diff)
downloadsqlite-f74b9e0965bdf30ca8911ca28a5f7ad6e11d6b22.tar.gz
sqlite-f74b9e0965bdf30ca8911ca28a5f7ad6e11d6b22.zip
Further work on Windows header file reform.
FossilOrigin-Name: 540f5525160b516de282136ca77f909115a51630
Diffstat (limited to 'src/os_setup.h')
-rw-r--r--src/os_setup.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/os_setup.h b/src/os_setup.h
new file mode 100644
index 000000000..b04fbf7cf
--- /dev/null
+++ b/src/os_setup.h
@@ -0,0 +1,56 @@
+/*
+** 2013 November 25
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code that is specific to Windows.
+*/
+#ifndef _OS_SETUP_H_
+#define _OS_SETUP_H_
+
+/*
+** Figure out if we are dealing with Unix, Windows, or some other operating
+** system.
+**
+** After the following block of preprocess macros, all of SQLITE_OS_UNIX,
+** SQLITE_OS_WIN, and SQLITE_OS_OTHER will defined to either 1 or 0. One of
+** the four will be 1. The other three will be 0.
+*/
+#if defined(SQLITE_OS_OTHER)
+# if SQLITE_OS_OTHER==1
+# undef SQLITE_OS_UNIX
+# define SQLITE_OS_UNIX 0
+# undef SQLITE_OS_WIN
+# define SQLITE_OS_WIN 0
+# else
+# undef SQLITE_OS_OTHER
+# endif
+#endif
+#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
+# define SQLITE_OS_OTHER 0
+# ifndef SQLITE_OS_WIN
+# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
+ defined(__MINGW32__) || defined(__BORLANDC__)
+# define SQLITE_OS_WIN 1
+# define SQLITE_OS_UNIX 0
+# else
+# define SQLITE_OS_WIN 0
+# define SQLITE_OS_UNIX 1
+# endif
+# else
+# define SQLITE_OS_UNIX 0
+# endif
+#else
+# ifndef SQLITE_OS_WIN
+# define SQLITE_OS_WIN 0
+# endif
+#endif
+
+#endif /* _OS_SETUP_H_ */