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.
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.
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.
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.
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.
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
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.
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.
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.
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.
Jim Meyering [Fri, 17 Apr 2009 20:03:48 +0000 (22:03 +0200)]
bootstrap: sync from coreutils
* build-aux/bootstrap: Honor variables like $ACLOCAL, etc.,
just as autoreconf does. Verify a list of prerequisite
package-name,version-number pairs if defined in bootstrap.conf.
Refer to README-prereq, if prerequisites are not satisfied.
Paolo Bonzini [Sat, 27 Jun 2009 11:00:37 +0000 (13:00 +0200)]
add warnings to selinux-h module's configure macros
2009-06-27 Paolo Bonzini <bonzini@gnu.org>
* m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
self-explaining comment.
* m4/selinux-selinux-h: Update serial.
(gl_LIBSELINUX): Warn if SELinux is found but libselinux is absent;
extracted from...
(gl_HEADERS_SELINUX_SELINUX_H): ... this one. Require gl_LIBSELINUX.
Add warning for missing development packages here, too.