utimensat: do not reference an out-of-scope buffer
[gnulib.git] / ChangeLog
index 013decd..4db03d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,127 @@
+2011-05-24  Jim Meyering  <meyering@redhat.com>
+
+       utimensat: do not reference an out-of-scope buffer
+       Otherwise, with __linux__ defined, "times" would point to a buffer, "ts"
+       declared in an inner scope, yet "times" would be dereferenced outside
+       the scope in which "ts" was valid.
+       * lib/utimensat.c (rpl_utimensat) [__linux__]: Move the declaration
+       of ts[2] "out/up", so that the use of aliased "times" (via "times = ts;")
+       does not end up referencing an out-of-scope "ts"
+
+       opendir-safer.c: don't clobber errno; don't close negative FD
+       * lib/opendir-safer.c (opendir_safer):
+       [HAVE_FDOPENDIR || GNULIB_FDOPENDIR]: Don't close a negative
+       file descriptor, and more importantly, don't clobber the
+       offending errno value with EINVAL.  Before, upon failure
+       of dup_safer, we would pass the negative file descriptor to
+       fdopendir, which would clobber errno.
+
+2011-05-23  Bruno Haible  <bruno@clisp.org>
+
+       idcache: Fix module description.
+       * modules/idcache (Include): Set to "idcache.h".
+
+2011-05-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       gnulib-tool: fix portability problem with MacOS sed
+       A sed command like "/x/{s/a/b/}" is not portable; a newline is needed
+       before the "}".  Problem reported by Leo in
+       <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00717.html>.
+       * gnulib-tool (func_modules_transitive_closure): Insert newlines in
+       sed_extract_condition1, sed_extract_condition2.
+
+2011-05-23  Bruno Haible  <bruno@clisp.org>
+
+       hash: Simplify autoconf macro.
+       * m4/hash.m4 (gl_HASH): Don't require AM_STDBOOL_H.
+
+2011-05-23  Bruno Haible  <bruno@clisp.org>
+
+       getugroups: Fix module description.
+       * modules/getugroups (Include): Set to "getugroups.h".
+
+2011-05-23  Bruno Haible  <bruno@clisp.org>
+
+       linkat: Simplify autoconf macro.
+       * m4/linkat.m4 (gl_FUNC_LINKAT): Don't require gl_FUNC_LINK.
+
+2011-05-23  Bruno Haible  <bruno@clisp.org>
+           Eric Blake  <eblake@redhat.com>
+
+       linkat, renameat: Update dependencies.
+       * modules/renameat (Depends-on): Add dosname, save-cwd. Remove stpcpy.
+       * modules/linkat (Depends-on): Likewise. Remove also readlink,
+       symlinkat.
+
+2011-05-23  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: more tight_scope improvements
+       * top/maint.mk: (_gl_TS_var_match): Use $(_gl_TS_extern) here, too.
+       (_gl_TS_headers): Define only in if-0'd block.
+       (_gl_TS_dir): Omit the $(srcdir)/ prefix.  Sometimes we need it,
+       sometimes we must *not* use it.  Adjust uses accordingly.
+       (sc_tight_scope): Use much simpler grep-based test to determine
+       whether we skip this rule.
+
+       maint.mk: generalize/improve the tight-scope rule
+       * top/maint.mk: Emit a warning when the test is skipped.
+       (_gl_TS_dir): Add $(srcdir)/ prefix.
+       (_gl_TS_function_match): Simplify, rather than trying
+       to enumerate common types.  Otherwise, it would fail to match an
+       "extern unsigned char const *" declaration in idutils.
+       (_gl_TS_extern): Do not endorse use of "XTERN", but do provide
+       a way to support use of that type of macro.
+       (_gl_TS_var_match): Simplify regexp.
+       (_gl_TS_obj_files): New configurable variable.
+       (_gl_TS_headers): Likewise.
+
+2011-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       verify: fix bug when gnulib <assert.h> is also included
+       * lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
+       is defined, not if _GL_STATIC_ASSERT_H is not defined.
+       Perhaps there's a better way, but this fixes the immediate problem.
+       Problem reported by Bruno Haible in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00478.html>.
+
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       xgetcwd: Simplify autoconf macro.
+       * m4/xgetcwd.m4 (gl_XGETCWD): Don't require gl_FUNC_GETCWD.
+
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       New module 'mktime-internal'.
+       * modules/mktime-internal: New file.
+       * m4/timegm.m4 (gl_PREREQ_TIMEGM): Move contents to ...
+       * m4/mktime.m4 (gl_FUNC_MKTIME_INTERNAL): New macro. Define
+       mktime_internal as a C macro if libc has __mktime_internal.
+       * modules/timegm (Depends-on): Add mktime-internal. Remove mktime. Add
+       conditions.
+       * MODULES.html.sh (Date and time <time.h>): Add mktime-internal.
+
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       timegm: Correct mktime replacement statements.
+       * m4/timegm.m4 (gl_PREREQ_TIMEGM): Set REPLACE_MKTIME, instead of
+       defining mktime as a C macro. This completes a 2009-07-28 commit.
+
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       timegm: Simplify autoconf macro.
+       * m4/timegm.m4 (gl_PREREQ_TIMEGM): Don't require gl_TIME_R.
+
+2011-05-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       clock-time: change to LGPLv2+.
+       * modules/clock-time: Change from GPL to LGPLv2+.  Actually, it's
+       BSD-like but we have no mark for that; this is good enough for now.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+       strerror_r: Fix comments.
+       * lib/strerror_r.c (strerror_r): Fix comment about Cygwin and sys_nerr.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
        relocatable-prog-wrapper: Fix possible link error.