PCExhumed: fix triddat.cpp build with libc++

Include cstdlib for abs() with an int argument.  Fixes the following
compile error with libc++.

source/exhumed/src/trigdat.cpp:159:9: error: call to 'abs' is ambiguous
    if (abs(diff) > c)
        ^~~
/usr/include/c++/v1/math.h:761:1: note: candidate function
abs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);}
^
/usr/include/c++/v1/math.h:765:1: note: candidate function
abs(double __lcpp_x) _NOEXCEPT {return ::fabs(__lcpp_x);}
^
/usr/include/c++/v1/math.h:769:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
^
1 error generated.
This commit is contained in:
Jonathan Gray 2019-12-31 16:56:13 +11:00 committed by Christoph Oelckers
parent 64d3d38014
commit 5ea5d87664

View file

@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ns.h"
#include "trigdat.h"
#ifndef __WATCOMC__
#include <cstdlib>
#include <cmath>
#else
#include <stdlib.h>