glibc/sysdeps
Joseph Myers b2491db6c8 Refactor FP_ILOGB* out of bits/mathdef.h.
Continuing the refactoring of bits/mathdef.h, this patch stops it
defining FP_ILOGB0 and FP_ILOGBNAN, moving the required information to
a new header bits/fp-logb.h.

There are only two possible values of each of those macros permitted
by ISO C.  TS 18661-1 adds corresponding macros for llogb, and their
values are required to correspond to those of the ilogb macros in the
obvious way.  Thus two boolean values - for which the same choices are
correct for most architectures - suffice to determine the value of all
these macros, and by defining macros for those boolean values in
bits/fp-logb.h we can then define the public FP_* macros in math.h and
avoid the present duplication of the associated feature test macro
logic.

This patch duly moves to bits/fp-logb.h defining __FP_LOGB0_IS_MIN and
__FP_LOGBNAN_IS_MIN.  Default definitions of those to 0 are correct
for both architectures, while ia64, m68k and x86 get their own
versions of bits/fp-logb.h to reflect their use of values different
from the defaults.

The patch renders many copies of bits/mathdef.h trivial (needed only
to avoid the default __NO_LONG_DOUBLE_MATH).  I'll revise
<https://sourceware.org/ml/libc-alpha/2016-11/msg00865.html>
accordingly so that it removes all bits/mathdef.h headers except the
default one and the alpha one, and arranges for the header to be
included only by complex.h as the only remaining use at that point
will be for the alpha ABI issues there.

Tested for x86_64 and x86.  Also did compile-only testing with
build-many-glibcs.py (using glibc sources from before the commit that
introduced many build failures with undefined __GI___sigsetjmp).

	* bits/fp-logb.h: New file.
	* sysdeps/ia64/bits/fp-logb.h: Likewise.
	* sysdeps/m68k/m680x0/bits/fp-logb.h: Likewise.
	* sysdeps/x86/bits/fp-logb.h: Likewise.
	* math/Makefile (headers): Add bits/fp-logb.h.
	* math/math.h: Include <bits/fp-logb.h>.
	[__USE_ISOC99] (FP_ILOGB0): Define based on __FP_LOGB0_IS_MIN.
	[__USE_ISOC99] (FP_ILOGBNAN): Define based on __FP_LOGBNAN_IS_MIN.
	* bits/mathdef.h (FP_ILOGB0): Remove.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/aarch64/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/alpha/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/ia64/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/m68k/m680x0/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/mips/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/powerpc/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/s390/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/sparc/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
	* sysdeps/x86/bits/mathdef.h (FP_ILOGB0): Likewise.
	(FP_ILOGBNAN): Likewise.
2016-12-01 02:56:55 +00:00
..
aarch64 Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
alpha Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
arm Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
generic ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
gnu
hppa Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
i386 Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
ia64 Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
ieee754 Make ilogb wrappers type-generic. 2016-11-28 23:27:23 +00:00
init_array
m68k Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
mach
microblaze Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
mips Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
nacl ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
nios2 Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
nptl Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
posix
powerpc Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
pthread
s390 Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
sh Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
sparc Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
tile Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
unix ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
wordsize-32
wordsize-64
x86 Refactor FP_ILOGB* out of bits/mathdef.h. 2016-12-01 02:56:55 +00:00
x86_64 ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00