mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 7.4.1440
Problem: Can't build on Windows. Solution: Change #ifdefs. Only define isnan when used.
This commit is contained in:
parent
f97ddbeb25
commit
fefecb0fbe
@ -10,6 +10,7 @@
|
|||||||
/*
|
/*
|
||||||
* eval.c: Expression evaluation.
|
* eval.c: Expression evaluation.
|
||||||
*/
|
*/
|
||||||
|
#define USING_FLOAT_STUFF
|
||||||
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*
|
*
|
||||||
* Follows this standard: https://tools.ietf.org/html/rfc7159.html
|
* Follows this standard: https://tools.ietf.org/html/rfc7159.html
|
||||||
*/
|
*/
|
||||||
|
#define USING_FLOAT_STUFF
|
||||||
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
|
40
src/macros.h
40
src/macros.h
@ -327,25 +327,29 @@
|
|||||||
/* for isnan() and isinf() */
|
/* for isnan() and isinf() */
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
# endif
|
# endif
|
||||||
# if defined(WIN32) && !defined(isnan)
|
# ifdef USING_FLOAT_STUFF
|
||||||
# define isnan(x) _isnan(x)
|
# if defined(WIN32)
|
||||||
# define isinf(x) (!_finite(x) && !_isnan(x))
|
# ifndef isnan
|
||||||
# else
|
# define isnan(x) _isnan(x)
|
||||||
# ifndef HAVE_ISNAN
|
# define isinf(x) (!_finite(x) && !_isnan(x))
|
||||||
static inline int isnan(double x) { return x != x; }
|
# endif
|
||||||
# endif
|
|
||||||
# ifndef HAVE_ISINF
|
|
||||||
static inline int isinf(double x) { return !isnan(x) && isnan(x - x); }
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# if !defined(INFINITY)
|
|
||||||
# if defined(DBL_MAX)
|
|
||||||
# define INFINITY (DBL_MAX+DBL_MAX)
|
|
||||||
# else
|
# else
|
||||||
# define INFINITY (1.0 / 0.0)
|
# 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
|
||||||
|
# if !defined(INFINITY)
|
||||||
|
# if defined(DBL_MAX)
|
||||||
|
# define INFINITY (DBL_MAX+DBL_MAX)
|
||||||
|
# else
|
||||||
|
# define INFINITY (1.0 / 0.0)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# if !defined(NAN)
|
||||||
|
# define NAN (INFINITY-INFINITY)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
|
||||||
# if !defined(NAN)
|
|
||||||
# define NAN (INFINITY-INFINITY)
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -743,6 +743,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1440,
|
||||||
/**/
|
/**/
|
||||||
1439,
|
1439,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user