Skip to content

Commit 73e28dc

Browse files
committed
patch 9.0.0491: no good reason to build without the float feature
Problem: No good reason to build without the float feature. Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
1 parent 1c3dd8d commit 73e28dc

74 files changed

Lines changed: 605 additions & 1168 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/builtin.txt

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,6 @@ abs({expr}) *abs()*
753753
Can also be used as a |method|: >
754754
Compute()->abs()
755755
756-
< {only available when compiled with the |+float| feature}
757-
758756
759757
acos({expr}) *acos()*
760758
Return the arc cosine of {expr} measured in radians, as a
@@ -770,8 +768,6 @@ acos({expr}) *acos()*
770768
Can also be used as a |method|: >
771769
Compute()->acos()
772770
773-
< {only available when compiled with the |+float| feature}
774-
775771
776772
add({object}, {expr}) *add()*
777773
Append the item {expr} to |List| or |Blob| {object}. Returns
@@ -904,8 +900,6 @@ asin({expr}) *asin()*
904900

905901
Can also be used as a |method|: >
906902
Compute()->asin()
907-
<
908-
{only available when compiled with the |+float| feature}
909903
910904
911905
assert_ functions are documented here: |assert-functions-details|
@@ -925,8 +919,6 @@ atan({expr}) *atan()*
925919

926920
Can also be used as a |method|: >
927921
Compute()->atan()
928-
<
929-
{only available when compiled with the |+float| feature}
930922
931923
932924
atan2({expr1}, {expr2}) *atan2()*
@@ -943,8 +935,6 @@ atan2({expr1}, {expr2}) *atan2()*
943935

944936
Can also be used as a |method|: >
945937
Compute()->atan2(1)
946-
<
947-
{only available when compiled with the |+float| feature}
948938
949939
950940
autocmd_add({acmds}) *autocmd_add()*
@@ -1428,8 +1418,6 @@ ceil({expr}) *ceil()*
14281418

14291419
Can also be used as a |method|: >
14301420
Compute()->ceil()
1431-
<
1432-
{only available when compiled with the |+float| feature}
14331421
14341422
14351423
ch_ functions are documented here: |channel-functions-details|
@@ -1801,8 +1789,6 @@ cos({expr}) *cos()*
18011789

18021790
Can also be used as a |method|: >
18031791
Compute()->cos()
1804-
<
1805-
{only available when compiled with the |+float| feature}
18061792
18071793
18081794
cosh({expr}) *cosh()*
@@ -1818,8 +1804,6 @@ cosh({expr}) *cosh()*
18181804

18191805
Can also be used as a |method|: >
18201806
Compute()->cosh()
1821-
<
1822-
{only available when compiled with the |+float| feature}
18231807
18241808
18251809
count({comp}, {expr} [, {ic} [, {start}]]) *count()*
@@ -2405,8 +2389,6 @@ exp({expr}) *exp()*
24052389

24062390
Can also be used as a |method|: >
24072391
Compute()->exp()
2408-
<
2409-
{only available when compiled with the |+float| feature}
24102392
24112393
24122394
expand({string} [, {nosuf} [, {list}]]) *expand()*
@@ -2807,8 +2789,6 @@ float2nr({expr}) *float2nr()*
28072789

28082790
Can also be used as a |method|: >
28092791
Compute()->float2nr()
2810-
<
2811-
{only available when compiled with the |+float| feature}
28122792
28132793
28142794
floor({expr}) *floor()*
@@ -2826,8 +2806,6 @@ floor({expr}) *floor()*
28262806

28272807
Can also be used as a |method|: >
28282808
Compute()->floor()
2829-
<
2830-
{only available when compiled with the |+float| feature}
28312809
28322810
28332811
fmod({expr1}, {expr2}) *fmod()*
@@ -2848,8 +2826,6 @@ fmod({expr1}, {expr2}) *fmod()*
28482826

28492827
Can also be used as a |method|: >
28502828
Compute()->fmod(1.22)
2851-
<
2852-
{only available when compiled with |+float| feature}
28532829
28542830
28552831
fnameescape({string}) *fnameescape()*
@@ -5050,8 +5026,6 @@ isinf({expr}) *isinf()*
50505026

50515027
Can also be used as a |method|: >
50525028
Compute()->isinf()
5053-
<
5054-
{only available when compiled with the |+float| feature}
50555029
50565030
islocked({expr}) *islocked()* *E786*
50575031
The result is a Number, which is |TRUE| when {expr} is the
@@ -5080,8 +5054,6 @@ isnan({expr}) *isnan()*
50805054

50815055
Can also be used as a |method|: >
50825056
Compute()->isnan()
5083-
<
5084-
{only available when compiled with the |+float| feature}
50855057
50865058
items({dict}) *items()*
50875059
Return a |List| with all the key-value pairs of {dict}. Each
@@ -5510,8 +5482,6 @@ log({expr}) *log()*
55105482

55115483
Can also be used as a |method|: >
55125484
Compute()->log()
5513-
<
5514-
{only available when compiled with the |+float| feature}
55155485
55165486
55175487
log10({expr}) *log10()*
@@ -5526,17 +5496,14 @@ log10({expr}) *log10()*
55265496

55275497
Can also be used as a |method|: >
55285498
Compute()->log10()
5529-
<
5530-
{only available when compiled with the |+float| feature}
55315499
55325500
luaeval({expr} [, {expr}]) *luaeval()*
55335501
Evaluate Lua expression {expr} and return its result converted
55345502
to Vim data structures. Second {expr} may hold additional
55355503
argument accessible as _A inside first {expr}.
55365504
Strings are returned as they are.
55375505
Boolean objects are converted to numbers.
5538-
Numbers are converted to |Float| values if vim was compiled
5539-
with |+float| and to numbers otherwise.
5506+
Numbers are converted to |Float| values.
55405507
Dictionaries and lists obtained by vim.eval() are returned
55415508
as-is.
55425509
Other objects are returned as zero without any errors.
@@ -6483,8 +6450,6 @@ pow({x}, {y}) *pow()*
64836450

64846451
Can also be used as a |method|: >
64856452
Compute()->pow(3)
6486-
<
6487-
{only available when compiled with the |+float| feature}
64886453
64896454
prevnonblank({lnum}) *prevnonblank()*
64906455
Return the line number of the first line at or above {lnum}
@@ -7366,8 +7331,6 @@ round({expr}) *round()*
73667331

73677332
Can also be used as a |method|: >
73687333
Compute()->round()
7369-
<
7370-
{only available when compiled with the |+float| feature}
73717334
73727335
rubyeval({expr}) *rubyeval()*
73737336
Evaluate Ruby expression {expr} and return its result
@@ -8536,8 +8499,6 @@ sin({expr}) *sin()*
85368499

85378500
Can also be used as a |method|: >
85388501
Compute()->sin()
8539-
<
8540-
{only available when compiled with the |+float| feature}
85418502
85428503
85438504
sinh({expr}) *sinh()*
@@ -8553,8 +8514,6 @@ sinh({expr}) *sinh()*
85538514

85548515
Can also be used as a |method|: >
85558516
Compute()->sinh()
8556-
<
8557-
{only available when compiled with the |+float| feature}
85588517
85598518
85608519
slice({expr}, {start} [, {end}]) *slice()*
@@ -8821,8 +8780,6 @@ sqrt({expr}) *sqrt()*
88218780

88228781
Can also be used as a |method|: >
88238782
Compute()->sqrt()
8824-
<
8825-
{only available when compiled with the |+float| feature}
88268783
88278784
88288785
srand([{expr}]) *srand()*
@@ -8896,8 +8853,6 @@ str2float({string} [, {quoted}]) *str2float()*
88968853

88978854
Can also be used as a |method|: >
88988855
let f = text->substitute(',', '', 'g')->str2float()
8899-
<
8900-
{only available when compiled with the |+float| feature}
89018856
89028857
str2list({string} [, {utf8}]) *str2list()*
89038858
Return a list containing the number values which represent
@@ -9643,8 +9598,6 @@ tan({expr}) *tan()*
96439598

96449599
Can also be used as a |method|: >
96459600
Compute()->tan()
9646-
<
9647-
{only available when compiled with the |+float| feature}
96489601
96499602
96509603
tanh({expr}) *tanh()*
@@ -9660,8 +9613,6 @@ tanh({expr}) *tanh()*
96609613

96619614
Can also be used as a |method|: >
96629615
Compute()->tanh()
9663-
<
9664-
{only available when compiled with the |+float| feature}
96659616
96669617
96679618
tempname() *tempname()* *temp-file-name*
@@ -9897,8 +9848,6 @@ trunc({expr}) *trunc()*
98979848
Can also be used as a |method|: >
98989849
Compute()->trunc()
98999850
<
9900-
{only available when compiled with the |+float| feature}
9901-
99029851
*type()*
99039852
type({expr}) The result is a Number representing the type of {expr}.
99049853
Instead of using the number directly, it is better to use the

runtime/doc/eval.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Number A 32 or 64 bit signed number. |expr-number|
5454
Examples: -123 0x10 0177 0o177 0b1011
5555

5656
Float A floating point number. |floating-point-format| *Float*
57-
{only when compiled with the |+float| feature} *E1076*
5857
Examples: 123.456 1.15e-6 -1.1e3
5958

6059
String A NUL terminated string of 8-bit unsigned characters (bytes).
@@ -1441,7 +1440,6 @@ digits are ignored.
14411440
{exp} is the exponent, power of 10.
14421441
Only a decimal point is accepted, not a comma. No matter what the current
14431442
locale is.
1444-
{only when compiled with the |+float| feature}
14451443

14461444
Examples:
14471445
123.456

runtime/doc/mlang.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ use of "-" and "_".
8282
characters. This sets $LC_COLLATE.
8383
Without an argument all are set, and additionally
8484
$LANG is set.
85-
When compiled with the |+float| feature the LC_NUMERIC
86-
value will always be set to "C", so that floating
87-
point numbers use '.' as the decimal point.
85+
If available the LC_NUMERIC value will always be set
86+
to "C", so that floating point numbers use '.' as the
87+
decimal point.
8888
This will make a difference for items that depend on
8989
the language (some messages, time and date format).
9090
Not fully supported on all systems

runtime/doc/various.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ N *+find_in_path* include file searches: |[I|, |:isearch|,
381381
N *+folding* |folding|
382382
*+footer* |gui-footer|
383383
*+fork* Unix only: |fork| shell commands
384-
*+float* Floating point support
384+
T *+float* Floating point support Always enabled since 9.0.0491
385385
N *+gettext* message translations |multi-lang|
386386
- *+GUI_Athena* Unix only: Athena |GUI|
387387
*+GUI_neXtaw* Unix only: neXtaw |GUI|

src/auto/configure

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13379,48 +13379,6 @@ _ACEOF
1337913379

1338013380
fi
1338113381

13382-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod() and other floating point functions" >&5
13383-
$as_echo_n "checking for strtod() and other floating point functions... " >&6; }
13384-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385-
/* end confdefs.h. */
13386-
13387-
#ifdef HAVE_MATH_H
13388-
# include <math.h>
13389-
#endif
13390-
#if STDC_HEADERS
13391-
# include <stdlib.h>
13392-
# include <stddef.h>
13393-
#endif
13394-
13395-
int
13396-
main ()
13397-
{
13398-
char *s; double d;
13399-
d = strtod("1.1", &s);
13400-
d = fabs(1.11);
13401-
d = ceil(1.11);
13402-
d = floor(1.11);
13403-
d = log10(1.11);
13404-
d = pow(1.11, 2.22);
13405-
d = sqrt(1.11);
13406-
d = sin(1.11);
13407-
d = cos(1.11);
13408-
d = atan(1.11);
13409-
13410-
;
13411-
return 0;
13412-
}
13413-
_ACEOF
13414-
if ac_fn_c_try_link "$LINENO"; then :
13415-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13416-
$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
13417-
13418-
else
13419-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13420-
$as_echo "no" >&6; }
13421-
fi
13422-
rm -f core conftest.err conftest.$ac_objext \
13423-
conftest$ac_exeext conftest.$ac_ext
1342413382

1342513383
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
1342613384
$as_echo_n "checking for isinf()... " >&6; }

src/config.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
#undef HAVE_FCHDIR
158158
#undef HAVE_FCHOWN
159159
#undef HAVE_FCHMOD
160-
#undef HAVE_FLOAT_FUNCS
161160
#undef HAVE_FSEEKO
162161
#undef HAVE_FSYNC
163162
#undef HAVE_FTRUNCATE

src/configure.ac

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3952,32 +3952,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
39523952
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET),
39533953
AC_MSG_RESULT(no))
39543954

3955-
dnl Need various functions for floating point support. Only enable
3956-
dnl floating point when they are all present.
3955+
dnl Floating point support may require the "m" library
39573956
AC_CHECK_LIB(m, strtod)
3958-
AC_MSG_CHECKING([for strtod() and other floating point functions])
3959-
AC_LINK_IFELSE([AC_LANG_PROGRAM([
3960-
#ifdef HAVE_MATH_H
3961-
# include <math.h>
3962-
#endif
3963-
#if STDC_HEADERS
3964-
# include <stdlib.h>
3965-
# include <stddef.h>
3966-
#endif
3967-
], [char *s; double d;
3968-
d = strtod("1.1", &s);
3969-
d = fabs(1.11);
3970-
d = ceil(1.11);
3971-
d = floor(1.11);
3972-
d = log10(1.11);
3973-
d = pow(1.11, 2.22);
3974-
d = sqrt(1.11);
3975-
d = sin(1.11);
3976-
d = cos(1.11);
3977-
d = atan(1.11);
3978-
])],
3979-
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS),
3980-
AC_MSG_RESULT(no))
39813957

39823958
dnl isinf() and isnan() need to include header files and may need -lm.
39833959
AC_MSG_CHECKING([for isinf()])

src/dict.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,13 +984,11 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
984984
}
985985
if (evaluate)
986986
{
987-
#ifdef FEAT_FLOAT
988987
if (tvkey.v_type == VAR_FLOAT)
989988
{
990989
tvkey.vval.v_string = typval_tostring(&tvkey, TRUE);
991990
tvkey.v_type = VAR_STRING;
992991
}
993-
#endif
994992
key = tv_get_string_buf_chk(&tvkey, buf);
995993
if (key == NULL)
996994
{

0 commit comments

Comments
 (0)