aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-01-30 16:02:43 +0000
committerdrh <drh@noemail.net>2012-01-30 16:02:43 +0000
commitd794e8b026b03230f19fe4f6e292b20dfb13b2e3 (patch)
treee35cb1b867b6429bf49dd7680c7c7c6d9528d75a /src
parentb21a8e4834b7d80f72e798f570f9dfdc90339b5a (diff)
downloadsqlite-d794e8b026b03230f19fe4f6e292b20dfb13b2e3.tar.gz
sqlite-d794e8b026b03230f19fe4f6e292b20dfb13b2e3.zip
Do not rely on the _WIN32_WINNT macro as vs2005 does not define it by default.
Instead, always assume winNT unless the makefile explicitly sets SQLITE_OS_WINNT=0. FossilOrigin-Name: 1ce4d21d521c383f2607222006023b6812f147bc
Diffstat (limited to 'src')
-rw-r--r--src/os.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/os.h b/src/os.h
index 08cd178e7..7dc0c8c2f 100644
--- a/src/os.h
+++ b/src/os.h
@@ -91,11 +91,23 @@
/*
** Determine if we are dealing with Windows NT.
+**
+** We ought to be able to determine if we are compiling for win98 or winNT
+** using the _WIN32_WINNT macro as follows:
+**
+** #if defined(_WIN32_WINNT)
+** # define SQLITE_OS_WINNT 1
+** #else
+** # define SQLITE_OS_WINNT 0
+** #endif
+**
+** However, vs2005 does not set _WIN32_WINNT by default, as it ought to,
+** so the above test does not work. We'll just assume that everything is
+** winNT unless the programmer explicitly says otherwise by setting
+** SQLITE_OS_WINNT to 0.
*/
-#if defined(_WIN32_WINNT)
+#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT)
# define SQLITE_OS_WINNT 1
-#else
-# define SQLITE_OS_WINNT 0
#endif
/*