changeset 18738:e0cd10f750e7 v8.1.2359

patch 8.1.2359: cannot build without FEAT_FLOAT Commit: https://github.com/vim/vim/commit/0387cae15ccdb8136381534a1f2c96b222346432 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 29 21:07:58 2019 +0100 patch 8.1.2359: cannot build without FEAT_FLOAT Problem: Cannot build without FEAT_FLOAT. (John Marriott) Solution: Fix #ifdefs around f_srand().
author Bram Moolenaar <Bram@vim.org>
date Fri, 29 Nov 2019 21:15:03 +0100
parents dad81eee6723
children 0a576092723e
files src/evalfunc.c src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -226,7 +226,9 @@ static void f_spellsuggest(typval_T *arg
 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 @@ static funcentry_T global_functions[] =
     {"split",		1, 3, FEARG_1,	  f_split},
 #ifdef FEAT_FLOAT
     {"sqrt",		1, 1, FEARG_1,	  f_sqrt},
+#endif
     {"srand",		0, 1, FEARG_1,	  f_srand},
-#endif
     {"state",		0, 1, FEARG_1,	  f_state},
 #ifdef FEAT_FLOAT
     {"str2float",	1, 1, FEARG_1,	  f_str2float},
@@ -7092,6 +7094,7 @@ f_sqrt(typval_T *argvars, typval_T *rett
     else
 	rettv->vval.v_float = 0.0;
 }
+#endif
 
 /*
  * "srand()" function
@@ -7160,6 +7163,7 @@ f_srand(typval_T *argvars, typval_T *ret
     list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32);
 }
 
+#ifdef FEAT_FLOAT
 /*
  * "str2float()" function
  */
--- a/src/version.c
+++ b/src/version.c
@@ -738,6 +738,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2359,
+/**/
     2358,
 /**/
     2357,