X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ChangeLog;h=b0c83b8a8bc4ace44834832f4a52dd3c7996123f;hb=975243c9fb21ec51e9cc59db68626a800be78abd;hp=e1d3a41b5069d77905d7682b6130522d46b108eb;hpb=8bd1168a9a8bdb4f5c7c155bfe97714703207137;p=gnulib.git diff --git a/ChangeLog b/ChangeLog index e1d3a41b5..b0c83b8a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,901 @@ +2009-10-29 Eric Blake + + 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 @@ -3525,10 +4423,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