postgresql/src
Tom Lane 06bf0dd6e3 Upgrade src/port/rint.c to be POSIX-compliant.
The POSIX spec says that rint() rounds halfway cases to nearest even.
Our substitute implementation failed to do that, rather rounding halfway
cases away from zero; and it also got some other cases (such as minus
zero) wrong.  This led to observable cross-platform differences, as
reported in bug #12885 from Rich Schaaf; in particular, casting from
float to int didn't honor round-to-nearest-even on builds using rint.c.

Implement something that attempts to cover all cases per spec, and add
some simple regression tests so that we'll notice if any platforms still
get this wrong.

Although this is a bug fix, no back-patch, as a behavioral change in
the back branches was agreed not to be a good idea.

Pedro Gimeno Fortea, reviewed by Michael Paquier and myself
2015-03-25 15:54:18 -04:00
..
backend Reduce pinning and buffer content locking for btree scans. 2015-03-25 14:24:43 -05:00
bin psql: show proper row count in \x mode for zero-column output 2015-03-24 21:04:10 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:05:23 -05:00
include Reduce pinning and buffer content locking for btree scans. 2015-03-25 14:24:43 -05:00
interfaces Fix libpq test expected output file 2015-03-11 17:04:27 -03:00
makefiles Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
pl array_offset() and array_offsets() 2015-03-18 16:01:34 -03:00
port Upgrade src/port/rint.c to be POSIX-compliant. 2015-03-25 15:54:18 -04:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Upgrade src/port/rint.c to be POSIX-compliant. 2015-03-25 15:54:18 -04:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:45:44 -05:00
tools Try to fix MSVC build of pg_rewind. 2015-03-23 20:26:49 +02:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:05:23 -05:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00