Improved 'fatal-signal' module.
[gnulib.git] / lib / ChangeLog
index 188afb7..c543f10 100644 (file)
@@ -1,3 +1,113 @@
+2003-10-14  Bruno Haible  <bruno@clisp.org>
+
+       * fatal-signal.h: Improved comments. Suggested by Paul Eggert.
+       * fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
+       Also use volatile where needed.
+
+2003-10-12  Paul Eggert  <eggert@twinsun.com>
+
+       * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
+       (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
+       and define in terms of the other primitives.
+       * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
+       (SIZE_MAX): Define if not already defined.
+       (array_size_overflow): New function.
+       (xalloc_die): Abort instead of exiting if 'error' returns.
+       (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
+       (xmalloc, xrealloc): Use them.
+       (xcalloc): Check for address arithmetic overflow.
+       * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
+       a bit faster than strcpy.
+
+2003-10-08  Paul Eggert  <eggert@twinsun.com>
+
+       Merge getpass from libc, plus a few fixes.
+
+       * getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
+       Include <stdbool.h>.
+       Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
+       __fsetlocking to empty.
+       [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
+       do include <bits/libc-lock.h>.
+       Do not include <fcntl.h>; not needed.
+       [_LIBC]: Include <wchar.h>.
+       (NOTCANCEL_MODE): New macro.
+       (flockfile, funlockfile) [_LIBC]: New macros.
+       (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
+       [!_LIBC]: New macros.
+       (call_fclose): New function.
+       (getpass): Use it.  Save tty stream separately; this simplifies the
+       code and makes it more reliable if stdin happens to equal stdout.
+       Invoke __fsetlocking on tty.
+       Handle thread cancellation if needed.
+       Namespace cleanup (use __tcgetattr, __getline).
+       Use bool for Booleans.
+       [USE_IN_LIBIO]: Handle wide streams.
+       [!_LIBC]: Unconditionally do the fseek, since we don't know what
+       stream might go where.
+
+       * unlocked-io.h: Include <stdio.h>, so that the caller
+       doesn't have to include <stdio.h> before us.
+       (clearerr_unlocked, feof_unlocked, ferror_unlocked,
+       fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
+       fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
+       putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
+       if not declared, so that we can use getpass.c code from libc without
+       rewriting it.
+       (flockfile, ftrylockfile, funlockfile): New macros.
+
+2003-10-06  Bruno Haible  <bruno@clisp.org>
+
+       * version-etc-2.h: Remove file.
+       * version-etc-2.c: Remove file.
+
+2003-09-25  Jim Meyering  <jim@meyering.net>
+            Bruno Haible  <bruno@clisp.org>
+
+       This lets translators provide better translations for the
+       "Written by ..." part of --version output.
+       * version-etc.h: Include stdarg.h.
+       (version_etc_copyright): Declare as readonly.
+       (version_etc): Make this function variadic with a NULL-terminated list
+       of author name strings.
+       (version_etc_va): New declaration.
+       * version-etc.c: Include stdarg.h, stdlib.h.
+       (version_etc_copyright): Declare as readonly.
+       (version_etc_va): New function. Provide a different translatable string
+       for each possible number of authors < 10. Abbreviate when there are 10
+       authors or more.
+       (version_etc): Make this function variadic. Call version_etc_va.
+       Suggestion from Gary V. Vaughan.
+
+       * long-options.h (parse_long_options): Change prototype: the authors
+       string is moved to the end and becomes variadic.
+       * long-options.c: Include stdarg.h.
+       (parse_long_options): Make this function variadic, too.
+       Call version_etc_va, not version_etc.
+
+2003-10-06  Bruno Haible  <bruno@clisp.org>
+
+       * fatal-signal.h: New file, from GNU gettext.
+       * fatal-signal.c: New file, from GNU gettext.
+
+2003-10-04  Karl Berry  <karl@gnu.org>
+
+       * argp*: update from libc.
+
+2003-10-01  Larry Jones  <lawrence.jones@eds.com>
+
+       * getpass.c (getpass): Use a no-op fseek when switching from input to
+       output mode on the same stream.
+
+2003-09-29  Paul Eggert  <eggert@twinsun.com>
+
+       * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
+       Fix arg typo in previous patch.
+
+2003-09-28  Jim Meyering  <jim@meyering.net>
+
+       * error.c: Correct cpp indentation.
+
 2003-09-27  Paul Eggert  <eggert@twinsun.com>
 
        * minmax.h (MIN, MAX) [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]: