Fix synchronization of TPP min/max priorities.

	* nptl/tpp.c (__init_sched_fifo_prio, __pthread_tpp_change_priority):
	Change synchronization of __sched_fifo_min_prio and
	__sched_fifo_max_prio.
	* nptl/pthread_mutexattr_getprioceiling.c
	(pthread_mutexattr_getprioceiling): Likewise.
	* nptl/pthread_mutexattr_setprioceiling.c
	(pthread_mutexattr_setprioceiling): Likewise.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Likewise.
	* nptl/pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling):
	Likewise.
powerpc: Fix missing barriers in atomic_exchange_and_add_{acq,rel}

On powerpc, atomic_exchange_and_add is implemented without any
barriers.  This patchs adds the missing instruction and memory barrier
for acquire and release semanthics.
Fix test-strchr.c warnings for wide string testing.

string/test-strchr.c is used for both wide and narrow string testing,
but produces a series of warnings for wide string testing because of
hardcoded use of narrow characters in the function check1.  This patch
fixes that function to use macros abstracting away the wide / narrow
string choice, adding a new such macro to handle the string and
character constants.

Tested for x86_64.

	* string/test-strchr.c [!WIDE] (L): New macro.
	[WIDE] (L): Likewise.
	(check1): Use CHAR instead of char.  Use L on string and character
	constants.
Remove TEST_IFUNC, tests-ifunc and *-ifunc.c tests.

TEST_IFUNC is only tested in two headers, bench-string.h and
test-string.h, after it gets defined by those headers, and it never
gets undefined.

Thus no defines of TEST_IFUNC are needed, and the *-ifunc.c tests that
just define TEST_IFUNC and include other tests are also redundant, as
is the code to remove $(tests-ifunc) and $(xtests-ifunc) conditionally
from tests and xtests.  This patch removes the useless defines and
tests of TEST_IFUNC and the associated useless tests and makefile
code.  It thereby fixes a series of warnings
"../string/test-string.h:21:0: warning: "TEST_IFUNC" redefined" where
test-string.h defines TEST_IFUNC to empty, other files define it to 1
and this produces warnings.

Tested for x86_64.

	* debug/test-stpcpy_chk-ifunc.c: Remove file.
	* debug/test-strcpy_chk-ifunc.c: Likewise.
	* wcsmbs/test-wcschr-ifunc.c: Likewise.
	* wcsmbs/test-wcscmp-ifunc.c: Likewise.
	* wcsmbs/test-wcscpy-ifunc.c: Likewise.
	* wcsmbs/test-wcslen-ifunc.c: Likewise.
	* wcsmbs/test-wcsrchr-ifunc.c: Likewise.
	* wcsmbs/test-wmemcmp-ifunc.c: Likewise.
	* Rules [$(multi-arch) = no] (tests): Do not filter out
	$(tests-ifunc).
	[$(multi-arch) = no] (xtests): Do not filter out $(xtests-ifunc).
	* debug/Makefile (tests-ifunc): Remove variable.
	(tests): Do not add $(tests-ifunc).
	* wcsmbs/Makefile (tests-ifunc): Remove variable.
	(tests): Do not add $(tests-ifunc).
	* benchtests/bench-string.h (TEST_IFUNC): Remove macro.
	[TEST_IFUNC]: Remove conditionals.
	* string/test-string.h (TEST_IFUNC): Remove macro.
	[TEST_IFUNC]: Remove conditionals.
Fix warnings in fwscanf / rewind tests.

This patch fixes "set but not used" warnings in the tests
libio/bug-rewind.c and libio/bug-rewind2.c by checking the return
values from fwscanf and making the tests fail if those values aren't
as expected.

Tested for x86_64.

	* libio/bug-rewind.c (do_test): Check fwscanf return values.
	* libio/bug-rewind2.c (do_test): Likewise.
FIx ldbl-128ibm frexpl for 32-bit systems (bug 16619, bug 16740).

This patch fixes bugs in ldbl-128ibm frexpl for 32-bit systems shown
up by warnings:

../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:82:4: warning: left shift count >= width of type
../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:129:5: warning: left shift count >= width of type

This did in fact show up in test-ldouble.out (alongside all the other
problems there ... maybe we should again consider running the libm
tests at finer granularity from the makefiles) as already covered by
the testsuite after the previous patch that fixed these bugs for
64-bit systems.  The fix is simply using 1LL instead of 1L when
shifting by 52.

Tested for powerpc32 (soft float).

	[BZ #16619]
	[BZ #16740]
	* sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Use 1LL << 52
	instead of 1L << 52.
Fix sysdeps/unix/sysv/linux/arm/libc-do-syscall.S warning.

This patch fixes a warning

../include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]

seen when building for ARM.  This warning comes from libc-do-syscall.S
being built for nscd: the nscd build uses _FORTIFY_SOURCE, while .S
files aren't built with -O, and the combination produces a warning.
As _FORTIFY_SOURCE doesn't do anything for .S files, undefining it in
libc-do-syscall.S seems the simplest solution.

Tested for ARM.

	* sysdeps/unix/sysv/linux/arm/libc-do-syscall.S (_FORTIFY_SOURCE):
	Undefine.
Fix nptl/tst-cancel-self-cancelstate.c warning.

This patch fixes "../sysdeps/nptl/pthread.h:670:26: warning:
initialization discards 'volatile' qualifier from pointer target type"
arising when building nptl/tst-cancel-self-cancelstate.c.  The problem
is passing a volatile int * to a macro expecting void *; the patch
adds an explicit cast.

Tested for x86_64.

	* nptl/tst-cancel-self-cancelstate.c (do_test): Cast argument of
	pthread_cleanup_push to void *.
Fix sysdeps/mips/__longjmp.c warning.

This patch fixes

../sysdeps/mips/__longjmp.c:27:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]

which arose I think from the MIPS16 changes (renaming the function to
____longjmp with an alias __longjmp, so a prior header prototype for
__longjmp no longer sufficed to prevent a warning).  I've made the
function use a prototype definition, which is what we want for all
function definitions in glibc anyway.

Tested for MIPS.

	* sysdeps/mips/__longjmp.c (____longjmp): Use prototype
	definition.
Avoid warnings for unused results in nscd/connections.c.

This patch avoids warnings for unused results of setuid and setgid in
nscd/connections.c using an ignore_value macro along the lines
suggested by Paul in
<https://sourceware.org/ml/libc-alpha/2014-11/msg00733.html>.

Tested for x86_64.

	* include/libc-internal.h (ignore_value): New macro.
	* nscd/connections.c (restart): Wrap calls to setuid and setgid
	with ignore_value.