glibc/sysdeps
Joseph Myers 85422c2acb Make nextafter, nexttoward set errno (bug 6799).
nextafter and nexttoward fail to set errno on overflow and underflow.
This patch makes them do so in cases that should include all the cases
where such errno setting is required by glibc's goals for when to set
errno (but not all cases of underflow where the result is nonzero and
so glibc's goals do not require errno setting).

Tested for x86_64, x86, mips64 and powerpc.

	[BZ #6799]
	* math/s_nextafter.c: Include <errno.h>.
	(__nextafter): Set errno on overflow and underflow.
	* math/s_nexttowardf.c: Include <errno.h>.
	(__nexttowardf): Set errno on overflow and underflow.
	* sysdeps/i386/fpu/s_nextafterl.c: Include <errno.h>.
	(__nextafterl): Set errno on overflow and underflow.
	* sysdeps/i386/fpu/s_nexttoward.c: Include <errno.h>.
	(__nexttoward): Set errno on overflow and underflow.
	* sysdeps/i386/fpu/s_nexttowardf.c: Include <errno.h>.
	(__nexttowardf): Set errno on overflow and underflow.
	* sysdeps/ieee754/flt-32/s_nextafterf.c: Include <errno.h>.
	(__nextafterf): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128/s_nextafterl.c: Include <errno.h>.
	(__nextafterl): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128/s_nexttoward.c: Include <errno.h>.
	(__nexttoward): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128/s_nexttowardf.c: Include <errno.h>.
	(__nexttowardf): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: Include <errno.h>.
	(__nextafterl): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Include <errno.h>.
	(__nexttoward): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: Include <errno.h>.
	(__nexttowardf): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-96/s_nexttoward.c: Include <errno.h>.
	(__nexttoward): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-96/s_nexttowardf.c: Include <errno.h>.
	(__nexttowardf): Set errno on overflow and underflow.
	* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: Include <errno.h>.
	(__nldbl_nexttowardf): Set errno on overflow and underflow.
	* sysdeps/m68k/m680x0/fpu/s_nextafterl.c: Include <errno.h>.
	(__nextafterl): Set errno on overflow and underflow.
	* math/libm-test.inc (nextafter_test_data): Do not allow errno
	setting to be missing on overflow.  Add more tests.
	(nexttoward_test_data): Likewise.
2015-11-02 18:54:19 +00:00
..
aarch64 Regenerate aarch64 libm-test-ulps 2015-09-24 14:22:31 +01:00
alpha Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
arm Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
generic malloc: Rewrite with explicit TLS access using __thread 2015-10-17 12:06:48 +02:00
gnu Add more TCP_* values to netinet/tcp.h. 2015-09-01 13:45:49 +00:00
hppa Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
i386 Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
ia64 Make drem an alias of remainder (bug 16171). 2015-10-29 22:29:21 +00:00
ieee754 Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
mach Convert 24 more function definitions to prototype style (array parameters). 2015-10-20 11:51:03 +00:00
microblaze Use soft-fp fma for MicroBlaze (bug 13304). 2015-09-25 17:29:19 +00:00
mips Remove MIPS16 atomics using __sync_* (bug 17404). 2015-10-27 23:47:56 +00:00
nacl NaCl: Do not install <sys/mtio.h>. 2015-09-11 14:16:18 -07:00
nios2 Fixes extern protected data handling testcases elf/tst-protected1a 2015-07-26 05:27:18 -07:00
nptl Remove sysdeps/nptl/configure.ac. 2015-10-27 21:46:03 +00:00
posix Convert 69 more function definitions to prototype style (line wrap cases). 2015-10-19 21:23:47 +00:00
powerpc powerpc: Provide __tls_get_addr () in static libc 2015-10-28 11:42:23 -02:00
pthread Convert 113 more function definitions to prototype style (files with assertions). 2015-10-20 11:54:09 +00:00
s390 Convert 231 sysdeps function definitions to prototype style. 2015-10-19 12:04:33 +00:00
sh Convert 231 sysdeps function definitions to prototype style. 2015-10-19 12:04:33 +00:00
sparc Convert 69 more function definitions to prototype style (line wrap cases). 2015-10-19 21:23:47 +00:00
tile tile: regenerate libm-test-ulps 2015-10-22 12:00:31 -04:00
unix powerpc: Fix usage of elision transient failure adapt param 2015-10-27 17:27:41 -02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Handle more state in i386/x86_64 fesetenv (bug 16068). 2015-10-28 22:58:29 +00:00
x86_64 Remove cpuid.h configure tests. 2015-10-29 14:43:46 +00:00