Fix "llabs" warnings under MinGW Some MinGW versions complain about "llabs" not being defined when including "inttypes.h". Include "stdlib.h" before.
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/bea4688b Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/bea4688b Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/bea4688b Branch: refs/heads/master Commit: bea4688bfe64110b50448a9772b2401291011a1e Parents: 2fcb176 Author: Nick Wellnhofer <[email protected]> Authored: Tue Jul 5 15:44:00 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Tue Jul 5 15:44:00 2016 +0200 ---------------------------------------------------------------------- src/Charmonizer/Probe/Integers.c | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/bea4688b/src/Charmonizer/Probe/Integers.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe/Integers.c b/src/Charmonizer/Probe/Integers.c index f894eed..8fec02e 100644 --- a/src/Charmonizer/Probe/Integers.c +++ b/src/Charmonizer/Probe/Integers.c @@ -587,6 +587,12 @@ chaz_Integers_run(void) { chaz_ConfWriter_start_module("IntegerFormatStrings"); if (has_inttypes) { + if (chaz_CC_is_mingw()) { + /* Suppress warnings about undefined inline function `llabs` + * under MinGW. + */ + chaz_ConfWriter_add_sys_include("stdlib.h"); + } chaz_ConfWriter_add_sys_include("inttypes.h"); }
