X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ChangeLog;h=528a59f592e45489dca745d063d6d228ef9c23c1;hb=4a54e50009b89eb38f8733af018abd474127d828;hp=48defa33f1efa16a4fcf9439c28dd6fcd9e3e502;hpb=6ca71ffe395184749d849f5bba4771d6b2fbb7d6;p=gnulib.git diff --git a/ChangeLog b/ChangeLog index 48defa33f..528a59f59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,1955 @@ +2009-11-19 Eric Blake + + manywarnings: depend on warnings + * modules/manywarnings (Depends-on): Add warnings. + + build: avoid compiler warnings + * lib/select.c (rpl_select): Delete unused variable. + * lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer. + +2009-11-18 Eric Blake + + tests: avoid false negative with --with-packager + * tests/test-version-etc.sh: Discard packager information. + * tests/test-argp-version-etc-1.sh: Likewise. + Reported by Mike Frysinger. + + utimens: fix regression on Solaris + * m4/utimens.m4 (gl_UTIMENS): Check for BSD bug. + * lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10 + can only change fd timestamps via futimesat. Instead, use an + additional witness macro to avoid BSD bug. + Reported by Jim Meyering. + +2009-11-17 Simon Josefsson + + * gnulib-tool: Support LGPLv3+ licenses in module files. Tiny + patch from ludo@gnu.org (Ludovic Courtès). + +2009-11-17 Jim Meyering + + version-etc: use proper license string + * modules/version-etc (License): Use LGPL, not LGPLv3+. + * modules/version-etc-fsf: Likewise. + +2009-11-17 Jim Meyering + + version-etc-fsf: relax license to LGPLv3+ + * modules/version-etc-fsf (License): Relax license. + +2009-11-16 Jim Meyering + + version-etc: relax license to LGPLv3+ + * modules/version-etc (License): Relax license. + + better AC_REQUIRE expanded-before-required-warning avoidance + * m4/chown.m4 (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Define + with AC_DEFUN_ONCE, rather than AC_DEFUN, to avoid AC_REQUIRE warnings. + Suggested by Eric Blake. This change also reverts commit 1b712ba8, + which is no longer needed. + +2009-11-16 Jim Meyering + + avoid new AC_REQUIRE expanded-before-required warnings + * modules/chown (configure.ac): Require gl_FUNC_CHOWN, rather than + merely using it. + * modules/euidaccess (configure.ac): Likewise for gl_FUNC_EUIDACCESS. + * modules/faccessat (configure.ac): Likewise for gl_FUNC_FACCESSAT. + +2009-11-15 Simon Josefsson + + * lib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898. Reported + by Vladimir 'phcoder' Serbinenko . + +2009-11-14 Eric Blake + + fnmatch: avoid compiler warning + * lib/fnmatch_loop.c (NEW_PATTERN): Coerce addition to unsigned, + to silence compiler warning about mismatch signedness in ?:. + Reported by Robert Millan. + +2009-11-14 Robert Millan (tiny change) + + gnulib-tool: correctly detect absence of m4 directories + * gnulib-tool: Avoid extra newline on data passed to wc -l. + +2009-11-14 John W. Eaton + + strftime.h: wrap funtion declaration in extern "C" block + * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration. + +2009-11-13 Eric Blake + + getgroups: avoid compiler warning + * lib/getgroups.c (rpl_getgroups): Delete shadowed variable. + + getgroups: work around FreeBSD bug + * lib/getgroups.c (rpl_getgroups): Work around the bug. + * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Detect the bug. + * doc/posix-functions/getgroups.texi (getgroups): Document it. + * tests/test-getgroups.c (main): Fix buffer overrun. + + getgroups: avoid compilation failure + * lib/getgroups.c (includes): Include for SIZE_MAX. + * modules/getgroups (Depends-on): Add stdint. + +2009-11-13 Jim Meyering + + test-getgroups: avoid compilation failure + * tests/test-getgroups.c: Include for use of SIZE_MAX. + +2009-11-13 Eric Blake + + getgroups, getugroups: provide stubs for mingw + * lib/getgroups.c (getgroups): Provide ENOSYS stub for mingw. + * lib/getugroups.c (getugroups): Likewise. + * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Check for missing + function. Modernize replacement scheme. + (gl_PREREQ_GETGROUPS): Delete. + * m4/getugroups.m4 (gl_GETUGROUPS): Check for . + * modules/getgroups (configure.ac): Declare witness. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default. + * modules/unistd (Depends-on): Substitute witness. + * lib/unistd.in.h (getgroups): Declare replacement. + + getgroups: avoid calling exit + * modules/getgroups (Depends-on): Add malloc-posix and unistd, + drop xalloc. + * modules/getgroups-tests (Depends-on, Makefile.am): Drop unneeded + dependencies. + * lib/getgroups.c (rpl_getgroups): Fail with ENOMEM rather than + exiting, in the rare case of malloc failure. + + getgroups: fix logic error + * lib/getgroups.c (rpl_getgroups): Don't fail if current process + has more than 20 groups. + * modules/getgroups-tests: New test. + * tests/test-getgroups.c: New file. + +2009-11-10 Kamil Dudka + + fts: do not fail on a submount during traversal + * lib/fts.c (fts_build): Read the stat info again after opening + a directory if the FTS_TIGHT_CYCLE_CHECK flag is set. + Original report at http://bugzilla.redhat.com/501848. + +2009-11-12 Jim Meyering + + bootstrap: generalize autoheader check + * build-aux/bootstrap: Look for AC_CONFIG_HEADER as well as + AC_CONFIG_HEADERS. + +2009-11-11 Eric Blake + + readlink: detect FreeBSD bug + * m4/readlink.m4 (gl_FUNC_READLINK): Also detect FreeBSD bug with + slash on symlink. + * doc/posix-functions/readlink.texi (readlink): Document the bug. + * tests/test-readlink.h (test_readlink): Enhance test. + + symlink: detect FreeBSD bug + * m4/symlink.m4 (gl_FUNC_SYMLINK): Also detect FreeBSD bug with + slash on symlink. + * doc/posix-functions/symlink.texi (symlink): Document the bug. + * tests/test-symlink.h (test_symlink): Enhance test. + +2009-11-10 Eric Blake + + link: detect FreeBSD bug + * m4/link.m4 (gl_FUNC_LINK): Also detect FreeBSD bug with slash on + symlink. + * doc/posix-functions/link.texi (link): Document the bug. + * tests/test-link.h (test_link): Enhance test. + * tests/test-linkat.c (main): Update caller. + + unlink, remove: detect FreeBSD bug + * m4/unlink.m4 (gl_FUNC_UNLINK): Also detect FreeBSD bug with + slash on symlink. + * doc/posix-functions/unlink.texi (unlink): Document the bug. + * doc/posix-functions/remove.texi (remove): Likewise. + * tests/test-unlink.h (test_unlink): Enhance test. + * tests/test-remove.c (main): Likewise. + +2009-11-09 Eric Blake + + rename: detect FreeBSD bug + * m4/rename.m4 (gl_FUNC_RENAME): Also detect FreeBSD bug with + slash on symlink. + * modules/renameat-tests (Depends-on): Add filenamecat. + * tests/test-rename.h (test_rename): Allow one more errno. + * tests/test-renameat.c (main): Likewise. + * doc/posix-functions/rename.texi (rename): Document the bug. + + open: detect FreeBSD bug + * m4/open.m4 (gl_FUNC_OPEN): Also detect FreeBSD bug with slash on + symlink. + * doc/posix-functions/open.texi (open): Document the bug. + * doc/posix-functions/utimes.texi (utimes): Likewise. + * tests/test-open.h (test_open): Add parameters, and test symlink + handling. + * tests/test-open.c (main): Adjust caller. + * tests/test-fcntl-safer.c (main): Likewise. + * modules/open-tests (Depends-on): Add stdbool, symlink. + * modules/fcntl-safer-tests (Depends-on): Likewise. + * tests/test-openat.c (main): Add test-open tests. + + stat: detect FreeBSD bug + * m4/stat.m4 (gl_FUNC_STAT): Also detect FreeBSD bug with slash on + symlink. + * doc/posix-functions/stat.texi (stat): Document the bug. + * tests/test-stat.h (test_stat_func): Add argument. + * tests/test-stat.c (main): Adjust caller. + * tests/test-fstatat.c (main): Likewise. + * modules/stat-tests (Depends-on): Add stdbool, symlink. + Reported by Jim Meyering. + +2009-11-09 James Youngman + + strftime.c: include ignore-value.h only when FPRINTFTIME is defined + * lib/strftime.c: Correct placement of #include "ignore-value.h". + +2009-11-08 Jim Meyering + + utimens: remove invalid futimesat call + * lib/utimens.c (fdutimens): Remove invalid futimesat call. + It used the file descriptor of the target file as the DIR_FD + parameter and NULL as the file name. That caused failure with + errno == EFAULT on FreeBSD-8.0-rc2 + +2009-11-07 Eric Blake + + fflush, freadseek: use fseeko, not fseek + * lib/fflush.c (clear_ungetc_buffer_preserving_position) + (clear_ungetc_buffer): Avoid potential problems on large files. + * lib/freadseek.c (freadseek): Likewise. + * modules/freadseek (Depends-on): Add fseeko. + * modules/fseek (configure.ac): Set a witness. + * tests/test-fflush.c (main): Use fseeko. + * tests/test-fpurge.c (fseek): Disable link warning. + * tests/test-freadable.c (fseek): Likewise. + * tests/test-freading.c (fseek): Likewise. + * tests/test-fseeko.c (fseek): Likewise. + * tests/test-ftell.c (fseek): Likewise. + * tests/test-ftello.c (fseek): Likewise. + * tests/test-fwritable.c (fseek): Likewise. + * tests/test-fwriting.c (fseek): Likewise. + +2009-11-06 Simon Josefsson + + * modules/memchr (Depends-on): Drop getpagesize dependency. + +2009-11-06 Simon Josefsson + + * build-aux/pmccabe2html: Disable execute bit. Suggested by + Reported by Ludovic Courtès. + * build-aux/pmccabe2html: Improve example usage. + * build-aux/pmccabe2html: Drop #! header. Doc fix. + +2009-11-06 Jim Meyering + + do-release-commit-and-tag: New module. + Automate the release-commit and tag process. + * build-aux/do-release-commit-and-tag: New script, from coreutils. + * modules/do-release-commit-and-tag: New file. + * MODULES.html.sh (Support for maintaining and releasing): Add it. + +2009-11-06 Simon Josefsson + + * modules/select-tests (test_select_LDADD): Add $(INET_PTON_LIB) + because test-select.c uses inet_pton. + +2009-11-06 Simon Josefsson + + * m4/getaddrinfo.m4: Add content of INET_NTOP_LIB to + GETADDRINFO_LIB. Bump serial number. + * modules/getaddrinfo (Link): Only mention GETADDRINFO_LIB again. + Suggested by Eric Blake . + +2009-11-05 Eric Blake + + strtod: detect darwin bug + * m4/strtod.m4 (gl_FUNC_STRTOD): Filter out darwin bug on "nan(". + Reported by Leo Davis. + + freopen-safer: new module + * modules/freopen-safer: New module. + * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): New macro. + * lib/freopen-safer.c (freopen_safer): New file. + * lib/stdio-safer.h (freopen_safer): New declaration. + * lib/stdio--.h (freopen): New override. + * MODULES.html.sh (File stream based Input/Output): Mention it. + * doc/posix-functions/freopen.texi (freopen): Mention pitfalls and + freopen-safer module. + * doc/posix-functions/stderr.texi (stderr): Likewise. + * doc/posix-functions/stdin.texi (stdin): Likewise. + * doc/posix-functions/stdout.texi (stdout): Likewise. + * modules/freopen-safer-tests: New test. + * tests/test-reopen-safer.c: New file. + +2009-11-05 Jim Meyering + + maint.mk: Prohibit inclusion of "close-stream.h" without use. + * top/maint.mk (sc_prohibit_close_stream_without_use): New rule. + +2009-11-05 Simon Josefsson + + * modules/pmccabe2html (configure.ac): Check for pmccabe tool. + +2009-11-05 Simon Josefsson + + * modules/getaddrinfo (Link): Add $(INET_NTOP_LIB). + +2009-11-05 Simon Josefsson + + Fix link error. + * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result. + * m4/inet_pton.m4 (gl_INET_PTON): Likewise. + +2009-11-05 Simon Josefsson + + * tests/test-func.c: Also test value of __func__. + +2009-11-05 Simon Josefsson + + * tests/test-sys_socket.c: Use smaller constant value, sa_family_t + may be an 8-bit type. Reported by Bruno Haible . + +2009-11-05 Bruno Haible + + Fix link error. + * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result. + * m4/inet_pton.m4 (gl_INET_PTON): Likewise. + Reported by Brad Hards via Simon Josefsson. + +2009-11-05 Bruno Haible + + Tests for module 'inet_pton'. + * modules/inet_pton-tests: New file. + * tests/test-inet_pton.c: New file. + +2009-11-05 Bruno Haible + + Tests for module 'inet_ntop'. + * modules/inet_ntop-tests: New file. + * tests/test-inet_ntop.c: New file. + +2009-11-04 Eric Blake + + stdlib-safer: wrap all mkstemp variants + * modules/mkostemp (configure.ac): Set witness. + * modules/mkostemps (configure.ac): Likewise. + * modules/mkstemps (configure.ac): Likewise. + * lib/stdlib-safer.h (mkostemp_safer, mkostemps_safer) + (mkstemps_safer): Wrap more functions. + * lib/stdlib--.h (mkostemp, mkostemps, mkstemps): Default the + wrapping. + * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer) + (mkstemps_safer): Implement the wrappers. + + mkstemps, mkostemps: new modules + * modules/mkostemps: New module. + * modules/mkstemps: Likewise. + * lib/mkostemps.c (mkostemps): New file. + * lib/mkstemps.c (mkstemps): Likewise. + * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Likewise. + * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Likewise. + * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add witnesses. + * modules/stdlib (Makefile.am): Substitute them. + * lib/stdlib.in.h (mkostemps, mkstemps): Declare them. + * doc/glibc-functions/mkstemps.texi (mkstemps): New file. + * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise. + * doc/gnulib.texi (Glibc stdlib.h): Include them. + * MODULES.html.sh (File system functions): Mention them. + + tempname: resync from glibc + * lib/tempname.c (__gen_tempname): Add suffixlen argument. Use + same values for __GT_FILE as glibc. Abort even when assertions + are disabled. + * lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and + match its value otherwise. Allow idempotent inclusion. + * lib/mkdtemp.c (mkdtemp): Adjust caller. + * lib/mkostemp.c (mkostemp): Likewise. + * lib/mkstemp.c (mkstemp): Likewise. + * lib/tmpfile.c (tmpfile): Likewise. + * NEWS: Document this. + + utimens: fix use of futimens on older Linux + * lib/utimens.c (fdutimens): Use updated, rather than original, + timespec to avoid bug in older Linux kernel. + Reported by Simon Josefsson. + +2009-11-04 Bruno Haible + + Make num_processors more flexible and consistent. + * lib/nproc.h (enum nproc_query): New type. + (num_processors): Add a 'query' argument. + * lib/nproc.c: Include , , c-ctype.h. + (num_processors): Add a 'query' argument. Test the value of the + OMP_NUM_THREADS environment variable if requested. On Linux, NetBSD, + mingw, count the number of CPUs available for the current process. + * m4/nproc.m4 (gl_PREREQ_NPROC): Require AC_USE_SYSTEM_EXTENSIONS. + Check for sched_getaffinity and sched_getaffinity_np. + * modules/nproc (Depends-on): Add c-ctype, extensions. + * NEWS: Mention the change. + +2009-11-03 Bruno Haible + + * NEWS: Document the new library dependencies of inet_ntop, inet_pton. + +2009-11-03 Jim Meyering + + test-getaddrinfo: avoid compilation failure on FreeBSD 7.2 + * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only + if it is defined. + +2009-11-02 Eric Blake + + mktime, timegm: share common declaration + * lib/mktime-internal.h: New file. + * lib/mktime.c: Use it rather than open-coding a declaration. + * lib/timegm.c: Likewise. + * modules/mktime (Files): Ship it. + * modules/timegm (Files): Likewise. + Suggested by Bruno Haible. + + test-update-copyright: update test to match script changes + * tests/test-update-copyright.sh: Avoid hard-coding perl + location. Don't update *.bak created by earlier runs. + +2009-11-02 Paul Eggert + Simon Josefsson + Bruno Haible + + Fix link error on Solaris 8. + * m4/inet_pton.m4 (gl_INET_PTON): Search for the function inet_pton + also in libnsl. Define also INET_PTON_LIB. + * modules/inet_pton (Link): New section. + +2009-11-02 Simon Josefsson + Bruno Haible + + * m4/inet_ntop.m4 (gl_INET_NTOP): Define also INET_NTOP_LIB. + * modules/inet_ntop (Link): New section. + Reported by Boyan Kasarov . + +2009-11-02 Eric Blake + + maint: avoid compiler warnings in m4 macros + * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable. + * m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header. + +2009-11-02 Simon Josefsson + + * m4/pmccabe2html.m4: Remove file. + * modules/pmccabe2html: Drop pmccabe2html.m4. Don't call m4 + function. Change maintainer. + * build-aux/pmccabe2html: Use /bin/sh with magic instead of + hard-coding path to awk. Tiny patch from ludo@gnu.org (Ludovic + Courtès). + +2009-10-31 Eric Blake + + fseeko: fix m4 regression + * m4/fseeko.m4 (gl_FUNC_FSEEKO): Use modern macro. Fixes + regression from 2009-10-27. + Reported by Ralf Wildenhues. + +2009-10-31 Jim Meyering + + inttostr: aesthetics and improved (compile-time) safety + Define inttype_is_signed rather than inttype_is_unsigned, + since the sole use is via "#if inttype_is_signed". + * lib/imaxtostr.c (inttype_is_signed): Define this, rather than + inttype_is_unsigned. + * lib/offtostr.c (inttype_is_signed): Likewise. + * lib/uinttostr.c (inttype_is_signed): Likewise. + * lib/umaxtostr.c (inttype_is_signed): Likewise. + * lib/inttostr.c (inttostr): Use verify to cross-check the + inttype_is_signed value and the signedness of the actual type. + * modules/inttostr (Depends-on): Add verify. + +2009-10-30 Eric Blake + + build: avoid compiler warnings + * lib/fchmodat.c (lchmod): Mark unused variables. + * lib/getopt.c (_getopt_initialize): Likewise. + * lib/mktime.c (__mktime_internal): Provide prototype. + * lib/inttostr.c (inttostr): Avoid compiler warning even with + older gcc that do not understand #pragma GCC diagnostic. + * lib/uinttostr.c (inttype_is_unsigned): Define. + * lib/umaxtostr.c (inttype_is_unsigned): Likewise. + +2009-10-30 Michael Haubenwallner + + stat: fix compilation on AIX + * lib/sys_stat.in.h (stat): Work with fact that large files on AIX + only see struct stat64. + +2009-10-30 Eric Blake + + exclude: make more robust + * lib/exclude.c (excluded_file_name): Abort on unexpected value, + rather than masking a coding bug. + Suggested by Bruno Haible. + +2009-10-30 Jim Meyering + + 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. + +2009-10-29 Eric Blake + + filenamecat-lgpl: adjust clients + * modules/linkat (Depends-on): Use filenamecat-lgpl, not + filenamecat. + * modules/renameat (Depends-on): Likewise. + + filenamecat: split into filenamecat-lgpl + * 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. + + argp: avoid memory leak + * 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(). + Leak introduced 2006-07-03. + + dirname-lgpl: adjust clients that don't need full dirname + * 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. + + dirname: split into dirname-lgpl + * 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. + + mkdir: make safe for libraries + * modules/mkdir (Depends-on): Drop xalloc. + * lib/mkdir.c (rpl_mkdir): Fail with ENOMEM rather than calling + exit. + + tests: avoid some compiler warnings + * 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. + + sockets: avoid compiler warning + * lib/sockets.c (gl_sockets_startup): Mark unused parameter. + + maint: detect usage(1) and other suspicious exits + * top/maint.mk (sc_prohibit_magic_number_exit): New rule. + +2009-10-29 Jim Meyering + + 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. + +2009-10-28 Jim Meyering + + 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). + + fprintftime: remove stray semicolon from previous change + * lib/strftime.c (cpy) [FPRINTFTIME]: Remove trailing semicolon. + + 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. + + exclude: avoid an unwarranted warning + * lib/exclude.c (excluded_file_name): Initialize "rc" before switch. + +2009-10-27 Eric Blake + + fseek: avoid compilation failure when fflush is replaced + * 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. + +2009-10-27 Bruno Haible + + * lib/isnan.c (rpl_isnan[fdl]): Repeat the specification declaration. + Reported by Jim Meyering. + +2009-10-27 Jim Meyering + Bruno Haible + + Avoid warning despite dropping the return value of fwrite. + * lib/unicodeio.c: Include ignore-value.h. + (fwrite_success_callback): Explicitly ignore fwrite's return value. + * modules/unicodeio (Depends-on): Add ignore-value. + +2009-10-26 Eric Blake + + areadlinkat: fix fallback path + * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between + pointer and zero. + +2009-10-22 Pádraig Brady + + Use a better IO block size for modern systems + * lib/copy-file.c (copy_file_preserving): Used a 32KiB malloced buffer. + * lib/md2.c: Likewise. + * lib/md4.c: Likewise. + * lib/md5.c: Likewise. + * lib/sha1.c: Likewise. + * lib/sha256.c: Likewise. + * lib/sha512.c: Likewise. + +2009-10-22 Eric Blake + + 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. + +2009-10-21 Eric Blake + + areadlinkat: avoid failure on older glibc + * lib/at-func.c (AT_FUNC_NAME): Check for explicit FUNC_FAIL, + rather than mis-comparing 0 against FUNC_RESULT of char*. + +2009-10-21 Bruno Haible + + * modules/stpncpy (License): Relicense under LGPLv2+. + Reported by David Lutterkort . + +2009-10-20 Eric Blake + + utimensat: work around Solaris 9 bug + * 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): Enhance documentation. + * 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): Likewise. + * doc/posix-functions/futimens.texi (futimens): Likewise. + + fdutimensat: new module + * 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. + + doc: regenerate INSTALL + * doc/INSTALL: Reflect recent autoconf update. + * doc/INSTALL.ISO: Likewise. + * doc/INSTALL.UTF-8: Likewise. + +2009-10-20 Pádraig Brady + + acl: warn if ACL support is not detected + * m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found. + +2009-10-19 Giuseppe Scrivano + + * lib/nproc.h: Add extern "C" block for C++. + +2009-10-18 Reuben Thomas + Bruno Haible + + * doc/posix-functions/isascii.texi: Document the 2 alternative APIs. + * doc/posix-functions/isalnum.texi: Document the 4 alternative APIs. + * doc/posix-functions/isalpha.texi: Likewise. + * doc/posix-functions/isblank.texi: Likewise. + * doc/posix-functions/iscntrl.texi: Likewise. + * doc/posix-functions/isdigit.texi: Likewise. + * doc/posix-functions/isgraph.texi: Likewise. + * doc/posix-functions/islower.texi: Likewise. + * doc/posix-functions/isprint.texi: Likewise. + * doc/posix-functions/ispunct.texi: Likewise. + * doc/posix-functions/isspace.texi: Likewise. + * doc/posix-functions/isupper.texi: Likewise. + * doc/posix-functions/isxdigit.texi: Likewise. + +2009-10-18 Bruno Haible + + Tests for module 'isblank'. + * modules/isblank-tests: New file. + * tests/test-isblank.c: New file. + + New module 'isblank'. + * lib/isblank.c: New file. + * m4/isblank.m4: New file. + * modules/isblank: New file. + * doc/posix-functions/isblank.texi: Mention the new module. + +2009-10-18 Bruno Haible + + New module 'ctype'. + * lib/ctype.in.h: New file. + * m4/ctype.m4: New file. + * modules/ctype: New file. + * doc/posix-headers/ctype.texi: Mention the new module. + +2009-10-18 Jim Meyering + + 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. + +2009-10-18 Bruno Haible + + Don't let environment variables perturb build. + * m4/gethrxtime.m4 (gl_GETHRXTIME): Initialize LIB_GETHRXTIME here... + (gl_PREREQ_GETHRXTIME): ... not here. + +2009-10-18 Bruno Haible + + Avoid symlink attack in localcharset module. + * lib/localcharset.c: Include , . + (O_NOFOLLOW): Define fallback. + (get_charset_aliases): Don't open the file if it is a symbolic link. + * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): New macro, extracted from + gl_FCNTL_H. + (gl_FCNTL_H): Require it. + * m4/localcharset.m4 (gl_LOCALCHARSET): Likewise. + * modules/localcharset (Files): Add m4/fcntl_h.m4. + Reported by Fergal Glynn . + +2009-10-18 Bruno Haible + + Implement nproc for mingw. + * lib/nproc.c: Include + (num_processors): On native Windows platforms, try GetSystemInfo. + +2009-10-18 Bruno Haible + + Implement nproc for IRIX. + * lib/nproc.c: Include . + (num_processors): On IRIX systems, try sysmp. + * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/sysmp.h and sysmp. + +2009-10-18 Bruno Haible + + Implement nproc for HP-UX. + * lib/nproc.c: Include + (num_processors): On HP-UX systems, try pstat_getdynamic. + * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/pstat.h and + pstat_getdynamic. + +2009-10-18 Giuseppe Scrivano + Bruno Haible + + Implement nproc for NetBSD, OpenBSD. + * lib/nproc.c: Include , , . + (ARRAY_SIZE): New macro. + (num_processors): On BSD systems, try sysctl of HW_NCPU. + * m4/nproc.m4: New file. + * modules/nproc (Files): Add m4/nproc.m4. + (configure.ac): Invoke gl_NPROC. Remove AC_LIBOBJ invocation. + (Makefile.am): Instead, augment lib_SOURCES. + +2009-10-18 Bruno Haible + + Fix recognition of sys/sysctl.h on OpenBSD 4.0. + * m4/physmem.m4 (gl_PHYSMEM): Before including sys/sysctl.h, include + sys/param.h. + +2009-10-16 Eric Blake + + utimensat: new module + * 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. + + utimens: let lutimens work 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. + + utimens: cache whether utimensat syscall works + * lib/utimens.c (utimensat_works_really): New cache variable. + (fdutimens, lutimens): Use it to avoid failing syscall. + + test-stat-time, test-utimens: improve portability + * 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. + + sys_stat: sort replacement declarations + * lib/sys_stat.in.h: Sort declarations. + * lib/futimens.c (futimens): Fix typo. + +2009-10-15 Jim Meyering + + 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. + +2009-10-14 Eric Blake + + fchdir: avoid infinite recursion in mingw + * lib/fchdir.c (rpl_fstat): Call system fstat, rather than + recursing. + + test-stat-time: port to mingw + * 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. + +2009-10-13 Jim Meyering + + 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. + +2009-10-12 Eric Blake + + utimens-tests: port to NFS file systems + * tests/test-utimens.h (test_utimens): Refactor utimecmp + comparisons to avoid spurious failures from timestamp drift + between NFS machines. + +2009-10-12 Eric Blake + + 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. + + sys_stat: guarantee struct timespec + * lib/sys_stat.in.h (includes): Always include + * 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. + +2009-10-10 Eric Blake + + futimens: new module + * 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. + + utimens: introduce fdutimens + * 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. + + utimens: add UTIME_NOW and UTIME_OMIT support + * 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. + + utimecmp: support symlink timestamps + * 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. + + utimens: add lutimens interface + * 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. + + utimens: validate futimens usage + * 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. + + utimens: add test + * modules/utimens-tests: New test. + * tests/test-utimens.h: New file. + * tests/test-futimens.h: Likewise. + * tests/test-utimens.c: Likewise. + + 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. + + test-dup2: enhance test + * tests/test-dup2.c (main): Also check AT_FDCWD. + + test-stat-time: avoid more spurious failures + * tests/test-stat-time.c (nap): Wait for 15ms rather than 2ms, for + xfs; and avoid race if the two timestamps cross quantization edge. + + 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. + +2009-10-10 Jim Meyering + + stat-time-tests: check for the usleep function + * modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP. + +2009-10-10 Bruno Haible + + * modules/xnanosleep: Put the Link section after the Include section. + +2009-10-09 Eric Blake + + dup2: work around FreeBSD 6.1 bug + * 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. + + test-stat-time: port to buggy NFS clients + * tests/test-stat-time.c (main) [W32]: Reduce ifdefs. + (test_ctime): Also skip test if mtime and ctime are skewed. + + 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. + + maint: make realtime library usage explicit + * modules/gethrxtime (Link): Mention LIB_GETHRXTIME. + * modules/gettime (Link): Mention LIB_CLOCK_GETTIME. + * modules/settime (Link): Likewise. + * modules/xnanosleep (Link): Mention LIB_NANOSLEEP. + + test-stat-time: speed up execution + * 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. + +2009-10-09 Jim Meyering + + 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 . + [!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 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/lgetfilecon.texi: New file. + * doc/glibc-functions/fgetfilecon.texi: New file. + * doc/glibc-functions/getfilecon.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. + +2009-10-08 Jim Meyering + + unistd: fix comment typo + * lib/unistd.in.h (euidaccess): Fix a comment typo. + +2009-10-08 Eric Blake + + 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. + +2009-10-08 Jim Meyering + + areadlinkat: avoid compilation failure + * lib/areadlinkat.c: Include for use of SIZE_MAX. + Fix typo in comment. + +2009-10-07 Eric Blake + + 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. + + 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. + + 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. + + 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. + + maint: minor cleanups + * lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed + _UNUSED_PARAMETER_ instead. + * lib/getdate.y (ATTRIBUTE_UNUSED): Likewise. + * lib/utimens.c (ATTRIBUTE_UNUSED): Likewise. + * modules/linkat-tests (Files): Distribute test-link.h. + + 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. + + openat: avoid using wrong fd + * 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. + + mkdir, mkdirat: fix cygwin 1.5.x bug + * 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. + + mkdir, mkdirat: add tests + * 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. + +2009-10-06 Eric Blake + + 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. + + openat: fix GNU/Hurd bug in unlinkat + * 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. + + fdopendir: fix GNU/Hurd bug + * 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. + + test-symlink: port to GNU/Hurd + * tests/test-symlink.h (test_symlink): Relax expected errno. + + 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. + + getopt-gnu: add another test + * 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. + + 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. + +2009-10-06 Bruno Haible + + * modules/size_max (Description): Discourage its use. + Reported by Simon Josefsson. + +2009-10-06 Jim Meyering + + linkat: avoid compilation failure + * lib/linkat.c: Include for use of SIZE_MAX. + +2009-10-05 Eric Blake + + 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. + + 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. + + 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. + + hash: allow C89 compilation + * lib/hash.c (check_tuning): Move declaration before statement. + Reported by Reuben Thomas. + +2009-10-05 Karl Berry + + * doc/gnulib.texi: @include execvpe.texi, missing for several days. + +2009-10-04 Paolo Bonzini + Bruno Haible + + * lib/uname.c (uname): Use a table-driven algorithm to compute + Windows NT versions. + +2009-10-04 Bruno Haible + + * lib/progname.c (set_program_name): Also remove the "lt-" prefix from + program_invocation_short_name. + * modules/progname (configure.ac): Test for presence of + program_invocation_short_name. + Reported by Sergey Poznyakoff . + +2009-10-04 Bruno Haible + + * lib/progname.c (set_program_name): Fix comment. + Reported by Jim Meyering. + +2009-10-03 Paolo Bonzini + Bruno Haible + + * lib/uname.c: Include . + (uname): Do only one call to GetVersionEx in the common case. + +2009-10-03 Paolo Bonzini + Bruno Haible + + * lib/uname.c (VER_PLATFORM_WIN32_CE, PROCESSOR_ARCHITECTURE_AMD64, + PROCESSOR_ARCHITECTURE_IA32_ON_WIN64): Define fallbacks. + (uname): Add support for Windows CE and various non-x86 CPU types. + +2009-10-03 Bruno Haible + + * gnulib-tool (func_create_testdir): Conditionally emit AM_PROG_CC_C_O + invocation to tests/configure.ac. + Reported by Ian Beckwith . + +2009-10-02 Eric Blake + + fchdir: avoid compiler warning + * lib/fchdir.c (canonicalize_file_name) + [!HAVE_CANONICALIZE_FILE_NAME]: Avoid compiler warning on mingw. + + test-open: support mingw errno values + * tests/test-open.h (test_open): Relax test. + * tests/test-fopen.h (test_fopen): Likewise. + * tests/test-openat-safer.c (main): Likewise. + + open: fix opening directory on mingw + * lib/open.c (open) [REPLACE_OPEN_DIRECTORY]: Correct typo. + + 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. + + rename, fchdir: don't ignore chdir failure + * 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. + + maint: cleanup whitespace in recent commits + * lib/rename.c (rpl_rename): Remove tabs. + * tests/test-link.h (test_link): Likewise. + * lib/fchdir.c (get_name): Likewise. + Reported by Jim Meyering. + +2009-10-02 Ben Pfaff + + relocatable-prog-wrapper: Add missing dependency on + double-slash-root. + * modules/relocatable-prog-wrapper: Add dependency. + Reported by Ian Beckwith . + +2009-10-02 Eric Blake + + renameat: fix Solaris bugs + * 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. + + renameat: new module + * 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. + + rename: fix mingw bugs + * lib/rename.c (rpl_rename) [W32]: Fix trailing slash and + directory overwrite bugs. + + rename: fix another cygwin 1.5 bug + * 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. + + rename-dest-slash: merge into rename module + * 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. + + rename: fix cygwin 1.5.x bugs + * m4/rename.m4 (gl_FUNC_RENAME): Detect cygwin bugs. + * lib/rename.c (rpl_rename): Work around them. + * modules/rename (Depends-on): Add same-inode. + + rename: fix Solaris 10 bug + * 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. + + rename: fix Solaris 9 bug + * 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. + + rename-dest-slash: fix NetBSD bug + * lib/rename-dest-slash.c (rpl_rename_dest_slash): Detect hard + links. + * modules/rename-dest-slash (Depends-on): Add same-inode. + + rename-tests: new test, exposes several platform bugs + * 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. + +2009-10-02 Paolo Bonzini + + * lib/uname.c: Include + (uname): Assume version info is available. + +2009-10-02 Jim Meyering + + gnu-web-doc-update: correct --help output + * build-aux/gnu-web-doc-update: Make --help output relevant. + + gnu-web-doc-update: add standard options + * build-aux/gnu-web-doc-update: Add --help, --version, etc. + + 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, from coreutils. + * build-aux/gnu-web-doc-update: New script. + +2009-10-01 Paolo Bonzini + + link: LoadLibrary is not needed. + * lib/link.c: Use GetModuleHandle. + +2009-10-01 Eric Blake + + getopt: bump serial number + * m4/getopt.m4: Increment serial number, to account for 2009-09-24 + change. + + tests: tighten link, rmdir, and remove tests + * tests/test-link.h (includes): No need to use 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. + +2009-10-01 Jim Meyering + + 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/ + +2009-09-30 Ben Pfaff + + Fix broken build of replacement for Windows tmpfile(). + * lib/tmpfile.c (tmpfile): Fix call to gen_tempname() to provide + flags argument added along with the 'mkostemp' module. + +2009-09-28 Bruno Haible + + Avoid identifier clash with POSIX function 'remove' defined as a macro. + * lib/gl_list.h (struct gl_list_implementation): Rename field 'remove' + to 'remove_elt'. + (gl_list_remove): Update. + * lib/gl_list.c (gl_list_remove): Update. + * lib/gl_oset.h (struct gl_oset_implementation): Rename field 'remove' + to 'remove_elt'. + (gl_oset_remove): Update. + * lib/gl_list.c (gl_oset_remove): Update. + Reported by Eric Blake. + +2009-09-28 Eric Blake + + 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. + + 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. + +2009-09-27 Jim Meyering + + 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 by Kurt Roeckx. + +2009-09-27 Bruno Haible + + Disable untested support for new flavours of ACLs on AIX. + * lib/file-has-acl.c (file_has_acl): Mark newer AIX code as work in + progress. + * lib/set-mode-acl.c (qset_acl): Likewise. + +2008-12-07 Bruno Haible + + Add support for new flavours of ACLs on AIX. (Untested.) + * lib/file-has-acl.c [AIX] (acl_nfs4_nontrivial): New function. + (file_has_acl): Add support for newer AIX. + * lib/set-mode-acl.c (qset_acl): Likewise. + * tests/test-sameacls.c (main): Fix use of aclx_get function. Hint by + Rainer Tammer . + +2009-09-26 Eric Blake + + argp: fix compilation of getopt + * lib/getopt.in.h (includes): Use different guard than glibc. + Reported by Sergey Poznyakoff. + + 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. + +2009-09-24 Eric Blake + + test-linkat: make test more robust + * tests/test-linkat.c (main): Avoid collision with EEXIST. + + getopt: fix inclusion guards for cygwin + * modules/getopt-posix (Depends-on): Add include-next. + (Makefile.am): Substitute more items in replacement header. + * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Also check for native + . + * lib/getopt.in.h (includes): Use split inclusion guard, and + prefer over include when one is present. + (option): Also override name of 'struct option'. + + same-inode: revert prior change; it is not yet ready + * NEWS: Undo mention of this change. + * lib/same-inode.h (same-inode.h): Undo tri-state change. + * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller. + * lib/cycle-check.c (cycle_check): Likewise. + * lib/same.c (same_name): Likewise. + * lib/at-func2.c (at_func2): Likewise. + +2009-09-23 Eric Blake + + linkat: new module + * modules/linkat: New file. + * lib/at-func2.c (at_func2): Likewise. + * lib/linkat.c (linkat): Likewise. + * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. + * lib/openat-priv.h (at_func2): Add declaration. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses. + * modules/unistd (Makefile.am): Substitute them. + * lib/unistd.in.h (linkat): Declare it. + * MODULES.html.sh (systems lacking POSIX:2008): Mention module. + * doc/posix-functions/linkat.texi (linkat): Likewise. + * doc/posix-functions/link.texi (link): Tweak wording. + * tests/test-link.c (main): Move guts... + * tests/test-link.h (test_link): ...into new file. + * modules/linkat-tests: New test. + * tests/test-linkat.c: Likewise. + * modules/link-tests (Files): Ship new file. + (Depends-on): Add stdbool. + + dirname: add library-safe mdir_name + * lib/dirname.h (mdir_name): New prototype. + * lib/dirname.c (dir_name): Move guts... + (mdir_name): ...to new function that avoids xalloc_die. + + fchdir: another mingw fix + * modules/fchdir (Depends-on): Drop canonicalize-lgpl. + * lib/fchdir.c (get_name): New helper method; skips canonicalize + on mingw (where it has not yet been ported), and make it optional + elsewhere. + (_gl_register_fd): Use it. + + same-inode: make SAME_INODE tri-state, to port to mingw + * NEWS: Mention this change. + * lib/same-inode.h (same-inode.h): Recognize mingw limitation of + st_ino always being 0. + * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller. + * lib/cycle-check.c (cycle_check): Likewise. + * lib/same.c (same_name): Likewise. + + lstat: avoid mingw compilation error + * m4/lstat.m4 (gl_FUNC_LSTAT): Avoid duplicate calls to + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and deal with missing + lstat ourselves. + * lib/lstat.c [!HAVE_LSTAT]: Do nothing if override + was adequate. + * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Let lstat module handle + the checks for lstat. + (gl_SYS_STAT_H_DEFAULTS): Set default for HAVE_LSTAT. + + link: fix test failure on Solaris 9 + * lib/link.c (rpl_link): Don't assume link will catch bogus + trailing slash on source. + + test-symlinkat: enhance test + * tests/test-readlink.c (main): Move guts... + * tests/test-readlink.h (test_readlink): ...into new file. + * tests/test-symlink.c (main): Move guts... + * tests/test-symlink.h (test_symlink): ...into new file. + * tests/test-symlinkat.c (main): Use new files for further + coverage. + (do_symlink, do_readlink): New helper functions. + * modules/symlink-tests (Files): Ship new file. + (Depends-on): Add stdbool. + * modules/readlink-tests (Files): Ship new file. + (Depends-on): Add stdbool. + * modules/symlinkat-tests (Files): Use new files. + +2009-09-23 Eric Blake + + readlink: document portability issue with symlink length + * doc/posix-functions/lstat.texi (lstat): Mention that some file + systems have bogus st_size on symlinks, and mention the + areadlink-with-size module. + * doc/posix-functions/fstatat.texi (fstatat): Likewise. + * doc/posix-functions/readlink.texi (readlink): Mention the + areadlink module, and ERANGE failure. + * doc/posix-functions/readlinkat.texi (readlinkat): Likewise. + * tests/test-readlink.c (main): Relax test for AIX, HP-UX. + + readlink: fix Solaris 9 bug with trailing slash + * lib/readlink.c (rpl_readlink): Work around trailing slash bug. + * m4/readlink.m4 (gl_FUNC_READLINK): Detect the bug. + * doc/posix-functions/readlink.texi (readlink): Document this. + * modules/readlink-tests: New test. + * tests/test-readlink.c: Likewise. + + readlink: fix cygwin 1.5.x bug with return type + * m4/readlink.m4 (gl_FUNC_READLINK): Require correct signature. + * lib/unistd.in.h (readlink): Use ssize_t. + * lib/readlink.c (readlink): Likewise. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. + * modules/unistd (Makefile.am): Substitute it. + * lib/unistd.in.h (readlink): Declare replacement. + * doc/posix-functions/readlink.texi (readlink): Document this. + + symlink: use throughout gnulib + * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Omit symlink check. + * lib/symlinkat.c (symlinkat) [!HAVE_SYMLINK]: Document why + symlink is not used. + * modules/symlinkat (Depends-on): Add symlink. + * modules/canonicalize-lgpl-tests (Depends-on): Likewise. + * modules/canonicalize-tests (Depends-on): Likewise. + * modules/lstat-tests (Depends-on): Likewise. + * modules/openat-tests (Depends-on): Likewise. + * modules/remove-tests (Depends-on): Likewise. + * modules/rmdir-tests (Depends-on): Likewise. + * modules/unlink-tests (Depends-on): Likewise. + * tests/test-canonicalize-lgpl.c (symlink): Delete stub. + * tests/test-canonicalize.c (symlink): Likewise. + * tests/test-fstatat.c (symlink): Likewise. + * tests/test-lstat.c (symlink): Likewise. + * tests/test-remove.c (symlink): Likewise. + * tests/test-rmdir.c (symlink): Likewise. + * tests/test-unlink.c (symlink): Likewise. + * tests/test-unlinkat.c (symlink): Likewise. + + symlink: new module, for Solaris 9 bug + * modules/symlink: New file. + * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise. + * lib/symlink.c: Likewise. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults. + * modules/unistd (Makefile.am): Substitute them. + * lib/unistd.in.h (symlink): Declare replacement. + * MODULES.html.sh (File system functions): Mention it. + * doc/posix-functions/symlink.texi (symlink): Likewise. + * modules/symlink-tests: New test. + * tests/test-symlink.c: Likewise. + +2009-09-23 Bruno Haible + + * gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules + when needed. + Test case: gnulib-tool --import --with-tests atexit inttypes. + Reported by Pauli Miettinen . + +2009-09-23 Bruno Haible + + * gnulib-tool (func_emit_tests_Makefile_am): Set uses_subdirs in a + subcommand, not in a subshell. + +2009-09-22 Eric Blake + + unistd: sort replacement declarations + * lib/unistd.in.h: Sort declarations. + + open, openat: minor optimization + * lib/open.c (open): If open succeeded, len is non-zero. + * lib/openat.c (rpl_openat): Likewise. + + link-follow: ensure correct result + * m4/fcntl_h.m4 (gl_FCNTL_H): Clean up temporary file. + * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise, and + distinguish between possible failures. + +2009-09-21 Eric Blake + + fts: avoid compiler warning + * lib/fts.c (dirent_inode_sort_may_be_useful) + (leaf_optimization_applies) [!__linux__]: Mark unused parameters. + +2009-09-19 Bruno Haible + + * lib/progreloc.c (canonicalize_file_name): New declaration. + 2009-09-19 Eric Blake + link: fix quoting + * m4/link.m4 (gl_FUNC_LINK): Fix shell quoting. + + openat: fix openat bugs on Solaris 9 + * lib/openat.c (rpl_openat): Work around Solaris 9 bug. + * m4/openat.m4 (gl_FUNC_OPENAT): Also replace openat on Solaris. + * modules/openat (Depends-on): Add open. + * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide new default. + * modules/fcntl-h (Makefile.am): Substitute it. + * lib/fcntl.in.h (openat): Declare replacement. + * doc/posix-functions/openat.texi (openat): Document this. + + openat: move fstatat and unlinkat into correct files + * m4/openat.m4 (gl_FUNC_OPENAT): Adjust which files will be + compiled. + * lib/openat.c (fstatat, unlinkat): Move... + * lib/fstatat.c (fstatat): ...into correct files. + * lib/unlinkat.c (unlinkat): Likewise. + + openat: fix unlinkat bugs on Solaris 9 + * lib/unlinkat.c (unlinkat): New file. + * modules/openat (Depends-on): Add unlink. + (Files): Distribute it. + * m4/openat.m4 (gl_FUNC_OPENAT): Mark unlinkat for replacement if + trailing slash behavior is broken. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. + * modules/unistd (Makefile.am): Substitute it. + * lib/unistd.in.h (unlinkat): Declare replacement. + * doc/posix-functions/unlinkat.texi (unlinkat): Document this. + + openat: fix fstatat bugs on Solaris 9 + * lib/fstatat.c (rpl_fstatat): Copy recent fixes from lstat and + stat. + * doc/posix-functions/fstatat.texi (fstatat): Document this. + + test-unlinkat: enhance test, to expose Solaris 9 bug + * tests/test-unlink.c (main): Factor guts... + * tests/test-unlink.h (test_rmdir_func): ...into new file. + * tests/test-rmdir.h (test_rmdir_func): Add parameter. + * tests/test-rmdir.c (main): Adjust caller. + * tests/test-unlinkat.c (main): Likewise. Add unlink tests. + (unlinker): New helper function. + (rmdirat): Enhance check. + * modules/rmdir-tests (Depends-on): Add stdbool. + * modules/unlink-tests (Depends-on): Likewise. + (Files): Add test-unlink.h. + * modules/openat-tests (Files): Likewise. + (Depends-on): Add unlinkdir. + + test-fstatat: new test, to expose Solaris 9 bugs + * tests/test-stat.c (main): Factor guts... + * tests/test-stat.h (test_stat_func): ...into new file. + * tests/test-lstat.c (main): Factor guts... + * tests/test-lstat.h (test_lstat_func): ...into new file. + * tests/test-fstatat.c: New file. + * modules/stat-tests (Files): Add test-stat.h. + * modules/lstat-tests (Files): Add test-lstat.h. + (Depends-on): Add stdbool. + * modules/openat-tests (Depends-on): Add pathmax. + (Files): Add test-lstat.h, test-stat.h, test-fstatat.c. + (Makefile.am): Run new test. + remove: new module, for mingw and Solaris 9 bugs * modules/remove: New file. * lib/remove.c: Likewise. @@ -3069,10 +5019,10 @@ 2009-06-25 Sergey Poznyakoff - * lib/argp-version-etc.c (program_authors): Add const - qualifier. - * lib/version-etc.c: Fix typos in the comments. - * modules/argp-version-etc: Depends on version-etc. + * lib/argp-version-etc.c (program_authors): Add const + qualifier. + * lib/version-etc.c: Fix typos in the comments. + * modules/argp-version-etc: Depends on version-etc. 2009-06-25 Sergey Poznyakoff