summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/msvc.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/msvc.h')
-rw-r--r--crawl-ref/source/msvc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/msvc.h b/crawl-ref/source/msvc.h
new file mode 100644
index 0000000000..d1dab39485
--- /dev/null
+++ b/crawl-ref/source/msvc.h
@@ -0,0 +1,16 @@
+#define snprintf _snprintf
+#define itoa _itoa
+#define strcasecmp _stricmp
+#define strncasecmp _strnicmp
+#define unlink _unlink
+
+// No va_copy in MSVC
+#if defined(_MSC_VER) || !defined(va_copy)
+#define va_copy(dst, src) \
+ ((void) memcpy(&(dst), &(src), sizeof(va_list)))
+#endif
+
+#pragma warning( disable : 4290 )
+#pragma warning( disable : 4351 )
+// bool -> int
+#pragma warning( disable : 4800 )