[vim] Include float.h if FEAT_FLOAT is defined (#570)

54 views
Skip to first unread message

David Ressman

unread,
Jan 19, 2016, 9:20:50 PM1/19/16
to vim/vim

I'm sure I'm doing something wrong, but by default on Centos 7.2 (gcc 4.8.5), the addition of the DBL_MAX CPP macro in patch 1143 appears not to come with a corresponding import of float.h, leading to the following:

gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       -o objects/ex_cmds.o ex_cmds.c
ex_cmds.c: In function ‘ex_sort’:
ex_cmds.c:560:48: error: ‘DBL_MAX’ undeclared (first use in this function)
       nrs[lnum - eap->line1].st_u.value_flt = -DBL_MAX;
                                                ^
ex_cmds.c:560:48: note: each undeclared identifier is reported only once for each function it appears in
make: *** [objects/ex_cmds.o] Error 1

The addition of the float.h include if FEAT_FLOAT is enabled appears to fix the problem.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/570

Commit Summary

  • Include float.h if FEAT_FLOAT is defined

File Changes

Patch Links:


Reply to this email directly or view it on GitHub.

Bram Moolenaar

unread,
Jan 20, 2016, 2:06:21 PM1/20/16
to vim/vim

Closed #570 via 17576a1.

Reply all
Reply to author
Forward
0 new messages