summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-27 21:27:20 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-27 21:27:20 +0100
commitfefecb0fbe14c44d46f91036d76bbb6c28162da8 (patch)
tree72b405825f3d5e2da3acb619a79bae99b092b26f /src
parentf97ddbeb255c64a2b3d9db4b049278cd286070a6 (diff)
downloadvim-git-fefecb0fbe14c44d46f91036d76bbb6c28162da8.tar.gz
patch 7.4.1440v7.4.1440
Problem: Can't build on Windows. Solution: Change #ifdefs. Only define isnan when used.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c1
-rw-r--r--src/json.c1
-rw-r--r--src/macros.h38
-rw-r--r--src/version.c2
4 files changed, 25 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c
index c3b7bccf1..4afceccfa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -10,6 +10,7 @@
/*
* eval.c: Expression evaluation.
*/
+#define USING_FLOAT_STUFF
#include "vim.h"
diff --git a/src/json.c b/src/json.c
index 36876455b..518a75a68 100644
--- a/src/json.c
+++ b/src/json.c
@@ -12,6 +12,7 @@
*
* Follows this standard: https://tools.ietf.org/html/rfc7159.html
*/
+#define USING_FLOAT_STUFF
#include "vim.h"
diff --git a/src/macros.h b/src/macros.h
index 464eb66a1..b86c479e7 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -327,25 +327,29 @@
/* for isnan() and isinf() */
# include <math.h>
# endif
-# if defined(WIN32) && !defined(isnan)
-# define isnan(x) _isnan(x)
-# define isinf(x) (!_finite(x) && !_isnan(x))
-# else
-# ifndef HAVE_ISNAN
- static inline int isnan(double x) { return x != x; }
+# ifdef USING_FLOAT_STUFF
+# if defined(WIN32)
+# ifndef isnan
+# define isnan(x) _isnan(x)
+# define isinf(x) (!_finite(x) && !_isnan(x))
+# endif
+# else
+# ifndef HAVE_ISNAN
+ static inline int isnan(double x) { return x != x; }
+# endif
+# ifndef HAVE_ISINF
+ static inline int isinf(double x) { return !isnan(x) && isnan(x - x); }
+# endif
# endif
-# ifndef HAVE_ISINF
- static inline int isinf(double x) { return !isnan(x) && isnan(x - x); }
+# if !defined(INFINITY)
+# if defined(DBL_MAX)
+# define INFINITY (DBL_MAX+DBL_MAX)
+# else
+# define INFINITY (1.0 / 0.0)
+# endif
# endif
-# endif
-# if !defined(INFINITY)
-# if defined(DBL_MAX)
-# define INFINITY (DBL_MAX+DBL_MAX)
-# else
-# define INFINITY (1.0 / 0.0)
+# if !defined(NAN)
+# define NAN (INFINITY-INFINITY)
# endif
# endif
-# if !defined(NAN)
-# define NAN (INFINITY-INFINITY)
-# endif
#endif
diff --git a/src/version.c b/src/version.c
index 28e16be6e..08ce4146e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1440,
+/**/
1439,
/**/
1438,