util/Math: change define

This has nothing to do with uClibc. It has everything to do with gcc's
libstdc++.

C99 math can be compile time disabled for it. Check for that and use boost
lround when std is not available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-24 22:19:42 -07:00 committed by Max Kellermann
parent 4fd0c84f46
commit cfa4524cb3
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@
#ifndef MATH_HXX
#define MATH_HXX
#ifdef __UCLIBC__
/*
* C99 math can be optionally omitted with gcc's libstdc++.
* Use boost if unavailable.
*/
#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH)
#include <boost/math/special_functions/round.hpp>
using boost::math::lround;
#else