Subject: Re: Imlib2 upgrade broken (no lround function)
To: <>
From: Chris Wareham <>
List: tech-pkg
Date: 01/13/2005 13:01:20
Adam Ciarcinski wrote:
 >> The recently upgraded Imlib2 (from 1.1.2 to 1.2.0) wont compile on my
 >> NetBSD 2.0 machine. The file color_helpers.c uses an lround function
 >> which would appear to have the following prototype:
 >>  long double lround(long double);
 >> I checked the NetBSD CVS, and it doesn't look like there's an lround in
 >> -current. By adding the function to my libm library (by copying the
 >> source for the round function and simply changing all "double"
 >> definitions to "long double"), I got Imlib2 to compile. I then checked a
 >> copy of Harbison & Steele and I couldn't find a description of lround
 >> there. Is it a part of C99 or in some amendment perhaps?
 > Dear Chris,
 > lround is defined in <math.h> (I have v1.39)
 > Kind regards,
 > Adam

I must have missed it when I checked CVS. It looks like it's in -current
but not in 2.0. What's the pkgsrc solution for systems and / or versions
of systems that are missing a function like this? Is that waht the
nbcompat stuff is for?