diff options
author | b-r-o-c-k <brockmammen@gmail.com> | 2018-03-04 17:44:23 -0600 |
---|---|---|
committer | b-r-o-c-k <brockmammen@gmail.com> | 2018-03-04 17:44:23 -0600 |
commit | 01fc02beeee2a4c5ba66e6f93d9fb0d1fd6a4548 (patch) | |
tree | 5fa82cac28c6073998a21fdcc4b8b4361dc8db82 | |
parent | 8e30598115f49df27fa9f20544dbfc5a8ade4e26 (diff) | |
download | rneovim-01fc02beeee2a4c5ba66e6f93d9fb0d1fd6a4548.tar.gz rneovim-01fc02beeee2a4c5ba66e6f93d9fb0d1fd6a4548.tar.bz2 rneovim-01fc02beeee2a4c5ba66e6f93d9fb0d1fd6a4548.zip |
build/msvc: Add missing WIN32 macro
MSVC predefines `_WIN32`, but not `WIN32`. Also, some unnecessary includes have been removed.
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/nvim/main.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ff4d5ac3..8147afb14f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,6 +204,7 @@ int main(void) if(MSVC) # XXX: /W4 gives too many warnings. #3241 add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-DWIN32) else() add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99) @@ -223,6 +224,9 @@ endif() if(MINGW) # Use POSIX compatible stdio in Mingw add_definitions(-D__USE_MINGW_ANSI_STDIO) +endif() +if(WIN32) + # Windows Vista is the minimum supported version add_definitions(-D_WIN32_WINNT=0x0600) endif() diff --git a/src/nvim/main.c b/src/nvim/main.c index 25fb0f14d8..4288d7f9d7 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -7,11 +7,6 @@ #include <string.h> #include <stdbool.h> -#ifdef WIN32 -# include <wchar.h> -# include <winnls.h> -#endif - #include <msgpack.h> #include "nvim/ascii.h" |