mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warning about math functions, include isnan, isinf, fpclassify.
This commit is contained in:
parent
3632f02564
commit
43833af53c
@ -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; \
|
||||
|
@ -50,6 +50,18 @@
|
||||
#include "nvim/os/shell.h"
|
||||
#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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user