Re: rint() replacement - Mailing list pgsql-hackers

From Tom Lane
Subject Re: rint() replacement
Date
Msg-id 23883.1052447668@sss.pgh.pa.us
Whole thread Raw
In response to rint() replacement  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: rint() replacement
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> In working on an rint() for Win32, I found two --- one in
> port/qnx4/rint.c and another in dt_common.c.  The first is very simple,
> using fmod, while the second is very complicated.

Not to mention desperately hardware-specific.  The dt_common.c routine
is a rip from utils/adt/float.c, which has absolutely no business being
where it is --- it might have some claim to live in a Sun-specific
backend/port/ file, but it is not general by any stretch of the
imagination.  (And I think we gave up supporting SunOS awhile back
anyway.)

I can't believe that Windoze does not offer rint(); it's in the C99
standard.  Have you checked?
        regards, tom lane



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: could not read transaction log directory ...?
Next
From: Michael Brusser
Date:
Subject: Re: could not read transaction log directory ...?