gnulib.git
14 years agosys_stat: sort replacement declarations
Eric Blake [Mon, 12 Oct 2009 21:33:30 +0000 (15:33 -0600)]
sys_stat: sort replacement declarations

* lib/sys_stat.in.h: Sort declarations.
* lib/futimens.c (futimens): Fix typo.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodon't let environment settings perturb build
Jim Meyering [Thu, 15 Oct 2009 19:04:51 +0000 (21:04 +0200)]
don't let environment settings perturb build

Setting the envvars, LIB_CLOCK_GETTIME, LIB_EACCESS or LIB_NANOSLEEP
could cause a configure-time and/or build-time malfunction.
Typically, a configure-time function-in-library test is performed
via code like this:

  LIB_VAR=
  AC_SUBST([LIB_VAR])
  prefix_saved_LIBS=$LIBS
    AC_SEARCH_LIBS([FUNC], [LIB_NAME],
       [test "$ac_cv_search_FUNC" = "none required" ||
LIB_VAR=$ac_cv_search_FUNC])
  LIBS=$prefix_saved_LIBS

However, in each of the files affected by this change, the LIB_VAR=
initialization was omitted.  Thus, when set in the environment, its
value would propagate into generated Makefiles when FUNC is not found
in LIB_NAME.
* m4/clock_time.m4 (gl_CLOCK_TIME): Initialize AC_SUBST'd var.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.

14 years agofchdir: avoid infinite recursion in mingw
Eric Blake [Tue, 13 Oct 2009 15:25:30 +0000 (09:25 -0600)]
fchdir: avoid infinite recursion in mingw

rpl_fstat, needed only on mingw when using fchdir, should not call itself.

* lib/fchdir.c (rpl_fstat): Call system fstat, rather than
recursing.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-stat-time: port to mingw
Eric Blake [Tue, 13 Oct 2009 15:16:16 +0000 (09:16 -0600)]
test-stat-time: port to mingw

Newer mingw has usleep, but it rejects arguments over 1000000
without sleeping.  And since stat has no visibility into
sub-second resolutions, it meant all the timestamps ended up
identical.  Fixed by restoring the 8 seconds of sleep, as
well as working around the documented unlink issue.

* tests/test-stat-time.c (force_unlink): Return a value.
(test_ctime) [W32]: Fix compilation error.
(nap): Don't call usleep with too large an argument.  Use
force_unlink.
* doc/pastposix-functions/usleep.texi (usleep): Document the
portability issue.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agouse AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
Jim Meyering [Tue, 13 Oct 2009 07:15:52 +0000 (09:15 +0200)]
use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*

* modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS.
* modules/pipe-filter-ii: Likewise.
* modules/sys_socket-tests: Likewise.
* modules/tsearch-tests: Likewise.
* Makefile (sc_prefer_ac_check_funcs_once): New rule.
(check): Depend on it.

14 years agoutimens-tests: port to NFS file systems
Eric Blake [Mon, 12 Oct 2009 16:42:35 +0000 (10:42 -0600)]
utimens-tests: port to NFS file systems

Testing on Solaris 8 with NFS: creat() and utimens(,NULL) seem to
set timestamps according to the current time on the server, while
utimens(,{,UTIME_NOW}) sets timestamps according to the current
time on the client.  If two machines are not perfectly
synchronized in time, then this makes time appear to move
backwards.  Avoid spurious test failures caused by a mtime
comparison across machines, by instead doing 2 mtime comparisons,
each known to be from timestamps tied to a single machine.

* tests/test-utimens.h (test_utimens): Add a utimens call prior to
grabbing stat buffer.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agostat-time-tests: minor cleanups
Eric Blake [Mon, 12 Oct 2009 16:37:48 +0000 (10:37 -0600)]
stat-time-tests: minor cleanups

* modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
* tests/test-stat-time.c (nap): Separate assignment from call.
Suggested by Paolo Bonzini and Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agosys_stat: guarantee struct timespec
Eric Blake [Mon, 12 Oct 2009 16:36:33 +0000 (10:36 -0600)]
sys_stat: guarantee struct timespec

* lib/sys_stat.in.h (includes): Always include <time.h>
* modules/sys_stat (Depends-on): Add time.
* tests/test-sys_stat.c: Guarantee struct timespec, as well as
mode_t permission values.
* doc/posix-headers/sys_stat.texi (sys/stat.h): Document how to
get at subsecond timestamps.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agofutimens: new module
Eric Blake [Fri, 9 Oct 2009 22:05:19 +0000 (16:05 -0600)]
futimens: new module

Provides futimens where it is missing, and rpl_futimens to work
around bugs in older Linux kernels.

* modules/futimens: New file.
* lib/futimens.c (futimens): Likewise.
* m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
* lib/utimens.c (futimens): Avoid recursion into rpl_futimens, so
we can work around Linux bugs.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
* modules/sys_stat (Makefile.am): Substitute them.
* lib/sys_stat.in.h (futimens): Declare it.
* MODULES.html.sh (systems lacking POSIX:2008): Mention module.
* doc/posix-functions/futimens.texi (futimens): Likewise.
* modules/futimens-tests: New test.
* tests/test-futimens.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: introduce fdutimens
Eric Blake [Thu, 8 Oct 2009 12:40:08 +0000 (06:40 -0600)]
utimens: introduce fdutimens

at-func.c wants the file name argument first.  This also paves the
way to add fdutimensat(dfd,name,fd,times,flag).

* lib/utimens.h (fdutimens): New prototype.
* lib/utimens.c (gl_futimens): Move guts...
(fdutimens): ...to new interface.
* tests/test-utimens.c (do_fdutimens): Use it.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: add UTIME_NOW and UTIME_OMIT support
Eric Blake [Wed, 7 Oct 2009 22:05:34 +0000 (16:05 -0600)]
utimens: add UTIME_NOW and UTIME_OMIT support

These flags make it possible to implement futimens and utimensat;
they also make touch(1) more efficient, by avoiding stat or
gettime if native utimensat works.

* lib/utimens.c (validate_timespec, update_timespec): New helper
functions.
(gl_futimens, lutimens): Use them.
* modules/utimens (Depends-on): Add gettime, lstat, stat-time,
stdbool, sys_stat.
(Link): Mention resulting library dependency.
* modules/utimecmp (Link): Likewise.
* modules/utimens-tests (Depends-on): Drop stat-time, stdbool.
(Makefile.am): Pick up library dependency.
* lib/sys_stat.in.h (UTIME_NOW, UTIME_OMIT): Guarantee a
definition.
* tests/test-sys_stat.c: Test the definitions.
* doc/posix-headers/sys_stat.texi (sys/stat.h): Document this.
* NEWS: Document library dependency.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimecmp: support symlink timestamps
Eric Blake [Thu, 8 Oct 2009 04:06:49 +0000 (22:06 -0600)]
utimecmp: support symlink timestamps

Update this module to reflect POSIX 2008:
With pathconf, we can avoid calling utimens.
With utimensat, the system resolution can be 1.
With lutimens, we can determine resolution on symlinks.

* lib/utimecmp.c (utimecmp): Use new interface.  Skip effort of
hashing when possible.  Use pathconf when available.
(SYSCALL_RESOLUTION): Recognize tighter resolution.
* modules/utimecmp (Depends-on): Add lstat.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: add lutimens interface
Eric Blake [Wed, 7 Oct 2009 19:36:45 +0000 (13:36 -0600)]
utimens: add lutimens interface

Wraps utimensat(,AT_SYMLINK_NOFOLLOW) or lutimes, when supported;
otherwise fail with ENOSYS.  Allows coreutils' copy.c to preserve
symlink timestamps on more systems.  Note that cygwin's lstat
changes atime of symlinks, but mtime can reliably be set.

* lib/utimens.c (lutimens): New function.
* m4/utimens.m4 (gl_UTIMENS): Check for lutimes.
* lib/utimens.h (lutimens): Declare new interface.
* tests/test-utimens.c (main): Enhance test.
* tests/test-lutimens.h (test_lutimens): New file.
* modules/utimens-tests (Files): Distribute it.
(Depends-on): Add symlink.
(configure.ac): Check for usleep.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: validate futimens usage
Eric Blake [Tue, 6 Oct 2009 18:23:32 +0000 (12:23 -0600)]
utimens: validate futimens usage

Using gl_futimens(fd,NULL,times) as an implementation for futimens
won't work unless we reliably detect EBADF for out-of-range fd.
Also catches a Linux bug with futimens(AT_FDCWD,NULL) changing ".".
mingw <utime.h> has a bug where utime's second argument is not const.

* lib/utimens.c (gl_futimens): Require valid fd up front, using
fewer syscalls on failure later on.  Avoid compiler warning on
mingw.
* modules/utimens (Depends-on): Add dup2.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: add test
Eric Blake [Wed, 7 Oct 2009 23:08:17 +0000 (17:08 -0600)]
utimens: add test

Exposes holes in our API, and several platform bugs.

* modules/utimens-tests: New test.
* tests/test-utimens.h: New file.
* tests/test-futimens.h: Likewise.
* tests/test-utimens.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodoc: mention timestamp portability issues
Eric Blake [Wed, 7 Oct 2009 17:58:54 +0000 (11:58 -0600)]
doc: mention timestamp portability issues

* doc/glibc-functions/lutimes.texi (lutimes): Refer to utimensat
instead.
* doc/posix-functions/utime.texi (utime): Likewise.
* doc/posix-functions/utimes.texi (utimes): Likewise.
* doc/glibc-functions/futimes.texi (futimes): Refer to futimens
instead.
* doc/posix-functions/futimens.texi (futimens): Mention utimens
module.
* doc/posix-functions/utimensat.texi (utimensat): Likewise.
Mention weakness with symlink timestamps.
* doc/glibc-functions/futimesat.texi (futimesat): New file; refer
to utimensat/futimens instead.
* doc/gnulib.texi (Glibc sys/time.h): Include new file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-dup2: enhance test
Eric Blake [Sat, 10 Oct 2009 13:06:22 +0000 (07:06 -0600)]
test-dup2: enhance test

AT_FDCWD is only supposed to be special in *at functions.

* tests/test-dup2.c (main): Also check AT_FDCWD.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-stat-time: avoid more spurious failures
Eric Blake [Sat, 10 Oct 2009 14:04:41 +0000 (08:04 -0600)]
test-stat-time: avoid more spurious failures

On xfs, although timestamps can have a full nanosecond resolution,
successive file actions appear to be quantized to approximately
10 millisecond windows.  Running with just 1 ms delays could
cause two actions to fall in the same window, leading to sporadic
failures on a fast enough machine.  Slow down to prevent this.

On ext2, timestamps only have 1 second resolution, but if the
first timestamp was made at 1.95 and the second at 2.10, then
the two files appear 1 second apart, and the shorter delay was
used, causing spurious failures.  Require that the observable
difference lie within the same second, using a second try if
necessary, to prevent this.

* tests/test-stat-time.c (nap): Wait for 15ms rather than 2ms, for
xfs; and avoid race if the two timestamps cross quantization edge.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorelocatable: prefer 'file system' over 'filesystem'
Eric Blake [Sat, 10 Oct 2009 01:17:38 +0000 (19:17 -0600)]
relocatable: prefer 'file system' over 'filesystem'

* m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Use AS_HELP_STRING.
(gl_RELOCATABLE_LIBRARY_BODY): Fix spelling.
* doc/relocatable-maint.texi (Supporting Relocation): Likewise.
* doc/relocatable.texi (Enabling Relocatability): Likewise.
* lib/relocatable.c (compute_curr_prefix): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agostat-time-tests: check for the usleep function
Jim Meyering [Sat, 10 Oct 2009 09:05:22 +0000 (11:05 +0200)]
stat-time-tests: check for the usleep function

* modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP.

14 years agoTypo in ChangeLog entry.
Bruno Haible [Sat, 10 Oct 2009 08:45:10 +0000 (10:45 +0200)]
Typo in ChangeLog entry.

14 years agoPut the Link section after the Include section.
Bruno Haible [Sat, 10 Oct 2009 08:43:21 +0000 (10:43 +0200)]
Put the Link section after the Include section.

14 years agodup2: work around FreeBSD 6.1 bug
Eric Blake [Sat, 10 Oct 2009 03:28:40 +0000 (21:28 -0600)]
dup2: work around FreeBSD 6.1 bug

dup2(1,1000000) needs to fail with EBADF (per POSIX), not
EMFILE, based on our usage of it in other modules.

* m4/dup2.m4 (gl_FUNC_DUP2): Detect bug.
* doc/posix-functions/dup2.texi (dup2): Document it.
Reported by Nelson H. F. Beebe and Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-stat-time: port to buggy NFS clients
Eric Blake [Sat, 10 Oct 2009 03:09:38 +0000 (21:09 -0600)]
test-stat-time: port to buggy NFS clients

On darwin, the NFS client reports mtime with st_sec==INT_MAX and
st_nsec monotonically increasing per transaction until the next
sync(); but sync() is expensive, so it is easier to just skip
this part of the test if mtime is nowhere near ctime.

* tests/test-stat-time.c (main) [W32]: Reduce ifdefs.
(test_ctime): Also skip test if mtime and ctime are skewed.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint: prefer 'file system' over 'filesystem'
Eric Blake [Sat, 10 Oct 2009 01:17:17 +0000 (19:17 -0600)]
maint: prefer 'file system' over 'filesystem'

* doc/posix-functions/fstatat.texi (fstatat): Likewise.
* doc/posix-functions/lstat.texi (lstat): Likewise.
* lib/file-has-acl.c (file_has_acl): Likewise.
* lib/fwriteerror.c [TEST]: Likewise.
* tests/test-areadlink.h (test_areadlink): Likewise.
* tests/test-areadlinkat-with-size.c (main): Likewise.
* tests/test-areadlinkat.c (main): Likewise.
* tests/test-canonicalize-lgpl.c (main): Likewise.
* tests/test-canonicalize.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-linkat.c (main): Likewise.
* tests/test-lstat.h (test_lstat_func): Likewise.
* tests/test-mkdir.h (test_mkdir): Likewise.
* tests/test-readlink.h (test_readlink): Likewise.
* tests/test-remove.c (main): Likewise.
* tests/test-rename.h (test_rename): Likewise.
* tests/test-renameat.c (main): Likewise.
* tests/test-rmdir.h (test_rmdir_func): Likewise.
* tests/test-symlink.h (test_symlink): Likewise.
* tests/test-symlinkat.c (main): Likewise.
* tests/test-unlink.h (test_unlink_func): Likewise.
* tests/test-unlinkat.c (main): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint: make realtime library usage explicit
Eric Blake [Fri, 9 Oct 2009 14:36:22 +0000 (08:36 -0600)]
maint: make realtime library usage explicit

Adding a Link section makes it easier to notice when it a module
may require edits to a user's Makefile.am.

* modules/gethrxtime (Link): Mention LIB_GETHRXTIME.
* modules/gettime (Link): Mention LIB_CLOCK_GETTIME.
* modules/settime (Link): Likewise.
* modules/xnanosleep (Link): Mention LIB_NANOSLEEP.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-stat-time: speed up execution
Eric Blake [Fri, 9 Oct 2009 17:55:46 +0000 (11:55 -0600)]
test-stat-time: speed up execution

Eight seconds was painfully long.

* tests/test-stat-time.c (test_ctime) [!W32]: Avoid compiler
warning on mingw.
(nap): New helper function.
(prepare_test): Use it to reduce sleep time.
(test_mtime, test_ctime, test_birthtime): Allow for subsecond
execution.
* modules/stat-time-tests (configure.ac): Check for usleep.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoselinux-h: always use getfilecon wrappers
Jim Meyering [Wed, 7 Oct 2009 17:00:42 +0000 (19:00 +0200)]
selinux-h: always use getfilecon wrappers

* lib/getfilecon.c: New file.
* lib/se-selinux.in.h: Use a better inclusion guard symbol name.
[HAVE_SELINUX_SELINUX_H]: Include-next <selinux/selinux.h>.
[!HAVE_SELINUX_SELINUX_H]: Use better parameter names.
(fgetfilecon): Provide a stub.
* m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Don't
AC_SUBST SELINUX_SELINUX_H, since now we're generating that
file unconditionally.
When <selinux/selinux.h> is found, arrange to use wrappers.
* modules/selinux-h (Files): Add getfilecon.c.
(Makefile.am): Substitute include-next-related bits
into the now-always-generated selinux/selinux.h file.
* doc/glibc-functions/getfilecon.texi: New file.
* doc/glibc-functions/lgetfilecon.texi: New file.
* doc/glibc-functions/fgetfilecon.texi: New file.
* doc/glibc-functions/getfilecon-desc.texi: New file.
* doc/gnulib.texi (Glibc selinux/selinux.h): New section, by
which to pull in the new files.
* MODULES.html.sh (Misc): Add selinux-h.

14 years agounistd: fix comment typo
Jim Meyering [Thu, 8 Oct 2009 16:25:39 +0000 (18:25 +0200)]
unistd: fix comment typo

* lib/unistd.in.h (euidaccess): Fix a comment typo.

14 years agoareadlink: use SIZE_MAX consistently
Eric Blake [Thu, 8 Oct 2009 16:09:05 +0000 (10:09 -0600)]
areadlink: use SIZE_MAX consistently

* modules/areadlink (Depends-on): Add stdint.
* modules/areadlink-with-size (Depends-on): Likewise.
* lib/areadlink-with-size.c (includes): Drop stdio, since stdlib
gives NULL; drop sys/types, since unistd gives size_t; and add
stdint for SIZE_MAX.
(SIZE_MAX): Rely on headers.
* lib/areadlinkat-with-size.c (includes): Drop stdio, sys/types,
and add stdint.
* lib/areadlink.c (includes): Drop sys/types, and add stdint.
(SIZE_MAX): Likewise.
(INITIAL_BUF_SIZE): Turn into enum.
* lib/areadlinkat.c (INITIAL_BUF_SIZE): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoautoupdate
Karl Berry [Thu, 8 Oct 2009 15:01:40 +0000 (08:01 -0700)]
autoupdate

14 years agoareadlinkat: avoid compilation failure
Jim Meyering [Thu, 8 Oct 2009 14:40:49 +0000 (16:40 +0200)]
areadlinkat: avoid compilation failure

* lib/areadlinkat.c: Include <stdint.h> for use of SIZE_MAX.
Fix typo in comment.

14 years agoareadlinkat-with-size: new module
Eric Blake [Wed, 7 Oct 2009 16:52:15 +0000 (10:52 -0600)]
areadlinkat-with-size: new module

* modules/areadlinkat-with-size: New module.
* lib/areadlinkat-with-size.c (areadlinkat_with_size): New file.
* lib/areadlink.h (areadlinkat): Declare it.
* MODULES.html.sh (File system functions): Mention it.
* modules/areadlinkat-with-size-tests: New test.
* tests/test-areadlinkat-with-size.c: New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoxreadlinkat: new module
Eric Blake [Wed, 7 Oct 2009 16:39:29 +0000 (10:39 -0600)]
xreadlinkat: new module

* modules/xreadlinkat: New module.
* lib/xreadlinkat.c (xreadlinkat): New file.
* lib/xreadlink.h (xreadlinkat): Declare it.
* MODULES.html.sh (File system functions): Mention it.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoareadlinkat: new module
Eric Blake [Wed, 7 Oct 2009 16:15:33 +0000 (10:15 -0600)]
areadlinkat: new module

* lib/at-func.c (FUNC_FAIL): New define.
(AT_FUNC_NAME, VALIDATE_FLAG): Use it rather than raw -1.
* modules/areadlinkat: New module.
* lib/linkat.c (areadlinkat): Move...
* lib/areadlinkat.c (areadlinkat): ...to new file.
* lib/areadlink.h (areadlinkat): Declare it.
* modules/linkat (Depends-on): Add areadlinkat.
* MODULES.html.sh (File system functions): Mention it.
* modules/areadlinkat-tests: New test.
* tests/test-areadlinkat.c: New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoareadlink, areadlink-with-size: add tests
Eric Blake [Wed, 7 Oct 2009 15:40:32 +0000 (09:40 -0600)]
areadlink, areadlink-with-size: add tests

* modules/areadlink-tests: New test.
* modules/areadlink-with-size-tests: Likewise.
* tests/test-areadlink.h: New file.
* tests/test-areadlink.c: Likewise.
* tests/test-areadlink-with-size.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint: minor cleanups
Eric Blake [Wed, 7 Oct 2009 20:49:38 +0000 (14:49 -0600)]
maint: minor cleanups

* lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed
_ATTRIBUTE_UNUSED instead.
* lib/getdate.y (ATTRIBUTE_UNUSED): Likewise.
* lib/utimens.c (ATTRIBUTE_UNUSED): Likewise.
* modules/linkat-tests (Files): Distribute test-link.h.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoopenat, utimens: whitespace cleanup
Eric Blake [Wed, 7 Oct 2009 14:17:36 +0000 (08:17 -0600)]
openat, utimens: whitespace cleanup

* lib/openat.c: Prefer space throughout, rather than mix of 8
spaces vs. tabs.
* lib/at-func.c: Likewise.
* lib/utimens.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoopenat: avoid using wrong fd
Eric Blake [Wed, 7 Oct 2009 12:56:52 +0000 (06:56 -0600)]
openat: avoid using wrong fd

Detected by a Solaris failure on:
int fd = dup (0);
close (fd);
mkdirat (fd, "dir", 0700);
which created "./dir" instead of failing with EBADF.

* lib/openat.c (openat_permissive): Reject user's fd if saving the
working directory chooses same fd.
* lib/at-func.c (AT_FUNC_NAME): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomkdir, mkdirat: fix cygwin 1.5.x bug
Eric Blake [Tue, 6 Oct 2009 22:08:46 +0000 (16:08 -0600)]
mkdir, mkdirat: fix cygwin 1.5.x bug

mkdir("dir/./",mode) mistakenly succeeded.

* lib/mkdir.c (rpl_mkdir) [FUNC_MKDIR_DOT_BUG]: Work around bug.
* m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Move...
* m4/mkdir.m4 (gl_FUNC_MKDIR): ...here, and add check for cygwin
bug.
(gl_PREREQ_MKDIR): Delete unused macro.
* modules/mkdir (Files): Track file rename.
(configure.ac): Update macro name.
* modules/openat (Depends-on): Add mkdir.
* doc/posix-functions/mkdir.texi (mkdir): Document the bug.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomkdir, mkdirat: add tests
Eric Blake [Tue, 6 Oct 2009 21:43:12 +0000 (15:43 -0600)]
mkdir, mkdirat: add tests

This test exposes failures on cygwin 1.5 and in our mkdirat emulation.

* modules/mkdir-tests: New test.
* tests/test-mkdir.h: New file.
* tests/test-mkdir.c: Likewise.
* tests/test-mkdirat.c: Likewise.
* modules/openat-tests (Files): Add new files.
(Makefile.am): Run new test.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodoc: tweak *at function documentation
Eric Blake [Tue, 6 Oct 2009 19:57:50 +0000 (13:57 -0600)]
doc: tweak *at function documentation

* doc/posix-functions/faccessat.texi (faccessat): Mention
known issue with replacement.
* doc/posix-functions/fchdir.texi (fchdir): Likewise.
* doc/posix-functions/linkat.texi (linkat): Likewise.
* doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
* doc/posix-functions/mknodat.texi (mknodat): Likewise.
* doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
* doc/posix-functions/renameat.texi (renameat): Likewise.
* doc/posix-functions/symlinkat.texi (symlinkat): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoopenat: fix GNU/Hurd bug in unlinkat
Eric Blake [Tue, 6 Oct 2009 18:03:58 +0000 (12:03 -0600)]
openat: fix GNU/Hurd bug in unlinkat

unlinkat(fd,"file/",0) mistakenly succeeded.

* m4/openat.m4 (gl_FUNC_OPENAT): Replace unlinkat if unlink is
broken.
* doc/posix-functions/unlink.texi (unlink): Document this.
* doc/posix-functions/unlinkat.texi (unlinkat): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agofdopendir: fix GNU/Hurd bug
Eric Blake [Tue, 6 Oct 2009 12:58:08 +0000 (06:58 -0600)]
fdopendir: fix GNU/Hurd bug

fdopendir(open("file",O_RDONLY)) mistakenly succeeded, with
subsequent readdir() failing with ENOTDIR.

* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in
allowing non-directory fds.
* lib/fdopendir.c (rpl_fdopendir): Work around it.
* m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
* modules/dirent (Makefile.am): Substitute it.
* lib/dirent.in.h (fdopendir): Declare replacement.
* doc/posix-functions/fdopendir.texi (fdopendir): Document this.
* tests/test-fdopendir.c (main): Test something other than
/dev/null, since on Hurd that behaves like a directory.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-symlink: port to GNU/Hurd
Eric Blake [Tue, 6 Oct 2009 13:09:13 +0000 (07:09 -0600)]
test-symlink: port to GNU/Hurd

* tests/test-symlink.h (test_symlink): Relax expected errno.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodoc: tweak more cygwin information
Eric Blake [Tue, 6 Oct 2009 19:58:06 +0000 (13:58 -0600)]
doc: tweak more cygwin information

* doc/glibc-headers/getopt.texi (getopt.h): Cygwin 1.7 getopt is
now compatible with glibc.
* doc/posix-functions/getopt.texi (getopt): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agogetopt-gnu: add another test
Eric Blake [Tue, 6 Oct 2009 20:29:13 +0000 (14:29 -0600)]
getopt-gnu: add another test

Ensure that POSIXLY_CORRECT does not interfere with optional argument
behavior; older BSD implementations botched this.

* tests/test-getopt_long.h (test_getopt_long_posix): New test, to
guarantee behavior relied on by m4.
* tests/test-getopt.c (main): Use it.
* modules/getopt-posix-tests (Depends-on): Add setenv.
See http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agogetopt: fix compilation on darwin
Eric Blake [Wed, 7 Oct 2009 02:44:13 +0000 (20:44 -0600)]
getopt: fix compilation on darwin

* lib/getopt.in.h (includes): Leave breadcrumbs during system
include.
* lib/unistd.in.h (getopt): Use them to avoid recursive include.
Reported by Ludovic Courtès.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoDiscourage the module 'size_max'.
Bruno Haible [Tue, 6 Oct 2009 21:48:47 +0000 (23:48 +0200)]
Discourage the module 'size_max'.

14 years agolinkat: avoid compilation failure
Jim Meyering [Tue, 6 Oct 2009 09:11:39 +0000 (11:11 +0200)]
linkat: avoid compilation failure

* lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.

14 years agolinkat: support Linux 2.6.17
Eric Blake [Tue, 6 Oct 2009 03:30:33 +0000 (21:30 -0600)]
linkat: support Linux 2.6.17

* m4/linkat.m4 (gl_FUNC_LINKAT): Default to always replacing
linkat on Linux, but allow cache variable override.
* lib/linkat.c (rpl_linkat): Define override.
* modules/linkat (Depends-on): Add symlinkat.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add new default.
* modules/unistd (Makefile.am): Substitute it.
* lib/unistd.in.h (linkat): Declare replacement.
Reported by Pádraig Brady.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoquotearg: port test to systems with C.UTF-8 locale
Eric Blake [Mon, 5 Oct 2009 23:17:34 +0000 (17:17 -0600)]
quotearg: port test to systems with C.UTF-8 locale

* tests/test-quotearg.c (struct result_strings): Add another
member, differentiating between C.ASCII and C.UTF-8 handling.
(compare_strings): Add parameter.
(main): Adjust all callers.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agogetopt: avoid clash with FreeBSD _getopt_internal
Eric Blake [Mon, 5 Oct 2009 20:34:25 +0000 (14:34 -0600)]
getopt: avoid clash with FreeBSD _getopt_internal

* lib/getopt.in.h (_getopt_internal): Override the name.
* lib/getopt_int.h (includes): Pick up any overrides.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agohash: allow C89 compilation
Eric Blake [Mon, 5 Oct 2009 19:52:28 +0000 (13:52 -0600)]
hash: allow C89 compilation

* lib/hash.c (check_tuning): Move declaration before statement.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoinclude execvpe.texi, so doc builds again
Karl Berry [Mon, 5 Oct 2009 13:36:16 +0000 (06:36 -0700)]
include execvpe.texi, so doc builds again

14 years agopush changelog for previous change
Paolo Bonzini [Sun, 4 Oct 2009 12:56:51 +0000 (14:56 +0200)]
push changelog for previous change

14 years agouname: Rewrite printing of Windows NT versions
Paolo Bonzini [Sun, 4 Oct 2009 10:24:28 +0000 (12:24 +0200)]
uname: Rewrite printing of Windows NT versions

* lib/uname.c (uname): Use a table-driver algorithm to compute
Windows NT versions.

14 years agoRemove the "lt-" prefix from program_invocation_short_name.
Bruno Haible [Sun, 4 Oct 2009 10:14:52 +0000 (12:14 +0200)]
Remove the "lt-" prefix from program_invocation_short_name.

14 years agoFix a misleading comment.
Bruno Haible [Sun, 4 Oct 2009 10:08:17 +0000 (12:08 +0200)]
Fix a misleading comment.

14 years agoDo only one call to GetVersionEx in the common case.
Bruno Haible [Sat, 3 Oct 2009 18:34:12 +0000 (20:34 +0200)]
Do only one call to GetVersionEx in the common case.

14 years agoAdd support for Windows CE and various non-x86 CPU types.
Paolo Bonzini [Sat, 3 Oct 2009 17:53:31 +0000 (19:53 +0200)]
Add support for Windows CE and various non-x86 CPU types.

14 years agoConditionally emit AM_PROG_CC_C_O invocation to tests/configure.ac.
Bruno Haible [Sat, 3 Oct 2009 16:13:38 +0000 (18:13 +0200)]
Conditionally emit AM_PROG_CC_C_O invocation to tests/configure.ac.

14 years agofchdir: avoid compiler warning
Eric Blake [Sat, 3 Oct 2009 04:32:45 +0000 (22:32 -0600)]
fchdir: avoid compiler warning

Using fchdir without canonicalize-lgpl gave a warning.

* lib/fchdir.c (canonicalize_file_name)
[!HAVE_CANONICALIZE_FILE_NAME]: Avoid compiler warning on mingw.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-open: support mingw errno values
Eric Blake [Sat, 3 Oct 2009 04:40:01 +0000 (22:40 -0600)]
test-open: support mingw errno values

mingw has non-standard errno values for handling directory opens,
but they weren't worth working around in the gnulib modules.

* tests/test-open.h (test_open): Relax test.
* tests/test-fopen.h (test_fopen): Likewise.
* tests/test-openat-safer.c (main): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoopen: fix opening directory on mingw
Eric Blake [Sat, 3 Oct 2009 04:41:54 +0000 (22:41 -0600)]
open: fix opening directory on mingw

open(".",O_WRONLY) used uninitialized memory to decide whether
to succeed or fail - never a good idea ;)

* lib/open.c (open) [REPLACE_OPEN_DIRECTORY]: Correct typo.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-open: on GNU/Hurd, /dev/null is a directory
Eric Blake [Sat, 3 Oct 2009 00:06:21 +0000 (18:06 -0600)]
test-open: on GNU/Hurd, /dev/null is a directory

* tests/test-fopen.h (main): Rename...
(test_fopen): ...to this.  Use a guaranteed non-directory when
confirming open behavior on trailing slash.
* tests/test-openat-safer.c (main): Likewise.
* tests/test-open.h (main): Likewise....
(test_open): ...to this.
* tests/test-fopen.c (main): Adjust caller.
* tests/test-fopen-safer.c (main): Likewise.
* tests/test-open.c (main): Likewise.
* tests/test-fcntl-safer.c (main): Likewise.
Reported by Samuel Thibault.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint: cleanup whitespace in recent commits
Eric Blake [Fri, 2 Oct 2009 19:47:43 +0000 (13:47 -0600)]
maint: cleanup whitespace in recent commits

* lib/fchdir.c (get_name): Remove tabs.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename, fchdir: don't ignore chdir failure
Eric Blake [Fri, 2 Oct 2009 18:05:02 +0000 (12:05 -0600)]
rename, fchdir: don't ignore chdir failure

Although we just checked that chdir(cwd) worked, there is a
race where it could disappear while we are temporarily away.
If that happens, forcefully give up rather than proceeding
in the wrong directory.

* lib/fchdir.c (get_name): Abort on unexpected chdir failure.
* lib/rename.c (rpl_rename) [W32]: Likewise.
(rpl_rename) [RENAME_DEST_EXISTS_BUG]: Avoid one case of losing
an empty destination directory if source cannot be renamed,
although there is still possibility for failure.
* doc/posix-functions/rename.texi (rename): Document the race.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint: cleanup whitespace in recent commits
Eric Blake [Fri, 2 Oct 2009 17:34:53 +0000 (11:34 -0600)]
maint: cleanup whitespace in recent commits

* lib/rename.c (rpl_rename): Remove tabs.
* tests/test-link.h (test_link): Likewise.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorelocatable-prog-wrapper: Add missing dependency on double-slash-root.
Ben Pfaff [Fri, 2 Oct 2009 16:18:16 +0000 (09:18 -0700)]
relocatable-prog-wrapper: Add missing dependency on double-slash-root.

14 years agorenameat: fix Solaris bugs
Eric Blake [Thu, 1 Oct 2009 21:31:32 +0000 (15:31 -0600)]
renameat: fix Solaris bugs

renameat(fd,"file",fd,"name/") failed, just like rename.

* m4/renameat.m4 (gl_FUNC_RENAMEAT): Replace renameat if rename
needed fixing.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): New witness.
* modules/stdio (Makefile.am): Substitute it.
* lib/stdio.in.h (renameat): Declare replacement.
* lib/renameat.c (rpl_renameat): Implement fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorenameat: new module
Eric Blake [Mon, 7 Sep 2009 12:45:59 +0000 (06:45 -0600)]
renameat: new module

Passes on Linux and cygwin 1.7 native renameat, and on systems
lacking renameat, but fails on Solaris 9 and 10 for now.

* modules/renameat: New file.
* lib/renameat.c (renameat): Likewise.
* m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
* modules/stdio (Makefile.am): Substitute them.
* lib/stdio.in.h (renameat): Declare it.
* MODULES.html.sh (systems lacking POSIX:2008): Mention module.
* doc/posix-functions/renameat.texi (renameat): Likewise.
* modules/renameat-tests: New test.
* tests/test-renameat.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename: fix mingw bugs
Eric Blake [Thu, 1 Oct 2009 22:46:08 +0000 (16:46 -0600)]
rename: fix mingw bugs

Copy various workarounds from cygwin 1.5: rename("dir/.","name"),
rename("dir","file"), rename("dir1","dir2").  Amazingly,
even though mingw stat() has no way to identify hard linked
files, and even though rename("hard1","hard2") destroys the
hard link, the lower-level MoveFileEx does the right thing!

* lib/rename.c (rpl_rename) [W32]: Fix trailing slash and
directory overwrite bugs.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename: fix another cygwin 1.5 bug
Eric Blake [Thu, 1 Oct 2009 17:57:47 +0000 (11:57 -0600)]
rename: fix another cygwin 1.5 bug

Cygwin 1.5 sometimes, but not always, failed on rename("dir1","dir2")
when "dir2" exists.  Beef up the m4 tests to more reliably
detect at least one of cygwin's bugs, in spite of not knowing
why the rename only failed sporadically (thankfully, cygwin 1.7
does not have the bug).  Meanwhile, although NetBSD needs to
share the hard link workarounds, it does not need the trailing
dot and directory workarounds, so split the m4 test into two
separate feature checks.

* m4/rename.m4 (gl_FUNC_RENAME): Split cygwin bugs into two
checks.
* lib/rename.c (rpl_rename): Don't penalize NetBSD with
unnecessary cygwin workarounds.  Also work around bug with moving
full directory onto an empty one.
* modules/rename (Depends-on): Add canonicalize-lgpl, rmdir.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename-dest-slash: merge into rename module
Eric Blake [Sat, 26 Sep 2009 21:18:13 +0000 (15:18 -0600)]
rename-dest-slash: merge into rename module

Tested that NetBSD workaround still passes unit test.

* modules/rename-dest-slash (Status): Mark obsolete.
(Depends-on): Add rename.
(Files): Let rename do it all.
* m4/rename.m4 (gl_FUNC_RENAME): Also test for NetBSD bugs,
subsuming the test from gl_FUNC_RENAME_TRAILING_DEST_SLASH...
* m4/rename-dest-slash.m4: ...so this file can be deleted.
* lib/rename-dest-slash.c (rpl_rename_dest_slash): Delete.
* lib/rename.c (rpl_rename): Update comments.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename: fix cygwin 1.5.x bugs
Eric Blake [Tue, 29 Sep 2009 22:42:59 +0000 (16:42 -0600)]
rename: fix cygwin 1.5.x bugs

On cygwin 1.5.x, rename("dir","file") mistakenly succeeded.
rename("hard1","hard2") mistakenly reduced the hard link count,
such that "hard1" disappears once "hard2" is unlinked.

* m4/rename.m4 (gl_FUNC_RENAME): Detect cygwin bugs.
* lib/rename.c (rpl_rename): Work around them.
* modules/rename (Depends-on): Add same-inode.

14 years agorename: fix Solaris 10 bug
Eric Blake [Thu, 1 Oct 2009 03:57:58 +0000 (21:57 -0600)]
rename: fix Solaris 10 bug

rename("file","name/") mistakenly succeeded.  But since Solaris 10
already obeys POSIX behavior on rename("link/","name"), we avoid
blindly forcing GNU behavior of rejecting symlinks with trailing slash.

* m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
* lib/rename.c (rpl_rename): Don't cripple POSIX behavior if this
was the only bug.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename: fix Solaris 9 bug
Eric Blake [Wed, 30 Sep 2009 22:19:00 +0000 (16:19 -0600)]
rename: fix Solaris 9 bug

rename("file/","oops") mistakenly succeeded.

* lib/rename.c (rpl_rename): Rewrite to recognize trailing slash
on non-directory.  Avoid calling exit.
* modules/rename (Depends-on): Drop xalloc; add lstat, stdbool,
strdup.
* modules/rename-tests (Depends-on): Drop lstat.
* m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
(gl_PREREQ_RENAME): Delete unused macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename-dest-slash: fix NetBSD bug
Eric Blake [Thu, 1 Oct 2009 00:57:02 +0000 (18:57 -0600)]
rename-dest-slash: fix NetBSD bug

rename("hard1","hard2") mistakenly removed the hard link "hard1".

* lib/rename-dest-slash.c (rpl_rename_dest_slash): Detect hard
links.
* modules/rename-dest-slash (Depends-on): Add same-inode.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agorename-tests: new test, exposes several platform bugs
Eric Blake [Sat, 26 Sep 2009 23:22:15 +0000 (17:22 -0600)]
rename-tests: new test, exposes several platform bugs

This test passes on GNU/Linux, OpenBSD, and Cygwin 1.7.
Elsewhere, this test fails because of at least these bugs:
Solaris 10, cygwin 1.5.x, and mingw all mistakenly succeed on
rename("file","other/").  Solaris 9 and the gnulib replacement
for SunOS 4.1 mistakenly succeed on rename("file/","other").
Cygwin 1.5.x and mingw mistakenly succeed on rename("dir","d/.").
Cygwin 1.5.x and NetBSD 1.6 (even with the gnulib replacement)
mistakenly reduce the link count on rename("hard1","hard2").

* modules/rename-tests: New file.
* tests/test-rename.h: Likewise.
* tests/test-rename.c: Likewise.
* doc/posix-functions/rename.texi (rename): Improve documentation,
including bugs that will eventually be fixed in gnulib.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoAssume version info is available.
Paolo Bonzini [Fri, 2 Oct 2009 11:22:24 +0000 (13:22 +0200)]
Assume version info is available.

14 years agognu-web-doc-update: correct --help output
Jim Meyering [Fri, 2 Oct 2009 10:31:38 +0000 (12:31 +0200)]
gnu-web-doc-update: correct --help output

* build-aux/gnu-web-doc-update: Make --help output relevant.

14 years agognu-web-doc-update: add standard options
Jim Meyering [Fri, 2 Oct 2009 10:05:03 +0000 (12:05 +0200)]
gnu-web-doc-update: add standard options

* build-aux/gnu-web-doc-update: Add --help, --version, etc.

14 years agognu-web-doc-update: New module.
Jim Meyering [Fri, 2 Oct 2009 09:03:48 +0000 (11:03 +0200)]
gnu-web-doc-update: New module.

Use this script to automatically update the on-line web documentation
for your GNU project at http://www.gnu.org/software/$pkg/manual/
* modules/gnu-web-doc-update: New file.
* build-aux/gnu-web-doc-update: New script, from coreutils.
* MODULES.html.sh (Support for maintaining and releasing projects):
Add gnu-web-doc-update.

14 years agolink: LoadLibrary is not needed.
Paolo Bonzini [Fri, 2 Oct 2009 01:04:16 +0000 (03:04 +0200)]
link: LoadLibrary is not needed.

* lib/link.c: Use GetModuleHandle.

14 years agogetopt: bump serial number
Eric Blake [Thu, 1 Oct 2009 12:18:46 +0000 (06:18 -0600)]
getopt: bump serial number

* m4/getopt.m4: Increment serial number, to account for 2009-09-24
change.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotests: tighten link, rmdir, and remove tests
Eric Blake [Tue, 29 Sep 2009 17:40:49 +0000 (11:40 -0600)]
tests: tighten link, rmdir, and remove tests

Catch cygwin bug where rmdir("a/./") failed but rmdir("a/.//")
succeeded.  Be kinder if a Solaris root user runs the test.

* tests/test-link.h (includes): No need to use <config.h> here.
Clean up if directory hard link was created, otherwise test for
trailing '.'.
* tests/test-linkat.c (main): Simplify.
* tests/test-remove.c (main): Enhance test for trailing '.'.
* tests/test-rmdir.h (test_rmdir_func): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint.mk: requiring "make major" was annoying, for a "minor" release.
Jim Meyering [Thu, 1 Oct 2009 08:09:30 +0000 (10:09 +0200)]
maint.mk: requiring "make major" was annoying, for a "minor" release.

What is intended is "stable", to contrast with alpha and beta,
so require "make stable", not "make major".
* build-aux/announce-gen (%valid_release_types): s/major/stable/.
(get_tool_versions): Likewise.
* top/maint.mk (ALL_RECURSIVE_TARGETS): s/major/stable/

14 years agoFix broken build of replacement for Windows tmpfile().
Ben Pfaff [Thu, 1 Oct 2009 04:35:14 +0000 (21:35 -0700)]
Fix broken build of replacement for Windows tmpfile().

14 years agoAvoid identifier clash with POSIX function 'remove' defined as a macro.
Bruno Haible [Mon, 28 Sep 2009 21:25:49 +0000 (23:25 +0200)]
Avoid identifier clash with POSIX function 'remove' defined as a macro.

14 years agodoc: mention yet more cygwin 1.7 status
Eric Blake [Sun, 27 Sep 2009 02:09:38 +0000 (20:09 -0600)]
doc: mention yet more cygwin 1.7 status

* doc/posix-functions/fexecve.texi (fexecve): Now implemented in
cygwin.
* doc/glibc-functions/execvpe.texi (execvpe): New file.
* doc/gnulib.texi (Glibc unistd.h): Mention it.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoargp: fix test failure
Eric Blake [Sun, 27 Sep 2009 03:32:14 +0000 (21:32 -0600)]
argp: fix test failure

* lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values
that are not upper-case.  Pass correct range to tolower.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-yesno: work around sparc-dash here-document infelicity
Jim Meyering [Sun, 27 Sep 2009 06:41:55 +0000 (08:41 +0200)]
test-yesno: work around sparc-dash here-document infelicity

Without this change, the literal \177 byte in a here document
would make dash 0.5.5.1-3 access uninitialized memory.
* tests/test-yesno.sh: Don't put the \177 byte in the here document.
Instead, use a marker, "@", and filter through tr to create the desired
contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.

14 years agoDisable untested support for new flavours of ACLs on AIX.
Bruno Haible [Sun, 27 Sep 2009 12:11:54 +0000 (14:11 +0200)]
Disable untested support for new flavours of ACLs on AIX.

14 years agoTypo in comment.
Bruno Haible [Sun, 27 Sep 2009 12:07:26 +0000 (14:07 +0200)]
Typo in comment.

14 years agoAdd support for new flavours of ACLs on AIX. (Untested.)
Bruno Haible [Sun, 27 Sep 2009 12:05:56 +0000 (14:05 +0200)]
Add support for new flavours of ACLs on AIX. (Untested.)

14 years agoargp: fix compilation of getopt
Eric Blake [Sat, 26 Sep 2009 22:28:24 +0000 (16:28 -0600)]
argp: fix compilation of getopt

* lib/getopt.in.h (includes): Use different guard than glibc.
Reported by Sergey Poznyakoff.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodoc: mention more cygwin 1.7 status
Eric Blake [Sat, 26 Sep 2009 15:39:17 +0000 (09:39 -0600)]
doc: mention more cygwin 1.7 status

* doc/posix-functions/access.texi (access): Mention cygwin 1.5
bug.
* doc/posix-functions/execl.texi (execl): Likewise.
* doc/posix-functions/execle.texi (execle): Likewise.
* doc/posix-functions/execlp.texi (execlp): Likewise.
* doc/posix-functions/execv.texi (execv): Likewise.
* doc/posix-functions/execve.texi (execve): Likewise.
* doc/posix-functions/execvp.texi (execvp): Likewise.
* doc/glibc-functions/canonicalize_file_name.texi
(canonicalize_file_name): Cygwin 1.7 now provides this.
* doc/glibc-functions/euidaccess.texi (euidaccess): Likewise.
* doc/posix-functions/fchmodat.texi (fchmodat): Mention limitation
on AT_SYMLINK_NOFOLLOW.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoautoupdate
Karl Berry [Fri, 25 Sep 2009 13:49:53 +0000 (06:49 -0700)]
autoupdate

14 years agotest-linkat: make test more robust
Eric Blake [Thu, 24 Sep 2009 22:49:49 +0000 (16:49 -0600)]
test-linkat: make test more robust

* tests/test-linkat.c (main): Avoid collision with EEXIST.

Signed-off-by: Eric Blake <ebb9@byu.net>