glibc/sysdeps/microblaze
Joseph Myers 6f9a3dd8b8 Move LDBL_CLASSIFY_COMPAT to its own header.
The general rule in glibc is that it's better for a macro to be always
defined, and tested with #if, than for it to be tested with #ifdef,
because the latter is prone to typos in the macro name as well as to
the header with the macro accidentally not being included in a file
testing it.  (Testing with an "if" statement is even better, in those
cases where it's possible to do things that way, as it then means both
cases in the code get checked for syntax in glibc builds with either
value of the condition.)

math_private.h has several different groups of macros, meaning that
architectures wanting to override some of them need to define those
then include the generic version, which then defines macros if not
already defined.  It's hard to avoid that arrangement completely, but
various cases can be improved by splitting out macros or groups of
macros into separate files.

This patch splits out the LDBL_CLASSIFY_COMPAT macro into a separate
ldbl-classify-compat.h header.  This macro is tested with #ifdef; this
patch changes it to testing with #if, with a default definition to 0
in the generic header and then architecture-specific headers defining
it to 1.

Tested with build-many-glibcs.py that installed stripped shared
libraries are unchanged by the patch.

	* sysdeps/generic/ldbl-classify-compat.h: New file.
	* sysdeps/arm/ldbl-classify-compat.h: Likewise.
	* sysdeps/m68k/coldfire/ldbl-classify-compat.h: Likewise.
	* sysdeps/microblaze/ldbl-classify-compat.h: Likewise.
	* sysdeps/mips/ldbl-classify-compat.h: Likewise.
	* sysdeps/nios2/ldbl-classify-compat.h: Likewise.
	* sysdeps/sh/ldbl-classify-compat.h: Likewise.
	* sysdeps/ieee754/dbl-64/s_finite.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/ieee754/dbl-64/s_isinf.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/ieee754/dbl-64/s_isnan.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c: Include
	<ldbl-classify-compat.h>.
	[LDBL_CLASSIFY_COMPAT]: Test value, not whether defined.
	* sysdeps/arm/math_private.h (LDBL_CLASSIFY_COMPAT): Remove macro.
	* sysdeps/mips/math_private.h (LDBL_CLASSIFY_COMPAT): Likewise.
	* sysdeps/m68k/coldfire/math_private.h: Remove file.
	* sysdeps/microblaze/math_private.h: Likewise.
	* sysdeps/nios2/math_private.h: Likewise.
	* sysdeps/sh/math_private.h: Likewise.
2018-02-01 21:01:00 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
nptl Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Implies Add sysdeps/ieee754/soft-fp. 2017-12-12 23:35:21 +00:00
Makefile [MicroBlaze]: Move MicroBlaze from ports to sysdeps. 2014-02-17 11:08:21 +10:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
abort-instr.h [MicroBlaze]: Move MicroBlaze from ports to sysdeps. 2014-02-17 11:08:21 +10:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtrace_linux.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
crti.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-machine.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldbl-classify-compat.h Move LDBL_CLASSIFY_COMPAT to its own header. 2018-02-01 21:01:00 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libm-test-ulps Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
preconfigure [MicroBlaze]: Move MicroBlaze from ports to sysdeps. 2014-02-17 11:08:21 +10:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sfp-machine.h Use soft-fp fma for MicroBlaze (bug 13304). 2015-09-25 17:29:19 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tls-macros.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00