gnulib.git
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.

12 years agoremainder-ieee: Work around test failure on OSF/1.
Bruno Haible [Mon, 27 Feb 2012 17:07:29 +0000 (18:07 +0100)]
remainder-ieee: Work around test failure on OSF/1.

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

12 years agoTests for module 'remainderl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:44:36 +0000 (17:44 +0100)]
Tests for module 'remainderl-ieee'.

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

12 years agoNew module 'remainderl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:44:27 +0000 (17:44 +0100)]
New module 'remainderl-ieee'.

* modules/remainderl-ieee: New file.

12 years agoTests for module 'remainder-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:44:18 +0000 (17:44 +0100)]
Tests for module 'remainder-ieee'.

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

12 years agoNew module 'remainder-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:44:08 +0000 (17:44 +0100)]
New module 'remainder-ieee'.

* modules/remainder-ieee: New file.

12 years agoTests for module 'remainderf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:43:58 +0000 (17:43 +0100)]
Tests for module 'remainderf-ieee'.

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

12 years agoNew module 'remainderf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 16:43:47 +0000 (17:43 +0100)]
New module 'remainderf-ieee'.

* modules/remainderf-ieee: New file.

12 years agomodff, modfl: Fix configure syntax error.
Bruno Haible [Mon, 27 Feb 2012 17:47:00 +0000 (18:47 +0100)]
modff, modfl: Fix configure syntax error.

* m4/modff.m4 (gl_FUNC_MODFF): Insert ':' command in 'if'.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.

12 years agofmodl-ieee: Work around test failures on OSF/1, MSVC 9.
Bruno Haible [Mon, 27 Feb 2012 13:19:01 +0000 (14:19 +0100)]
fmodl-ieee: Work around test failures on OSF/1, MSVC 9.

* m4/fmodl-ieee.m4: New file.
* m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
whether fmodl works with zero arguments. Replace it if not.
* modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
(Depends-on): Add fmod-ieee.
(configure.ac): Invoke gl_FUNC_FMODL_IEEE.
* doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.

12 years agofmodf-ieee: Work around test failure on OSF/1.
Bruno Haible [Mon, 27 Feb 2012 12:18:57 +0000 (13:18 +0100)]
fmodf-ieee: Work around test failure on OSF/1.

* m4/fmodf-ieee.m4: New file.
* m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
whether fmodf works with zero arguments. Replace it if not.
* lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
* modules/math (Makefile.am): Substitute REPLACE_FMODF.
* modules/fmodf (configure.ac): Consider REPLACE_FMODF.
(Depends-on): Update dependencies.
* modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
(configure.ac): Invoke gl_FUNC_FMODF_IEEE.
* doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.

12 years agofmodf-ieee: Work around test failure on MSVC 9.
Bruno Haible [Mon, 27 Feb 2012 11:52:27 +0000 (12:52 +0100)]
fmodf-ieee: Work around test failure on MSVC 9.

* modules/fmodf-ieee (Depends-on): Add fmod-ieee.
* doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.

12 years agofmod-ieee: Work around test failures on OSF/1, mingw.
Bruno Haible [Mon, 27 Feb 2012 11:28:29 +0000 (12:28 +0100)]
fmod-ieee: Work around test failures on OSF/1, mingw.

* m4/fmod-ieee.m4: New file.
* m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
whether fmod works with zero arguments. Replace it if not.
* lib/math.in.h (fmod): New declaration.
* lib/fmod.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
* modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
* modules/fmod (Files): Add lib/fmod.c.
(Depends-on): Add math, isinf, trunc, fma.
(configure.ac): Arrange to compile lib/fmod.c if needed.
* modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(configure.ac): Invoke gl_FUNC_FMOD_IEEE.
* tests/test-math-c++.cc: Check the declaration of fmod.
* doc/posix-functions/fmod.texi: Mention the fmod-ieee module.

12 years agofmodl-ieee: Fix test failures.
Bruno Haible [Mon, 27 Feb 2012 10:35:41 +0000 (11:35 +0100)]
fmodl-ieee: Fix test failures.

* lib/fmodl.c (fmodl): Treat Inf specially.
* modules/fmodl (Depends-on): Add isinf.

12 years agoTests for module 'fmodl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:22:21 +0000 (11:22 +0100)]
Tests for module 'fmodl-ieee'.

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

12 years agoNew module 'fmodl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:22:10 +0000 (11:22 +0100)]
New module 'fmodl-ieee'.

* modules/fmodl-ieee: New file.

12 years agoTests for module 'fmod-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:22:00 +0000 (11:22 +0100)]
Tests for module 'fmod-ieee'.

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

12 years agoNew module 'fmod-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:17:38 +0000 (11:17 +0100)]
New module 'fmod-ieee'.

* modules/fmod-ieee: New file.

12 years agoTests for module 'fmodf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:17:27 +0000 (11:17 +0100)]
Tests for module 'fmodf-ieee'.

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

12 years agoNew module 'fmodf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 10:17:12 +0000 (11:17 +0100)]
New module 'fmodf-ieee'.

* modules/fmodf-ieee: New file.

12 years agoTests for module 'rintl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:56:43 +0000 (10:56 +0100)]
Tests for module 'rintl-ieee'.

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

12 years agoNew module 'rintl-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:56:33 +0000 (10:56 +0100)]
New module 'rintl-ieee'.

* modules/rintl-ieee: New file.

12 years agoTests for module 'rint-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:56:24 +0000 (10:56 +0100)]
Tests for module 'rint-ieee'.

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

12 years agoNew module 'rint-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:56:13 +0000 (10:56 +0100)]
New module 'rint-ieee'.

* modules/rint-ieee: New file.

12 years agoTests for module 'rintf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:55:02 +0000 (10:55 +0100)]
Tests for module 'rintf-ieee'.

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

12 years agoNew module 'rintf-ieee'.
Bruno Haible [Mon, 27 Feb 2012 09:54:47 +0000 (10:54 +0100)]
New module 'rintf-ieee'.

* modules/rintf-ieee: New file.

12 years agoregex: re_search etc. should return -2 when memory exhausted
Paul Eggert [Mon, 27 Feb 2012 07:09:05 +0000 (23:09 -0800)]
regex: re_search etc. should return -2 when memory exhausted

This bug was uncovered when testing 'grep'.  Without the fix,
re_search and friends return -1 when memory is exhausted, but -1
means no match, and this causes grep to falsely report no-match
instead of memory-exhaustion.  See
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=13762>.
* lib/regexec.c (re_search_stub): Return -2 (not -1) if there is
trouble; this can occur if re_search_internal ran out of memory.

12 years agomodfl-ieee: Work around test failures on IRIX, OSF/1, mingw.
Bruno Haible [Mon, 27 Feb 2012 04:03:10 +0000 (05:03 +0100)]
modfl-ieee: Work around test failures on IRIX, OSF/1, mingw.

* m4/modfl-ieee.m4: New file.
* m4/modfl.m4 (gl_FUNC_MODFL): If gl_FUNC_MODFL_IEEE is present, test
whether modfl works with Inf. Replace it if not.
* lib/math.in.h (modfl): Override if REPLACE_MODFF is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFL.
* modules/math (Makefile.am): Substitute REPLACE_MODFL.
* modules/modfl (configure.ac): Consider REPLACE_MODFL.
(Depends-on): Update dependencies.
* modules/modfl-ieee (Files): Add m4/modfl-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(configure.ac): Invoke gl_FUNC_MODFL_IEEE.
* doc/posix-functions/modfl.texi: Mention the modfl-ieee module.

12 years agomodfl-ieee: Fix dependencies.
Bruno Haible [Mon, 27 Feb 2012 03:06:41 +0000 (04:06 +0100)]
modfl-ieee: Fix dependencies.

* modules/modfl-ieee (Depends-on): Add modf-ieee.

12 years agomodfl-ieee: Fix test failures.
Bruno Haible [Mon, 27 Feb 2012 03:03:02 +0000 (04:03 +0100)]
modfl-ieee: Fix test failures.

* lib/modfl.c (modfl): Treat NaN and Inf specially.
* modules/modfl (Depends-on): Add isfinite, isinf.

12 years agomodff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.
Bruno Haible [Mon, 27 Feb 2012 02:13:00 +0000 (03:13 +0100)]
modff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.

* m4/modff-ieee.m4: New file.
* m4/modff.m4 (gl_FUNC_MODFF): If gl_FUNC_MODFF_IEEE is present, test
whether modff works with NaN and Inf. Replace it if not.
* lib/math.in.h (modff): Override if REPLACE_MODFF is 1.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFF.
* modules/math (Makefile.am): Substitute REPLACE_MODFF.
* modules/modff (configure.ac): Consider REPLACE_MODFF.
(Depends-on): Update dependencies.
* modules/modff-ieee (Files): Add m4/modff-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(Depends-on): Add modf-ieee.
(configure.ac): Invoke gl_FUNC_MODFF_IEEE.
* doc/posix-functions/modff.texi: Mention the modff-ieee module.

12 years agomodf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
Bruno Haible [Mon, 27 Feb 2012 00:44:57 +0000 (01:44 +0100)]
modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.

* m4/modf-ieee.m4: New file.
* m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test
whether modf works with NaN and Inf. Replace it if not.
* lib/math.in.h (modf): New declaration.
* lib/modf.c: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether modf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF.
* modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF.
* modules/modf (Files): Add lib/modf.c.
(Depends-on): Add math, isfinite, trunc, isinf.
(configure.ac): Addrange to compile lib/modf.c if needed.
* modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4,
m4/signbit.m4.
(configure.ac): Invoke gl_FUNC_MODF_IEEE.
* tests/test-math-c++.cc: Check the declaration of modf.
* doc/posix-functions/modf.texi: Mention the modf-ieee module.

12 years agoTests for module 'modfl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:55:42 +0000 (17:55 +0100)]
Tests for module 'modfl-ieee'.

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

12 years agoNew module 'modfl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:55:31 +0000 (17:55 +0100)]
New module 'modfl-ieee'.

* modules/modfl-ieee: New file.

12 years agoTests for module 'modf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:55:21 +0000 (17:55 +0100)]
Tests for module 'modf-ieee'.

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

12 years agoNew module 'modf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:55:10 +0000 (17:55 +0100)]
New module 'modf-ieee'.

* modules/modf-ieee: New file.

12 years agoTests for module 'modff-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:54:59 +0000 (17:54 +0100)]
Tests for module 'modff-ieee'.

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

12 years agoNew module 'modff-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:54:47 +0000 (17:54 +0100)]
New module 'modff-ieee'.

* modules/modff-ieee: New file.

12 years agoTests for module 'fabsl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:28:33 +0000 (17:28 +0100)]
Tests for module 'fabsl-ieee'.

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

12 years agoNew module 'fabsl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:28:22 +0000 (17:28 +0100)]
New module 'fabsl-ieee'.

* modules/fabsl-ieee: New file.

12 years agoTests for module 'fabs-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:28:10 +0000 (17:28 +0100)]
Tests for module 'fabs-ieee'.

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

12 years agoNew module 'fabs-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:27:59 +0000 (17:27 +0100)]
New module 'fabs-ieee'.

* modules/fabs-ieee: New file.

12 years agoTests for module 'fabsf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:27:47 +0000 (17:27 +0100)]
Tests for module 'fabsf-ieee'.

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

12 years agoNew module 'fabsf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:27:36 +0000 (17:27 +0100)]
New module 'fabsf-ieee'.

* modules/fabsf-ieee: New file.

12 years agofma*-ieee tests: Remove unneeded dependency.
Bruno Haible [Sun, 26 Feb 2012 16:13:18 +0000 (17:13 +0100)]
fma*-ieee tests: Remove unneeded dependency.

12 years agoTests for module 'fmal-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:09:26 +0000 (17:09 +0100)]
Tests for module 'fmal-ieee'.

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

12 years agoNew module 'fmal-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:09:17 +0000 (17:09 +0100)]
New module 'fmal-ieee'.

* modules/fmal-ieee: New file.

12 years agoTests for module 'fma-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:09:07 +0000 (17:09 +0100)]
Tests for module 'fma-ieee'.

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

12 years agoNew module 'fma-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:08:55 +0000 (17:08 +0100)]
New module 'fma-ieee'.

* modules/fma-ieee: New file.

12 years agoTests for module 'fmaf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:08:41 +0000 (17:08 +0100)]
Tests for module 'fmaf-ieee'.

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

12 years agoNew module 'fmaf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 16:08:28 +0000 (17:08 +0100)]
New module 'fmaf-ieee'.

* modules/fmaf-ieee: New file.

12 years agoTests for module 'ldexpl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:32:16 +0000 (16:32 +0100)]
Tests for module 'ldexpl-ieee'.

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

12 years agoNew module 'ldexpl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:32:02 +0000 (16:32 +0100)]
New module 'ldexpl-ieee'.

* modules/ldexpl-ieee: New file.

12 years agoTests for module 'ldexp-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:31:50 +0000 (16:31 +0100)]
Tests for module 'ldexp-ieee'.

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

12 years agoNew module 'ldexp-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:31:33 +0000 (16:31 +0100)]
New module 'ldexp-ieee'.

* modules/ldexp-ieee: New file.

12 years agoTests for module 'ldexpf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:31:19 +0000 (16:31 +0100)]
Tests for module 'ldexpf-ieee'.

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

12 years agoNew module 'ldexpf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 15:30:47 +0000 (16:30 +0100)]
New module 'ldexpf-ieee'.

* modules/ldexpf-ieee: New file.

12 years agoRefactor frexp*-ieee tests.
Bruno Haible [Sun, 26 Feb 2012 15:19:59 +0000 (16:19 +0100)]
Refactor frexp*-ieee tests.

* tests/test-frexp-ieee.h: New file.
* tests/test-frexpf-ieee.c: Include test-frexp-ieee.h.
(main): Just call test_function.
* tests/test-frexp-ieee.c: Include test-frexp-ieee.h.
(main): Just call test_function.
* tests/test-frexpl-ieee.c: Include test-frexp-ieee.h.
(main): Just call test_function.
* modules/frexpf-ieee-tests (Files): Add tests/test-frexp-ieee.h.
* modules/frexp-ieee-tests (Files): Likewise.
* modules/frexpl-ieee-tests (Files): Likewise.

12 years agoMore tests for modules frexpf-ieee, frexp-ieee, frexpl-ieee.
Bruno Haible [Sun, 26 Feb 2012 15:02:40 +0000 (16:02 +0100)]
More tests for modules frexpf-ieee, frexp-ieee, frexpl-ieee.

12 years agoTests for module 'frexpl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:10:07 +0000 (15:10 +0100)]
Tests for module 'frexpl-ieee'.

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

12 years agoNew module 'frexpl-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:09:52 +0000 (15:09 +0100)]
New module 'frexpl-ieee'.

* modules/frexpl-ieee: New file.

12 years agoTests for module 'frexp-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:09:38 +0000 (15:09 +0100)]
Tests for module 'frexp-ieee'.

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

12 years agoNew module 'frexp-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:09:24 +0000 (15:09 +0100)]
New module 'frexp-ieee'.

* modules/frexp-ieee: New file.

12 years agoTests for module 'frexpf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:09:10 +0000 (15:09 +0100)]
Tests for module 'frexpf-ieee'.

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

12 years agoNew module 'frexpf-ieee'.
Bruno Haible [Sun, 26 Feb 2012 14:08:36 +0000 (15:08 +0100)]
New module 'frexpf-ieee'.

* modules/frexpf-ieee: New file.

12 years agoroundl-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:27:44 +0000 (14:27 +0100)]
roundl-ieee tests: More tests.

* tests/test-roundl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/roundl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanl-nolibm.

12 years agoround-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:27:32 +0000 (14:27 +0100)]
round-ieee tests: More tests.

* tests/test-round-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/round-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnand-nolibm.

12 years agoroundf-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:27:22 +0000 (14:27 +0100)]
roundf-ieee tests: More tests.

* tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanf-nolibm.

12 years agotruncl-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:26:56 +0000 (14:26 +0100)]
truncl-ieee tests: More tests.

* tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanl-nolibm.

12 years agotrunc-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:26:44 +0000 (14:26 +0100)]
trunc-ieee tests: More tests.

* tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/trunc-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnand-nolibm.

12 years agotruncf-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:26:32 +0000 (14:26 +0100)]
truncf-ieee tests: More tests.

* tests/test-truncf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/truncf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanf-nolibm.

12 years agoceill-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:26:02 +0000 (14:26 +0100)]
ceill-ieee tests: More tests.

* tests/test-ceill-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/ceill-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanl-nolibm.

12 years agoceil-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:25:50 +0000 (14:25 +0100)]
ceil-ieee tests: More tests.

* tests/test-ceil-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/ceil-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnand-nolibm.

12 years agoceilf-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:25:39 +0000 (14:25 +0100)]
ceilf-ieee tests: More tests.

* tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanf-nolibm.

12 years agofloorl-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:24:38 +0000 (14:24 +0100)]
floorl-ieee tests: More tests.

* tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanl-nolibm.

12 years agofloor-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:24:11 +0000 (14:24 +0100)]
floor-ieee tests: More tests.

* tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/floor-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnand-nolibm.

12 years agofloorf-ieee tests: More tests.
Bruno Haible [Sun, 26 Feb 2012 13:23:35 +0000 (14:23 +0100)]
floorf-ieee tests: More tests.

* tests/test-floorf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/floorf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanf-nolibm.

12 years agofpieee: More comments.
Bruno Haible [Sun, 26 Feb 2012 12:44:16 +0000 (13:44 +0100)]
fpieee: More comments.

* m4/fpieee.m4 (gl_FP_IEEE): Add more comments.

12 years agoTests for module 'log10l'.
Bruno Haible [Sat, 25 Feb 2012 23:43:21 +0000 (00:43 +0100)]
Tests for module 'log10l'.

* modules/log10l-tests: New file.
* tests/test-log10l.c: New file.
* tests/test-math-c++.cc: Check the declaration of log10l.

12 years agoNew module 'log10l'.
Bruno Haible [Sat, 25 Feb 2012 23:42:25 +0000 (00:42 +0100)]
New module 'log10l'.

* lib/math.in.h (log10l): New declaration.
* lib/log10l.c: New file.
* m4/log10l.m4: New file.
* modules/log10l: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
HAVE_DECL_LOG10L.
* modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
HAVE_DECL_LOG10L.
* doc/posix-functions/log10l.texi: Mention the new module.

12 years agofmodl, remainder*: Avoid wrong results due to rounding errors.
Bruno Haible [Sat, 25 Feb 2012 23:36:01 +0000 (00:36 +0100)]
fmodl, remainder*: Avoid wrong results due to rounding errors.

* lib/fmodl.c (fmodl): Correct the result if it is not within the
expected bounds.
* lib/remainderf.c (remainderf): Likewise.
* lib/remainder.c (remainder): Likewise.
* lib/remainderl.c (remainderl): Likewise.