]> granicus.if.org Git - vim/commitdiff
patch 8.1.2359: cannot build without FEAT_FLOAT v8.1.2359
authorBram Moolenaar <Bram@vim.org>
Fri, 29 Nov 2019 20:07:58 +0000 (21:07 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Nov 2019 20:07:58 +0000 (21:07 +0100)
Problem:    Cannot build without FEAT_FLOAT. (John Marriott)
Solution:   Fix #ifdefs around f_srand().

src/evalfunc.c
src/version.c

index 6b00b4e6561189b712c19e452ff69120ca40f5d4..254b2a9baab0ec15c67f2e663a7609cd4dd7e759 100644 (file)
@@ -226,7 +226,9 @@ static void f_spellsuggest(typval_T *argvars, typval_T *rettv);
 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},
-    {"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 @@ f_sqrt(typval_T *argvars, typval_T *rettv)
     else
        rettv->vval.v_float = 0.0;
 }
+#endif
 
 /*
  * "srand()" function
@@ -7160,6 +7163,7 @@ f_srand(typval_T *argvars, typval_T *rettv)
     list_append_number(rettv->vval.v_list, (varnumber_T)SPLITMIX32);
 }
 
+#ifdef FEAT_FLOAT
 /*
  * "str2float()" function
  */
index 7318a6a6c4db8ad7c87759adf5cc94331b04afc1..04808b0a27ef15da7b0657dc5cbb5ff602e99625 100644 (file)
@@ -737,6 +737,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2359,
 /**/
     2358,
 /**/