]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1440 v7.4.1440
authorBram Moolenaar <Bram@vim.org>
Sat, 27 Feb 2016 20:27:20 +0000 (21:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 27 Feb 2016 20:27:20 +0000 (21:27 +0100)
Problem:    Can't build on Windows.
Solution:   Change #ifdefs.  Only define isnan when used.

src/eval.c
src/json.c
src/macros.h
src/version.c

index c3b7bccf1d460d9de173955b2a6a21a330e91d1c..4afceccfaf12c9f0fbdd29c9a49cde8f6c6d344a 100644 (file)
@@ -10,6 +10,7 @@
 /*
  * eval.c: Expression evaluation.
  */
+#define USING_FLOAT_STUFF
 
 #include "vim.h"
 
index 36876455b5691876de1289a4596fd17bf4e2dc49..518a75a6889b6a26ca257192ca7876a69f1f0f86 100644 (file)
@@ -12,6 +12,7 @@
  *
  * Follows this standard: https://tools.ietf.org/html/rfc7159.html
  */
+#define USING_FLOAT_STUFF
 
 #include "vim.h"
 
index 464eb66a10cdfc71f0504888445858bb69028717..b86c479e720486f7e37a2095ec01da244d77d786 100644 (file)
    /* 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
index 28e16be6e3d6ffe37ea708eff1f7ebcaf8722ef5..08ce4146e215c65ea6f06ae2874ddd22a3d1755e 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1440,
 /**/
     1439,
 /**/