[MPlayer-dev-eng] [PATCH] test for presence of lrint etc.

Rich Felker dalias at aerifal.cx
Fri Nov 23 01:28:13 CET 2007


On Thu, Nov 22, 2007 at 06:04:37PM +0100, Diego Biurrun wrote:
> On Thu, Nov 22, 2007 at 03:15:57PM +0100, Ralf Menzel wrote:
> > 
> > This patch tests if the functions lrint, llrint, round, expf, and powf
> > are available. (All of them are not available under Solaris 9.) I
> > tried to find alternatives for them, but I'm not sure if all of these
> > alternatives are appropriate. I would be nice if someone more
> > knowledgeable than me would have a closer look at this patch.
> 
> I bet most of this is incorrect.  In any case, this is a problem of
> Solaris 9 not conforming to C99, which is required.  Patch rejected.

All of these except round have trivial workarounds:
#define lrint(x) (long)rint((x))
#define llrint(x) (long long)rint((x))
#define expf(x) (float)exp((x))
#define powf(x, y) (float)pow((x), (y))

Putting evil ifdef shit all over the codebase is absolutely not
acceptable, but I have no objecting to adding defines like these to
config.h if the target system is broken.

Rich



More information about the MPlayer-dev-eng mailing list