[sane-devel] hp5400_internal.c rintf()

Henning Meier-Geinitz henning at meier-geinitz.de
Fri Apr 25 09:54:25 BST 2003


Hi,

On Thu, Apr 24, 2003 at 11:12:00PM +0200, Franz Bakan wrote:
> Everything built fine with one exeption:
> OS/2 runtime-lib doesnt't have rintf()
> (used in Line 1226 of hp5400_internal.c)

rintf is C99, rint is BSD 4.2.

> So I got one undefined symbol _rintf while linking.
> 
> replacing rintf() with rint() helps, but I don't know if
> that would be a real solution.

The line is:

    int bpp = rintf ((float) htonl (res.transfersize) / pixels);
    
What about this:

    int bpp = (int) (float) htonl (res.transfersize) / pixels + 0.5);

Bye,
  Henning



More information about the sane-devel mailing list