|
298d8b4a
|
2009-10-30T17:00:03
|
|
stat: fix compilation on AIX
AC_SYS_LARGEFILE turns on large-file support, but in that mode, AIX
provides only struct stat64, and not struct stat.
* lib/sys_stat.in.h (stat): Work with fact that large files on AIX
only see struct stat64.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
2c5cdd7e
|
2009-10-30T06:48:14
|
|
exclude: make more robust
* lib/exclude.c (excluded_file_name): Abort on unexpected value,
rather than masking a coding bug.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
b3602e85
|
2009-10-30T15:02:02
|
|
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Rather than putting #!/usr/bin/perl on the first line,
start with a variant of what's recommended by "man perlrun" that
invokes the first "perl" program from your shell's search path.
* build-aux/gitlog-to-changelog: Replace #!... as above.
Add a "Local Variables" perl mode setting.
Prompted by a patch from Ludovic Courtès.
Improved by Eric Blake.
* build-aux/useless-if-before-free: Likewise.
* build-aux/announce-gen: Likewise.
* build-aux/update-copyright: Likewise.
|
|
68b69830
|
2009-10-29T12:09:48
|
|
filenamecat-lgpl: adjust clients
at-func2 still needs xalloc_die because of openat-die, but this
change is still good to make.
* modules/linkat (Depends-on): Use filenamecat-lgpl, not
filenamecat.
* modules/renameat (Depends-on): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
b3338b63
|
2009-10-29T12:00:03
|
|
filenamecat: split into filenamecat-lgpl
The concept of filenamecat is simple enough to use in an LGPL
manner, even though current clients are GPL for other reasons.
At any rate, it is nice to separate mfile_name_concat into its
own file so that the linker does not fail without xalloc_die.
* modules/filenamecat-lgpl: New module.
* modules/filenamecat (Files): Move library-safe files into
filenamecat-lgpl.
(Depends-on): Add filenamecat-lgpl.
(configure.ac): Declare witness.
* lib/filenamecat.h (file_name_concat): Only declare when using
GPL module.
* lib/filenamecat.c (longest_relative_suffix, mfile_name_concat):
Move...
* lib/filenamecat-lgpl.c: ...into new file.
* m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): New macro.
(gl_FILE_NAME_CONCAT): Use it.
* MODULES.html.sh (File system functions): Mention new module.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
ce2d0d6e
|
2009-10-29T13:38:52
|
|
argp: avoid memory leak
argp has been leaking memory since commit 79c0a43, in Jul 2006.
* modules/argp (Depends-on): Use dirname-lgpl, not dirname.
* lib/argp-namefrob.h (__argp_base_name): Use last_component, not
base_name, since the latter malloc()s and can call exit().
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
90cff1db
|
2009-10-29T11:44:12
|
|
dirname-lgpl: adjust clients that don't need full dirname
Some of these modules still use xalloc_die from other paths, but
mkdir and rename are definitely reduced in complexity.
* modules/backupfile (Depends-on): Use dirname-lgpl, not dirname.
* modules/filenamecat (Depends-on): Likewise.
* modules/linkat (Depends-on): Likewise.
* modules/mkancesdirs (Depends-on): Likewise.
* modules/mkdir (Depends-on): Likewise.
* modules/openat (Depends-on): Likewise.
* modules/savewd (Depends-on): Likewise.
* modules/rename (Depends-on): Likewise.
(License): Relax license.
* modules/mkdir-tests (Depends-on): Drop progname.
(Makefile.am): Delete unneeded LDADD.
* modules/rename-tests (Depends-on, Makefile.am): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
48e0ba6d
|
2009-10-29T10:43:31
|
|
dirname: split into dirname-lgpl
dirname.h is proving quite useful from multiple LGPL modules,
given the number of trailing slash bugs fixed in syscalls;
only the calls to xalloc_die need to remain GPL.
* modules/dirname-lgpl: New module.
* modules/dirname (Files): Move library-safe files into
dirname-lgpl.
(Depends-on): Add dirname-lgpl.
(configure.ac): Declare witness.
* modules/double-slash-root (License): Relax license.
* lib/dirname.h (base_name, dir_name): Only declare when using GPL
module.
* lib/dirname.c (dir_len, mdir_name): Move...
* lib/dirname-lgpl.c: ...into new file.
* lib/basename.c (last_component, base_len): Move...
* lib/basename-lgpl.c: ...into new file.
* m4/dirname.m4 (gl_DIRNAME_LGPL): New macro.
(gl_DIRNAME): Use it.
* MODULES.html.sh (Enhancements for POSIX:2008 functions):
Mention new module.
* modules/dirname-tests (Depends-on): Add progname.
* tests/test-dirname.c (program_name): Delete.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
9c093736
|
2009-10-29T09:37:42
|
|
mkdir: make safe for libraries
xstrdup is too dangerous to use in a syscall replacement.
* modules/mkdir (Depends-on): Drop xalloc.
* lib/mkdir.c (rpl_mkdir): Fail with ENOMEM rather than calling
exit.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
b886ebac
|
2009-10-29T09:15:06
|
|
tests: avoid some compiler warnings
Mostly Simon's modules; warnings reported by gcc 4.3.4 on coreutils.
* tests/test-getaddrinfo.c (simple): Mark static, and allow string
literals.
* tests/test-memchr.c (main): Avoid type mismatch.
* tests/test-arpa_inet.c (main): Avoid unused parameters.
* tests/test-base64.c (main): Likewise.
* tests/test-getdelim.c (main): Likewise.
* tests/test-gethostname.c (main): Likewise.
* tests/test-getline.c (main): Likewise.
* tests/test-netinet_in.c (main): Likewise.
* tests/test-select.c (open_server_socket, main): Likewise.
* tests/test-select-stdin.c (main): Likewise.
* tests/test-sockets.c (main): Likewise.
* tests/test-strsignal.c (main): Likewise.
* tests/test-sys_select.c (main): Likewise.
* tests/test-sys_socket.c (main): Likewise.
* tests/test-u64.c (main): Likewise.
* tests/test-xfprintf-posix.c (main): Likewise.
* tests/test-xvasprintf.c (test_xvasprintf, main): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
c65dda0e
|
2009-10-29T08:47:22
|
|
sockets: avoid compiler warning
* lib/sockets.c (gl_sockets_startup): Mark unused parameter.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
975243c9
|
2009-10-29T07:29:26
|
|
maint: detect usage(1) and other suspicious exits
* top/maint.mk (sc_prohibit_magic_number_exit): New rule.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
02a5d9ca
|
2009-10-29T11:52:34
|
|
timespec: long-to-int truncation could make timespec_cmp malfunction
* lib/timespec.h (timespec_cmp): Do not interpret a difference of
a multiple of 2^32 nanoseconds as no difference.
|
|
739294f4
|
2009-10-28T11:25:29
|
|
fprintftime: wrap macro code argument in "do {...} while(0)"
* lib/strftime.c (cpy) [FPRINTFTIME]: The second argument to the
cpy macro must be a statement that can be followed by a semicolon.
Now that the else clause contains a comment and is hence longer
than one line, I require curly braces. That in turn requires
that we wrap this code block in the standard do...while(0).
|
|
8348e9cb
|
2009-10-28T11:07:31
|
|
fprintftime: remove stray semicolon from previous change
* lib/strftime.c (cpy) [FPRINTFTIME]: Remove trailing semicolon.
|
|
119ae551
|
2009-10-28T10:24:09
|
|
fprintftime: avoid a warning about ignored fwrite return value
* lib/strftime.c [FPRINTFTIME]: Include "ignore-value.h".
(cpy) [FPRINTFTIME]: Ignore fwrite failure, even though technically,
that is unsafe.
* modules/fprintftime (Depends-on): Add ignore-value.
|
|
57eaa650
|
2009-10-28T09:26:04
|
|
exclude: avoid an unwarranted warning
* lib/exclude.c (excluded_file_name): Initialize "rc" before switch.
|
|
5abb9c9c
|
2009-10-27T10:42:50
|
|
fseek: avoid compilation failure when fflush is replaced
./gnulib-tool --import fseek fwritable failed on Debian, due
to broken fflush() pulling in rpl_fseeko that mistakenly
overwrote fseek() as function-like macro.
* m4/fseek.m4 (gl_REPLACE_FSEEK): New macro.
* m4/fseeko.m4 (gl_REPLACE_FSEEKO): Also replace fseek, if fseek
module is in use.
* lib/stdio.in.h (GNULIB_FSEEKO): Only poison fseek if fseek
module is not in use; since REPLACE_FSEEK worked otherwise.
(GNULIB_FTELLO): Likewise for ftell.
Reported by Ian Beckwith and others.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
18f9c249
|
2009-10-28T01:22:40
|
|
Avoid a nearly redundant gcc warning.
|
|
97b954ff
|
2009-10-28T00:51:42
|
|
Avoid warning despite dropping the return value of fwrite.
|
|
185233aa
|
2009-10-26T21:41:21
|
|
areadlinkat: fix fallback path
* lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
pointer and zero.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
c910e6ce
|
2009-10-22T17:36:28
|
|
digests, copy-file: increase the IO buffer size from 4KiB to 32KiB
This results in a significant decrease in syscall overhead
giving a 3% speedup to the digest utilities for example
(when processing large files from cache).
Storage is moved from the stack to the heap as some
threaded environments for example can have small stacks.
* lib/copy-file.c (copy_file_preserving): Use a 32KiB malloced buffer
* modules/copy-file: Depend on xalloc
* lib/md2.c: Likewise
* lib/md4.c: Likewise
* lib/md5.c: Likewise
* lib/sha1.c: Likewise
* lib/sha256.c: Likewise
* lib/sha512.c: Likewise
|
|
82381b9e
|
2009-10-22T07:59:46
|
|
tests: avoid several compiler warnings
* tests/test-getcwd.c (main): Avoid buffer underflow.
* tests/test-getdate.c (main): String literals are not safe with
putenv, so use setenv. Declare unused argument.
* modules/getdate-tests (Depends-on): Add setenv.
* tests/test-argv-iter.c (main): Declare unused argument. Avoid
problems with string literals in char *.
* tests/test-hash.c (main): Avoid shadowing declaration.
(insert_new): Treat string literals as char const *.
* tests/test-getopt.h (test_getopt): Likewise.
(getopt_loop): Alter types to minimize casting elsewhere.
* tests/test-getopt_long.h (test_getopt_long, getopt_long_loop)
(test_getopt_long_posix): Likewise.
(do_getopt_long): Add wrapper to minimize casting.
* tests/test-atexit.c (clear_temp_file): Use void.
* tests/test-areadlink-with-size.c (main): Declare unused
arguments.
* tests/test-areadlink.c (main): 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-dirent-safer.c (main): Likewise.
* tests/test-dirname.c (main): Likewise.
* tests/test-dup2.c (main): Likewise.
* tests/test-fchdir.c (main): Likewise.
* tests/test-fcntl-h.c (main): Likewise.
* tests/test-fcntl-safer.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-fdutimensat.c (main): Likewise.
* tests/test-fflush.c (main): Likewise.
* tests/test-filenamecat.c (main): Likewise.
* tests/test-filevercmp.c (main): Likewise.
* tests/test-fopen-safer.c (main): Likewise.
* tests/test-fopen.c (main): Likewise.
* tests/test-fpending.c (main): Likewise.
* tests/test-fpurge.c (main): Likewise.
* tests/test-freading.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-fsync.c (main): Likewise.
* tests/test-futimens.c (main): Likewise.
* tests/test-getndelim2.c (main): Likewise.
* tests/test-gettimeofday.c (main): Likewise.
* tests/test-getopt.c (main): Likewise.
* tests/test-i-ring.c (main): Likewise.
* tests/test-inttypes.c (main): Likewise.
* tests/test-link.c (main): Likewise.
* tests/test-lstat.c (main): Likewise.
* tests/test-math.c (main): Likewise.
* tests/test-md5.c (main): Likewise.
* tests/test-memchr2.c (main): Likewise.
* tests/test-memrchr.c (main): Likewise.
* tests/test-mkdir.c (main): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-mkfifoat.c (main): Likewise.
* tests/test-open.c (main): Likewise.
* tests/test-openat-safer.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-quotearg.c (main): Likewise.
* tests/test-rawmemchr.c (main): Likewise.
* tests/test-readlink.c (main): Likewise.
* tests/test-remove.c (main): Likewise.
* tests/test-rename.c (main): Likewise.
* tests/test-renameat.c (main): Likewise.
* tests/test-rmdir.c (main): Likewise.
* tests/test-sha1.c (main): Likewise.
* tests/test-signal.c (main): Likewise.
* tests/test-sigaction.c (main): Likewise.
* tests/test-stat.c (main): Likewise.
* tests/test-stat-time.c (main): Likewise.
* tests/test-stddef.c (main): Likewise.
* tests/test-stdint.c (main): Likewise.
* tests/test-stdio.c (main): Likewise.
* tests/test-stdlib.c (main): Likewise.
* tests/test-strchrnul.c (main): Likewise.
* tests/test-strerror.c (main): Likewise.
* tests/test-string.c (main): Likewise.
* tests/test-strtod.c (main): Likewise.
* tests/test-strverscmp.c (main): Likewise.
* tests/test-symlink.c (main): Likewise.
* tests/test-symlinkat.c (main): Likewise.
* tests/test-sys_stat.c (main): Likewise.
* tests/test-sys_time.c (main): Likewise.
* tests/test-time.c (main): Likewise.
* tests/test-unistd.c (main): Likewise.
* tests/test-unlink.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-utimens.c (main): Likewise.
* tests/test-utimensat.c (main): Likewise.
* tests/test-version-etc.c (main): Likewise.
* tests/test-wchar.c (main): Likewise.
* tests/test-wctype.c (main): Likewise.
* tests/test-xprintf-posix.c (main): Likewise.
* tests/test-posixtm.c (main): Likewise.
(STREQ): Delete unused macro.
* tests/test-linkat.c (main): Declare unused arguments. Avoid
shadowed variables.
* tests/test-memchr.c (main): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
447ce743
|
2009-10-21T21:01:41
|
|
areadlinkat: avoid failure on older glibc
Acting on /proc/self/-1/name gives ENOTDIR. at-func normally falls
back to fchdir, which discovers the real problem of invalid fd and
changes to EBADF; but for areadlinkat, it mistakenly short-circuited
when FUNC_FAIL was NULL (since 0<=(char*)result is always true).
* lib/at-func.c (AT_FUNC_NAME): Check for explicit FUNC_FAIL,
rather than mis-comparing 0 against FUNC_RESULT of char*.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
4bb09526
|
2009-10-22T02:00:21
|
|
Relicense stpncpy under LGPLv2+.
|
|
8c871c07
|
2009-10-20T16:47:36
|
|
utimensat: work around Solaris 9 bug
utimes("file/",times) mistakenly succeeds. This commit doesn't fix
utimes, but does make utimensat be careful before calling utimes.
The test is now enhanced to test trailing slashes and directories.
Meanwhile, cygwin 1.5 stat() on a directory changes atime (it does
a readdir under the hood to populate st_nlink), so only mtime of
a directory is reliable enough for testing. Cygwin 1.7 no longer
has this problem, because it no longer wastes time on st_nlink.
* lib/utimens.c (fdutimens, lutimens): Force a stat if platform
has trailing slash bugs.
* tests/test-lutimens.h (test_lutimens): Enhance test.
* tests/test-utimens.h (test_utimens): Likewise.
* doc/posix-functions/utime.texi (utime): Document the bug.
* doc/posix-functions/utimes.texi (utimes): Likewise.
* doc/posix-functions/utimensat.texi (utimensat): Likewise.
* doc/glibc-functions/futimesat.texi (futimesat): Likewise.
* doc/glibc-functions/lutimes.texi (lutimes): Mention utimens.
* doc/posix-functions/futimens.texi (futimens): Mention
limitation.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
06b8c126
|
2009-10-20T06:09:29
|
|
fdutimensat: new module
Needed for coreutils copy.c to be rewritten to use fts.
* modules/fdutimensat: New file.
* lib/fdutimensat.c (fdutimensat): Likewise.
* lib/utimens.h (fdutimensat, lutimensat): Declare new functions.
* MODULES.html.sh (File system functions): Mention module.
* modules/fdutimensat-tests: New test.
* tests/test-fdutimensat.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
e94df9f0
|
2009-10-20T20:27:20
|
|
doc: regenerate INSTALL
* doc/INSTALL: Reflect recent autoconf update.
* doc/INSTALL.ISO: Likewise.
* doc/INSTALL.UTF-8: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
69ff0e19
|
2009-10-20T08:04:10
|
|
ChangeLog syntax: use TAB, not a sequence of leading spaces
|
|
ab362e82
|
2009-10-19T10:10:05
|
|
acl: warn if ACL support is not detected
* m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found.
|
|
b156173b
|
2009-10-19T06:47:23
|
|
autoupdate
|
|
7a73c537
|
2009-10-19T11:43:54
|
|
users.txt: add myserver
* users.txt: Add myserver.
|
|
cea50d69
|
2009-10-19T09:30:13
|
|
Add extern "C" block for C++.
|
|
f7f4cd99
|
2009-10-18T21:49:38
|
|
Document the alternative APIs for character classification.
|
|
3602dc4b
|
2009-10-18T21:17:38
|
|
Tests for module 'isblank'.
|
|
4b41e9b7
|
2009-10-18T21:16:44
|
|
New module 'isblank'.
|
|
0d976c6e
|
2009-10-18T21:12:31
|
|
New module 'ctype'.
|
|
6cb63a97
|
2009-10-18T18:53:35
|
|
m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
right after its initialization, rather than farther down.
Keeping these in close proximity makes it easier to ensure
that each such variable is initialized. E.g.,
LIB_CLOCK_GETTIME=
AC_SUBST([LIB_CLOCK_GETTIME])
This change also increments these serial numbers.
* m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
|
|
13de2c6f
|
2009-10-18T18:19:22
|
|
Don't let environment variables perturb build.
* m4/gethrxtime.m4 (gl_GETHRXTIME): Initialize LIB_GETHRXTIME here...
(gl_PREREQ_GETHRXTIME): ... not here.
|
|
b06da86e
|
2009-10-18T16:58:39
|
|
Avoid symlink attack in localcharset module.
|
|
fe8e9df2
|
2009-10-18T11:22:22
|
|
Implement nproc for mingw.
|
|
c1c31499
|
2009-10-18T10:56:30
|
|
Implement nproc for IRIX.
|
|
2ea759e2
|
2009-10-18T10:42:19
|
|
Implement nproc for HP-UX.
|
|
e841c33e
|
2009-10-18T10:13:58
|
|
Implement nproc for NetBSD, OpenBSD.
|
|
bb0465fc
|
2009-10-18T10:00:29
|
|
Fix recognition of sys/sysctl.h on OpenBSD 4.0.
|
|
791cc509
|
2009-10-12T16:48:57
|
|
utimensat: new module
Provide utimensat where it is missing, and rpl_utimensat to work
around ENOSYS and EINVAL bugs in older Linux kernels.
* modules/utimensat: New file.
* lib/utimensat.c (utimensat): Likewise.
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
* lib/utimens.c (utimensat): Avoid recursion into rpl_utimensat,
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 (utimensat): Declare it.
* MODULES.html.sh (systems lacking POSIX:2008): Mention module.
* doc/posix-functions/utimensat.texi (utimensat): Likewise.
* modules/utimensat-tests: New test.
* tests/test-utimensat.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
0c278290
|
2009-10-15T12:04:57
|
|
utimens: let lutimens work on non-symlinks
Coreutils new 'touch -h' is easier to write if we guarantee POSIX
semantics of utimensat(fd,"file",NULL,AT_SYMLINK_NOFOLLOW), rather
than blindly failing with ENOSYS even on non-symlinks.
* lib/utimens.c (lutimens): Fall back to utimens rather than
failing with ENOSYS, when file is not a symlink.
(utimens): Reduce redirection.
* tests/test-lutimens.h (test_lutimens): Update test to cover
non-symlinks.
* tests/test-utimens.h (test_utimens): Update test to cover
symlinks.
* tests/test-utimens.c (main): Update caller.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
c1572a88
|
2009-10-12T14:56:22
|
|
utimens: cache whether utimensat syscall works
No need to repeatedly try utimensat on older Linux kernel.
* lib/utimens.c (utimensat_works_really): New cache variable.
(fdutimens, lutimens): Use it to avoid failing syscall.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
4d8f2295
|
2009-10-12T10:42:35
|
|
test-stat-time, test-utimens: improve portability
ext4 on an alpha system has a quantization of about 10 ms but
a resolution of 1ns; utimecmp does not know about quantization,
so tests were failing when comparing timestamps that fall
within the same quantization window. Add strategic usleeps
throughout to minimize this issue, whether or not we later
improve utimecmp to account for quantization.
Windows (and hence cygwin) is documented as having a default
clock quantization of 15.25 milliseconds (although it can be
reduced to 1 millisecond); file timestamps are quantized to this
boundary even though more accurate timing can be obtained.
However, this means that 15 milliseconds is too short for any
test that wants to guarantee crossing a file timestamp boundary.
Cygwin, however, still has bugs where clock_gettime can lag
behind file timestamps, which is not fixed by this patch.
Solaris 9 with NFS exposed the same problem for futimes that was
previously fixed for utimes on Solaris 8, where futimens(f,NULL)
uses a different time source than futimes(,{,UTIME_NOW}).
* tests/test-stat-time.c (nap): Lengthen delay to 20ms, for
ext4 on alpha, and for cygwin.
* tests/test-utimens-common.h: New file.
(nap): Factor delays into single function.
* tests/test-lutimens.h (test_lutimens): Use new header.
* tests/test-futimens.h (test_futimens): Likewise.
* tests/test-utimens.h (test_utimens): Likewise. Also, force NFS
timestamps to occur from same machine, as was done previously for
test_utimens.
* modules/utimens-tests (Files): Ship new file.
* modules/futimens-tests (Files): Likewise.
Reported in part by Jim Meyering.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
8cb4edaa
|
2009-10-12T15:33:30
|
|
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>
|
|
2d437590
|
2009-10-15T21:04:51
|
|
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.
|
|
1506e414
|
2009-10-13T09:25:30
|
|
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>
|
|
20bdd2f4
|
2009-10-13T09:16:16
|
|
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>
|
|
0f24cad0
|
2009-10-13T09:15:52
|
|
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.
|
|
420f3dbb
|
2009-10-12T10:42:35
|
|
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>
|
|
17090f6d
|
2009-10-12T10:37:48
|
|
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>
|
|
4754ac9d
|
2009-10-12T10:36:33
|
|
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>
|
|
959d9cb4
|
2009-10-09T16:05:19
|
|
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>
|
|
aba35168
|
2009-10-08T06:40:08
|
|
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>
|
|
080cbfca
|
2009-10-07T16:05:34
|
|
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>
|
|
4a060c0d
|
2009-10-07T22:06:49
|
|
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>
|
|
2726b8f4
|
2009-10-07T13:36:45
|
|
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>
|
|
d71f5056
|
2009-10-06T12:23:32
|
|
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>
|
|
30dc6636
|
2009-10-07T17:08:17
|
|
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>
|
|
75de3afe
|
2009-10-07T11:58:54
|
|
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>
|
|
b2fb3b5d
|
2009-10-10T07:06:22
|
|
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>
|
|
3776abf8
|
2009-10-10T08:04:41
|
|
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>
|
|
d93391bf
|
2009-10-09T19:17:38
|
|
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>
|
|
fd35e151
|
2009-10-10T11:05:22
|
|
stat-time-tests: check for the usleep function
* modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP.
|
|
e1aaa1ba
|
2009-10-10T10:45:10
|
|
Typo in ChangeLog entry.
|
|
005ce790
|
2009-10-10T10:43:21
|
|
Put the Link section after the Include section.
|
|
b5b8e4ac
|
2009-10-09T21:28:40
|
|
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>
|
|
f9f3206e
|
2009-10-09T21:09:38
|
|
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>
|
|
231bdaf6
|
2009-10-09T19:17:17
|
|
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>
|
|
0dc2838b
|
2009-10-09T08:36:22
|
|
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>
|
|
4e42b89b
|
2009-10-09T11:55:46
|
|
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>
|
|
f4dc8062
|
2009-10-07T19:00:42
|
|
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.
|
|
d984c0bc
|
2009-10-08T18:25:39
|
|
unistd: fix comment typo
* lib/unistd.in.h (euidaccess): Fix a comment typo.
|
|
2ee3ac7f
|
2009-10-08T10:09:05
|
|
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>
|
|
fd67d661
|
2009-10-08T08:01:40
|
|
autoupdate
|
|
01b49fe4
|
2009-10-08T16:40:49
|
|
areadlinkat: avoid compilation failure
* lib/areadlinkat.c: Include <stdint.h> for use of SIZE_MAX.
Fix typo in comment.
|
|
daa06b99
|
2009-10-07T10:52:15
|
|
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>
|
|
25148dfa
|
2009-10-07T10:39:29
|
|
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>
|
|
9d145640
|
2009-10-07T10:15:33
|
|
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>
|
|
87e03169
|
2009-10-07T09:40:32
|
|
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>
|
|
35335a0a
|
2009-10-07T14:49:38
|
|
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>
|
|
4563696d
|
2009-10-07T08:17:36
|
|
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>
|
|
100bccc4
|
2009-10-07T06:56:52
|
|
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>
|
|
cb7317d7
|
2009-10-06T16:08:46
|
|
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>
|
|
da8f2a56
|
2009-10-06T15:43:12
|
|
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>
|
|
396ef4ef
|
2009-10-06T13:57:50
|
|
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>
|
|
3cfa8707
|
2009-10-06T12:03:58
|
|
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>
|
|
dfbec8be
|
2009-10-06T06:58:08
|
|
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>
|
|
48b0feac
|
2009-10-06T07:09:13
|
|
test-symlink: port to GNU/Hurd
* tests/test-symlink.h (test_symlink): Relax expected errno.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
b46dd7ed
|
2009-10-06T13:58:06
|
|
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>
|
|
497ec25b
|
2009-10-06T14:29:13
|
|
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>
|
|
09e22b5a
|
2009-10-06T20:44:13
|
|
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>
|
|
3d4be5be
|
2009-10-06T23:48:47
|
|
Discourage the module 'size_max'.
|
|
6f6420cc
|
2009-10-06T11:11:39
|
|
linkat: avoid compilation failure
* lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.
|
|
cdba659e
|
2009-10-05T21:30:33
|
|
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>
|