aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/encode.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-20 22:40:31 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-01-20 23:51:12 +0100
commitc6a039d087ca2b333d1d3a2604d675e0010f7063 (patch)
tree594c694e2396ed96b804b7106c38db9ebf899a0d /src/nvim/eval/encode.c
parent53c0f0bba50f424683d281a3631aee86cce78368 (diff)
downloadrneovim-c6a039d087ca2b333d1d3a2604d675e0010f7063.tar.gz
rneovim-c6a039d087ca2b333d1d3a2604d675e0010f7063.tar.bz2
rneovim-c6a039d087ca2b333d1d3a2604d675e0010f7063.zip
build: Fix -Wconversion warnings for fpclassify et al
closes #8274 - Instead of #undef and re-#define, define "xfoo" wrappers to avoid include-order sensitivity. - The warnings are bogus, caused by bad interaction between glibc and clang 6+. - https://bugs.llvm.org/show_bug.cgi?id=35268 - https://bugs.llvm.org/show_bug.cgi?id=39738 - https://bugzilla.redhat.com/show_bug.cgi?id=1472437
Diffstat (limited to 'src/nvim/eval/encode.c')
-rw-r--r--src/nvim/eval/encode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c
index 64658b52d9..cf9ecd8d56 100644
--- a/src/nvim/eval/encode.c
+++ b/src/nvim/eval/encode.c
@@ -28,11 +28,6 @@
#include "nvim/lib/kvec.h"
#include "nvim/eval/typval_encode.h"
-#ifdef __MINGW32__
-# undef fpclassify
-# define fpclassify __fpclassify
-#endif
-
#define ga_concat(a, b) ga_concat(a, (char_u *)b)
#define utf_ptr2char(b) utf_ptr2char((char_u *)b)
#define utf_ptr2len(b) ((size_t)utf_ptr2len((char_u *)b))
@@ -327,7 +322,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf,
#define TYPVAL_ENCODE_CONV_FLOAT(tv, flt) \
do { \
const float_T flt_ = (flt); \
- switch (fpclassify(flt_)) { \
+ switch (xfpclassify(flt_)) { \
case FP_NAN: { \
ga_concat(gap, (char_u *) "str2float('nan')"); \
break; \
@@ -531,7 +526,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf,
#define TYPVAL_ENCODE_CONV_FLOAT(tv, flt) \
do { \
const float_T flt_ = (flt); \
- switch (fpclassify(flt_)) { \
+ switch (xfpclassify(flt_)) { \
case FP_NAN: { \
EMSG(_("E474: Unable to represent NaN value in JSON")); \
return FAIL; \