Complete _BSD_SOURCE / _SVID_source followup cleanup.

This patch completes the headers cleanup consequent on removal of
_BSD_SOURCE and _SVID_SOURCE (apart from any subsequent deprecations):

* #endif conditionals that referred to BSD or SVID are updated.

* Redundant __USE_* tests in cases involving __USE_MISC are removed.
  This includes cases such as __USE_MISC || __USE_ISOC99, where
  __USE_MISC is redundant (because __USE_MISC is only ever defined in
  the default / _DEFAULT_SOURCE / _GNU_SOURCE case, when __USE_ISOC99
  is also defined; the same applies to the non-XSI-extended POSIX
  versions), and cases involving __USE_GNU, where __USE_GNU is
  redundant (because if __USE_GNU is defined, so are the other __USE_*
  macros).  There may well be other cases of __USE_FOO || __USE_BAR
  tests that could be simplified because one macro implies the other;
  this patch only addresses cases involving __USE_MISC.

Tested x86_64.

	* bits/fcntl.h [__USE_MISC]: Remove redundant conditionals.
	* bits/sigaction.h [__USE_MISC]: Likewise.
	* bits/waitstatus.h: Update #endif comments.
	* ctype/ctype.h: Likewise.
	* dirent/dirent.h: Likewise.
	[__USE_MISC]: Remove redundant conditionals.
	* grp/grp.h: Update #endif comments.
	[__USE_GNU]: Remove redundant conditionals.
	[__USE_MISC]: Likewise.
	* inet/netinet/in.h [__USE_GNU]: Likewise.
	* io/sys/stat.h [__USE_MISC]: Likewise.
	* libio/bits/stdio-ldbl.h [__USE_MISC]: Likewise.
	* libio/bits/stdio.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* libio/bits/stdio2.h [__USE_MISC]: Likewise.
	* libio/stdio.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* math/bits/math-finite.h [__USE_MISC]: Likewise.
	* math/bits/mathcalls.h [__USE_MISC]: Likewise.
	* math/math.h: Update #else and #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* misc/sys/uio.h: Update #endif comments.
	* posix/bits/unistd.h [__USE_MISC]: Remove redundant conditionals.
	* posix/glob.h [__USE_MISC]: Likewise.
	* posix/sys/types.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* posix/sys/wait.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* posix/unistd.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* pwd/pwd.h [__USE_GNU]: Likewise.
	[__USE_MISC]: Likewise.
	* resolv/netdb.h [__USE_GNU]: Likewise.
	* signal/signal.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* stdlib/stdlib.h: Update #else and #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	[__USE_GNU]: Likewise.
	* string/bits/string2.h [__USE_MISC]: Likewise.
	* string/string.h: Update #endif comments.
	[__USE_MISC]: Remove redundant conditionals.
	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__USE_MISC]:
	Likewise.
	* sysdeps/mach/hurd/bits/fcntl.h [__USE_MISC]: Likewise.
	* sysdeps/mach/hurd/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/stat.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Update #endif
	comments.
	[__USE_MISC]: Remove redundant conditionals.
	* sysdeps/unix/sysv/linux/bits/in.h [__USE_GNU]: Likewise.
	* sysdeps/unix/sysv/linux/bits/sigaction.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h [__USE_GNU]: Likewise.
	* sysdeps/unix/sysv/linux/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/stat.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/sigaction.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/stat.h [__USE_MISC]:
	Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/stat.h [__USE_MISC]: Likewise.
	* sysdeps/x86/bits/string.h: Update #endif comments.
	* sysdeps/x86/fpu/bits/mathinline.h [__USE_MISC]: Remove redundant
	conditionals.
	* time/sys/time.h: Update #endif comments.
	* time/time.h: Likewise.
	[__USE_MISC]: Remove redundant conditionals.
Generate .test-result files for tests with special rules.

This patch, an updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now
proposed for inclusion in glibc, extends the generation of PASS and
FAIL status in .test-result files for individual tests to cover tests
with their own custom makefile rules.  This is just adding
$(evaluate-test) calls to all such rules, since tests with multiple
commands were previously split into separate tests.

Note that the tests the makefiles expect to fail (posix/annexc and
conformtest) currently get FAIL listed in the .test-result file,
rather than XFAIL; a subsequent patch will introduce a better XFAIL
mechanism.

Tested x86_64.

	* Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test).
	($(objpfx)check-local-headers.out): Likewise.
	($(objpfx)begin-end-check.out): Likewise.
	* Makerules (check-abi-%.out): Likewise.
	* catgets/Makefile ($(objpfx)test1.cat): Likewise.
	($(objpfx)test2.cat): Likewise.
	($(objpfx)de/libc.cat): Likewise.
	($(objpfx)test-gencat.out): Likewise.
	* conform/Makefile ($(objpfx)run-conformtest.out): Likewise.
	* elf/Makefile ($(objpfx)order-cmp.out): Likewise.
	($(objpfx)noload-mem): Likewise.
	($(objpfx)tst-pathopt.out): Likewise.
	($(objpfx)tst-rtld-load-self.out): Likewise.
	($(objpfx)tst-array1-cmp.out): Likewise.
	($(objpfx)tst-array1-static-cmp.out): Likewise.
	($(objpfx)tst-array2-cmp.out): Likewise.
	($(objpfx)tst-array3-cmp.out): Likewise.
	($(objpfx)tst-array4-cmp.out): Likewise.
	($(objpfx)tst-array5-cmp.out): Likewise.
	($(objpfx)tst-array5-static-cmp.out): Likewise.
	($(objpfx)check-textrel.out): Likewise.
	($(objpfx)check-execstack.out): Likewise.
	($(objpfx)check-localplt.out): Likewise.
	($(objpfx)order2-cmp.out): Likewise.
	($(objpfx)tst-leaks1-mem): Likewise.
	($(objpfx)tst-leaks1-static-mem): Likewise.
	($(objpfx)tst-initorder-cmp.out): Likewise.
	($(objpfx)tst-initorder2-cmp.out): Likewise.
	($(objpfx)tst-unused-dep.out): Likewise.
	($(objpfx)tst-unused-dep-cmp.out): Likewise.
	* grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise.
	* iconv/Makefile (test-iconvconfig): Likewise.
	* iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise.
	($(objpfx)iconv-test.out): Likewise.
	($(objpfx)tst-tables.out): Likewise.
	* intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise.
	($(objpfx)tst-gettext.out): Likewise.
	($(objpfx)tst-translit.out): Likewise.
	($(objpfx)tst-gettext2.out): Likewise.
	($(objpfx)tst-gettext4.out): Likewise.
	($(objpfx)tst-gettext6.out): Likewise.
	* io/Makefile ($(objpfx)ftwtest.out): Likewise.
	* libio/Makefile ($(objpfx)test-freopen.out): Likewise.
	($(objpfx)tst-fopenloc-cmp.out): Likewise.
	($(objpfx)tst-fopenloc-mem.out): Likewise.
	* malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise.
	* misc/Makefile ($(objpfx)tst-error1-mem): Likewise.
	* posix/Makefile ($(objpfx)globtest.out): Likewise.
	($(objpfx)wordexp-tst.out): Likewise.
	($(objpfx)annexc.out): Likewise.
	($(objpfx)tst-fnmatch-mem): Likewise.
	($(objpfx)bug-regex2-mem): Likewise.
	($(objpfx)bug-regex14-mem): Likewise.
	($(objpfx)bug-regex21-mem): Likewise.
	($(objpfx)bug-regex31-mem): Likewise.
	($(objpfx)tst-vfork3-mem): Likewise.
	($(objpfx)tst-rxspencer-no-utf8-mem): Likewise.
	($(objpfx)tst-pcre-mem): Likewise.
	($(objpfx)tst-boost-mem): Likewise.
	($(objpfx)tst-getconf.out): Likewise.
	($(objpfx)bug-ga2-mem): Likewise.
	($(objpfx)bug-glob2-mem): Likewise.
	* resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise.
	($(objpfx)mtrace-tst-leaks2): Likewise.
	* stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise.
	($(objpfx)tst-printf.out): Likewise.
	($(objpfx)tst-setvbuf1.out): Likewise.
	($(objpfx)tst-setvbuf1-cmp.out): Likewise.
	* stdlib/Makefile ($(objpfx)isomac.out): Likewise.
	($(objpfx)tst-fmtmsg.out): Likewise.
	* string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise.
	* sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise.

localedata:
	* Makefile ($(objpfx)sort-test.out): Use $(evaluate-test).
	($(objpfx)tst-fmon.out): Likewise.
	($(objpfx)tst-numeric.out): Likewise.
	($(objpfx)tst-locale.out): Likewise.
	($(objpfx)tst-rpmatch.out): Likewise.
	($(objpfx)tst-trans.out): Likewise.
	($(objpfx)tst-mbswcs.out): Likewise.
	($(objpfx)tst-ctype.out): Likewise.
	($(objpfx)tst-wctype.out): Likewise.
	($(objpfx)tst-langinfo.out): Likewise.
	($(objpfx)mtrace-tst-leaks): Likewise.

nptl:
	* Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test).
	($(objpfx)tst-tls6.out): Likewise.
	($(objpfx)tst-cleanup0.out): Likewise.
	($(objpfx)tst-cleanup0-cmp.out): Likewise.
	($(objpfx)tst-cancel-wrappers.out): Likewise.
	($(objpfx)tst-oddstacklimit.out): Likewise.

nptl_db:
	* Makefile ($(objpfx)db-symbols.out): Use
	$(evaluate-test).