patch 8.1.2359: cannot build without FEAT_FLOAT
Problem: Cannot build without FEAT_FLOAT. (John Marriott)
Solution: Fix #ifdefs around f_srand().
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 6b00b4e..254b2a9 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -226,7 +226,9 @@
static void f_split(typval_T *argvars, typval_T *rettv);
#ifdef FEAT_FLOAT
static void f_sqrt(typval_T *argvars, typval_T *rettv);
+#endif
static void f_srand(typval_T *argvars, typval_T *rettv);
+#ifdef FEAT_FLOAT
static void f_str2float(typval_T *argvars, typval_T *rettv);
#endif
static void f_str2list(typval_T *argvars, typval_T *rettv);
@@ -728,8 +730,8 @@
{"split", 1, 3, FEARG_1, f_split},
#ifdef FEAT_FLOAT
{"sqrt", 1, 1, FEARG_1, f_sqrt},
- {"srand", 0, 1, FEARG_1, f_srand},
#endif
+ {"srand", 0, 1, FEARG_1, f_srand},
{"state", 0, 1, FEARG_1, f_state},
#ifdef FEAT_FLOAT
{"str2float", 1, 1, FEARG_1, f_str2float},
@@ -7092,6 +7094,7 @@
else
rettv->vval.v_float = 0.0;
}
+#endif
/*
* "srand()" function
@@ -7160,6 +7163,7 @@
list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32);
}
+#ifdef FEAT_FLOAT
/*
* "str2float()" function
*/
diff --git a/src/version.c b/src/version.c
index 7318a6a..04808b0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -738,6 +738,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2359,
+/**/
2358,
/**/
2357,