warnings.m4: check the compiler, not the preprocessor

* m4/warnings.m4 (gl_WARN_ADD): Use the compiler, not the
preprocessor.
Depend on the current AC_LANG for the cache variables.
fflush: avoid compiler warning

Compiling under glibc produced warnings.

* lib/fflush.c (update_fpos_cache): Mark variables that are
potentially unused.

Signed-off-by: Eric Blake <eblake@redhat.com>
strerror_r: avoid compiler warning

Nested declarations are easy to avoid, and doing so avoids at least
libvirt's choice of compiler warnings.

* lib/strerror_r.c (strerror_r): Hoist extern declaration to top
level.

Signed-off-by: Eric Blake <eblake@redhat.com>
maint.mk: fix syntax checks without exclusions

Commit 727075d0 skipped per-line exclusions if ${exclude} is left
undefined, but was immediately broken by commit 44de969c which
always initialized the variable to the empty string.

* top/maint.mk (_sc_search_regexp): Allow for empty variable.
Reported by Daniel P. Berrange.

Signed-off-by: Eric Blake <eblake@redhat.com>
stdio: don't assume gets any more

Gnulib intentionally does not have a gets module, and now that C11
and glibc have dropped it, we should be more proactive about warning
any user on a platform that still has a declaration of this dangerous
interface.

* m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
support.
* modules/stdio (Makefile.am): Likewise.
* lib/stdio-read.c (gets): Likewise.
* tests/test-stdio-c++.cc: Likewise.
* m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
* lib/stdio.in.h (gets): Make warning occur in more places.
* doc/posix-functions/gets.texi (gets): Update documentation.
Reported by Christer Solskogen.

Signed-off-by: Eric Blake <eblake@redhat.com>
warnings.m4: fix errors.

* m4/warnings.m4 (gl_WARN_ADD): Don't change CPPFLAGS,
but the compiler flags.
Reported by Bruno Haible.
update from texinfo
regex: pacify GCC when compiling GRUB

* lib/regcomp.c (init_dfa): Make a pointer 'const', to avoid
a diagnostic.  Reported by Vladimir Serbinenko in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00163.html>.
fflush: Fix syntax error.

* lib/fflush.c: Include unused-parameter.h, needed for
_GL_UNUSED_PARAMETER.
* modules/fflush (Depends-on): Add snippet/unused-parameter.
Fix typo in ChangeLog entry.
log10 tests: More tests.

* tests/test-log10.h: New file.
* modules/log10-tests (Files): Add tests/test-log10.h,
tests/minus-zero.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_log10_SOURCES.
* tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
(main): Invoke test_function.
log10f tests: More tests.

* modules/log10f-tests (Files): Add tests/test-log10.h,
tests/minus-zero.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_log10f_SOURCES.
* tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
(main): Invoke test_function.
log10l tests: More tests.

* modules/log10l-tests (Files): Add tests/test-log10l.h,
tests/minus-zero.h, tests/randoml.c.
(Makefile.am): Add randoml.c to test_log10l_SOURCES.
* tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
(main): Invoke test_function.
log10: Work around OSF/1 5.1 bug.

* lib/math.in.h (log10): New declaration.
* lib/log10.c: New file.
* m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro.
(gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10.
* m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10.
* modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10.
* modules/log10 (Files): Add lib/log10.c.
(Depends-on): Add math.
(configure.ac): If REPLACE_LOG10 is 1, compile an override.
* tests/test-math-c++.cc: Check the declaration of log10.
* doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
log10f: Work around OSF/1 5.1 bug.

* lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1.
* lib/log10f.c (log10f): If logf exists, use it and provide just the
workaround.
* m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro.
(gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F.
* modules/math (Makefile.am): Substitute REPLACE_LOG10F.
* modules/log10f (configure.ac): Consider REPLACE_LOG10F.
(Depends-on): Update conditions.
* doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.

* lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
* lib/log10l.c (log10l): If log10l exists, use it and provide just the
workaround.
* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
(gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
* modules/math (Makefile.am): Substitute REPLACE_LOG10L.
* modules/log10l (configure.ac): Consider REPLACE_LOG10L.
(Depends-on): Update conditions.
* doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
IRIX 6.5, OSF/1 5.1 problems.
New module 'log10f-ieee'.

* modules/log10f-ieee: New file.
Tests for module 'log10f-ieee'.

* modules/log10f-ieee-tests: New file.
* tests/test-log10f-ieee.c: New file.
* tests/test-log10-ieee.h: New file.
New module 'log10-ieee'.

* modules/log10-ieee: New file.
Tests for module 'log10-ieee'.

* modules/log10-ieee-tests: New file.
* tests/test-log10-ieee.c: New file.