microoptimization of lib/poll.c
[gnulib.git] / ChangeLog
index 0e69018..9273b33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,334 @@
+2008-08-06  Paolo Bonzini  <bonzini@gnu.org>
+
+       * lib/poll.c (poll): Avoid division when timeout is 0, cache
+       _SC_OPEN_MAX, avoid repeated access to errno.  Check for nfd < 0.
+
+2008-08-06  Jim Meyering  <meyering@redhat.com>
+
+       * modules/inet_pton (License): Relicense under LGPLv2+.
+
+2008-08-03  Bruno Haible  <bruno@clisp.org>
+
+       Additional non-aborting API for lock and tls.
+       * lib/lock.h: Include <errno.h>.
+       (glthread_lock_init): New macro/function.
+       (gl_lock_init): Define as wrapper around glthread_lock_init.
+       (glthread_lock_lock): New macro/function.
+       (gl_lock_lock): Define as wrapper around glthread_lock_lock.
+       (glthread_lock_unlock): New macro/function.
+       (gl_lock_unlock): Define as wrapper around glthread_lock_unlock.
+       (glthread_lock_destroy): New macro/function.
+       (gl_lock_destroy): Define as wrapper around glthread_lock_destroy.
+       (glthread_rwlock_init): New macro/function.
+       (gl_rwlock_init): Define as wrapper around glthread_rwlock_init.
+       (glthread_rwlock_rdlock): New macro/function.
+       (gl_rwlock_rdlock): Define as wrapper around glthread_rwlock_rdlock.
+       (glthread_rwlock_wrlock): New macro/function.
+       (gl_rwlock_wrlock): Define as wrapper around glthread_rwlock_wrlock.
+       (glthread_rwlock_unlock): New macro/function.
+       (gl_rwlock_unlock): Define as wrapper around glthread_rwlock_unlock.
+       (glthread_rwlock_destroy): New macro/function.
+       (gl_rwlock_destroy): Define as wrapper around glthread_rwlock_destroy.
+       (glthread_recursive_lock_init): New macro/function.
+       (gl_recursive_lock_init): Define as wrapper around
+       glthread_recursive_lock_init.
+       (glthread_recursive_lock_lock): New macro/function.
+       (gl_recursive_lock_lock): Define as wrapper around
+       glthread_recursive_lock_lock.
+       (glthread_recursive_lock_unlock): New macro/function.
+       (gl_recursive_lock_unlock): Define as wrapper around
+       glthread_recursive_lock_unlock.
+       (glthread_recursive_lock_destroy): New macro/function.
+       (gl_recursive_lock_destroy): Define as wrapper around
+       glthread_recursive_lock_destroy.
+       (glthread_once): New macro/function.
+       (gl_once): Define as wrapper around glthread_once.
+       Update function declarations.
+       * lib/lock.c (glthread_rwlock_init_multithreaded): Renamed from
+       glthread_rwlock_init. Return error code.
+       (glthread_rwlock_rdlock_multithreaded): Renamed from
+       glthread_rwlock_rdlock. Return error code.
+       (glthread_rwlock_wrlock_multithreaded): Renamed from
+       glthread_rwlock_wrlock. Return error code.
+       (glthread_rwlock_unlock_multithreaded): Renamed from
+       glthread_rwlock_unlock. Return error code.
+       (glthread_rwlock_destroy_multithreaded): Renamed from
+       glthread_rwlock_destroy. Return error code.
+       (glthread_recursive_lock_init_multithreaded): Renamed from
+       glthread_recursive_lock_init. Return error code.
+       (glthread_recursive_lock_lock_multithreaded): Renamed from
+       glthread_recursive_lock_lock. Return error code.
+       (glthread_recursive_lock_unlock_multithreaded): Renamed from
+       glthread_recursive_lock_unlock. Return error code.
+       (glthread_recursive_lock_destroy_multithreaded): Renamed from
+       glthread_recursive_lock_destroy. Return error code.
+       (glthread_once_call): Make static.
+       (glthread_once_multithreaded): Renamed from glthread_once.
+       * lib/tls.h: Include <errno.h>.
+       (glthread_tls_key_init): New macro/function.
+       (gl_tls_key_init): Define as wrapper around glthread_tls_key_init.
+       (glthread_tls_set): New macro/function.
+       (gl_tls_set): Define as wrapper around glthread_tls_set.
+       (glthread_tls_key_destroy): New macro/function.
+       (gl_tls_key_destroy): Define as wrapper around glthread_tls_key_destroy.
+       Update function declarations.
+       * lib/tls.c (glthread_tls_get_multithreaded): Renamed from
+       glthread_tls_get.
+       Suggested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
+
+2008-08-04  Eric Blake  <ebb9@byu.net>
+
+       gnumakefile: use space, not TAB, outside of targets
+       * top/GNUmakefile (_dummy): Fix whitespace error in prior edit.
+
+2008-08-02  Jim Meyering  <meyering@redhat.com>
+
+       getdate.y: avoid locale-dependent date parsing failure
+       In Turkish locales, getdate would fail to recognize keywords
+       containing a lowercase "i".  The solution is not to rely on
+       locale-sensitive case-conversion.
+       * lib/getdate.y: Include <c-ctype.h> rather than <ctype.h>.
+       (lookup_word): Use c_toupper in place of toupper.
+       (yylex, get_date): Use c_ prefixed variants of isspace and isalpha, too.
+       Reported by Vefa Bicakci <bicave@superonline.com> in
+       <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14184>.
+       * modules/getdate (Depends-on): Add c-ctype.
+
+2008-08-02  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_import): When updating or creating a .gitignore
+       file, prepend each added line with a slash, and ignore leading slashes
+       from the existing lines.
+       Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
+
+2008-08-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Portability fix for GNU make 3.79.1.
+       * top/GNUmakefile: Avoid 'else COND', which older GNU make
+       versions do not understand.
+
+2008-08-01  Bruno Haible  <bruno@clisp.org>
+
+       Work around bug of HP-UX 10.20 cc with -0.0 literal.
+       * tests/test-isnanf.h (zero): New variable.
+       (main): Avoid literal -0.0f.
+       * tests/test-isnand.h (zero): New variable.
+       (main): Avoid literal -0.0.
+       * tests/test-isnanl.h (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-isnan.c (zerof, zerod, zerol): New variables.
+       (test_float, test_double, test_long_double): Avoid literals -0.0f,
+       -0.0, -0.0L.
+       * tests/test-signbit.c (test_signbitf): Avoid literal -0.0f.
+       (test_signbitd): Avoid literal -0.0.
+       (test_signbitl): Avoid literal -0.0L.
+       * tests/test-ceilf1.c (zero): New variable.
+       (main): Avoid literal -0.0f.
+       * tests/test-ceill.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-floorf1.c (zero): New variable.
+       (main): Avoid literal -0.0f.
+       * tests/test-floorl.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-roundf1.c (zero): New variable.
+       (main): Avoid literal -0.0f.
+       * tests/test-round1.c (zero): New variable.
+       (main): Avoid literal -0.0.
+       * tests/test-roundl.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-truncf1.c (zero): New variable.
+       (main): Avoid literal -0.0f.
+       * tests/test-trunc1.c (zero): New variable.
+       (main): Avoid literal -0.0.
+       * tests/test-truncl.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-frexp.c (zero): New variable.
+       (main): Avoid literal -0.0.
+       * tests/test-frexpl.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-ldexpl.c (zero): New variable.
+       (main): Avoid literal -0.0L.
+       * tests/test-snprintf-posix.h (have_minus_zero): Avoid literal -0.0.
+       (zerod, zerol): New variables.
+       (test_function): Avoid literals -0.0, -0.0L.
+       * tests/test-sprintf-posix.h (have_minus_zero): Avoid literal -0.0.
+       (zerod, zerol): New variables.
+       (test_function): Avoid literals -0.0, -0.0L.
+       * tests/test-vasnprintf-posix.c (have_minus_zero): Avoid literal -0.0.
+       (zerod, zerol): New variables.
+       (test_function): Avoid literals -0.0, -0.0L.
+       * tests/test-vasprintf-posix.c (have_minus_zero): Avoid literal -0.0.
+       (zerod, zerol): New variables.
+       (test_function): Avoid literals -0.0, -0.0L.
+       * tests/test-strtod.c (zero): New variable.
+       (main): Avoid literal -0.0.
+       Reported by Jonathan C. Patschke <jp@centtech.com>.
+
+2008-07-31  Jim Meyering  <meyering@redhat.com>
+
+       sha256.h: correct definition of SHA224_DIGEST_SIZE
+       * lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24.
+       Reported by Paulie Pena IV <paulie4@gmail.com>.
+       Define as 224 / 8, rather than as a literal.
+       (SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal.
+       * lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8.
+       (SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
+
+2008-07-31  Bruno Haible  <bruno@clisp.org>
+
+       * lib/regex_internal.h (BITSET_WORD_BITS): Make first conditional work
+       on HP-UX 10.20 with "cc -Ae". Fix second conditional.
+       Reported by Jonathan Patschke <jp@centtech.com>.
+
+2008-07-31  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_import): Make change from 2008-06-23 more robust.
+       Reported by Paolo Bonzini <bonzini@gnu.org>.
+
+2008-07-30  Eric Blake  <ebb9@byu.net>
+
+       test-strtod: allow compilation without -lm
+       * tests/test-strtod.c (main): Avoid link dependence on fabs.
+       Reported by Dennis Clarke <blastwave@gmail.com>.
+
+2008-07-28  Jim Meyering  <meyering@redhat.com>
+
+       bootstrap: work also when there are no .po files in po/
+       * build-aux/bootstrap (update_po_files): Complete the change
+       that I began in bc960df8c789c878f1c1c54a28a3c2648dead8d9.
+
+2008-07-27  Jim Meyering  <meyering@redhat.com>
+
+       * users.txt: Add zile.
+
+2008-07-26  Ben Pfaff  <blp@gnu.org>
+
+       Add missing dependencies on new m4/exponent[fdl].m4 files.
+       * modules/isnanf-nolibm: Add m4/exponentf.m4.
+       * modules/isnand-nolibm: Add m4/exponentd.m4.
+       * modules/isnanl-nolibm: Add m4/exponentl.m4.
+       * modules/signbit-tests: Use m4/exponent[fdl].m4 instead of
+       m4/isnan[fdl].m4, because the macros actually used moved.
+       Reported by Jim Meyering.
+
+2008-07-14  Ben Pfaff  <blp@gnu.org>
+
+       Add isinf module.
+       * lib/isinf.c: New file.
+       * lib/math.in.h: Define isinf macro if we have decided to replace
+       it.
+       * m4/isinf.m4: New file.
+       * m4/math_h.m4: Initialize and substitute variables for isinf
+       module.
+       * modules/isinf: New file.
+       * modules/isinf-tests: New file.
+       * modules/math: Add substitutions for new module.
+       * tests/test-isinf.c: New file.
+       * doc/posix-functions/isinf.texi: Mention new module.
+       * MODULES.html.sh: Mention new module.
+
+2008-07-14  Ben Pfaff  <blp@gnu.org>
+
+       Factor out some macros for use by additional modules.
+       * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Move into new file
+       exponentf.m4.
+       * m4/isnand.m4 (gl_DOUBLE_EXPONENT_LOCATION): Move into new file
+       exponentd.m4.
+       * m4/isnanl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Move into new
+       file exponentl.m4.
+       * m4/exponentf.m4: New file.
+       * m4/exponentd.m4: New file.
+       * m4/exponentl.m4: New file.
+       * modules/isnanf: Use new file m4/exponentf.m4.
+       * modules/isnand: Use new file m4/exponentd.m4.
+       * modules/isnanl: Use new file m4/exponentl.m4.
+
+2008-07-23  Ulrich Drepper  <drepper@redhat.com>
+
+       mktime.c: normalize tp->tm_isdst value to -1/0/1.
+       * lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
+       Reported by Michael Ringe <Michael.Ringe@gmx.de> in
+       <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
+
+       * lib/canonicalize-lgpl.c (__realpath): Avoid buffer overflow after
+       readlink on platforms without PATH_MAX.
+
+2008-07-21  Eric Blake  <ebb9@byu.net>
+
+       Warn, not fail, on stale version.
+       * top/GNUmakefile (_curr-ver): Tone down previous patch.
+
+       Don't allow installation with stale devel version number.
+       * top/GNUmakefile (_is-install-target): New macro.
+       (_curr-ver): Forbid installation with stale version number.
+
+2008-07-20  Bruno Haible  <bruno@clisp.org>
+
+       * modules/c-stack-tests (Makefile.am): Add LIBSIGSEGV to
+       TESTS_ENVIRONMENT.
+       * tests/test-c-stack2.sh: React differently if LIBSIGSEGV is in use.
+
+2008-07-20  Bruno Haible  <bruno@clisp.org>
+
+       * lib/c-stack.h (c_stack_action): Add documentation.
+       * lib/c-stack.c (c_stack_action): Remove incomplete documentation.
+
+2008-07-20  Bruno Haible  <bruno@clisp.org>
+
+       * modules/canonicalize-lgpl (License): Relicense under LGPLv2+.
+       * modules/readlink (License): Likewise.
+
+2008-07-17  Eric Blake  <ebb9@byu.net>
+
+       * modules/c-stack (Link): Fix typo.
+
+       Make c-stack use libsigsegv, when available.
+       * modules/c-stack (Depends-on): Add libsigsegv.
+       * modules/c-stack-tests (Makefile.am): Link with libsigsegv, if
+       needed.
+       * lib/c-stack.c (SIGSTKSZ): Define fallback.
+       (segv_handler, overflow_handler, c_stack_action)
+       [HAVE_LIBSIGSEGV && !HAVE_XSI_STACK_OVERFLOW_HEURISTIC]: Add new
+       implementation when libsigsegv is available, but only when using
+       the library is necessary.
+       * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Add
+       comment, explaining why XSI check fails on Linux.
+       (gl_PREREQ_C_STACK): Supply LIBCSTACK, LTLIBCSTACK.
+       * tests/test-c-stack2.sh: Tweak skip message.
+       * NEWS: Document new link-time requirements.
+
+2008-07-16  Eric Blake  <ebb9@byu.net>
+
+       c-stack: Expose false positives when not using libsigsegv.
+       * modules/c-stack-tests (Files): Expand test.
+       * tests/test-c-stack.c (main): Add means to conditionally trigger
+       non-overflow SIGSEGV.
+       * tests/test-c-stack2.sh: New file.
+
+2008-07-14  Bruno Haible  <bruno@clisp.org>
+
+       * m4/libsigsegv.m4: Remove unneeded AC_PREREQ.
+       Reported by Eric Blake.
+
+2008-07-14  Sam Steingold  <sds@gnu.org>
+           Bruno Haible  <bruno@clisp.org>
+
+       New module libsigsegv.
+       * modules/libsigsegv: New file.
+       * m4/libsigsegv.m4: New file, from GNU clisp sigsegv.m4 with
+       modifications.
+       * MODULES.html.sh (Signal handling): New section.
+
+2008-07-14  Bruno Haible  <bruno@clisp.org>
+
+       * modules/unictype/ctype-* (Description): Add the word "function".
+       Improves the resulting doc in MODULES.html.
+
+2008-07-12  Ben Pfaff  <blp@gnu.org>
+
+       Add longlong module.
+       * modules/longlong: New file.
+
 2008-07-12  Bruno Haible  <bruno@clisp.org>
 
        * m4/isnan.m4 (gl_ISNAN): When the replacement is used, set ISNAN_LIBM
 2008-07-10  Ben Pfaff  <blp@gnu.org>
 
        Add isnan module.
-        * doc/posix-functions/isnan.texi: Mention new module.
-        * lib/math.in.h: Define isnan macro if we have decided to replace
-        it.
-        * m4/isnan.m4: New file.
+       * doc/posix-functions/isnan.texi: Mention new module.
+       * lib/math.in.h: Define isnan macro if we have decided to replace
+       it.
+       * m4/isnan.m4: New file.
        * m4/isnanl.m4 (gl_FUNC_ISNANL): Factor out some code into new
        macro gl_BUILD_ISNANL so that isnan.m4 can use that functionality
        also.
        * modules/isnand-nolibm: Likewise.
        * modules/isnanf-nolibm-tests: Likewise.
        * modules/isnand-nolibm-tests: Likewise.
-        * lib/frexp.c: Likewise.
+       * lib/frexp.c: Likewise.
        * lib/isfinite.c: Likewise.
        * lib/signbitd.c: Likewise.
        * lib/signbitf.c: Likewise.