diff options
-rw-r--r-- | src/nvim/eval/encode.c | 5 | ||||
-rw-r--r-- | src/nvim/strings.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 31779a544f..f6c42a2d3c 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -288,6 +288,11 @@ int encode_read_from_list(ListReaderState *const state, char *const buf, : OK); } +#ifdef __MINGW32__ +# undef fpclassify +# define fpclassify __fpclassify +#endif + #define TYPVAL_ENCODE_CONV_STRING(tv, buf, len) \ do { \ const char *const buf_ = (const char *) buf; \ diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 687f734742..7ad61fd29c 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -51,6 +51,18 @@ #include "nvim/eval/encode.h" /* + * Fix warning on mingw32 and mingw64 + * make isnan as _isnan + * fpclassify is used by isinf, so redefine it + */ +#ifdef __MINGW32__ +# undef fpclassify +# define fpclassify __fpclassify +# undef isnan +# define isnan _isnan +#endif + +/* * Copy "string" into newly allocated memory. */ char_u *vim_strsave(const char_u *string) |