gnulib.git
12 years agoquotearg: the module must now include quote.h
Jim Meyering [Wed, 7 Mar 2012 14:44:33 +0000 (15:44 +0100)]
quotearg: the module must now include quote.h

With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
So must the module.
* modules/quotearg (Files): Add quote.h.

12 years agoreadtokens: avoid core dumps with unusual calling patterns
Paul Eggert [Tue, 6 Mar 2012 23:19:24 +0000 (15:19 -0800)]
readtokens: avoid core dumps with unusual calling patterns

Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
* lib/readtokens.c: Include limits.h.
(word, bits_per_word, get_nth_bit, set_nth_bit): New.
(readtoken): Don't cache the delimiters; the cache code was buggy
if !delim && saved_delim, or if the new n_delim differs from the old.
Also, it wasn't thread-safe.

12 years agoquote: Adhere to common module description layout.
Bruno Haible [Wed, 7 Mar 2012 10:36:37 +0000 (11:36 +0100)]
quote: Adhere to common module description layout.

* modules/quote (Makefile.am): Add back empty section.

12 years agoquote: fuse into quotearg
Akim Demaille [Wed, 7 Mar 2012 07:35:28 +0000 (23:35 -0800)]
quote: fuse into quotearg

This patch is made for the benefit of Bison.
quote does not leave the choice of the quoting style to the user.
quoting_style provides poor customizability, yet quoting_options,
which is very rich, is hidden inside quotearg.c.  So in order to
allow quote customization, move its implementation to quotearg.c.
* lib/quote.c: Remove.
* modules/quote: Adjust.
* lib/quotearg.c (quoting_options_from_style): Fix a compiler
warning: provide all the members of literal structs.
(quote_quoting_options): New.
(quote, quote_n): Import implementation from quote.c.
* lib/quote.h: Import the comments from quote.c.
(quote_quoting_options): New.

12 years agoTests for module 'expm1l-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:50:22 +0000 (00:50 +0100)]
Tests for module 'expm1l-ieee'.

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

12 years agoNew module 'expm1l-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:49:52 +0000 (00:49 +0100)]
New module 'expm1l-ieee'.

* modules/expm1l-ieee: New file.

12 years agoTests for module 'expm1f-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:43:17 +0000 (00:43 +0100)]
Tests for module 'expm1f-ieee'.

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

12 years agoNew module 'expm1f-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:42:42 +0000 (00:42 +0100)]
New module 'expm1f-ieee'.

* modules/expm1f-ieee: New file.

12 years agoTests for module 'expm1-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:39:56 +0000 (00:39 +0100)]
Tests for module 'expm1-ieee'.

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

12 years agoNew module 'expm1-ieee'.
Bruno Haible [Tue, 6 Mar 2012 23:38:50 +0000 (00:38 +0100)]
New module 'expm1-ieee'.

* modules/expm1-ieee: New file.
* m4/expm1-ieee.m4: New file.
* m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
whether expm1 works with a minus zero argument. Replace it if not.
* lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
* modules/math (Makefile.am): Substitute REPLACE_EXPM1.
* modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
(Depends-on): Update conditions.
* doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
AIX problem.

12 years agoWork around expm1f bug on IRIX 6.5.
Bruno Haible [Tue, 6 Mar 2012 22:25:51 +0000 (23:25 +0100)]
Work around expm1f bug on IRIX 6.5.

* lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
* m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
(gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
not work.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
* modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
* modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
(Depends-on): Update conditions.
* doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.

12 years agoTests for module 'expm1l'.
Bruno Haible [Tue, 6 Mar 2012 20:56:00 +0000 (21:56 +0100)]
Tests for module 'expm1l'.

* modules/expm1l-tests: New file.
* tests/test-expm1l.c: New file.

12 years agoNew module 'expm1l'.
Bruno Haible [Tue, 6 Mar 2012 20:55:34 +0000 (21:55 +0100)]
New module 'expm1l'.

* lib/math.in.h (expm1l): New declaration.
* lib/expm1l.c: New file.
* m4/expm1l.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
* modules/expm1l: New file.
* tests/test-math-c++.cc: Check the declaration of expm1l.
* doc/posix-functions/expm1l.texi: Mention the new module.

12 years agoTests for module 'expm1f'.
Bruno Haible [Tue, 6 Mar 2012 20:26:12 +0000 (21:26 +0100)]
Tests for module 'expm1f'.

* modules/expm1f-tests: New file.
* tests/test-expm1f.c: New file.

12 years agoNew module 'expm1f'.
Bruno Haible [Tue, 6 Mar 2012 20:24:28 +0000 (21:24 +0100)]
New module 'expm1f'.

* lib/math.in.h (expm1f): New declaration.
* lib/expm1f.c: New file.
* m4/expm1f.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
* modules/expm1f: New file.
* tests/test-math-c++.cc: Check the declaration of expm1f.
* doc/posix-functions/expm1f.texi: Mention the new module.

12 years agoTests for module 'expm1'.
Bruno Haible [Tue, 6 Mar 2012 20:02:17 +0000 (21:02 +0100)]
Tests for module 'expm1'.

* modules/expm1-tests: New file.
* tests/test-expm1.c: New file.
* tests/test-expm1.h: New file.

12 years agoNew module 'expm1'.
Bruno Haible [Tue, 6 Mar 2012 16:55:54 +0000 (17:55 +0100)]
New module 'expm1'.

* lib/math.in.h (expm1): New declaration.
* lib/expm1.c: New file.
* m4/expm1.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
* modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
* modules/expm1: New file.
* tests/test-math-c++.cc: Check the declaration of expm1.
* doc/posix-functions/expm1.texi: Mention the new module.

12 years agomath: Ensure declarations of math functions.
Bruno Haible [Tue, 6 Mar 2012 15:24:16 +0000 (16:24 +0100)]
math: Ensure declarations of math functions.

* modules/acosf (Depends-on): Add 'extensions'.
* modules/asinf (Depends-on): Likewise.
* modules/atan2f (Depends-on): Likewise.
* modules/atanf (Depends-on): Likewise.
* modules/cbrt (Depends-on): Likewise.
* modules/cbrtf (Depends-on): Likewise.
* modules/cbrtl (Depends-on): Likewise.
* modules/copysignf (Depends-on): Likewise.
* modules/copysignl (Depends-on): Likewise.
* modules/cosf (Depends-on): Likewise.
* modules/coshf (Depends-on): Likewise.
* modules/expf (Depends-on): Likewise.
* modules/fabsf (Depends-on): Likewise.
* modules/fabsl (Depends-on): Likewise.
* modules/fmaf (Depends-on): Likewise.
* modules/fmal (Depends-on): Likewise.
* modules/fmodf (Depends-on): Likewise.
* modules/fmodl (Depends-on): Likewise.
* modules/frexpf (Depends-on): Likewise.
* modules/frexpl (Depends-on): Likewise.
* modules/hypot (Depends-on): Likewise.
* modules/hypotf (Depends-on): Likewise.
* modules/hypotl (Depends-on): Likewise.
* modules/ldexpf (Depends-on): Likewise.
* modules/ldexpl (Depends-on): Likewise.
* modules/log10f (Depends-on): Likewise.
* modules/log10l (Depends-on): Likewise.
* modules/log1p (Depends-on): Likewise.
* modules/logb (Depends-on): Likewise.
* modules/logf (Depends-on): Likewise.
* modules/modff (Depends-on): Likewise.
* modules/modfl (Depends-on): Likewise.
* modules/powf (Depends-on): Likewise.
* modules/remainderf (Depends-on): Likewise.
* modules/remainderl (Depends-on): Likewise.
* modules/rintf (Depends-on): Likewise.
* modules/rintl (Depends-on): Likewise.
* modules/sinf (Depends-on): Likewise.
* modules/sinhf (Depends-on): Likewise.
* modules/sqrtf (Depends-on): Likewise.
* modules/tanf (Depends-on): Likewise.
* modules/tanhf (Depends-on): Likewise.
* m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
* m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
* m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
* m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
* m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
* m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
* m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
* m4/cosf.m4 (gl_FUNC_COSF): Likewise.
* m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
* m4/expf.m4 (gl_FUNC_EXPF): Likewise.
* m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
* m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
* m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
* m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
* m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
* m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
* m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
* m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
* m4/logb.m4 (gl_FUNC_LOGB): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/powf.m4 (gl_FUNC_POWF): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
* m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
* m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
* m4/sinf.m4 (gl_FUNC_SINF): Likewise.
* m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
* m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
* m4/tanf.m4 (gl_FUNC_TANF): Likewise.
* m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.

12 years agomath: Update module names in warnings.
Bruno Haible [Tue, 6 Mar 2012 11:34:50 +0000 (12:34 +0100)]
math: Update module names in warnings.

* lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
tanl): Use specific module name in warn-on-use warning.

12 years agoexpl: Simplify computation.
Bruno Haible [Tue, 6 Mar 2012 11:03:57 +0000 (12:03 +0100)]
expl: Simplify computation.

* lib/expl.c (expl): Simplify computation of exp_y. Fix comment.

12 years agoexp* tests: More tests.
Bruno Haible [Tue, 6 Mar 2012 02:05:14 +0000 (03:05 +0100)]
exp* tests: More tests.

* tests/test-exp.h: New file.
* tests/test-exp.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* tests/test-expf.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* tests/test-expl.c: Include <float.h> and test-exp.h.
(main): Invoke test_function.
* modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_exp_SOURCES.
* modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_expf_SOURCES.
* modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_expl_SOURCES.

12 years agoexpl: Fix precision of computed result.
Bruno Haible [Tue, 6 Mar 2012 02:01:51 +0000 (03:01 +0100)]
expl: Fix precision of computed result.

* lib/expl.c: Completely rewritten.
* modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
(Maintainer): Add me.
* m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.

12 years agocbrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 13:16:38 +0000 (14:16 +0100)]
cbrt* tests: More tests.

* tests/test-cbrt.h: New file.
* tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
(main): Invoke test_function.
* modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_cbrt_SOURCES.
* modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
* modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_cbrtl_SOURCES.

12 years agohypot* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 12:21:47 +0000 (13:21 +0100)]
hypot* tests: More tests.

* tests/test-hypot.h: New file, partially extracted from
tests/test-hypotl.c.
* tests/test-hypot.c: Include test-hypot.h.
(main): Invoke test_function.
* tests/test-hypotf.c: Include test-hypot.h.
(main): Invoke test_function.
* tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
(main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
* modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_hypot_SOURCES.
* modules/hypotf-tests (Files): Add tests/test-hypot.h,
tests/randomf.c.
(Makefile.am): Add randomf.c to test_hypotf_SOURCES.
* modules/hypotl-tests (Files): Add tests/test-hypot.h,
tests/randoml.c.
(Depends-on): Add 'fpucw', 'float'.
(Makefile.am): Add randoml.c to test_hypotl_SOURCES.

12 years agofpucw: Doc about FreeBSD.
Bruno Haible [Mon, 5 Mar 2012 12:16:20 +0000 (13:16 +0100)]
fpucw: Doc about FreeBSD.

* lib/fpucw.h: Mention FreeBSD in comments.

12 years agosqrt* tests: Rename local variable.
Bruno Haible [Mon, 5 Mar 2012 02:20:34 +0000 (03:20 +0100)]
sqrt* tests: Rename local variable.

12 years agosqrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 01:43:43 +0000 (02:43 +0100)]
sqrt* tests: More tests.

12 years agosqrt* tests: More tests.
Bruno Haible [Mon, 5 Mar 2012 01:14:30 +0000 (02:14 +0100)]
sqrt* tests: More tests.

* tests/test-sqrt.h: New file.
* tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
(main): Invoke test_function.
* modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_sqrt_SOURCES.
* modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
* modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_sqrtl_SOURCES.

12 years agoremainder* tests: More tests.
Bruno Haible [Sun, 4 Mar 2012 22:07:45 +0000 (23:07 +0100)]
remainder* tests: More tests.

* tests/test-remainder.h: New file, based on tests/test-fmod.h.
* tests/test-remainder.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* tests/test-remainderf.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* tests/test-remainderl.c: Include <float.h> and test-remainder.h.
(main): Invoke test_function.
* modules/remainder-tests (Files): Add tests/test-remainder.h,
tests/randomd.c.
(Makefile.am): Add randomd.c to test_remainder_SOURCES.
* modules/remainderf-tests (Files): Add tests/test-remainder.h,
tests/randomf.c.
(Makefile.am): Add randomf.c to test_remainderf_SOURCES.
* modules/remainderl-tests (Files): Add tests/test-remainder.h,
tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_remainderl_SOURCES.

12 years agoremainder, remainderf, remainderl: Fix computation for large quotients.
Bruno Haible [Sun, 4 Mar 2012 22:01:33 +0000 (23:01 +0100)]
remainder, remainderf, remainderl: Fix computation for large quotients.

* lib/remainder.c: Completely rewritten.
* lib/remainderf.c (remainderf): Use implementation of remainder.c with
USE_FLOAT.
* lib/remainderl.c (remainderl): Use implementation of remainder.c with
USE_LONG_DOUBLE.
* modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
isnand, isinf. Remove round, fma.
* modules/remainderf (Files): Add lib/remainder.c.
(Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
Remove roundf, fmaf.
* modules/remainderl (Files): Add lib/remainder.c.
(Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
isinf. Remove roundl, fmal.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
REMAINDER_LIBM.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
REMAINDERF_LIBM.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
REMAINDERL_LIBM.

12 years agofmodl: Fix last commit.
Bruno Haible [Sun, 4 Mar 2012 21:54:38 +0000 (22:54 +0100)]
fmodl: Fix last commit.

12 years agofmod* tests: More tests.
Bruno Haible [Sun, 4 Mar 2012 19:59:05 +0000 (20:59 +0100)]
fmod* tests: More tests.

* tests/test-fmod.h (my_ldexp): New function.
(test_function): Reduce amount of random numbers to test. Add tests
of very large quotients x / y.
* tests/test-fmod.c (MAX_EXP): New macro.
* tests/test-fmodf.c (MAX_EXP): Likewise.
* tests/test-fmodl.c (MAX_EXP): Likewise.

12 years agofmod, fmodl: Fix computation for large quotients x / y.
Bruno Haible [Sun, 4 Mar 2012 19:56:32 +0000 (20:56 +0100)]
fmod, fmodl: Fix computation for large quotients x / y.

* lib/fmod.c: Completely rewritten.
* lib/fmodl.c (fmodl): Use implementation of fmod.c with
USE_LONG_DOUBLE.
* modules/fmod (Depends-on): Add isfinite, signbit, fabs, frexp, ldexp,
isnand. Remove fma.
* modules/fmodl (Depends-on): Add float, isfinite, signbit, fabsl,
frexpl, ldexpl, isnanl. Remove fma.
* m4/fmod.m4 (gl_FUNC_FMOD): Update computation of FMOD_LIBM.
* m4/fmodl.m4 (gl_FUNC_FMODL): Update computation of FMODL_LIBM.

12 years agofmod* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 17:15:16 +0000 (18:15 +0100)]
fmod* tests: More tests.

* tests/test-fmod.h: New file.
* tests/test-fmod.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* tests/test-fmodf.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* tests/test-fmodl.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_fmod_SOURCES.
* modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_fmodf_SOURCES.
* modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_fmodl_SOURCES.

12 years agorint* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 16:17:19 +0000 (17:17 +0100)]
rint* tests: More tests.

* tests/test-rint.h: New file, partially extracted from
tests/test-rintl.c.
* tests/test-rint.c: Include test-rint.h.
(main): Invoke test_function.
* tests/test-rintf.c: Include test-rint.h.
(main): Invoke test_function.
* tests/test-rintl.c: Include test-rint.h.
(main): Invoke test_function.
* modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_rint_SOURCES.
* modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_rintf_SOURCES.
* modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
(Makefile.am): Add randoml.c to test_rintl_SOURCES.

12 years agomodf* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 16:00:59 +0000 (17:00 +0100)]
modf* tests: More tests.

* tests/test-modf.h: New file.
* tests/test-modf.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* tests/test-modff.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* tests/test-modfl.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_modf_SOURCES.
* modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_modff_SOURCES.
* modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_modfl_SOURCES.

12 years agofabs* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 15:14:14 +0000 (16:14 +0100)]
fabs* tests: More tests.

* tests/test-fabs.h: New file, partially extracted from
tests/test-fabsl.c.
* tests/test-fabs.c (RANDOM): New macro.
* tests/test-fabsf.c (RANDOM): New macro.
* tests/test-fabsl.c (RANDOM): New macro.
* modules/fabs-tests (Files): Add tests/randomd.c.
(Makefile.am): Add randomd.c to test_fabs_SOURCES.
* modules/fabsf-tests (Files): Add tests/randomf.c.
(Makefile.am): Add randomf.c to test_fabsf_SOURCES.
* modules/fabsl-tests (Files): Add tests/randoml.c.
(Makefile.am): Add randoml.c to test_fabsl_SOURCES.

12 years agoldexp* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 13:59:07 +0000 (14:59 +0100)]
ldexp* tests: More tests.

* tests/test-ldexp.h (test_function): Add some pseudo-randomized tests.
* tests/test-ldexp.c (RANDOM): New macro.
* tests/test-ldexpf.c (RANDOM): New macro.
* tests/test-ldexpl.c (RANDOM): New macro.
* modules/ldexp-tests (Files): Add tests/randomd.c.
(Makefile.am): Add randomd.c to test_ldexp_SOURCES.
* modules/ldexpf-tests (Files): Add tests/randomf.c.
(Makefile.am): Add randomf.c to test_ldexpf_SOURCES.
* modules/ldexpl-tests (Files): Add tests/randoml.c.
(Makefile.am): Add randoml.c to test_ldexpl_SOURCES.

12 years agofrexp* tests: More tests.
Bruno Haible [Sat, 3 Mar 2012 13:28:03 +0000 (14:28 +0100)]
frexp* tests: More tests.

* tests/test-frexp.h (test_function): Add some pseudo-randomized tests.
* tests/test-frexp.c (RANDOM): New macro.
* tests/test-frexpf.c (RANDOM): New macro.
* tests/test-frexpl.c (RANDOM): New macro.
* modules/frexp-tests (Files): Add tests/randomd.c.
(Makefile.am): Add randomd.c to test_frexp_SOURCES.
* modules/frexpf-tests (Files): Add tests/randomf.c.
(Makefile.am): Add randomf.c to test_frexpf_SOURCES.
* modules/frexpl-tests (Files): Add tests/randoml.c.
(Makefile.am): Add randoml.c to test_frexpl_SOURCES.

12 years agoSupport for pseudo-random numbers in tests.
Bruno Haible [Sat, 3 Mar 2012 13:01:03 +0000 (14:01 +0100)]
Support for pseudo-random numbers in tests.

* tests/randomf.c: New file.
* tests/randomd.c: New file.
* tests/randoml.c: New file.
* tests/macros.h (randomf, randomd, randoml): New declarations.

12 years agofrexp* tests: Refactor.
Bruno Haible [Sat, 3 Mar 2012 12:35:37 +0000 (13:35 +0100)]
frexp* tests: Refactor.

* tests/test-frexp.h: New file, extracted from tests/test-frexpl.c.
* tests/test-frexp.c: Include and use it.
* tests/test-frexpf.c: Likewise.
* tests/test-frexpl.c: Likewise.
* modules/frexp-tests (Files): Add tests/test-frexp.h.
* modules/frexpf-tests (Files): Likewise.
* modules/frexpl-tests (Files): Likewise.

12 years agomaint: don't specify XZ_OPT=-9ev in dist-related rule
Jim Meyering [Fri, 2 Mar 2012 17:35:12 +0000 (18:35 +0100)]
maint: don't specify XZ_OPT=-9ev in dist-related rule

Using xz's -9 option is warranted only if you have a very large
tarball (see xz's documentation for the sizes vs. presets), and
requires 64MiB of memory at decompression time.
* top/maint.mk (alpha beta stable): Don't specify XZ_OPT=-9ev.
Automake's default of just "-e" is fine.  Override on a
per-package basis by setting XZ_OPT e.g., in cfg.mk.

12 years agoautoupdate
Karl Berry [Fri, 2 Mar 2012 14:49:09 +0000 (06:49 -0800)]
autoupdate

12 years agomaint.mk: allow announcement for non-gnulib project
Eric Blake [Fri, 2 Mar 2012 04:21:09 +0000 (21:21 -0700)]
maint.mk: allow announcement for non-gnulib project

Currently, autoconf does not use a gnulib submodule; this
tripped up the 'make beta' with:

announce-gen: when specifying gnulib as a tool, you must also specify
--gnulib-version=V, where V is the result of running git describe
in the gnulib source directory.
Try 'announce-gen --help' for more information.

* maint.mk (announcement): Skip gnulib version if not used.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agomaint.mk: avoid spurious failure of _sc_search_regexp-using tests
Jim Meyering [Thu, 1 Mar 2012 22:20:22 +0000 (23:20 +0100)]
maint.mk: avoid spurious failure of _sc_search_regexp-using tests

* top/maint.mk: Initialize _sc_search_regexp parameters, so that
envvar settings cannot interfere.  Otherwise, setting envvars like
prohibit=foo require=bar, etc. would cause spurious test failures.

12 years agomaint.mk: add per-line exclusions to prohibitions
Eric Blake [Thu, 1 Mar 2012 21:51:31 +0000 (14:51 -0700)]
maint.mk: add per-line exclusions to prohibitions

_sc_search_regexp would let you skip entire files, but not
individual lines, until now.  As proof that adding in a new
per-line regex exception mechanism is useful, I found three
syntax checks that were previously open-coded, only because
they had to exclude individual lines.

The exclude filtering is done on 'file:line:contents' output
from grep, rather than the original files, so filtering for
empty lines is a no-op, and searching for contents anchored
at the beginning of the line in the original file should
instead be anchored against ':' at the time of the filtering.

* maint.mk (_sc_search_regexp): Add $exclude parameter.
(sc_prohibit_strcmp, sc_unmarked_diagnostics)
(sc_const_long_option): Use it.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoTests for module 'expl-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:39:22 +0000 (11:39 +0100)]
Tests for module 'expl-ieee'.

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

12 years agoNew module 'expl-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:39:13 +0000 (11:39 +0100)]
New module 'expl-ieee'.

* modules/expl-ieee: New file.

12 years agoTests for module 'exp-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:39:03 +0000 (11:39 +0100)]
Tests for module 'exp-ieee'.

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

12 years agoNew module 'exp-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:38:53 +0000 (11:38 +0100)]
New module 'exp-ieee'.

* modules/exp-ieee: New file.

12 years agoTests for module 'expf-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:38:42 +0000 (11:38 +0100)]
Tests for module 'expf-ieee'.

* modules/expf-ieee-tests: New file.
* tests/test-expf-ieee.c: New file.
* tests/test-exp-ieee.h: New file.

12 years agoNew module 'expf-ieee'.
Bruno Haible [Thu, 1 Mar 2012 10:38:27 +0000 (11:38 +0100)]
New module 'expf-ieee'.

* modules/expf-ieee: New file.

12 years agocbrtl-ieee: Work around test failure on IRIX 6.5.
Bruno Haible [Thu, 1 Mar 2012 03:54:18 +0000 (04:54 +0100)]
cbrtl-ieee: Work around test failure on IRIX 6.5.

* m4/cbrtl-ieee.m4: New file.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): If gl_FUNC_CBRTL_IEEE is present,
test whether cbrtl works with a minus zero argument. Replace it if not.
* lib/math.in.h (cbrtl): Override if REPLACE_CBRTL is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTL.
* modules/math (Makefile.am): Substitute REPLACE_CBRTL.
* modules/cbrtl (configure.ac): Consider REPLACE_CBRTL.
(Depends-on): Update conditions.
* modules/cbrtl-ieee (Files): Add m4/cbrtl-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(configure.ac): Invoke gl_FUNC_CBRTL_IEEE.
* lib/cbrtl.c (cbrtl) [IRIX]: Avoid an unnecessary addition.
* doc/posix-functions/cbrtl.texi: Mention the cbrtl-ieee module.

12 years agoTests for module 'cbrtl-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:03:00 +0000 (03:03 +0100)]
Tests for module 'cbrtl-ieee'.

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

12 years agoNew module 'cbrtl-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:02:52 +0000 (03:02 +0100)]
New module 'cbrtl-ieee'.

* modules/cbrtl-ieee: New file.

12 years agoTests for module 'cbrt-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:02:44 +0000 (03:02 +0100)]
Tests for module 'cbrt-ieee'.

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

12 years agoNew module 'cbrt-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:02:34 +0000 (03:02 +0100)]
New module 'cbrt-ieee'.

* modules/cbrt-ieee: New file.

12 years agoTests for module 'cbrtf-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:02:24 +0000 (03:02 +0100)]
Tests for module 'cbrtf-ieee'.

* modules/cbrtf-ieee-tests: New file.
* tests/test-cbrtf-ieee.c: New file.
* tests/test-cbrt-ieee.h: New file.

12 years agoNew module 'cbrtf-ieee'.
Bruno Haible [Thu, 1 Mar 2012 02:02:14 +0000 (03:02 +0100)]
New module 'cbrtf-ieee'.

* modules/cbrtf-ieee: New file.

12 years agocbrtf: Work around bug in IRIX 6.5 system function.
Bruno Haible [Thu, 1 Mar 2012 02:36:14 +0000 (03:36 +0100)]
cbrtf: Work around bug in IRIX 6.5 system function.

* lib/math.in.h (cbrtf): Override if REPLACE_CBRTF is 1.
* m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): New macro.
(gl_FUNC_CBRTF): Invoke it. Set REPLACE_CBRTF to 1 if cbrtf() does not
work.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTF.
* modules/math (Makefile.am): Substitute REPLACE_CBRTF.
* modules/cbrtf (configure.ac): Consider REPLACE_CBRTF.
(Depends-on): Update conditions.
* doc/posix-functions/cbrtf.texi: Mention the IRIX 6.5 problem.

12 years agoTests for module 'cbrtl'.
Bruno Haible [Thu, 1 Mar 2012 01:51:18 +0000 (02:51 +0100)]
Tests for module 'cbrtl'.

* modules/cbrtl-tests: New file.
* tests/test-cbrtl.c: New file.

12 years agoNew module 'cbrtl'.
Bruno Haible [Thu, 1 Mar 2012 01:50:14 +0000 (02:50 +0100)]
New module 'cbrtl'.

* lib/math.in.h (cbrtl): New declaration.
* lib/cbrtl.c: New file.
* m4/cbrtl.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether cbrtl is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTL, HAVE_CBRTL,
HAVE_DECL_CBRTL.
* modules/math (Makefile.am): Substitute GNULIB_CBRTL, HAVE_CBRTL,
HAVE_DECL_CBRTL.
* modules/cbrtl: New file.
* tests/test-math-c++.cc: Check the declaration of cbrtl.
* doc/posix-functions/cbrtl.texi: Mention the new module.

12 years agoTests for module 'cbrtf'.
Bruno Haible [Thu, 1 Mar 2012 01:04:56 +0000 (02:04 +0100)]
Tests for module 'cbrtf'.

* modules/cbrtf-tests: New file.
* tests/test-cbrtf.c: New file.

12 years agoNew module 'cbrtf'.
Bruno Haible [Thu, 1 Mar 2012 01:03:36 +0000 (02:03 +0100)]
New module 'cbrtf'.

* lib/math.in.h (cbrtf): New declaration.
* lib/cbrtf.c: New file.
* m4/cbrtf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether cbrtf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTF, HAVE_CBRTF,
HAVE_DECL_CBRTF.
* modules/math (Makefile.am): Substitute GNULIB_CBRTF, HAVE_CBRTF,
HAVE_DECL_CBRTF.
* modules/cbrtf: New file.
* tests/test-math-c++.cc: Check the declaration of cbrtf.
* doc/posix-functions/cbrtf.texi: Mention the new module.

12 years agocbrt: Provide replacement on MSVC and Minix.
Bruno Haible [Wed, 29 Feb 2012 22:42:53 +0000 (23:42 +0100)]
cbrt: Provide replacement on MSVC and Minix.

* lib/math.in.h (cbrt): New declaration.
* lib/cbrt.c: New file.
* m4/cbrt.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
* modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
* modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
(Depends-on): Add dependencies.
(configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
* tests/test-math-c++.cc: Check the declaration of cbrt.
* doc/posix-functions/cbrt.texi: Mention that the module provides a
replacement.

12 years agohypotl-ieee: Work around test failure on OSF/1 and native Windows.
Bruno Haible [Wed, 29 Feb 2012 19:50:49 +0000 (20:50 +0100)]
hypotl-ieee: Work around test failure on OSF/1 and native Windows.

* m4/hypotl-ieee.m4: New file.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
test whether hypotl works with mixed NaN and Infinity arguments.
Replace it if not.
* lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
* modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
* modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
(Depends-on): Update conditions.
* modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
(Depends-on): Add hypot-ieee.
(configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
* doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.

12 years agohypotf-ieee: Work around test failure on OSF/1 and native Windows.
Bruno Haible [Wed, 29 Feb 2012 19:26:22 +0000 (20:26 +0100)]
hypotf-ieee: Work around test failure on OSF/1 and native Windows.

* m4/hypotf-ieee.m4: New file.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
test whether hypotf works with mixed NaN and Infinity arguments.
Replace it if not.
* modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
(Depends-on): Add hypot-ieee.
(configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
* doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.

12 years agohypot-ieee: Work around test failure on OSF/1 and native Windows.
Bruno Haible [Wed, 29 Feb 2012 19:00:38 +0000 (20:00 +0100)]
hypot-ieee: Work around test failure on OSF/1 and native Windows.

* lib/math.in.h (hypot): New declaration.
* lib/hypot.c: New file.
* m4/hypot-ieee.m4: New file.
* m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
whether hypot works with mixed NaN and Infinity arguments. Replace it
if not.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
REPLACE_HYPOT.
* modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
* modules/hypot (Files): Add lib/hypot.c.
(Depends-on): Add dependencies.
(configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
* modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
(configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
* tests/test-math-c++.cc: Check the declaration of hypot.
* doc/posix-functions/hypot.texi: Mention the hypot-ieee module.

12 years agoTests for module 'hypotl-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:34:47 +0000 (18:34 +0100)]
Tests for module 'hypotl-ieee'.

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

12 years agoNew module 'hypotl-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:34:37 +0000 (18:34 +0100)]
New module 'hypotl-ieee'.

* modules/hypotl-ieee: New file.

12 years agoTests for module 'hypot-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:34:26 +0000 (18:34 +0100)]
Tests for module 'hypot-ieee'.

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

12 years agoNew module 'hypot-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:34:11 +0000 (18:34 +0100)]
New module 'hypot-ieee'.

* modules/hypot-ieee: New file.

12 years agoTests for module 'hypotf-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:33:58 +0000 (18:33 +0100)]
Tests for module 'hypotf-ieee'.

* modules/hypotf-ieee-tests: New file.
* tests/test-hypotf-ieee.c: New file.
* tests/test-hypot-ieee.h: New file.

12 years agoNew module 'hypotf-ieee'.
Bruno Haible [Wed, 29 Feb 2012 17:33:34 +0000 (18:33 +0100)]
New module 'hypotf-ieee'.

* modules/hypotf-ieee: New file.

12 years agoRemove unused variables.
Bruno Haible [Wed, 29 Feb 2012 18:51:16 +0000 (19:51 +0100)]
Remove unused variables.

* m4/fmod.m4 (gl_FUNC_FMOD): Remove unused variable 'i'.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.

12 years agotermios: fix pid_t always, not just for tcgetsid
Eric Blake [Wed, 29 Feb 2012 15:36:22 +0000 (08:36 -0700)]
termios: fix pid_t always, not just for tcgetsid

tests-termios.c was failing on more than just cygwin.

* doc/posix-headers/termios.texi (termios.h): Mention problem.
* lib/termios.in.h (include): Ensure pid_t on all platforms, not
just when building tcgetsid.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoupdate from texinfo
Karl Berry [Wed, 29 Feb 2012 15:12:44 +0000 (07:12 -0800)]
update from texinfo

12 years agoTests for module 'hypotl'.
Bruno Haible [Wed, 29 Feb 2012 14:46:45 +0000 (15:46 +0100)]
Tests for module 'hypotl'.

* modules/hypotl-tests: New file.
* tests/test-hypotl.c: New file.

12 years agoNew module 'hypotl'.
Bruno Haible [Wed, 29 Feb 2012 14:46:25 +0000 (15:46 +0100)]
New module 'hypotl'.

* lib/math.in.h (hypotl): New declaration.
* lib/hypotl.c: New file.
* m4/hypotl.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTL, HAVE_HYPOTL.
* modules/math (Makefile.am): Substitute GNULIB_HYPOTL, HAVE_HYPOTL.
* modules/hypotl: New file.
* tests/test-math-c++.cc: Check the hypotl declaration.
* doc/posix-functions/hypotl.texi: Mention the new module.

12 years agohypotf: Fix typo in comment.
Bruno Haible [Wed, 29 Feb 2012 13:42:48 +0000 (14:42 +0100)]
hypotf: Fix typo in comment.

12 years agotcgetsid: fix cygwin header bug
Eric Blake [Tue, 28 Feb 2012 00:35:56 +0000 (17:35 -0700)]
tcgetsid: fix cygwin header bug

Cygwin added tcgetsid in 1.7.10, but with int instead of pid_t:
http://cygwin.com/ml/cygwin-patches/2012-q1/msg00031.html
For now, since cygwin's pid_t is int, I'm not worrying about
correcting the return type.

* lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agodocs: update cygwin progress
Eric Blake [Tue, 28 Feb 2012 00:06:06 +0000 (17:06 -0700)]
docs: update cygwin progress

Now that cygwin 1.7.11 is released, it's time to update some docs.

Not listed: cygwin 1.7.10 added __fpurge; but the fpurge module
properly uses it.

* doc/posix-functions/llround.texi (llround): Added in cygwin
1.7.8.
* doc/posix-functions/llroundf.texi (llroundf): Likewise.
* doc/glibc-functions/program_invocation_name.texi
(program_invocation_name): Likewise.
* doc/glibc-functions/program_invocation_short_name.texi
(program_invocation_short_name): Likewise.
* doc/glibc-functions/madvise.texi (madvise): Likewise.
* doc/glibc-functions/pthread_yield.texi (pthread_yield):
Likewise.
* doc/posix-functions/pthread_spin_destroy.texi
(pthread_spin_destroy): Added in cygwin 1.7.10.
* doc/posix-functions/pthread_spin_init.texi (pthread_spin_init):
Likewise.
* doc/posix-functions/pthread_spin_lock.texi (pthread_spin_lock):
Likewise.
* doc/posix-functions/pthread_spin_trylock.texi
(pthread_spin_trylock): Likewise.
* doc/posix-functions/pthread_spin_unlock.texi
(pthread_spin_unlock): Likewise.
* doc/posix-functions/pthread_setschedprio.texi
(pthread_setschedprio): Likewise.
* doc/posix-functions/pthread_attr_getstack.texi
(pthread_attr_getstack): Likewise.
* doc/pastposix-functions/pthread_attr_getstackaddr.texi
(pthread_attr_getstackaddr): Likewise.
* doc/glibc-functions/pthread_getattr_np.texi
(pthread_getattr_np): Likewise.
* doc/glibc-functions/sys_siglist.texi (sys_siglist): Likewise.
* doc/glibc-functions/sysinfo.texi (sysinfo): Likewise.
* doc/posix-functions/clock_settime.texi (clock_settime):
Likewise.
* doc/posix-functions/pthread_attr_getguardsize.texi
(pthread_attr_getguardsize): Likewise.
* doc/posix-functions/pthread_attr_setguardsize.texi
(pthread_attr_setguardsize): Likewise.
* doc/posix-functions/pthread_attr_setstack.texi
(pthread_attr_setstack): Likewise.
* doc/pastposix-functions/pthread_attr_setstackaddr.texi
(pthread_attr_setstackaddr): Likewise.
* doc/posix-functions/clock_getcpuclockid.texi
(clock_getcpuclockid): Likewise.
* doc/posix-functions/pthread_getcpuclockid.texi
(pthread_getcpuclockid): Likewise.
* doc/glibc-functions/error.texi (error): Likewise.
* doc/glibc-functions/error_at_line.texi (error_at_line):
Likewise.
* doc/glibc-functions/error_message_count.texi
(error_message_count): Likewise.
* doc/glibc-functions/error_one_per_line.texi
(error_one_per_line): Likewise.
* doc/glibc-functions/error_print_progname.texi
(error_print_progname): Likewise.
* doc/posix-functions/pthread_condattr_getclock.texi
(pthread_condattr_getclock): Likewise.
* doc/posix-functions/pthread_condattr_setclock.texi
(pthread_condattr_setclock): Likewise.
* doc/posix-functions/clock_nanosleep.texi (clock_nanosleep):
Likewise.
* doc/glibc-functions/getgrouplist.texi (getgrouplist): Likewise.
* doc/glibc-functions/getpt.texi (getpt): Likewise.
* doc/glibc-functions/get_current_dir_name.texi
(get_current_dir_name): Likewise.
* doc/glibc-functions/pthread_sigqueue.texi (pthread_sigqueue):
Likewise.
* doc/posix-functions/tcgetsid.texi (tcgetsid): Likewise, but with
wrong return type.
* doc/glibc-functions/scandirat.texi (scandirat): Added in cygwin
1.7.11.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoTests for module 'hypotf'.
Bruno Haible [Wed, 29 Feb 2012 12:24:23 +0000 (13:24 +0100)]
Tests for module 'hypotf'.

* modules/hypotf-tests: New file.
* tests/test-hypotf.c: New file.

12 years agoNew module 'hypotf'.
Bruno Haible [Wed, 29 Feb 2012 12:22:12 +0000 (13:22 +0100)]
New module 'hypotf'.

* lib/math.in.h (hypotf): New declaration.
* lib/hypotf.c: New file.
* m4/hypotf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTF, HAVE_HYPOTF,
REPLACE_HYPOTF.
* modules/math (Makefile.am): Substitute GNULIB_HYPOTF, HAVE_HYPOTF,
REPLACE_HYPOTF.
* modules/hypotf: New file.
* tests/test-math-c++.cc: Check the hypotf declaration.
* doc/posix-functions/hypotf.texi: Mention the new module.

12 years agohypot: Prepare for hypotf module.
Bruno Haible [Wed, 29 Feb 2012 12:20:37 +0000 (13:20 +0100)]
hypot: Prepare for hypotf module.

* m4/hypot.m4: New file.
* modules/hypot (Files): Add m4/hypot.m4.
(configure.ac): Invoke gl_FUNC_HYPOT.

12 years agohypot tests: More tests.
Bruno Haible [Wed, 29 Feb 2012 11:32:18 +0000 (12:32 +0100)]
hypot tests: More tests.

* tests/test-hypot.c: Include <float.h>.
(main): Add tests about overflow and underflow.

12 years agomath code: Add comments.
Bruno Haible [Wed, 29 Feb 2012 11:30:07 +0000 (12:30 +0100)]
math code: Add comments.

* lib/acosl.c: Add comment about related glibc source files.
* lib/asinl.c: Likewise.
* lib/atanl.c: Likewise.
* lib/expl.c: Likewise.
* lib/logl.c: Likewise.
* lib/sincosl.c: Likewise.
* lib/sinl.c: Likewise.
* lib/tanl.c: Likewise.
* lib/trigl.c: Likewise.
* lib/cosl.c: Likewise. Fix comments.

12 years agomath: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.
Bruno Haible [Tue, 28 Feb 2012 19:40:59 +0000 (20:40 +0100)]
math: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.

* lib/math.in.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Define fallbacks.
* tests/test-math.c: Include macros.h. Check that HUGE_VAL, HUGE_VALF,
HUGE_VALL are defined.
(numeric_equald): Renamed from numeric_equal.
(numeric_equalf, numeric_equall): New functions.
(main): Check also HUGE_VALF, HUGE_VALL.
* modules/math-tests (Files): Add tests/macros.h.
* doc/posix-headers/math.texi: Document the problems with HUGE_VALF and
HUGE_VALL.

12 years agodoc: Move ISO C11 feature notes into POSIX chapters.
Bruno Haible [Wed, 29 Feb 2012 11:10:02 +0000 (12:10 +0100)]
doc: Move ISO C11 feature notes into POSIX chapters.

* doc/posix-functions/aligned_alloc.texi: Renamed from
doc/glibc-functions/aligned_alloc.texi.
* doc/posix-functions/quick_exit.texi: Renamed from
doc/glibc-functions/quick_exit.texi.
* doc/posix-headers/uchar.texi: Renamed from
doc/glibc-headers/uchar.texi.
* doc/posix-functions/c16rtomb.texi: Renamed from
doc/glibc-functions/c16rtomb.texi.
* doc/posix-functions/c32rtomb.texi: Renamed from
doc/glibc-functions/c32rtomb.texi.
* doc/posix-functions/mbrtoc16.texi: Renamed from
doc/glibc-functions/mbrtoc16.texi.
* doc/posix-functions/mbrtoc32.texi: Renamed from
doc/glibc-functions/mbrtoc32.texi.
* doc/gnulib.texi: Update.
(Glibc uchar.h): Remove section.
Suggested by Eric Blake.

12 years agostdnoreturn: port to MSVC better
Paul Eggert [Wed, 29 Feb 2012 09:48:18 +0000 (01:48 -0800)]
stdnoreturn: port to MSVC better

MSVC standard headers use __declspec(noreturn), so #define noreturn
to empty on that platform.  Reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-02/msg00152.html>.
* lib/stdnoreturn.in.h (noreturn): Define to empty on MSVC.
* doc/posix-headers/stdnoreturn.texi (stdnoreturn.h): Document this.

12 years agodoc: Mention new glibc headers and functions.
Bruno Haible [Tue, 28 Feb 2012 12:03:39 +0000 (13:03 +0100)]
doc: Mention new glibc headers and functions.

* doc/glibc-headers/uchar.texi: New file.
* doc/glibc-functions/aligned_alloc.texi: New file.
* doc/glibc-functions/c16rtomb.texi: New file.
* doc/glibc-functions/c32rtomb.texi: New file.
* doc/glibc-functions/clock_adjtime.texi: New file.
* doc/glibc-functions/fanotify_init.texi: New file.
* doc/glibc-functions/fanotify_mark.texi: New file.
* doc/glibc-functions/inet6_opt_append.texi: New file.
* doc/glibc-functions/inet6_opt_find.texi: New file.
* doc/glibc-functions/inet6_opt_finish.texi: New file.
* doc/glibc-functions/inet6_opt_get_val.texi: New file.
* doc/glibc-functions/inet6_opt_init.texi: New file.
* doc/glibc-functions/inet6_opt_next.texi: New file.
* doc/glibc-functions/inet6_opt_set_val.texi: New file.
* doc/glibc-functions/inet6_rth_add.texi: New file.
* doc/glibc-functions/inet6_rth_getaddr.texi: New file.
* doc/glibc-functions/inet6_rth_init.texi: New file.
* doc/glibc-functions/inet6_rth_reverse.texi: New file.
* doc/glibc-functions/inet6_rth_segments.texi: New file.
* doc/glibc-functions/inet6_rth_space.texi: New file.
* doc/glibc-functions/login.texi: New file.
* doc/glibc-functions/mbrtoc16.texi: New file.
* doc/glibc-functions/mbrtoc32.texi: New file.
* doc/glibc-functions/name_to_handle_at.texi: New file.
* doc/glibc-functions/ntp_gettimex.texi: New file.
* doc/glibc-functions/open_by_handle_at.texi: New file.
* doc/glibc-functions/prlimit.texi: New file.
* doc/glibc-functions/process_vm_readv.texi: New file.
* doc/glibc-functions/process_vm_writev.texi: New file.
* doc/glibc-functions/recvmmsg.texi: New file.
* doc/glibc-functions/scandirat.texi: New file.
* doc/glibc-functions/sendmmsg.texi: New file.
* doc/glibc-functions/setns.texi: New file.
* doc/glibc-functions/timespec_get.texi: New file.
* doc/gnulib.texi: Include them.
(Glibc sys/fanotify.h, Glibc sys/resource.h, Glibc uchar.h): New
sections.
Reported by Eric Blake.

12 years agoAvoid compilation errors with MSVC option -fp:strict.
Bruno Haible [Tue, 28 Feb 2012 10:50:03 +0000 (11:50 +0100)]
Avoid compilation errors with MSVC option -fp:strict.

* lib/floor.c: Use MSVC specific pragma fenv_access.
* lib/ceil.c: Likewise.
* lib/trunc.c: Likewise.
* lib/round.c: Likewise.
* lib/rint.c: Likewise.
* lib/fma.c: Likewise.
* lib/integer_length.c: Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* tests/test-floor2.c: Likewise.
* tests/test-floorf2.c: Likewise.
* tests/test-ceil2.c: Likewise.
* tests/test-ceilf2.c: Likewise.
* tests/test-trunc2.c: Likewise.
* tests/test-truncf2.c: Likewise.
Reported by Michael Goffioul <michael.goffioul@gmail.com>.

12 years agoTests for module 'sqrtl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:59 +0000 (21:29 +0100)]
Tests for module 'sqrtl-ieee'.

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

12 years agoNew module 'sqrtl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:50 +0000 (21:29 +0100)]
New module 'sqrtl-ieee'.

* modules/sqrtl-ieee: New file.

12 years agoTests for module 'sqrt-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:39 +0000 (21:29 +0100)]
Tests for module 'sqrt-ieee'.

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

12 years agoNew module 'sqrt-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:29 +0000 (21:29 +0100)]
New module 'sqrt-ieee'.

* modules/sqrt-ieee: New file.

12 years agoTests for module 'sqrtf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:18 +0000 (21:29 +0100)]
Tests for module 'sqrtf-ieee'.

* modules/sqrtf-ieee-tests: New file.
* tests/test-sqrtf-ieee.c: New file.
* tests/test-sqrt-ieee.h: New file.

12 years agoNew module 'sqrtf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 20:29:06 +0000 (21:29 +0100)]
New module 'sqrtf-ieee'.

* modules/sqrtf-ieee: New file.

12 years agoremainderl-ieee: Work around test failure on OSF/1.
Bruno Haible [Mon, 27 Feb 2012 20:06:30 +0000 (21:06 +0100)]
remainderl-ieee: Work around test failure on OSF/1.

* m4/remainderl-ieee.m4: New file.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): If gl_FUNC_REMAINDERL_IEEE is
present, test whether remainderl works with a zero second argument.
Replace it if not.
* lib/math.in.h (remainderl): Override if REPLACE_REMAINDERL is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERL.
* modules/math (Makefile.am): Substitute REPLACE_REMAINDERL.
* modules/remainderl (configure.ac): Consider REPLACE_REMAINDERL.
(Depends-on): Update conditions.
* modules/remainderl-ieee (Files): Add m4/remainderl-ieee.m4.
(Depends-on): Add remainder-ieee.
(configure.ac): Invoke gl_FUNC_REMAINDERL_IEEE.
* doc/posix-functions/remainderl.texi: Mention the remainderl-ieee
module.

12 years agoremainderf-ieee: Work around test failure on OSF/1.
Bruno Haible [Mon, 27 Feb 2012 18:33:31 +0000 (19:33 +0100)]
remainderf-ieee: Work around test failure on OSF/1.

* m4/remainderf-ieee.m4: New file.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): If gl_FUNC_REMAINDERF_IEEE is
present, test whether remainderf works with a zero second argument.
Replace it if not.
* lib/math.in.h (remainderf): Override if REPLACE_REMAINDERF is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERF.
* modules/math (Makefile.am): Substitute REPLACE_REMAINDERF.
* modules/remainderf (configure.ac): Consider REPLACE_REMAINDERF.
(Depends-on): Update conditions.
* modules/remainderf-ieee (Files): Add m4/remainderf-ieee.m4.
(Depends-on): Add remainder-ieee.
(configure.ac): Invoke gl_FUNC_REMAINDERF_IEEE.
* doc/posix-functions/remainderf.texi: Mention the remainderf-ieee
module.