gnulib.git
14 years agoAvoid compilation error on NetBSD 5.0.
Bruno Haible [Tue, 11 Aug 2009 19:06:43 +0000 (21:06 +0200)]
Avoid compilation error on NetBSD 5.0.

14 years agoMost tests don't need module 'close' any more.
Bruno Haible [Tue, 11 Aug 2009 10:52:19 +0000 (12:52 +0200)]
Most tests don't need module 'close' any more.

14 years agoUndefine DCHAR_SET after use.
Bruno Haible [Mon, 10 Aug 2009 23:06:54 +0000 (01:06 +0200)]
Undefine DCHAR_SET after use.

14 years agoFix a gcc warning.
Bruno Haible [Mon, 10 Aug 2009 23:03:08 +0000 (01:03 +0200)]
Fix a gcc warning.

14 years agoDon't optimize AC_LIBOBJs, as they may appear in different contexts.
Bruno Haible [Mon, 10 Aug 2009 21:54:09 +0000 (23:54 +0200)]
Don't optimize AC_LIBOBJs, as they may appear in different contexts.

14 years agoMake it possible to use module 'gethostname' without module 'close' or 'ioctl'.
Bruno Haible [Mon, 10 Aug 2009 21:00:13 +0000 (23:00 +0200)]
Make it possible to use module 'gethostname' without module 'close' or 'ioctl'.

14 years agoAdd comment.
Bruno Haible [Mon, 10 Aug 2009 20:53:54 +0000 (22:53 +0200)]
Add comment.

14 years agoTypo in comment.
Bruno Haible [Mon, 10 Aug 2009 20:38:22 +0000 (22:38 +0200)]
Typo in comment.

14 years agoAvoid collision between gnulib wrapper and libintl wrapper.
Bruno Haible [Mon, 10 Aug 2009 11:29:20 +0000 (13:29 +0200)]
Avoid collision between gnulib wrapper and libintl wrapper.

14 years agoMake <sys/select.h> really self-contained, also on Solaris 10.
Bruno Haible [Sun, 9 Aug 2009 22:26:10 +0000 (00:26 +0200)]
Make <sys/select.h> really self-contained, also on Solaris 10.

14 years agoAvoid warnings from 'aclocal' when AM_XGETTEXT_OPTION is not defined.
Bruno Haible [Sun, 9 Aug 2009 17:58:07 +0000 (19:58 +0200)]
Avoid warnings from 'aclocal' when AM_XGETTEXT_OPTION is not defined.

14 years agoAvoid compilation error in C++ mode.
Bruno Haible [Sun, 9 Aug 2009 07:15:28 +0000 (09:15 +0200)]
Avoid compilation error in C++ mode.

14 years agoDefine HOST_NAME_MAX also for the various Unix platforms.
Bruno Haible [Sat, 8 Aug 2009 09:18:41 +0000 (11:18 +0200)]
Define HOST_NAME_MAX also for the various Unix platforms.

14 years agoselinux-at: fix typo in a comment
Jim Meyering [Fri, 7 Aug 2009 21:22:51 +0000 (23:22 +0200)]
selinux-at: fix typo in a comment

* lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
Spotted by Paolo Bonzini.

14 years agoselinux-at: remove redundant m4 code, add documentation
Jim Meyering [Fri, 7 Aug 2009 08:57:17 +0000 (10:57 +0200)]
selinux-at: remove redundant m4 code, add documentation

* modules/selinux-at (configure.ac): Remove redundant code.
LIB_SELINUX is already set via the dependent module, selinux-h.
(Include): Add quotes around selinux-at.h.
* lib/selinux-at.h: Add documentation.
Reported by Bruno Haible in
http://marc.info/?l=gnulib-bug&m=124958988300749

14 years agoAvoid link error on MacOS X 10.3 and 10.4.
Bruno Haible [Fri, 7 Aug 2009 07:06:45 +0000 (09:06 +0200)]
Avoid link error on MacOS X 10.3 and 10.4.

14 years agotest-version-etc.sh: Use $EXEEXT.
Simon Josefsson [Fri, 7 Aug 2009 00:23:00 +0000 (02:23 +0200)]
test-version-etc.sh: Use $EXEEXT.

14 years agoupdate-copyright: update documentation to point to maint.mk
Joel E. Denny [Thu, 6 Aug 2009 14:22:32 +0000 (10:22 -0400)]
update-copyright: update documentation to point to maint.mk

* build-aux/update-copyright: Here.

14 years agomaint.mk: support update-copyright-local
Jim Meyering [Thu, 6 Aug 2009 07:25:05 +0000 (09:25 +0200)]
maint.mk: support update-copyright-local

* top/maint.mk (update-copyright-local): Define place-holder.
(update-copyright): Depend on $(update-copyright-local).

14 years agoselinux-at: new module
Jim Meyering [Thu, 6 Aug 2009 12:15:23 +0000 (14:15 +0200)]
selinux-at: new module

Initially written for coreutils, this module will soon be
used by findutils, too.
* MODULES.html.sh [Misc]: Add selinux-at.
* lib/selinux-at.h: New file, from coreutils.
* lib/selinux-at.c: Likewise.
* modules/selinux-at: Likewise.
(License): Change from LGPL to GPL, since it depends
on the GPL'd openat module.

14 years agodoc: update README
Jim Meyering [Thu, 6 Aug 2009 10:33:21 +0000 (12:33 +0200)]
doc: update README

* README: Remove references to cogito.
Remove cvs-repo-updating instructions from 2007.
Don't imply that CVS is better if you have limited disk space.

14 years agoupdate-copyright: support C-style comments
Joel E. Denny [Thu, 6 Aug 2009 03:30:14 +0000 (23:30 -0400)]
update-copyright: support C-style comments

* build-aux/update-copyright: Implement and document.
* tests/test-update-copyright.sh: Test.

14 years agoupdate-copyright: support omitted "(C)"
Joel E. Denny [Thu, 6 Aug 2009 00:51:27 +0000 (20:51 -0400)]
update-copyright: support omitted "(C)"

* build-aux/update-copyright: Implement and document.  Also,
allow variable whitespace before "(C)".
* tests/test-update-copyright.sh: Test.

14 years agoupdate-copyright: don't trip on non-FSF copyright statements
Joel E. Denny [Wed, 5 Aug 2009 20:52:24 +0000 (16:52 -0400)]
update-copyright: don't trip on non-FSF copyright statements

* build-aux/update-copyright: Fix so that the first correctly
formatted FSF copyright statement is recognized no matter what
appears before it.  Update documentation.
* tests/test-update-copyright.sh: Test that.

14 years agoupdate-copyright: clean up code a little
Joel E. Denny [Wed, 5 Aug 2009 19:31:15 +0000 (15:31 -0400)]
update-copyright: clean up code a little

* build-aux/update-copyright: Append "_re" to the name of any
variable holding a regular expression.
Replace "old" and "new" with "stmt" in variable names.
Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
handled correctly.
Format code more consistently.

14 years agoupdate-copyright-tests: improve portability
Joel E. Denny [Wed, 5 Aug 2009 14:03:10 +0000 (10:03 -0400)]
update-copyright-tests: improve portability

* tests/test-update-copyright.sh: Use cmp if diff cannot handle
-u or /dev/null.  Suggested by Jim Meyering and Eric Blake.

14 years agoupdate-copyright: support @copyright{} and &copy;
Joel E. Denny [Tue, 4 Aug 2009 03:06:24 +0000 (23:06 -0400)]
update-copyright: support @copyright{} and &copy;

* build-aux/update-copyright: Implement and document.
* tests/test-update-copyright.sh: Test.

14 years agoupdate-copyright-tests: correctly test EOL=\r\n handling
Jim Meyering [Tue, 4 Aug 2009 14:25:12 +0000 (16:25 +0200)]
update-copyright-tests: correctly test EOL=\r\n handling

* tests/test-update-copyright.sh: Put \r at the end of some lines
for the dos-eol tests.  Based on a patch by Joel E. Denny.

14 years agomaint.mk: make update-copyright exclusion list more configurable
Jim Meyering [Tue, 4 Aug 2009 09:17:08 +0000 (11:17 +0200)]
maint.mk: make update-copyright exclusion list more configurable

* top/maint.mk (update-copyright): Default to excluding COPYING,
but allow an override, in case someone does want to update that file.

14 years agomaint.mk: don't update copyright date in COPYING
Jim Meyering [Tue, 4 Aug 2009 08:44:05 +0000 (10:44 +0200)]
maint.mk: don't update copyright date in COPYING

* top/maint.mk (update-copyright): Exclude COPYING.

14 years agomaint.mk: add a copyright-updating rule
Jim Meyering [Tue, 4 Aug 2009 07:53:04 +0000 (09:53 +0200)]
maint.mk: add a copyright-updating rule

* top/maint.mk (update-copyright): New rule.
Derived from coreutils/Makefile.am.

14 years agoupdate-copyright: rename some variables
Jim Meyering [Tue, 4 Aug 2009 07:25:12 +0000 (09:25 +0200)]
update-copyright: rename some variables

* build-aux/update-copyright: Rename a few variables for clarity.
Tweak syntax.  List Joel E. Denny as coauthor.

14 years agoupdate-copyright: fix bug for 2-digit last year and add tests
Joel E. Denny [Tue, 4 Aug 2009 00:05:50 +0000 (20:05 -0400)]
update-copyright: fix bug for 2-digit last year and add tests

* build-aux/update-copyright: Fix bug.
Use UPDATE_COPYRIGHT_YEAR from environment as current year if
specified.
* modules/update-copyright-tests: New
* tests/test-update-copyright.sh: New.

14 years agoupdate-copyright: handle leading tabs in line prefix
Joel E. Denny [Fri, 31 Jul 2009 13:38:05 +0000 (09:38 -0400)]
update-copyright: handle leading tabs in line prefix

* build-aux/update-copyright: Count leading tabs as 8 spaces
when computing margin.  This helps with the formatting of
ChangeLogs, for example.
Fix documentation a little.

14 years agoupdate-copyright: support EOL=\r\n
Joel E. Denny [Fri, 31 Jul 2009 13:32:30 +0000 (09:32 -0400)]
update-copyright: support EOL=\r\n

* build-aux/update-copyright: Implement that.

14 years agoupdate-copyright: automatically format copyright statements
Joel E. Denny [Fri, 31 Jul 2009 13:11:53 +0000 (09:11 -0400)]
update-copyright: automatically format copyright statements

* build-aux/update-copyright: Implement that.
Also, be a little more predictable and safer by always failing
when the full copyright format is not perfectly recognized as an
unbroken whole.  Discussed at
<http://lists.gnu.org/archive/html/bug-gnulib/2009-07/msg00131.html>.
Rewrite documentation.

14 years agoFix displayed message of AM_ICONV with autoconf-2.64.
Bruno Haible [Mon, 3 Aug 2009 21:07:00 +0000 (23:07 +0200)]
Fix displayed message of AM_ICONV with autoconf-2.64.

14 years agoTests for module 'uname'.
Bruno Haible [Sun, 2 Aug 2009 14:52:37 +0000 (16:52 +0200)]
Tests for module 'uname'.

14 years agoNew module 'uname'.
Bruno Haible [Sun, 2 Aug 2009 14:51:49 +0000 (16:51 +0200)]
New module 'uname'.

14 years agoTests for module 'sys_utsname'.
Bruno Haible [Sun, 2 Aug 2009 14:50:32 +0000 (16:50 +0200)]
Tests for module 'sys_utsname'.

14 years agoNew module 'sys_utsname'.
Bruno Haible [Sun, 2 Aug 2009 14:49:23 +0000 (16:49 +0200)]
New module 'sys_utsname'.

14 years agoImplicitly initialize the sockets library.
Bruno Haible [Sun, 2 Aug 2009 14:43:55 +0000 (16:43 +0200)]
Implicitly initialize the sockets library.

14 years agoAllow multiple calls to gl_sockets_startup.
Bruno Haible [Sun, 2 Aug 2009 14:39:07 +0000 (16:39 +0200)]
Allow multiple calls to gl_sockets_startup.

14 years agoFix argp-version-etc-test module.
Simon Josefsson [Mon, 3 Aug 2009 13:58:20 +0000 (15:58 +0200)]
Fix argp-version-etc-test module.

14 years agoFix typo in last commit.
Simon Josefsson [Mon, 3 Aug 2009 07:32:08 +0000 (09:32 +0200)]
Fix typo in last commit.

14 years agoTests for module 'pipe-filter-gi'.
Bruno Haible [Sun, 2 Aug 2009 21:53:25 +0000 (23:53 +0200)]
Tests for module 'pipe-filter-gi'.

14 years agoNew module 'pipe-filter-gi'.
Bruno Haible [Sun, 2 Aug 2009 21:52:05 +0000 (23:52 +0200)]
New module 'pipe-filter-gi'.

14 years agoTests for module 'pipe-filter-ii'.
Bruno Haible [Sun, 2 Aug 2009 21:50:47 +0000 (23:50 +0200)]
Tests for module 'pipe-filter-ii'.

14 years agoNew module 'pipe-filter-ii'.
Bruno Haible [Sun, 2 Aug 2009 21:46:44 +0000 (23:46 +0200)]
New module 'pipe-filter-ii'.

14 years agogc-libgcrypt.c, gc-gnulib.c: Change copyright to FSF.
Simon Josefsson [Sun, 2 Aug 2009 20:23:56 +0000 (22:23 +0200)]
gc-libgcrypt.c, gc-gnulib.c: Change copyright to FSF.

14 years agoFix compilation error on mingw.
Martin Lambers [Sun, 2 Aug 2009 18:57:19 +0000 (20:57 +0200)]
Fix compilation error on mingw.

14 years agoFix compilation error on mingw.
Bruno Haible [Sun, 2 Aug 2009 18:55:40 +0000 (20:55 +0200)]
Fix compilation error on mingw.

14 years agoMake the gethostname test compile again.
Bruno Haible [Sun, 2 Aug 2009 13:29:02 +0000 (15:29 +0200)]
Make the gethostname test compile again.

14 years agoEnsure HOST_NAME_MAX as part of the gethostname module.
Bruno Haible [Sun, 2 Aug 2009 10:24:14 +0000 (12:24 +0200)]
Ensure HOST_NAME_MAX as part of the gethostname module.

14 years agoFix handling of large len argument.
Bruno Haible [Sun, 2 Aug 2009 10:05:11 +0000 (12:05 +0200)]
Fix handling of large len argument.

14 years agoImplement gethostname correctly for native Windows.
Simon Josefsson [Sun, 2 Aug 2009 09:54:52 +0000 (11:54 +0200)]
Implement gethostname correctly for native Windows.

14 years agomaint.mk: relax update-NEWS-hash to accept more syntax
Peter Simons [Sat, 1 Aug 2009 09:43:31 +0000 (11:43 +0200)]
maint.mk: relax update-NEWS-hash to accept more syntax

* top/maint.mk (update-NEWS-hash): Match variants of the
"old_NEWS_hash = ...HASH..." line: allow TABs, more than one space,
and ":=" in place of "=".

14 years agoUpdate copyright year, for commit on 2009-07-21.
Bruno Haible [Sat, 1 Aug 2009 09:25:10 +0000 (11:25 +0200)]
Update copyright year, for commit on 2009-07-21.

14 years agogetloadavg: fix symbol name in comment
Jim Meyering [Fri, 31 Jul 2009 16:16:54 +0000 (18:16 +0200)]
getloadavg: fix symbol name in comment

* lib/getloadavg.c: Correct a typo I introduced when adding
comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
Matt Kraai spotted the problem.

14 years agogetloadvg: add ChangeLog entry for previous change
Jim Meyering [Fri, 31 Jul 2009 08:21:27 +0000 (10:21 +0200)]
getloadvg: add ChangeLog entry for previous change

14 years agogetloadavg: check whether n_name is a pointer, for QNX 6.4.1
Matt Kraai [Wed, 29 Jul 2009 15:33:59 +0000 (08:33 -0700)]
getloadavg: check whether n_name is a pointer, for QNX 6.4.1

* lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
code also if ! defined N_NAME_POINTER.
* m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
but the n_name member is a 12-byte array.

14 years agoupdate-copyright: generalize comment handling
Joel E. Denny [Wed, 29 Jul 2009 19:17:53 +0000 (15:17 -0400)]
update-copyright: generalize comment handling

* build-aux/update-copyright: Handle copyright statements
within more comment styles.
Document usage.
Report any file with an external copyright holder or parse failure.

14 years agomktime: correct setting of REPLACE_MKTIME
Jim Meyering [Wed, 29 Jul 2009 17:30:21 +0000 (19:30 +0200)]
mktime: correct setting of REPLACE_MKTIME

* m4/mktime.m4 (gl_FUNC_MKTIME): Set REPLACE_MKTIME=0, when required.

14 years agoupdate-copyright: new module
Jim Meyering [Wed, 29 Jul 2009 14:22:21 +0000 (16:22 +0200)]
update-copyright: new module

* modules/update-copyright: New file.
* build-aux/update-copyright: New file.
* MODULES.html.sh (maint+release support): Add update-copyright.

14 years agoFix compilation error when <ctime> is used and mktime is replaced.
Bruno Haible [Tue, 28 Jul 2009 19:01:16 +0000 (21:01 +0200)]
Fix compilation error when <ctime> is used and mktime is replaced.

* lib/time.in.h (mktime): New declaration.
* m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
REPLACE_MKTIME instead of defining mktime in config.h.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
* modules/time (Makefile.am): Substitute REPLACE_MKTIME.
Reported by Ross McFarland <rwmcfa1@neces.com>.

14 years agoAvoid compilation error on QNX.
Bruno Haible [Mon, 27 Jul 2009 19:21:02 +0000 (21:21 +0200)]
Avoid compilation error on QNX.

14 years agoautoupdate
Karl Berry [Mon, 27 Jul 2009 12:50:46 +0000 (05:50 -0700)]
autoupdate

14 years agoupdate from texinfo
Karl Berry [Sun, 26 Jul 2009 17:25:30 +0000 (10:25 -0700)]
update from texinfo

14 years ago-mautoupdate
Karl Berry [Sun, 26 Jul 2009 13:27:06 +0000 (06:27 -0700)]
-mautoupdate

14 years agoUndo last gnulib-tool commit: maintainer-makefile is fixed.
Bruno Haible [Sat, 25 Jul 2009 20:55:21 +0000 (22:55 +0200)]
Undo last gnulib-tool commit: maintainer-makefile is fixed.

14 years agomaint.mk: avoid warnings about missing files
Jim Meyering [Sat, 25 Jul 2009 13:43:11 +0000 (15:43 +0200)]
maint.mk: avoid warnings about missing files

* top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
diagnostic when .prev-version does not exist.
(_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
(syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
nonexistent cfg.mk.
Suggestions from Simon Josefsson.

14 years agoAvoid syntax error on QNX.
Bruno Haible [Sat, 25 Jul 2009 09:17:24 +0000 (11:17 +0200)]
Avoid syntax error on QNX.

14 years agoExclude the maintainer-makefile module from big testdir builds.
Bruno Haible [Sat, 25 Jul 2009 09:11:49 +0000 (11:11 +0200)]
Exclude the maintainer-makefile module from big testdir builds.

14 years agomaint.mk: invoke "make dist" with a working value of XZ_OPT
Jim Meyering [Thu, 23 Jul 2009 08:05:10 +0000 (10:05 +0200)]
maint.mk: invoke "make dist" with a working value of XZ_OPT

* top/maint.mk (vc-dist): Use no "-" in the value of XZ_OPT.

14 years agoMake fseeko.c compile on QNX.
Matt Kraai [Thu, 23 Jul 2009 05:25:46 +0000 (07:25 +0200)]
Make fseeko.c compile on QNX.

14 years agoC++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
Peter Simons [Tue, 21 Jul 2009 13:22:24 +0000 (15:22 +0200)]
C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope

* lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
* lib/md4.h: Likewise.
* lib/md5.h: Likewise.
* lib/sha1.h: Likewise.
* lib/sha256.h: Likewise.
* lib/sha512.h: Likewise.

14 years agotests-sha1: don't assign literal string to 'char *' variable
Peter Simons [Tue, 21 Jul 2009 13:23:55 +0000 (15:23 +0200)]
tests-sha1: don't assign literal string to 'char *' variable

* tests/test-sha1.c (main): Declare locals with "const" to match
attributes of the right hand side.

14 years agodup2: fix more mingw problems
Eric Blake [Tue, 21 Jul 2009 15:00:57 +0000 (09:00 -0600)]
dup2: fix more mingw problems

* lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
fd to itself.
* doc/posix-functions/dup2.texi (dup2): Document the bug.
* lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
* lib/fchdir.c (dup2): Manage preprocessor macros correctly.
(rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
care of mingw bugs.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agovc-list-files: avoid failure when /bin/sh is dash
Jim Meyering [Tue, 21 Jul 2009 16:24:22 +0000 (18:24 +0200)]
vc-list-files: avoid failure when /bin/sh is dash

* build-aux/vc-list-files: Avoid a shell portability problem with dash.
On some Debian based systems, /bin/sh is a symlink to dash, and running
this command would omit the "/" following each 'tests' prefix:
  dash -x build-aux/vc-list-files -C . tests
That is because bash and dash work differently:
  $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
  bash ok
  dash odd

14 years agodup2-tests: test previous patch
Eric Blake [Tue, 21 Jul 2009 12:48:56 +0000 (06:48 -0600)]
dup2-tests: test previous patch

* modules/dup2-tests: New file.
* tests/test-dup2.c: Likewise.
* tests/test-open.c (main): Avoid unspecified behavior.
* tests/test-pipe.c (child_main): Use dup2 semantics to simplify
test.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodup2: work around mingw and cygwin 1.5 bug
Eric Blake [Tue, 21 Jul 2009 12:48:26 +0000 (06:48 -0600)]
dup2: work around mingw and cygwin 1.5 bug

* m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
* modules/unistd (Makefile.am): Substitute it.
* lib/unistd.in.h (dup2): Declare the replacement.
* lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
* doc/posix-functions/dup2.texi (dup2): Document the bugs.
* lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
* modules/execute (Depends-on): Add dup2.
* modules/fseterr (Depends-on): Likewise.
* modules/pipe (Depends-on): Likewise.
* modules/posix_spawn-internal (Depends-on): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoDon't let "git push" reject trailing blank lines in modules files.
Bruno Haible [Tue, 21 Jul 2009 08:13:16 +0000 (10:13 +0200)]
Don't let "git push" reject trailing blank lines in modules files.

14 years agoTweak for maintainability.
Bruno Haible [Mon, 20 Jul 2009 20:45:39 +0000 (22:45 +0200)]
Tweak for maintainability.

14 years agotest-pipe: make a bit more robust.
Eric Blake [Mon, 20 Jul 2009 12:41:01 +0000 (06:41 -0600)]
test-pipe: make a bit more robust.

* tests/test-pipe.c (myerr): Allow error messages regardless of
what we do to stderr.
(test_pipe): Rearrange to avoid deadlock.
(child_main): Try a larger read, to ensure we avoided deadlock.
* lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
* lib/pipe.h (create_pipe_bidi): Document potential for deadlock
if misused.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agofts: avoid false-positive cycle-detection
Jim Meyering [Sun, 19 Jul 2009 20:33:09 +0000 (22:33 +0200)]
fts: avoid false-positive cycle-detection

* lib/fts.c (fts_read): Reinitialize cycle-detection data structures
for each new command line argument.

14 years agoFix build error on mingw with the modules sys_select and unistd.
Bruno Haible [Sun, 19 Jul 2009 15:16:51 +0000 (17:16 +0200)]
Fix build error on mingw with the modules sys_select and unistd.

14 years agoUnify conditionals.
Bruno Haible [Sun, 19 Jul 2009 11:13:43 +0000 (13:13 +0200)]
Unify conditionals.

14 years agoFix handling of closed stdin/stdout/stderr on mingw.
Bruno Haible [Sun, 19 Jul 2009 10:45:28 +0000 (12:45 +0200)]
Fix handling of closed stdin/stdout/stderr on mingw.

14 years agoRefactor test code.
Bruno Haible [Sun, 19 Jul 2009 09:06:58 +0000 (11:06 +0200)]
Refactor test code.

14 years agoPass slave_process argument consistently.
Bruno Haible [Sun, 19 Jul 2009 08:38:05 +0000 (10:38 +0200)]
Pass slave_process argument consistently.

14 years agotest-pipe: fix mingw build
Eric Blake [Sat, 18 Jul 2009 15:10:05 +0000 (09:10 -0600)]
test-pipe: fix mingw build

* tests/test-pipe.c (main): Avoid fcntl on mingw.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoFix typo.
Bruno Haible [Sat, 18 Jul 2009 15:13:00 +0000 (17:13 +0200)]
Fix typo.

14 years agoerror: fix mingw build
Eric Blake [Sat, 18 Jul 2009 13:58:57 +0000 (07:58 -0600)]
error: fix mingw build

* lib/error.c (error, error_at_line): Avoid fcntl on mingw.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoerror: avoid undefined use of stdout
Eric Blake [Sat, 18 Jul 2009 12:18:21 +0000 (06:18 -0600)]
error: avoid undefined use of stdout

* lib/error.c (error, error_at_line): Check that fd 1 is open
before flushing stdout.  Avoids a crash on cygwin when libsigsegv
is handling faults and the close_stdout module wants to report the
detection of closed stdout as an error.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agopipe: be robust in face of closed fds
Eric Blake [Fri, 17 Jul 2009 18:00:07 +0000 (12:00 -0600)]
pipe: be robust in face of closed fds

* lib/pipe.c (create_pipe): Closed standard descriptors in parent
should cause child to misbehave.
* modules/pipe-tests: New module.
* tests/test-pipe.c: New file.
* tests/test-pipe.sh: New file.
Reported by Akim Demaille.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoGuess that wcwidth works on glibc systems.
Bruno Haible [Tue, 14 Jul 2009 19:33:32 +0000 (21:33 +0200)]
Guess that wcwidth works on glibc systems.

14 years agomaint.mk: don't look for translatable strings in *.m4 or *.mk
Jim Meyering [Tue, 7 Jul 2009 16:35:23 +0000 (18:35 +0200)]
maint.mk: don't look for translatable strings in *.m4 or *.mk

* top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
when searching for translatable strings.

14 years agoremove superfluous parentheses in STREQ definition
Jim Meyering [Sun, 5 Jul 2009 15:45:56 +0000 (17:45 +0200)]
remove superfluous parentheses in STREQ definition

* tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
* lib/getugroups.c (STREQ): Likewise.
* lib/fnmatch.c (STREQ): Likewise.
Spotted by Bruno Haible.

14 years agoargv-iter: new module
Jim Meyering [Sat, 4 Jul 2009 14:44:19 +0000 (16:44 +0200)]
argv-iter: new module

* MODULES.html.sh: Add argv-iter.
* lib/argv-iter.c, lib/argv-iter.h: New files.
* modules/argv-iter: New file.
* modules/argv-iter-tests: New file.
* tests/test-argv-iter.c: Test it.

14 years agoFix an assertion failure.
Bruno Haible [Sat, 4 Jul 2009 09:25:49 +0000 (11:25 +0200)]
Fix an assertion failure.