aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/msvc.h27
-rw-r--r--src/shell.c7
-rw-r--r--src/sqliteInt.h8
3 files changed, 42 insertions, 0 deletions
diff --git a/src/msvc.h b/src/msvc.h
new file mode 100644
index 000000000..f5d6752ea
--- /dev/null
+++ b/src/msvc.h
@@ -0,0 +1,27 @@
+/*
+** 2015 January 12
+**
+** 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 _MSVC_H_
+#define _MSVC_H_
+
+#if defined(_MSC_VER)
+#pragma warning(disable : 4100)
+#pragma warning(disable : 4127)
+#pragma warning(disable : 4232)
+#pragma warning(disable : 4244)
+/* #pragma warning(disable : 4701) */
+/* #pragma warning(disable : 4706) */
+#endif
+
+#endif /* _MSVC_H_ */
diff --git a/src/shell.c b/src/shell.c
index 7f8a9ef3a..b7a8fa8b0 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -18,6 +18,13 @@
#endif
/*
+** If requested, include the SQLite compiler options file for MSVC.
+*/
+#if defined(INCLUDE_MSVC_H)
+#include "msvc.h"
+#endif
+
+/*
** Enable large-file support for fopen() and friends on unix.
*/
#ifndef SQLITE_DISABLE_LFS
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 0a1948fef..3c591ca1c 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -16,6 +16,14 @@
#define _SQLITEINT_H_
/*
+** Include the header file used to customize the compiler options for MSVC.
+** This should be done first so that it can successfully prevent spurious
+** compiler warnings due to subsequent content in this file and other files
+** that are included by this file.
+*/
+#include "msvc.h"
+
+/*
** These #defines should enable >2GB file support on POSIX if the
** underlying operating system supports it. If the OS lacks
** large file support, or if the OS is windows, these should be no-ops.