Paolo Bonzini [Thu, 20 Aug 2009 08:24:19 +0000 (10:24 +0200)]
Move more flags to lib/fcntl.in.h.
* lib/cloexec.c: Do not define FD_CLOEXEC here.
* lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
* lib/fcntl.in.h: Do both things here.
Jim Meyering [Thu, 20 Aug 2009 09:04:20 +0000 (11:04 +0200)]
maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
* top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
expression that converts "." in a file name to "\." in the resulting
regexp. Start with a dummy statement, so that prior shell variable
definitions are expanded portably. Reported by Simon Josefsson.
Eric Blake [Wed, 19 Aug 2009 16:02:19 +0000 (10:02 -0600)]
popen-safer: prevent popen from clobbering std descriptors
* modules/popen-safer: New file.
* lib/popen-safer.c: Likewise.
* m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
* lib/stdio--.h (popen): Provide override.
* lib/stdio-safer.h (popen_safer): Provide declaration.
* tests/test-popen.c (includes): Partially test this.
* modules/popen-safer-tests: New file, for more tests.
* tests/test-popen-safer.c: Likewise.
* MODULES.html.sh (file stream based Input/Output): Mention it.
Joel E. Denny [Tue, 18 Aug 2009 01:41:57 +0000 (21:41 -0400)]
maint.mk: give full control over update-copyright exclusions
* top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
(update-copyright): Don't force inclusion of top-level
ChangeLog. Don't force exclusion of all COPYING files, but make
them the default exclusion instead.
Eric Blake [Sun, 16 Aug 2009 14:59:54 +0000 (08:59 -0600)]
fpurge: fix previous commits
* modules/fpurge (Makefile.am): Make replacement conditional,
partially reverting 2007-04-29 change; missed in previous
attempt.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
is missing.
Eric Blake [Fri, 14 Aug 2009 15:40:53 +0000 (09:40 -0600)]
maint.mk: simplify update-copyright rule
* top/maint.mk (update-copyright-local): Delete, and document how
to do it in cfg.mk instead.
(update-copyright-exclude-regexp): Delete, and document how to do
it in .x-update-copyright instead.
(update-copyright): Simplify, thanks to VC_LIST_EXCEPT. Don't
exclude ChangeLog.
Joel E. Denny [Fri, 14 Aug 2009 05:10:08 +0000 (01:10 -0400)]
update-copyright: much ado about intervals
* build-aux/update-copyright: Implement and document
UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
of copyright year intervals.
Also, document UPDATE_COPYRIGHT_YEAR.
* tests/test-update-copyright.sh: Test it.
Optimize exclude: use hash tables for non-wildcard patterns.
* lib/exclude.c: Include hash.h and mbuiter.h
(struct exclude_pattern, exclude_segment): New data types.
(struct exclude): Rewrite.
(fnmatch_pattern_has_wildcards): New function.
(new_exclude_segment, free_exclude_segment): New functions.
(excluded_file_pattern_p, excluded_file_name_p): New functions.
(excluded_file_name, add_exclude): Rewrite using new struct exclude.
* lib/exclude.h (is_fnmatch_pattern): New prototype.
* modules/exclude: Depend on hash and mbuiter.
* modules/exclude-tests: New file.
* tests/test-exclude.c: New file.
* tests/test-exclude1.sh: New file.
* tests/test-exclude2.sh: New file.
* tests/test-exclude3.sh: New file.
* tests/test-exclude4.sh: New file.
* tests/test-exclude5.sh: New file.
* tests/test-exclude6.sh: New file.
* tests/test-exclude7.sh: New file.
* 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
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.
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.
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.
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.
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.
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.