Work around a glibc bug in strtok_r.
[gnulib.git] / ChangeLog
index a73cad1..e5653e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,140 @@
+2009-09-06  Ben Pfaff  <blp@gnu.org>
+           Bruno Haible  <bruno@clisp.org>
+
+       Work around a glibc bug in strtok_r.
+       * lib/string.in.h (strtok_r): Replace if REPLACE_STRTOK_R is set.
+       Undefine if UNDEFINE_STRTOK_R is set.
+       * lib/strtok_r.c (strtok_r, __strtok_r) [!_LIBC]: Don't undefine.
+       * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
+       REPLACE_STRTOK_R and UNDEFINE_STRTOK_R.
+       * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Check against the glibc bug.
+       * modules/string (Makefile.am): Substitute REPLACE_STRTOK_R,
+       UNDEFINE_STRTOK_R.
+       * doc/posix-functions/strtok_r.texi: Mention the glibc 2.7 bug.
+
+2009-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>
+
+       exclude: minor fix
+       * lib/exclude.c: Include wctype.h
+
+2009-09-06  Akim Demaille  <demaille@gostai.com>
+
+       bootstrap: improve error message
+       * build-aux/bootstrap (find_tool): Upon failure, report the list
+       of candidates.
+       Honor the initial value of the envvar.
+
+2009-09-05  Eric Blake  <ebb9@byu.net>
+
+       symlinkat: new module
+       * modules/symlinkat: New file.
+       * lib/symlinkat.c: Likewise.
+       * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
+       * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
+       * modules/unistd (Makefile.am): Use them.
+       * lib/unistd.in.h (symlinkat, readlinkat): Declare them.
+       (faccessat) [GNULIB_POSIXCHECK]: Fix typo.
+       * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int.
+       * MODULES.html.sh (File system functions): Mention module.
+       * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
+       * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
+       * modules/symlinkat-tests: New test.
+       * tests/test-symlinkat.c: Likewise.
+
+       test-openat-safer: add more checks
+       * tests/test-openat-safer.c (main): Check more code paths.
+
+2009-09-05  Jim Meyering  <meyering@redhat.com>
+
+       syntax-check: detect unnecessary inclusion of openat.h
+       * top/maint.mk (sc_prohibit_openat_without_use): New rule.
+
+2009-09-05  Bruno Haible  <bruno@clisp.org>
+
+       Support towlower, towupper.
+       * doc/posix-functions/towlower.texi: Mention module wctype.
+       * doc/posix-functions/towupper.texi: Likewise.
+       * lib/wctype.in.h (towlower, towupper): New functions.
+       * tests/test-wctype.c: Include stdio.h, stdlib.h.
+       (ASSERT): New macro.
+       (e): New variable.
+       (main): Test also towlower, towupper. Test WEOF argument.
+       Reported by Alan Hourihane <alanh@fairlite.co.uk>.
+
+2009-09-05  Bruno Haible  <bruno@clisp.org>
+
+       Fix conversion behaviour when the input is invalid.
+       * lib/striconveh.c (mem_cd_iconveh_internal): Fix storing of question
+       mark occurring in first pass of indirect conversion.
+       * tests/test-striconveh.c (main): Test conversion of invalid ASCII
+       input.
+       Found by clang's static analyzer.
+
+2009-09-05  Bruno Haible  <bruno@clisp.org>
+
+       * tests/test-striconveh.c (main): Test indirect conversion on platforms
+       where direct conversion is possible.
+
+2009-09-04  Eric Blake  <ebb9@byu.net>
+
+       openat: fail with ENOENT on empty name
+       * lib/openat-proc.c (openat_proc_name): Special-case the empty
+       buffer.
+
+       link-follow: fix logic bug in prior patch
+       * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that
+       reversed sense of yes and no in prior patch.  Avoid confusing
+       compilation failure with desired semantics.
+
+       link-follow: accomodate mingw and cross-compilation
+       * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename...
+       (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this.  Change
+       cross-compilation results to -1, to make linkat easier to
+       implement when cross-compiling.  Trivially support mingw.
+       * modules/link-follow (configure.ac): Call new name.
+       * NEWS: Mention this.
+
 2009-09-03  Eric Blake  <ebb9@byu.net>
 
+       faccessat: compile replacement
+       * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Build replacement when
+       needed.
+
+       fts: fix compilation error
+       * lib/fts.c (includes): Re-add "openat.h", for
+       openat_needs_fchdir.
+
+       faccessat: new module
+       * modules/faccessat: New file.
+       * lib/faccessat.c: Likewise.
+       * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
+       * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
+       * modules/unistd (Makefile.am): Use it.
+       * lib/unistd.in.h (faccessat): Declare it.
+       (F_OK, X_OK, W_OK, R_OK): Provide definitions.
+       * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise.
+       * MODULES.html.sh (File system functions): Mention it.
+       * doc/posix-functions/faccessat.texi (faccessat): Likewise.
+       * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
+
+       euidaccess: prefer POSIX over non-standard implementation
+       * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat.
+       * lib/euidaccess.c (euidaccess): Use it if available.
+
+       openat: make template easier to use
+       * lib/at-func.c (CALL_FUNC): Allow AT_FUNC_USE_F1_COND and
+       AT_FUNC_F2 to be undefined.
+       (VALIDATE_FLAG): New macro; use it to reject bad flags.
+       (AT_FUNC_USE_F1_COND): Change sense to just flag bit.
+       * lib/fchmodat.c (AT_FUNC_USE_F1_COND): Adjust.
+       * lib/fchownat.c (AT_FUNC_USE_F1_COND): Likewise.
+       * lib/openat.c (AT_FUNC_USE_F1_COND) [fstatat, unlinkat]:
+       Likewise.
+       * lib/mkdirat.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND): Delete.
+       * lib/selinux-at.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND)
+       [getfileconat, lgetfileconat, setfileconat, lsetfileconat]:
+       Likewise.
+
        openat: declare in POSIX headers
        * NEWS: Mention this.
        * modules/openat (configure.ac): Declare witnesses.