summaryrefslogtreecommitdiff
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-10 16:07:44 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-10 16:07:44 +0100
commitf32c5cd6e0e6aa6d4aeacb6bf52e3d3ba21e5201 (patch)
tree9c40164b4f6be45820a7d09b905dba7abbd760c8 /src/gui_w32.c
parentb86a343280b08d6701da68ee0651e960a0a7a61c (diff)
downloadvim-git-f32c5cd6e0e6aa6d4aeacb6bf52e3d3ba21e5201.tar.gz
patch 7.4.1080v7.4.1080
Problem: VS2015 has a function HandleToLong() that is shadowed by the macro that Vim defines. Solution: Do not define HandleToLong() for MSVC version 1400 and later. (Mike Williams)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index c5bd81d85..db0a9d5bf 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1769,9 +1769,11 @@ gui_mch_init(void)
#endif
#ifdef FEAT_EVAL
-# ifndef HandleToLong
-/* HandleToLong() only exists in compilers that can do 64 bit builds */
-# define HandleToLong(h) ((long)(h))
+# if !defined(_MSC_VER) || (_MSC_VER < 1400)
+/* Define HandleToLong for old MS and non-MS compilers if not defined. */
+# ifndef HandleToLong
+# define HandleToLong(h) ((long)(h))
+# endif
# endif
/* set the v:windowid variable */
set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));