gnulib.git
12 years agosin: Use a .m4 file.
Bruno Haible [Sat, 8 Oct 2011 20:48:25 +0000 (22:48 +0200)]
sin: Use a .m4 file.

* m4/sin.m4: New file.
* modules/sin (Files): Add it.
(configure.ac): Just invoke gl_FUNC_SIN.

12 years agoTests for module 'powf'.
Bruno Haible [Sat, 8 Oct 2011 20:46:18 +0000 (22:46 +0200)]
Tests for module 'powf'.

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

12 years agoNew module 'powf'.
Bruno Haible [Sat, 8 Oct 2011 20:45:54 +0000 (22:45 +0200)]
New module 'powf'.

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

12 years agopow: Use a .m4 file.
Bruno Haible [Sat, 8 Oct 2011 20:34:38 +0000 (22:34 +0200)]
pow: Use a .m4 file.

* m4/pow.m4: New file.
* modules/pow (Files): Add it.
(configure.ac): Just invoke gl_FUNC_POW.

12 years agoTests for module 'log10f'.
Bruno Haible [Sat, 8 Oct 2011 20:32:57 +0000 (22:32 +0200)]
Tests for module 'log10f'.

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

12 years agoNew module 'log10f'.
Bruno Haible [Sat, 8 Oct 2011 20:32:31 +0000 (22:32 +0200)]
New module 'log10f'.

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

12 years agolog10: Use a .m4 file.
Bruno Haible [Sat, 8 Oct 2011 20:20:16 +0000 (22:20 +0200)]
log10: Use a .m4 file.

* m4/log10.m4: New file.
* modules/log10 (Files): Add it.
(configure.ac): Just invoke gl_FUNC_LOG10.

12 years agoTests for module 'logf'.
Bruno Haible [Sat, 8 Oct 2011 20:19:12 +0000 (22:19 +0200)]
Tests for module 'logf'.

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

12 years agoNew module 'logf'.
Bruno Haible [Sat, 8 Oct 2011 20:18:44 +0000 (22:18 +0200)]
New module 'logf'.

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

12 years agolog: Use a .m4 file.
Bruno Haible [Sat, 8 Oct 2011 20:12:22 +0000 (22:12 +0200)]
log: Use a .m4 file.

* m4/log.m4: New file.
* modules/log (Files): Add it.
(configure.ac): Just invoke gl_FUNC_LOG.

12 years agoTests for module 'expf'.
Bruno Haible [Sat, 8 Oct 2011 20:11:11 +0000 (22:11 +0200)]
Tests for module 'expf'.

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

12 years agoNew module 'expf'.
Bruno Haible [Sat, 8 Oct 2011 20:10:45 +0000 (22:10 +0200)]
New module 'expf'.

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

12 years agoexp: Use a .m4 file.
Bruno Haible [Sat, 8 Oct 2011 20:09:55 +0000 (22:09 +0200)]
exp: Use a .m4 file.

* m4/exp.m4: New file.
* modules/exp (Files): Add it.
(configure.ac): Just invoke gl_FUNC_EXP.

12 years agoTests for module 'sqrtf'.
Bruno Haible [Sat, 8 Oct 2011 19:17:35 +0000 (21:17 +0200)]
Tests for module 'sqrtf'.

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

12 years agoNew module 'sqrtf'.
Bruno Haible [Sat, 8 Oct 2011 19:16:48 +0000 (21:16 +0200)]
New module 'sqrtf'.

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

12 years agoTests: Avoid link failures w.r.t. libintl.
Bruno Haible [Sat, 8 Oct 2011 14:36:22 +0000 (16:36 +0200)]
Tests: Avoid link failures w.r.t. libintl.

* modules/faccessat-tests (Makefile.am): Link test-faccessat against
$(LIBINTL).
* modules/fchdir-tests (Makefile.am): Link test-fchdir against
$(LIBINTL).
* modules/getcwd-lgpl-tests (Makefile.am): Link test-getcwd-lgpl
against $(LIBINTL).
* modules/getcwd-tests (Makefile.am): Link test-getcwd against
$(LIBINTL).
* modules/openat-tests (Makefile.am): Link test-fchmodat against
$(LIBINTL).
* modules/stat-tests (Makefile.am): Link test-stat against $(LIBINTL).

12 years agopow tests: Defeat compiler optimizations.
Bruno Haible [Sat, 8 Oct 2011 12:03:06 +0000 (14:03 +0200)]
pow tests: Defeat compiler optimizations.

* tests/test-pow.c (main): Assign arguments to x and y before use.

12 years agognulib-tool: Improve last commit.
Bruno Haible [Sat, 8 Oct 2011 08:20:58 +0000 (10:20 +0200)]
gnulib-tool: Improve last commit.

* gnulib-tool (func_modules_transitive_closure): Simplify code.
(func_emit_autoconf_snippets): Instead of invoking func_acceptable,
ignore dependencies that are not among the modules list.

12 years agognulib-tool: don't follow dependencies to avoided modules
Paul Eggert [Fri, 7 Oct 2011 20:59:10 +0000 (13:59 -0700)]
gnulib-tool: don't follow dependencies to avoided modules

This fixes a bug that is related to the previous one.
* gnulib-tool (func_modules_transitive_closure)
(func_emit_autoconf_snippets):
Check whether a dependency is acceptable before using it.
(--extract-dependencies): Report an error if --avoid is also used,
since this combination of options is not yet supported.

12 years agognulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.
Paul Eggert [Fri, 7 Oct 2011 20:04:52 +0000 (13:04 -0700)]
gnulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.

Problem reported by Peter Dyballa in
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9696>.
* gnulib-tool (func_emit_autoconf_snippets): Quote with "", not '',
when echoing "$condition".

12 years agoFix documentation about math functions on MacOS X.
Bruno Haible [Fri, 7 Oct 2011 10:55:09 +0000 (12:55 +0200)]
Fix documentation about math functions on MacOS X.

* doc/posix-functions/exp2.texi: Don't say the function is missing on
MacOS X 10.5.
* doc/posix-functions/fdim.texi: Likewise.
* doc/posix-functions/feclearexcept.texi: Likewise.
* doc/posix-functions/fegetenv.texi: Likewise.
* doc/posix-functions/fegetround.texi: Likewise.
* doc/posix-functions/feholdexcept.texi: Likewise.
* doc/posix-functions/feraiseexcept.texi: Likewise.
* doc/posix-functions/fesetenv.texi: Likewise.
* doc/posix-functions/fesetround.texi: Likewise.
* doc/posix-functions/fetestexcept.texi: Likewise.
* doc/posix-functions/feupdateenv.texi: Likewise.
* doc/posix-functions/fmax.texi: Likewise.
* doc/posix-functions/fmin.texi: Likewise.
* doc/posix-functions/log2.texi: Likewise.
* doc/posix-functions/modff.texi: Likewise.
* doc/posix-functions/nan.texi: Likewise.
* doc/posix-functions/nanf.texi: Likewise.
* doc/posix-functions/nextafterf.texi: Likewise.
* doc/posix-functions/remquo.texi: Likewise.

12 years agomodff: Drop assumption about library that defines modff.
Bruno Haible [Fri, 7 Oct 2011 10:25:52 +0000 (12:25 +0200)]
modff: Drop assumption about library that defines modff.

* m4/modff.m4 (gl_FUNC_MODFF): Use gl_MATHFUNC macro instead of
AC_CHECK_FUNCS.
* modules/modff (Files): Add m4/mathfunc.m4.

12 years agoraise tests: Avoid a GCC warning.
Bernhard Voelker [Fri, 7 Oct 2011 09:37:31 +0000 (11:37 +0200)]
raise tests: Avoid a GCC warning.

* tests/test-raise.c (handler): Use _Noreturn.

12 years agoTests for module 'ldexpf'.
Bruno Haible [Fri, 7 Oct 2011 09:18:49 +0000 (11:18 +0200)]
Tests for module 'ldexpf'.

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

12 years agoNew module 'ldexpf'.
Bruno Haible [Fri, 7 Oct 2011 09:17:58 +0000 (11:17 +0200)]
New module 'ldexpf'.

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

12 years agoTweak last commit.
Bruno Haible [Fri, 7 Oct 2011 09:17:34 +0000 (11:17 +0200)]
Tweak last commit.

12 years agofrexpf: Work around problems on IRIX and mingw.
Bruno Haible [Thu, 6 Oct 2011 22:59:38 +0000 (00:59 +0200)]
frexpf: Work around problems on IRIX and mingw.

* lib/math.in.h (frexpf): Consider also REPLACE_FREXPF.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPF.
* m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): New macro.
(gl_FUNC_FREXPF): Invoke it. Set REPLACE_FREXPF.
* modules/frexpf (Depends-on, configure.ac): Consider REPLACE_FREXPF.
* modules/math (Makefile.am): Substitute REPLACE_FREXPF.
* doc/posix-functions/frexpf.texi: Mention the IRIX and mingw problems.

12 years agofabsf: Drop assumption about library that defines fabsf.
Bruno Haible [Thu, 6 Oct 2011 22:21:57 +0000 (00:21 +0200)]
fabsf: Drop assumption about library that defines fabsf.

* m4/fabsf.m4 (gl_FUNC_FABSF): Use gl_MATHFUNC macro instead of
AC_CHECK_FUNCS.
* modules/fabsf (Files): Add m4/mathfunc.m4.

12 years agofrexpf: Drop assumption about library that defines frexpf.
Bruno Haible [Thu, 6 Oct 2011 22:11:51 +0000 (00:11 +0200)]
frexpf: Drop assumption about library that defines frexpf.

* m4/mathfunc.m4 (gl_MATHFUNC): Support also the argument types
'int *', 'float *', 'long double *', 'float', 'long double'.
* m4/frexpf.m4 (gl_FUNC_FREXPF): Use gl_MATHFUNC macro instead of
AC_CHECK_FUNCS.
* modules/frexpf (Files): Add m4/mathfunc.m4.

12 years agoTests for module 'frexpf'.
Bruno Haible [Thu, 6 Oct 2011 09:29:34 +0000 (11:29 +0200)]
Tests for module 'frexpf'.

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

12 years agoNew module 'frexpf'.
Bruno Haible [Thu, 6 Oct 2011 09:28:38 +0000 (11:28 +0200)]
New module 'frexpf'.

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

12 years agomath: Sort function declarations of math.in.h.
Bruno Haible [Thu, 6 Oct 2011 08:56:19 +0000 (10:56 +0200)]
math: Sort function declarations of math.in.h.

* lib/math.in.h (frexp, logb): Move declarations.

12 years agoTests for module 'modff'.
Bruno Haible [Thu, 6 Oct 2011 00:49:48 +0000 (02:49 +0200)]
Tests for module 'modff'.

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

12 years agoNew module 'modff'.
Bruno Haible [Thu, 6 Oct 2011 00:49:14 +0000 (02:49 +0200)]
New module 'modff'.

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

12 years agomodf tests: Make test sharper.
Bruno Haible [Thu, 6 Oct 2011 00:44:05 +0000 (02:44 +0200)]
modf tests: Make test sharper.

* tests/test-modf.c (main): Strengthen upper bound.

12 years agomodf: Use a .m4 file.
Bruno Haible [Wed, 5 Oct 2011 23:21:12 +0000 (01:21 +0200)]
modf: Use a .m4 file.

* m4/modf.m4: New file.
* modules/modf (Files): Add it.
(configure.ac): Just invoke gl_FUNC_MODF.

12 years agoTweak new module 'fmodf'.
Bruno Haible [Wed, 5 Oct 2011 23:23:46 +0000 (01:23 +0200)]
Tweak new module 'fmodf'.

12 years agoTweak new module 'fmodf'.
Bruno Haible [Wed, 5 Oct 2011 23:16:36 +0000 (01:16 +0200)]
Tweak new module 'fmodf'.

12 years agoTests for module 'fmodf'.
Bruno Haible [Wed, 5 Oct 2011 23:02:24 +0000 (01:02 +0200)]
Tests for module 'fmodf'.

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

12 years agoNew module 'fmodf'.
Bruno Haible [Wed, 5 Oct 2011 23:01:52 +0000 (01:01 +0200)]
New module 'fmodf'.

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

12 years agofmod: Use a .m4 file.
Bruno Haible [Wed, 5 Oct 2011 22:37:54 +0000 (00:37 +0200)]
fmod: Use a .m4 file.

* m4/fmod.m4: New file.
* modules/fmod (Files): Add it.
(configure.ac): Just invoke gl_FUNC_FMOD.

12 years agoNew module 'fabsf'.
Bruno Haible [Wed, 5 Oct 2011 22:45:57 +0000 (00:45 +0200)]
New module 'fabsf'.

12 years agoTests for module 'fabsf'.
Bruno Haible [Wed, 5 Oct 2011 22:16:53 +0000 (00:16 +0200)]
Tests for module 'fabsf'.

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

12 years agoNew module 'fabsf'.
Bruno Haible [Wed, 5 Oct 2011 22:03:44 +0000 (00:03 +0200)]
New module 'fabsf'.

* lib/math.in.h (fabsf): New declaration.
* lib/fabsf.c: New file.
* m4/fabsf.m4: New file.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSF,
HAVE_FABSF.
* modules/math (Makefile.am): Substitute GNULIB_FABSF, HAVE_FABSF.
* modules/fabsf: New file.
* tests/test-math-c++.cc: Check the declaration of fabsf.
* doc/posix-functions/fabsf.texi: Mention the new module.

12 years agofabs: Use a .m4 file.
Bruno Haible [Wed, 5 Oct 2011 21:28:52 +0000 (23:28 +0200)]
fabs: Use a .m4 file.

* m4/fabs.m4: New file.
* modules/fabs (Files): Add it.
(configure.ac): Just invoke gl_FUNC_FABS.

12 years agofile-has-acl: revert both recent changes, 80af92af and 95f7c57f
Jim Meyering [Wed, 5 Oct 2011 13:06:49 +0000 (15:06 +0200)]
file-has-acl: revert both recent changes, 80af92af and 95f7c57f

* lib/file-has-acl.c: While the 2011-10-03 change does fix the
ls -lL regression introduced in coreutils-8.12, it does so at the
cost of an additional stat call in the common case.  Besides, now
that the kernel change that prompted commit 95f7c57f has been reverted
(see https://bugzilla.redhat.com/show_bug.cgi?id=720325#c24)
we have no use for commit 95f7c57f, "file-has-acl: use
acl_extended_file_nofollow if available".

12 years agofile-has-acl: revert unintended change in behavior of ls -L
Kamil Dudka [Mon, 3 Oct 2011 10:17:22 +0000 (12:17 +0200)]
file-has-acl: revert unintended change in behavior of ls -L

* lib/file-has-acl.c (acl_extended_file_wrap): New function,
derived from...
(file_has_acl): ...code here.  Call it.
This problem was introduced with 2011-07-22 commit 95f7c57f,
"file-has-acl: use acl_extended_file_nofollow if available".
See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538

12 years agopoll: Avoid link errors on MSVC.
Bruno Haible [Tue, 4 Oct 2011 01:33:21 +0000 (03:33 +0200)]
poll: Avoid link errors on MSVC.

* m4/poll.m4 (gl_FUNC_POLL): Determine LIB_POLL.
* modules/poll (Depends-on): Add sockets.
(Link): New section.
* NEWS: Mention the change.
* modules/poll-tests (Makefile.am): Link test-poll against $(LIB_POLL).
* modules/poll-h-c++-tests (Makefile.am): Link test-poll-h-c++ against
$(LIB_POLL) instead of $(LIBSOCKET).

12 years agosys_select tests: Fix link error on MSVC 9.
Bruno Haible [Tue, 4 Oct 2011 01:02:05 +0000 (03:02 +0200)]
sys_select tests: Fix link error on MSVC 9.

* modules/sys_select-c++-tests (Makefile.am): Link test-sys_select-c++
with $(LIB_SELECT) instead of $(LIBSOCKET).

12 years agosys_select: Fix compilation error on mingw.
Bruno Haible [Tue, 4 Oct 2011 00:32:48 +0000 (02:32 +0200)]
sys_select: Fix compilation error on mingw.

* lib/sys_select.in.h: On native Windows, include <io.h>.

12 years agowmemset: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:51:23 +0000 (01:51 +0200)]
wmemset: Support for MSVC.

* m4/wmemset.m4 (gl_FUNC_WMEMSET): Use a small test program to test
whether wmemset() exists.

12 years agowmemmove: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:50:45 +0000 (01:50 +0200)]
wmemmove: Support for MSVC.

* m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Use a small test program to test
whether wmemmove() exists.

12 years agowmemcpy: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:49:58 +0000 (01:49 +0200)]
wmemcpy: Support for MSVC.

* m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Use a small test program to test
whether wmemcpy() exists.

12 years agowmemcmp: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:49:09 +0000 (01:49 +0200)]
wmemcmp: Support for MSVC.

* m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Use a small test program to test
whether wmemcmp() exists.

12 years agowmemchr: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:27:54 +0000 (01:27 +0200)]
wmemchr: Support for MSVC.

* m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Use a small test program to test
whether wmemchr() exists.

12 years agoglthread/*, strsignal: Support for MSVC.
Bruno Haible [Mon, 3 Oct 2011 23:19:29 +0000 (01:19 +0200)]
glthread/*, strsignal: Support for MSVC.

* lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid
including <winsock.h> on MSVC 9.
* lib/glthread/lock.h: Likewise.
* lib/glthread/thread.h: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/glthread/yield.h: Likewise.
* lib/strsignal.c: Include <string.h> first. Don't include <unistd.h>
if HAVE_UNISTD_H is false.
* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>.

12 years agononblocking tests: Fix test failure on OpenBSD/SPARC64.
Bruno Haible [Mon, 3 Oct 2011 14:15:47 +0000 (16:15 +0200)]
nonblocking tests: Fix test failure on OpenBSD/SPARC64.

* tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE) [OpenBSD]:
Set to 100000.

12 years agoacl: Fix specification.
Bruno Haible [Mon, 3 Oct 2011 13:48:57 +0000 (15:48 +0200)]
acl: Fix specification.

* lib/file-has-acl.c (file_has_acl): Fix specification.

12 years agorelocatable-lib[-lgpl]: Avoid expensive /proc access on Linux, Cygwin.
Bruno Haible [Mon, 3 Oct 2011 11:15:34 +0000 (13:15 +0200)]
relocatable-lib[-lgpl]: Avoid expensive /proc access on Linux, Cygwin.

* lib/relocatable.c (ENABLE_COSTLY_RELOCATABLE): New macro.
(compute_curr_prefix, shared_library_fullname,
find_shared_library_fullname, get_shared_library_fullname, relocate):
Use it together with PIC && INSTALLDIR.
Reported by <jojelino@gmail.com>
via Charles Wilson <cygwin@cwilson.fastmail.fm>.

12 years agoautoupdate
Karl Berry [Sun, 2 Oct 2011 13:31:01 +0000 (06:31 -0700)]
autoupdate

12 years agomaint.mk: adjust a release-related rule not to require use of gzip
Jim Meyering [Sat, 1 Oct 2011 15:33:42 +0000 (17:33 +0200)]
maint.mk: adjust a release-related rule not to require use of gzip

* top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
Instead, check each file in $(DIST_ARCHIVES).  This is better for
projects that build only .tar.xz files.  Also fix an erroneous test.

12 years agotest-linkat: don't leave behind a temporary file
Jim Meyering [Sat, 1 Oct 2011 13:06:43 +0000 (15:06 +0200)]
test-linkat: don't leave behind a temporary file

* tests/test-linkat.c (main): Don't forget to remove a temporary file.
Otherwise, coreutils' "make distcheck" would fail with this:
  Only in /c/cu/tests/torture/coreutils/test/\
    coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
  make[2]: *** [my-distcheck] Error 1

12 years agofloat, math: add omitted file
Jim Meyering [Sat, 1 Oct 2011 12:34:09 +0000 (14:34 +0200)]
float, math: add omitted file

* lib/itold.c: Add file, required for yesterday's float change.

12 years agoisinf: Fix for OpenBSD/x86.
Bruno Haible [Sat, 1 Oct 2011 10:07:28 +0000 (12:07 +0200)]
isinf: Fix for OpenBSD/x86.

* m4/isinf.m4 (gl_ISINFL_WORKS): Also test the behaviour of isinf on
pseudo-NaNs, pseudo-Infinities, and other non-IEEE values.
* doc/posix-functions/isinf.texi: Mention the problem on OpenBSD/x86.

12 years agoisfinite: Fix syntax error in configure test.
Bruno Haible [Sat, 1 Oct 2011 09:58:48 +0000 (11:58 +0200)]
isfinite: Fix syntax error in configure test.

* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Fix syntax error.

12 years agoisfinite: Fix typo.
Bruno Haible [Sat, 1 Oct 2011 09:50:52 +0000 (11:50 +0200)]
isfinite: Fix typo.

* m4/isfinite.m4 (gl_ISFINITEL_WORKS): When cross-compiling, set
gl_cv_func_isfinitel_works, not gl_cv_func_isnanl_works.

12 years agononblocking tests: Fix test failure on Linux/IA-64.
Bruno Haible [Sat, 1 Oct 2011 09:23:31 +0000 (11:23 +0200)]
nonblocking tests: Fix test failure on Linux/IA-64.

* tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/IA-64]:
Set to 270000.

12 years agomkfifoat tests: Fix a test failure on mingw.
Bruno Haible [Sat, 1 Oct 2011 08:50:57 +0000 (10:50 +0200)]
mkfifoat tests: Fix a test failure on mingw.

* tests/test-mkfifoat.c (main): Allow mkfifoat or test_mknodat to fail
with error ENOSYS.

12 years agofloat, math: Fix 'int' to 'long double' conversion on Linux/SPARC64.
Bruno Haible [Fri, 30 Sep 2011 19:07:43 +0000 (21:07 +0200)]
float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64.

* m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to
'long double'. Set REPLACE_ITOLD.
* lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations.
* lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations.
* lib/itold.c: New file.
* modules/float (Files): Add lib/itold.c.
(configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c.
(Makefile.am): Substitute REPLACE_ITOLD.
* modules/math (Depends-on): Add float.
(Makefile.am): Substitute REPLACE_ITOLD.
* doc/posix-headers/float.texi: Mention problem on Linux/SPARC64.
* doc/posix-headers/math.texi: Likewise.
* doc/posix-functions/logl.texi: Likewise.

12 years agononblocking tests: Fix test failure on Linux/SPARC (32-bit and 64-bit).
Bruno Haible [Fri, 30 Sep 2011 15:44:22 +0000 (17:44 +0200)]
nonblocking tests: Fix test failure on Linux/SPARC (32-bit and 64-bit).

* tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/SPARC]:
Set to 140000.

12 years agognulib-tool: Improve suggestion where to put gl_EARLY invocation.
Bruno Haible [Fri, 30 Sep 2011 10:10:27 +0000 (12:10 +0200)]
gnulib-tool: Improve suggestion where to put gl_EARLY invocation.

* gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC
invocation, say "right after AC_PROG_CC_STDC", not "right after
AC_PROG_CC".
Reported by Gary V. Vaughan <gary@gnu.org>.

12 years agoCentralize C99 requirement.
Bruno Haible [Fri, 30 Sep 2011 09:54:58 +0000 (11:54 +0200)]
Centralize C99 requirement.

* m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro.
* modules/stdarg (configure.ac-early): Invoke it instead of
AC_PROG_CC_STDC.
Reported by Gary V. Vaughan and Paul Eggert.

12 years agofloat: Fix LDBL_MAX value on Linux/PowerPC.
Bruno Haible [Fri, 30 Sep 2011 01:56:26 +0000 (03:56 +0200)]
float: Fix LDBL_MAX value on Linux/PowerPC.

* m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also
on Linux/PowerPC.
* lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC.
* lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC.
* doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected
platform.
Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.

12 years agoTweak last ChangeLog entry.
Bruno Haible [Thu, 29 Sep 2011 19:39:39 +0000 (21:39 +0200)]
Tweak last ChangeLog entry.

12 years agodoc: Improve doc about gl_EARLY.
Bruno Haible [Thu, 29 Sep 2011 08:50:37 +0000 (10:50 +0200)]
doc: Improve doc about gl_EARLY.

* doc/gnulib-tool.texi (Initial import): Mention where to place an
AC_PROG_CC_STDC invocation.
Reported by Gary V. Vaughan <gary@vaughan.pe>.

12 years agofgetc, fputc, fread, fwrite tests: Fix link error.
Bruno Haible [Wed, 28 Sep 2011 08:57:32 +0000 (10:57 +0200)]
fgetc, fputc, fread, fwrite tests: Fix link error.

* tests/test-fgetc.c (main): Don't invoke gl_msvc_inval_ensure_handler
on non-MSVC platforms.
* tests/test-fputc.c (main): Likewise.
* tests/test-fread.c (main): Likewise.
* tests/test-fwrite.c (main): Likewise.
Reported by Jim Meyering.

12 years agofputc, fwrite tests: Avoid test failure on MSVC.
Bruno Haible [Wed, 28 Sep 2011 00:01:19 +0000 (02:01 +0200)]
fputc, fwrite tests: Avoid test failure on MSVC.

* tests/test-fgetc.c: Include msvc-inval.h.
(main): Invoke gl_msvc_inval_ensure_handler.
* tests/test-fputc.c: Include msvc-inval.h.
(main): Invoke gl_msvc_inval_ensure_handler.
* tests/test-fread.c: Include msvc-inval.h.
(main): Invoke gl_msvc_inval_ensure_handler.
* tests/test-fwrite.c: Include msvc-inval.h.
(main): Invoke gl_msvc_inval_ensure_handler.
* modules/fgetc-tests (Depends-on): Add msvc-inval.
* modules/fputc-tests (Depends-on): Likewise.
* modules/fread-tests (Depends-on): Likewise.
* modules/fwrite-tests (Depends-on): Likewise.

12 years agoraise: Fix double declaration with modules 'sigprocmask' and 'sigpipe'.
Bruno Haible [Tue, 27 Sep 2011 22:49:04 +0000 (00:49 +0200)]
raise: Fix double declaration with modules 'sigprocmask' and 'sigpipe'.

* lib/signal.in.h (GNULIB_defined_signal_blocking): New macro.
(raise): Remove older, duplicated declaration.
(_gl_raise_SIGPIPE): New declaration.
* lib/sigprocmask.c (_gl_raise_SIGPIPE): New function.
(rpl_raise): Remove function.
* lib/raise.c (rpl_raise, raise): Merge into a single function. Handle
a gnulib-defined SIGPIPE here.
* m4/raise.m4 (gl_FUNC_RAISE): Set REPLACE_RAISE also if the module
'sigprocmask' has detected missing signal-blocking and the module
'sigpipe' is enabled.
Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.

12 years agoautoupdate
Karl Berry [Tue, 27 Sep 2011 13:20:10 +0000 (06:20 -0700)]
autoupdate

12 years agobase64-tests: avoid memory leak
Gijs van Tulder [Mon, 26 Sep 2011 17:58:01 +0000 (19:58 +0200)]
base64-tests: avoid memory leak

* tests/test-base64.c (main): Plug memory leak.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agobase32: new module
Gijs van Tulder [Sun, 25 Sep 2011 12:06:58 +0000 (14:06 +0200)]
base32: new module

* modules/base32: New module.
* lib/base32.c: New file.
* lib/base32.h: Likewise.
* m4/base32.m4: Likewise.
* modules/base32-tests: New test.
* tests/test-base32.c: Likewise.
* MODULES.html.sh (Misc): Mention it.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agognulib: use more-standard license notice wording
Paul Eggert [Mon, 26 Sep 2011 19:58:27 +0000 (12:58 -0700)]
gnulib: use more-standard license notice wording

* gnulib-tool (func_emit_copyright_notice): When emitting a
license notice into a file, use the standard wording as suggested
by the current information for GNU maintainers, except say "file"
rather than "program".  The new wording gives a license version
number, which addresses an issue raised by Glenn Morris in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
* m4/onceonly.m4: Use that same wording here, too.

12 years agodup2: minor simplification
Paul Eggert [Mon, 26 Sep 2011 16:27:08 +0000 (09:27 -0700)]
dup2: minor simplification

* m4/dup2.m4 (gl_PREREQ_DUP2): Don't require AC_C_INLINE,
as lib/dup2.c no longer uses 'inline'.

12 years agostrings: Fix compilation error on MSVC.
Bruno Haible [Mon, 26 Sep 2011 00:36:46 +0000 (02:36 +0200)]
strings: Fix compilation error on MSVC.

* lib/strings.in.h: Include <stddef.h> for size_t.

12 years agofflush et al.: Document limitation on MSVC.
Bruno Haible [Sun, 25 Sep 2011 21:22:19 +0000 (23:22 +0200)]
fflush et al.: Document limitation on MSVC.

* doc/posix-functions/fflush.texi: Document possible crash in handling
mode other than DEFAULT_HANDLING.
* doc/posix-functions/fgetc.texi: Likewise.
* doc/posix-functions/fputc.texi: Likewise.
* doc/posix-functions/fread.texi: Likewise.
* doc/posix-functions/fwrite.texi: Likewise.

12 years agomsvc-inval: Allow three invalid parameter handling modes.
Bruno Haible [Sun, 25 Sep 2011 21:08:45 +0000 (23:08 +0200)]
msvc-inval: Allow three invalid parameter handling modes.

* lib/msvc-inval.h: Don't include <stdlib.h> here.
(DEFAULT_HANDLING, HAIRY_LIBRARY_HANDLING, SANE_LIBRARY_HANDLING): New
macros.
(gl_msvc_inval_ensure_handler, TRY_MSVC_INVAL, CATCH_MSVC_INVAL,
DONE_MSVC_INVAL): Implement DEFAULT_HANDLING. Treat
SANE_LIBRARY_HANDLING as a no-op.
* lib/msvc-inval.c: Treat SANE_LIBRARY_HANDLING as a no-op. Include
<stdlib.h>.
(gl_msvc_invalid_parameter_handler): Implement DEFAULT_HANDLING.

12 years agomsvc-inval: Make handler multithread-safe.
Bruno Haible [Sun, 25 Sep 2011 20:02:18 +0000 (22:02 +0200)]
msvc-inval: Make handler multithread-safe.

* lib/msvc-inval.h (struct gl_msvc_inval_per_thread): New type.
(gl_msvc_inval_restart, gl_msvc_inval_restart_valid): Remove
declarations.
(gl_msvc_inval_current): New declaration.
(TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
Operate on the structure returned by gl_msvc_inval_current().
* lib/msvc-inval.c (gl_msvc_inval_restart, gl_msvc_inval_restart_valid):
Remove varaiables.
(tls_index, tls_initialized): New variables.
(not_per_thread): New variable.
(gl_msvc_inval_current): New function.
(gl_msvc_invalid_parameter_handler) [!_MSC_VER]: Use the structure
returned by gl_msvc_inval_current().

12 years agomsvc-inval: Install handler globally.
Bruno Haible [Sun, 25 Sep 2011 19:05:20 +0000 (21:05 +0200)]
msvc-inval: Install handler globally.

* lib/msvc-inval.h (STATUS_GNULIB_INVALID_PARAMETER): Define also for
!_MSC_VER.
(gl_msvc_invalid_parameter_handler): Remove declaration.
(gl_msvc_inval_restart_valid, gl_msvc_inval_ensure_handler): New
declarations.
(TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
Install the handler globally, don't uninstall it.
* lib/msvc-inval.c (gl_msvc_inval_restart_valid): New variable.
(gl_msvc_invalid_parameter_handler): Make static. If the restart is not
currently valid, call RaiseException instead.
(gl_msvc_inval_initialized, gl_msvc_inval_ensure_handler): Define also
for !_MSC_VER.

12 years agostrerror_r-posix: Fix for MSVC 9.
Bruno Haible [Sun, 25 Sep 2011 12:54:47 +0000 (14:54 +0200)]
strerror_r-posix: Fix for MSVC 9.

* lib/strerror_r.c (local_snprintf): New function.
(snprintf): Define to local_snprintf, not to _snprintf.

12 years agoftruncate: Support for MSVC 9.
Bruno Haible [Sun, 25 Sep 2011 12:10:58 +0000 (14:10 +0200)]
ftruncate: Support for MSVC 9.

* lib/ftruncate.c: Include errno.h, msvc-inval.h.
(chsize_nothrow): New function.
(chsize): Redefine as a macro.
* m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Require AC_C_INLINE.
* modules/ftruncate (Depends-on): Add msvc-inval.

12 years agoNew module 'fstat'.
Bruno Haible [Sun, 25 Sep 2011 11:42:08 +0000 (13:42 +0200)]
New module 'fstat'.

* lib/sys_stat.in.h (fstat): Declare only if GNULIB_FSTAT is set.
* lib/fstat.c: New file, based on a piece of lib/fchdir.c.
* lib/fchdir.c (rpl_fstat): Remove function.
* m4/fstat.m4: New file.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_FSTAT.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether fstat is
declared.
(gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_FSTAT.
* modules/sys_stat (Makefile.am): Substitute GNULIB_FSTAT.
* modules/fstat: New file.
* modules/sys_stat-tests (Depends-on): Remove fstat-tests.
* tests/test-sys_stat-c++.cc (fstat): Check only if GNULIB_TEST_FSTAT
is set.
* doc/posix-functions/fstat.texi: Mention the new module and the
problem on MSVC.
* NEWS: Mention the change.
* modules/acl (Depends-on): Add fstat.
* modules/chdir-safer (Depends-on): Likewise.
* modules/chown (Depends-on): Likewise.
* modules/copy-file (Depends-on): Likewise.
* modules/fchdir (Depends-on): Likewise.
* modules/fdopendir (Depends-on): Likewise.
* modules/fopen (Depends-on): Likewise.
* modules/fts (Depends-on): Likewise.
* modules/getcwd (Depends-on): Likewise.
* modules/isapipe (Depends-on): Likewise.
* modules/linkat (Depends-on): Likewise.
* modules/lseek (Depends-on): Likewise.
* modules/mkdir-p (Depends-on): Likewise.
* modules/open (Depends-on): Likewise.
* modules/openat (Depends-on): Likewise.
* modules/read-file (Depends-on): Likewise.
* modules/renameat (Depends-on): Likewise.
* modules/utimens (Depends-on): Likewise.

12 years agolinkat: Fix compilation on MSVC 9.
Bruno Haible [Sun, 25 Sep 2011 11:25:16 +0000 (13:25 +0200)]
linkat: Fix compilation on MSVC 9.

* lib/linkat.c: Don't include <stdint.h>.

12 years agofclose: Support for MSVC 9.
Bruno Haible [Sun, 25 Sep 2011 10:10:10 +0000 (12:10 +0200)]
fclose: Support for MSVC 9.

* lib/fclose.c: Include msvc-inval.h.
(fclose_nothrow): New function.
(rpl_fclose): Use it.
* modules/fclose (Depends-on): Add msvc-inval.
* doc/posix-functions/fclose.texi: Mention the problem on MSVC.

12 years agodup2: minor simplifications
Paul Eggert [Sun, 25 Sep 2011 05:49:14 +0000 (22:49 -0700)]
dup2: minor simplifications

* lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
that it's a performance win.
(rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
! defined __CYGWIN__)" to "ifdef F_GETFL".

12 years agotest-futimens: avoid a warning from gcc -Wshadow
Jim Meyering [Sat, 24 Sep 2011 19:02:15 +0000 (21:02 +0200)]
test-futimens: avoid a warning from gcc -Wshadow

* tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
to avoid a shadowing warning.

12 years agofdopen: Support for MSVC 9.
Bruno Haible [Sat, 24 Sep 2011 16:08:50 +0000 (18:08 +0200)]
fdopen: Support for MSVC 9.

* m4/fdopen.m4 (gl_FUNC_FDOPEN): Set REPLACE_FDOPEN also if
HAVE_MSVC_INVALID_PARAMETER_HANDLER is 1.
* lib/fdopen.c: Include msvc-inval.h.
(fdopen_nothrow): New function.
(rpl_fdopen): Use it.
* modules/fdopen (Depends-on): Add msvc-inval.
* modules/fclose-tests (Depends-on): Add fdopen.
* modules/fflush-tests (Depends-on): Likewise.
* modules/fgetc-tests (Depends-on): Likewise.
* modules/fputc-tests (Depends-on): Likewise.
* modules/fread-tests (Depends-on): Likewise.
* modules/freopen-tests (Depends-on): Likewise.
* modules/fseeko-tests (Depends-on): Likewise.
* modules/ftello-tests (Depends-on): Likewise.
* modules/fwrite-tests  (Depends-on): Likewise.
* doc/posix-functions/fdopen.texi: Mention the problem on MSVC.

12 years agofgetc, fputc, fread, fwrite tests: Avoid compilation error on MSVC.
Bruno Haible [Sat, 24 Sep 2011 15:59:54 +0000 (17:59 +0200)]
fgetc, fputc, fread, fwrite tests: Avoid compilation error on MSVC.

* modules/fgetc-tests (Depends-on): Add unistd.
* modules/fputc-tests (Depends-on): Likewise.
* modules/fread-tests (Depends-on): Likewise.
* modules/fwrite-tests (Depends-on): Likewise.

12 years agodup: Simplify autoconf test.
Bruno Haible [Sat, 24 Sep 2011 15:42:03 +0000 (17:42 +0200)]
dup: Simplify autoconf test.

* m4/dup.m4 (gl_FUNC_DUP): Don't run a test program. Instead, just rely
on gl_MSVC_INVAL's result.

12 years agoTests for function fwrite().
Bruno Haible [Sat, 24 Sep 2011 15:08:38 +0000 (17:08 +0200)]
Tests for function fwrite().

* modules/fwrite-tests: New file.
* tests/test-fwrite.c: New file.
* modules/stdio-tests (Depends-on): Add fwrite-tests.

12 years agoTests for function fread().
Bruno Haible [Sat, 24 Sep 2011 15:07:17 +0000 (17:07 +0200)]
Tests for function fread().

* modules/fread-tests: New file.
* tests/test-fread.c: New file.
* modules/stdio-tests (Depends-on): Add fread-tests.