$NetBSD: patch-ab,v 1.2 2009/01/10 10:02:39 mwdavies Exp $ --- kmplot/kmplot/parser.cpp.orig 2008-11-29 04:33:54.000000000 +1300 +++ kmplot/kmplot/parser.cpp @@ -102,9 +102,13 @@ ScalarFunction Parser::scalarFunctions[ {"floor", 0, floor}, // round down to nearest integer {"ceil", 0, ceil}, // round up to nearest integer {"round", 0, round}, // round to nearest integer +#ifndef __NetBSD__ {"gamma", 0, tgamma}, // gamma function +#endif {"lgamma", 0, lgamma}, // log-gamma function +#ifndef __NetBSD__ {"factorial", 0, factorial}, // factorial +#endif {"erfc", 0, lerfc}, // error function {"erf", 0, lerf}, // complementary error function @@ -1340,9 +1344,11 @@ double larcsin(double x) { double larctan(double x) { return atan(x) / Parser::radiansPerAngleUnit(); } +#ifndef __NetBSD__ double factorial( double x ) { return tgamma(x+1); } +#endif double legendre0( double ) { return 1.0; }