X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ChangeLog;h=06777dec3ed6c0263b51cf99d6ef7890aa1e66d5;hb=1fd0accd6684bbaba6690f33684e5e6a0c85344a;hp=0a2b45786e95bb6e598a342385c52472b6decade;hpb=cda5c90820d55b4b1f52d6a6f5329a10668bd720;p=gnulib.git diff --git a/ChangeLog b/ChangeLog index 0a2b45786..06777dec3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,261 @@ +2013-06-11 Paul Eggert + + getcwd-lgpl: port to Tru64 + * lib/getcwd-lgpl.c: Include , for malloc etc. + Problem reported by Steven M. Schweda in + . + + tests: port large-fd POSIX spawn tests to OS X + Problem reported by Daiki Ueno in + . + * tests/test-posix_spawn_file_actions_addclose.c: + * tests/test-posix_spawn_file_actions_adddup2.c: + * tests/test-posix_spawn_file_actions_addopen.c: + Include , for OPEN_MAX, if available. + (big_fd): New static function. + (main): Use it. + +2013-06-04 Bernhard Voelker + + tests/nap.h: use an adaptive delay to avoid ctime update issues + The recent change in nap.h (5191133e) decreased the probability of lost + races to about a third, however such problems could still be observed + in virtual machines and openSUSE's OBS. + Before, nap() detected the needed time once empirically and then used + that delay (together with a small correction multiplier) in further + calls. This problem has been reported and discussed several times, + including guesses about possible kernel issues: + https://lists.gnu.org/archive/html/bug-gnulib/2013-04/msg00071.html + http://lists.gnu.org/archive/html/coreutils/2012-03/msg00088.html + https://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00226.html + http://bugs.gnu.org/12820 + https://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00113.html + https://lists.gnu.org/archive/html/bug-gnulib/2009-11/msg00007.html + Now, nap() avoids the race alltogether by verifying on a reference + file whether a timestamp difference has happened. + * tests/nap.h (nap_fd): Define file descriptor variable for the + witness file. + (nap_works): Change return value to bool. Change passing + the old file's status by value instead of by reference as this function + does no longer update that timestamp; rename the function argument from + st to old_st. Remove the local variables cdiff and mdiff because that + function now returns true/false instead of the precise delay. + (guess_delay): Remove function. + (clear_tmp_file): Add new function to close and unlink the witness file. + (nap): Instead of re-using the delay which has been calculated during + the first call, avoid the race by actually verifying that a timestamp + difference can be observed on the current file system. Use an adaptive + approach for the delay to minimize execution time. Assert that the + maximum delay is <= ~2 seconds, more precisely sum(2^n) from 0 to 30 + = 2^31 - 1 = 2.1s. + Use atexit to call clear_tmp_file when the process terminates. + +2013-06-02 Paul Eggert + + sig2str: port to C++ + * lib/sig2str.h (sig2str, str2sig): Declare as extern "C". + Reported by Daniel J Sebald in + . + +2013-05-30 Eric Blake + + docs: mention cygwin shortcoming in + * doc/posix-headers/sys_un.texi (sys/un.h): Mention problem. + + vasnprintf: silence mingw compiler warning + * lib/vasnprintf.c (VASNPRINTF): Avoid unused variable warning. + +2013-05-29 Paul Eggert + + c-ctype, regex, verify: port to gcc -std=c90 -pedantic + Avoid constructions that are rejected by gcc -std=c90 -pedantic. + This fixes a porting bug I recently reintroduced in regex, and + some other instances that I discovered while testing the fix. + * lib/c-ctype.h [__STRICT_ANSI__]: Avoid ({ ... }). + * lib/regcomp.c (utf8_sb_map) [__STRICT_ANSI__]: Avoid [0 ... N] = E. + * lib/regex_internal.h [!_LIBC && GNULIB_LOCK]: Do not use a macro + with an empty argument if this is a pedantic pre-C99 GCC. + * lib/verify.h: Do not use _Static_assert if this is a pedantic + pre-C11 GCC. + + regex: adapt to locking regime instead of depending on pthread + Instead of depending on pthread, adapt to whatever thread + modules are in use. Problem reported by Ludovic Courtès in + + and by Mats Erik Andersson in + . + * lib/regex_internal.h (lock_define, lock_init, lock_fini): + Support either the 'lock' module, or the 'pthread' module, or + no module. + (lock_lock, lock_unlock): New macros. + * lib/regexec.c (regexec, re_search_stub): Use the new macros. + * modules/lock, modules/pthread (configure.ac): Add module indicator. + * modules/regex (Depends-on): Remove pthread. + +2013-05-22 Eric Blake + + getgroups: document portability issues + * doc/glibc-functions/initgroups.texi (initgroups): Mention + multithread safety. + * doc/posix-functions/getpwuid.texi (getpwuid): Likewise. + * doc/posix-functions/getpwuid_r.texi (getpwuid_r): Likewise. + * doc/glibc-functions/getgrouplist.texi (getgrouplist): Mention + getugroups. + * doc/posix-functions/getgroups.texi (getgroups): Mention + multithread safety and mgetgroups. + +2013-05-22 Bernhard Voelker + + test-lchown, test-chown: also skip test if chown fails with EPERM + * tests/test-lchown.h (test_lchown): Add EPERM to the condition to + skip this test, to handle FAT file systems. + * tests/test-chown.h (test_chown): Likewise. + +2013-05-19 Paul Eggert + + regex: fix dfa race in multithreaded uses + Problem reported by Ludovic Courtès in + . + * lib/regex_internal.h (lock_define, lock_init, lock_fini): + New macros. All uses of __libc_lock_define, __libc_lock_init + changed to use the first two of these. + (__libc_lock_lock, __libc_lock_unlock): New macros, for + non-glibc platforms. + (struct re_dfa_t): Define the lock unconditionally. + * lib/regexec.c (regexec, re_search_stub): Remove some now-incorrect + '#ifdef _LIBC"s. + * modules/regex (Depends-on): Add pthread, if we use the + included regex. + + * lib/regcomp.c: Do actions that are not needed for glibc, + but may be needed elsewhere. + (regfree, re_compile_internal): Destroy the lock. + (re_compile_internal): Check for lock-initialization failure. + + malloca: port to compilers that reject size-zero arrays + This fixes a bug introduced in my previous patch. + * lib/malloca.c (struct preliminary_header): Use an int + rather than a character array of size int; that's simpler. + (struct header): Remove, replacing with ... + (union header): New type. This avoids the need for declaring a + character array of size zero, which is not allowed on some platforms. + All uses changed. + +2013-05-18 Paul Eggert + + parse-datetime, tests: don't use "string" + int + Recent versions of 'clang' complain about C source code that + uses expressions of the form '"string literal" + integer', + I guess on the theory that it's confusing for readers who are + used to C++. On those grounds I suppose it's OK to make this + minor style change. + * lib/parse-datetime.y (parse_datetime): + * tests/test-fchdir.c (main): + * tests/test-snprintf-posix.h (test_function): + * tests/test-snprintf.c (main): + * tests/test-vasnprintf-posix.c (test_function): + * tests/test-vasnprintf.c (test_function): + * tests/test-vsnprintf.c (main): + * tests/unistdio/test-ulc-asnprintf1.h (test_function): + Rewrite '"str" + E' to '&"str"[E]'. + +2013-05-17 Alexandre Duret-Lutz + + argmatch: port to C++ + * lib/argmatch.h [__cplusplus]: Add extern "C". + + argp: typo fix + * lib/argp-help.c: Typo in comment. + +2013-05-15 Paul Eggert + + manywarnings: update for GCC 4.8.0 + * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): + Add -Waggressive-loop-optimizations, -Wreturn-local-addr, which + are new to GCC 4.8. Remove -Wformat=2, -Wmissing-format-attribute, + -Wmissing-noreturn, as they are duplicates of other warnings. + Remove -Wunreachable-code, as it is removed in GCC 4.8 and + was documented to be flaky in earlier versions of GCC. + + spawn-tests, sys_socket-tests, sys_wait-tests: port to clang + * tests/test-spawn.c (main): + * tests/test-sys_socket.c (main): + * tests/test-sys_wait.c (main): + Don't have a switch value that isn't covered by a case. + + getaddrinfo-tests: port --enable-gcc-warnings to clang + * tests/test-getaddrinfo.c (simple): + Avoid casts from looser to stricter-aligned pointers. + + thread: port --enable-gcc-warnings to clang + * lib/glthread/thread.h [__clang__ && USE_POSIX_THREADS_WEAK]: + Include , to pacify a warning about pthread_sigmask. + + stdio: use __REDIRECT for fwrite, fwrite_unlocked + * lib/stdio.in.h (fwrite): + When working around bug 11959, use __REDIRECT rather than '#define + fwrite(...) ... fwrite (...) ...'. This is a more-targeted way to + fix the -Wunused-value issue with clang, and it works with GCC too. + Problem with targeting reported by Eric Blake in + . + (fwrite_unlocked): Treat like fwrite. I ran into this issue while + debugging the fwrite issue. + + stdio: port --enable-gcc-warnings to clang + * lib/stdio.in.h (fwrite) [__clang__]: Ignore -Wunused-value entirely, + since the GCC workaround for fwrite does not pacify clang. + + sig2str: port --enable-gcc-warnings to clang + * lib/sig2str.c (sig2str): Avoid warning about unused printf argument. + + obstack: port --enable-gcc-warnings to clang + * lib/obstack.h (obstack_ptr_grow_fast, obstack_int_grow_fast): + Avoid casts from looser to stricter-aligned pointers. + + memchr2: port --enable-gcc-warnings to clang + * lib/memchr2.c (memchr2): + Avoid casts from looser to stricter-aligned pointers. + + mbsstr: port --enable-gcc-warnings to clang + * lib/mbsstr.c (knuth_morris_pratt_multibyte): + Avoid casts from looser to stricter-aligned pointers. + + malloca: port --enable-gcc-warnings to clang + * lib/malloca.c (struct header): New member 'magic', to avoid casts. + (mmalloca): Avoid casts from looser to stricter-aligned pointers. + + inttostr: port --enable-gcc-warnings to clang + * lib/anytostr.c [__clang__]: Ignore -Wtautological-compare. + + warnings: port to clang + Problem reported by Daniel P. Berrange via Eric Blake in + . + * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS): New macro. + (gl_WARN_ADD): Use it. + +2013-05-11 Jim Meyering + + quotearg: do not read beyond end of buffer + * lib/quotearg.c (quotearg_buffer_restyled): Do not read beyond the + end of an ARG for which no length was specified. With an N-byte + quote string, (e.g., N is 3 in the fr_FR.UTF-8 locale), this function + would read N-2 bytes beyond ARG's trailing NUL. This was triggered + via coreutils' misc/sort-debug-keys.sh test and detected by running + the test against a binary compiled with gcc-4.8.0's -fsanitize=address. + * tests/test-quotearg-simple.c (main): Add a test to trigger the bug. + * modules/quotearg-simple-tests (Files): Add tests/zerosize-ptr.h. + Introduced via the 2000-01-15 commit, c4b7f3f8, "Quote multibyte + characters correctly." + +2013-05-11 Daiki Ueno + + lock: work around pthread recursive mutexes bug in Mac OS X 10.6 + * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the + compilation target is Mac OS X 10.6. + Problem reported by parafin and Andoni Morales in + and + . + 2013-05-11 Paul Eggert mkdir-p: remove assumptions about umask and mode