bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sync from gnulib to coreutils


From: Paul Eggert
Subject: sync from gnulib to coreutils
Date: Wed, 09 Aug 2006 16:43:31 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

I installed the following to sync from gnulib.

Index: build-aux/ChangeLog
===================================================================
RCS file: /fetish/cu/build-aux/ChangeLog,v
retrieving revision 1.21
diff -p -u -r1.21 ChangeLog
--- build-aux/ChangeLog 25 Jul 2006 14:10:12 -0000      1.21
+++ build-aux/ChangeLog 9 Aug 2006 23:38:32 -0000
@@ -1,3 +1,7 @@
+2006-08-09  Paul Eggert  <address@hidden>
+
+       * texinfo.tex: Update from gnulib.
+
 2006-07-25  Jim Meyering  <address@hidden>
 
        * vc-list-files: Handle git repositories, too.
Index: build-aux/texinfo.tex
===================================================================
RCS file: /fetish/cu/build-aux/texinfo.tex,v
retrieving revision 1.17
diff -p -u -r1.17 texinfo.tex
--- build-aux/texinfo.tex       9 Jul 2006 16:57:00 -0000       1.17
+++ build-aux/texinfo.tex       9 Aug 2006 23:38:34 -0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2006-06-19.13}
+\def\texinfoversion{2006-07-17.16}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -327,9 +327,9 @@
       \pagebody{#1}%
       \ifdim\ht\footlinebox > 0pt
         % Only leave this space if the footline is nonempty.
-        % (We lessened \vsize for it in \oddfootingxxx.)
+        % (We lessened \vsize for it in \oddfootingyyy.)
         % The \baselineskip=24pt in plain's \makefootline has no effect.
-        \vskip 2\baselineskip
+        \vskip 24pt
         \unvbox\footlinebox
       \fi
       %
@@ -2051,11 +2051,11 @@ where each line of input produces a line
 % and arrange explicitly to hyphenate at a dash.
 %  -- rms.
 {
-  \catcode`\-=\active
-  \catcode`\_=\active
+  \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active
   %
   \global\def\code{\begingroup
-    \catcode`\-=\active  \catcode`\_=\active
+    \catcode`\-=\active  \catcode`\_=\active \catcode`\'=\active
+    \let'\singlequotechar
     \ifallowcodebreaks
      \let-\codedash
      \let_\codeunder
@@ -2472,8 +2472,8 @@ where each line of input produces a line
   %
   % Leave some space for the footline.  Hopefully ok to assume
   % @evenfooting will not be used by itself.
-  \global\advance\pageheight by -\baselineskip
-  \global\advance\vsize by -\baselineskip
+  \global\advance\pageheight by -12pt
+  \global\advance\vsize by -12pt
 }
 
 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
@@ -5042,7 +5042,7 @@ where each line of input produces a line
 {\tentt \global\dimen0 = 3em}% Width of the box.
 \dimen2 = .55pt % Thickness of rules
 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
 %
 \setbox\errorbox=\hbox to \dimen0{\hfil
    \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
@@ -5265,11 +5265,10 @@ where each line of input produces a line
 %
 \maketwodispenvs {lisp}{example}{%
   \nonfillstart
-  \tt
+  \tt\quoteexpand
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
   \gobble       % eat return
 }
-
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
 \makedispenv {display}{%
@@ -5397,6 +5396,22 @@ where each line of input produces a line
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
 \def\starttabbox{\setbox0=\hbox\bgroup}
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report.  xpdf does work with the
+% regular 0x27.  
+% 
+\def\singlequotechar{%
+  \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+    '%
+  \else
+    \char'15
+  \fi
+}
+%
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
@@ -5409,7 +5424,13 @@ where each line of input produces a line
       \wd0=\dimen0 \box0 \starttabbox
     }%
   }
+  \catcode`\'=\active
+  \gdef\quoteexpand{%
+    \catcode`\'=\active
+    \def'{\singlequotechar}
+  }%
 \endgroup
+%
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
@@ -5418,6 +5439,7 @@ where each line of input produces a line
   \def\par{\leavevmode\egroup\box0\endgraf}%
   \catcode`\`=\active
   \tabexpand
+  \quoteexpand
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count
Index: lib/ChangeLog
===================================================================
RCS file: /fetish/cu/lib/ChangeLog,v
retrieving revision 1.1214
diff -p -u -r1.1214 ChangeLog
--- lib/ChangeLog       9 Aug 2006 20:05:18 -0000       1.1214
+++ lib/ChangeLog       9 Aug 2006 23:38:35 -0000
@@ -1,3 +1,13 @@
+2006-08-09  Paul Eggert  <address@hidden>
+
+       * allocsa.h, config.charset, error.c, error.h, exitfail.c, full-write.c:
+       * getaddrinfo.c, getaddrinfo.h, gettext.h, localcharset.c, mbchar.h:
+       * mbswidth.c, mkstemp-safer.c, pipe-safer.c, printf-args.c, quote.c:
+       * readlink.c, regex_internal.h, setenv.c, stdint_.h, stdio--.h:
+       * stdio-safer.h, stpcpy.c, strcspn.c, strtoimax.c, vasnprintf.h:
+       * version-etc.c, wcwidth.h:
+       Update from gnulib.
+
 2006-08-09  Jim Meyering  <address@hidden>
 
        * rand-isaac.c: Include <config.h>.
Index: lib/allocsa.h
===================================================================
RCS file: /fetish/cu/lib/allocsa.h,v
retrieving revision 1.5
diff -p -u -r1.5 allocsa.h
--- lib/allocsa.h       14 May 2005 07:58:06 -0000      1.5
+++ lib/allocsa.h       9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2004 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,12 @@
 #include <stddef.h>
 #include <stdlib.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
    alloca(N); otherwise it returns NULL.  It either returns N bytes of
    memory allocated on the stack, that lasts until the function returns,
@@ -69,6 +75,11 @@ extern void freesa (void *p);
    If this would be useful in your application. please speak up.  */
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 /* ------------------- Auxiliary, non-public definitions ------------------- */
 
 /* Determine the alignment of a type at compile time.  */
@@ -81,6 +92,10 @@ extern void freesa (void *p);
   /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
      values.  */
 # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+#elif defined _AIX
+  /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
+     values.  */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
 #else
 # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, 
__slot2)
 #endif
Index: lib/config.charset
===================================================================
RCS file: /fetish/cu/lib/config.charset,v
retrieving revision 1.18
diff -p -u -r1.18 config.charset
--- lib/config.charset  14 May 2005 07:58:06 -0000      1.18
+++ lib/config.charset  9 Aug 2006 23:38:35 -0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -30,21 +30,21 @@
 # The current list of GNU canonical charset names is as follows.
 #
 #       name              MIME?             used by which systems
-#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd darwin
-#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd darwin
-#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin
+#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd 
darwin
+#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd 
darwin
 #   ISO-8859-3              Y   glibc solaris
-#   ISO-8859-4              Y   osf solaris freebsd darwin
-#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-4              Y   osf solaris freebsd netbsd darwin
+#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd 
darwin
 #   ISO-8859-6              Y   glibc aix hpux solaris
-#   ISO-8859-7              Y   glibc aix hpux irix osf solaris darwin
+#   ISO-8859-7              Y   glibc aix hpux irix osf solaris netbsd darwin
 #   ISO-8859-8              Y   glibc aix hpux osf solaris
 #   ISO-8859-9              Y   glibc aix hpux irix osf solaris darwin
-#   ISO-8859-13                 glibc darwin
+#   ISO-8859-13                 glibc netbsd darwin
 #   ISO-8859-14                 glibc
 #   ISO-8859-15                 glibc aix osf solaris freebsd darwin
-#   KOI8-R                  Y   glibc solaris freebsd darwin
-#   KOI8-U                  Y   glibc freebsd darwin
+#   KOI8-R                  Y   glibc solaris freebsd netbsd darwin
+#   KOI8-U                  Y   glibc freebsd netbsd darwin
 #   KOI8-T                      glibc
 #   CP437                       dos
 #   CP775                       dos
@@ -57,7 +57,7 @@
 #   CP862                       dos
 #   CP864                       dos
 #   CP865                       dos
-#   CP866                       freebsd darwin dos
+#   CP866                       freebsd netbsd darwin dos
 #   CP869                       dos
 #   CP874                       woe32 dos
 #   CP922                       aix
@@ -70,22 +70,22 @@
 #   CP1125                      dos
 #   CP1129                      aix
 #   CP1250                      woe32
-#   CP1251                      glibc solaris darwin woe32
+#   CP1251                      glibc solaris netbsd darwin woe32
 #   CP1252                      aix woe32
 #   CP1253                      woe32
 #   CP1254                      woe32
 #   CP1255                      glibc woe32
 #   CP1256                      woe32
 #   CP1257                      woe32
-#   GB2312                  Y   glibc aix hpux irix solaris freebsd darwin
-#   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd darwin
-#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd darwin
-#   EUC-TW                      glibc aix hpux irix osf solaris
-#   BIG5                    Y   glibc aix hpux osf solaris freebsd darwin
+#   GB2312                  Y   glibc aix hpux irix solaris freebsd netbsd 
darwin
+#   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd netbsd 
darwin
+#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd 
darwin
+#   EUC-TW                      glibc aix hpux irix osf solaris netbsd
+#   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd 
darwin
 #   BIG5-HKSCS                  glibc solaris
 #   GBK                         glibc aix osf solaris woe32 dos
-#   GB18030                     glibc solaris
-#   SHIFT_JIS               Y   hpux osf solaris freebsd darwin
+#   GB18030                     glibc solaris netbsd
+#   SHIFT_JIS               Y   hpux osf solaris freebsd netbsd darwin
 #   JOHAB                       glibc solaris woe32
 #   TIS-620                     glibc aix hpux osf solaris
 #   VISCII                  Y   glibc
@@ -99,7 +99,7 @@
 #   HP-KANA8                    hpux
 #   DEC-KANJI                   osf
 #   DEC-HANYU                   osf
-#   UTF-8                   Y   glibc aix hpux osf solaris darwin
+#   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin
 #
 # Note: Names which are not marked as being a MIME name should not be used in
 # Internet protocols for information interchange (mail, news, etc.).
@@ -387,6 +387,8 @@ case "$os" in
        echo "ISO8859-2 ISO-8859-2"
        echo "ISO8859-4 ISO-8859-4"
        echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-7 ISO-8859-7"
+       echo "ISO8859-13 ISO-8859-13"
        echo "ISO8859-15 ISO-8859-15"
        echo "eucCN GB2312"
        echo "eucJP EUC-JP"
@@ -479,7 +481,7 @@ case "$os" in
        echo "# If you find that the encoding given for your language and"
        echo "# country is not the one your DOS machine actually uses, just"
        echo "# correct it in this file, and send a mail to"
-       echo "# Juan Manuel Guerrero <address@hidden>"
+       echo "# Juan Manuel Guerrero <address@hidden>"
        echo "# and Bruno Haible <address@hidden>."
        echo "#"
        echo "C ASCII"
Index: lib/error.c
===================================================================
RCS file: /fetish/cu/lib/error.c,v
retrieving revision 1.37
diff -p -u -r1.37 error.c
--- lib/error.c 14 May 2005 07:58:06 -0000      1.37
+++ lib/error.c 9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,6 +34,9 @@
 #endif
 
 #ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
 # include <wchar.h>
 # define mbsrtowcs __mbsrtowcs
 #endif
@@ -59,6 +62,7 @@ unsigned int error_message_count;
 
 # define program_name program_invocation_name
 # include <errno.h>
+# include <limits.h>
 # include <libio/libioP.h>
 
 /* In GNU libc we want do not want to use the common name `error' directly.
@@ -122,14 +126,10 @@ print_errno_message (int errnum)
 #endif
 
 #if _LIBC
-  if (_IO_fwide (stderr, 0) > 0)
-    {
-      __fwprintf (stderr, L": %s", s);
-      return;
-    }
-#endif
-
+  __fxprintf (NULL, ": %s", s);
+#else
   fprintf (stderr, ": %s", s);
+#endif
 }
 
 static void
@@ -140,26 +140,65 @@ error_tail (int status, int errnum, cons
     {
 # define ALLOCA_LIMIT 2000
       size_t len = strlen (message) + 1;
-      const wchar_t *wmessage = L"out of memory";
-      wchar_t *wbuf = (len < ALLOCA_LIMIT
-                      ? alloca (len * sizeof *wbuf)
-                      : len <= SIZE_MAX / sizeof *wbuf
-                      ? malloc (len * sizeof *wbuf)
-                      : NULL);
+      wchar_t *wmessage = NULL;
+      mbstate_t st;
+      size_t res;
+      const char *tmp;
+      bool use_malloc = false;
 
-      if (wbuf)
+      while (1)
        {
-         size_t res;
-         mbstate_t st;
-         const char *tmp = message;
+         if (__libc_use_alloca (len * sizeof (wchar_t)))
+           wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+         else
+           {
+             if (!use_malloc)
+               wmessage = NULL;
+
+             wchar_t *p = (wchar_t *) realloc (wmessage,
+                                               len * sizeof (wchar_t));
+             if (p == NULL)
+               {
+                 free (wmessage);
+                 fputws_unlocked (L"out of memory\n", stderr);
+                 return;
+               }
+             wmessage = p;
+             use_malloc = true;
+           }
+
          memset (&st, '\0', sizeof (st));
-         res = mbsrtowcs (wbuf, &tmp, len, &st);
-         wmessage = res == (size_t) -1 ? L"???" : wbuf;
+         tmp = message;
+
+         res = mbsrtowcs (wmessage, &tmp, len, &st);
+         if (res != len)
+           break;
+
+         if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+           {
+             /* This really should not happen if everything is fine.  */
+             res = (size_t) -1;
+             break;
+           }
+
+         len *= 2;
+       }
+
+      if (res == (size_t) -1)
+       {
+         /* The string cannot be converted.  */
+         if (use_malloc)
+           {
+             free (wmessage);
+             use_malloc = false;
+           }
+         wmessage = (wchar_t *) L"???";
        }
 
       __vfwprintf (stderr, wmessage, args);
-      if (! (len < ALLOCA_LIMIT))
-       free (wbuf);
+
+      if (use_malloc)
+       free (wmessage);
     }
   else
 #endif
@@ -170,11 +209,10 @@ error_tail (int status, int errnum, cons
   if (errnum)
     print_errno_message (errnum);
 #if _LIBC
-  if (_IO_fwide (stderr, 0) > 0)
-    putwc (L'\n', stderr);
-  else
+  __fxprintf (NULL, "\n");
+#else
+  putc ('\n', stderr);
 #endif
-    putc ('\n', stderr);
   fflush (stderr);
   if (status)
     exit (status);
@@ -207,11 +245,10 @@ error (int status, int errnum, const cha
   else
     {
 #if _LIBC
-      if (_IO_fwide (stderr, 0) > 0)
-       __fwprintf (stderr, L"%s: ", program_name);
-      else
+      __fxprintf (NULL, "%s: ", program_name);
+#else
+      fprintf (stderr, "%s: ", program_name);
 #endif
-       fprintf (stderr, "%s: ", program_name);
     }
 
   va_start (args, message);
@@ -267,21 +304,19 @@ error_at_line (int status, int errnum, c
   else
     {
 #if _LIBC
-      if (_IO_fwide (stderr, 0) > 0)
-       __fwprintf (stderr, L"%s: ", program_name);
-      else
+      __fxprintf (NULL, "%s:", program_name);
+#else
+      fprintf (stderr, "%s:", program_name);
 #endif
-       fprintf (stderr, "%s:", program_name);
     }
 
   if (file_name != NULL)
     {
 #if _LIBC
-      if (_IO_fwide (stderr, 0) > 0)
-       __fwprintf (stderr, L"%s:%d: ", file_name, line_number);
-      else
+      __fxprintf (NULL, "%s:%d: ", file_name, line_number);
+#else
+      fprintf (stderr, "%s:%d: ", file_name, line_number);
 #endif
-       fprintf (stderr, "%s:%d: ", file_name, line_number);
     }
 
   va_start (args, message);
Index: lib/error.h
===================================================================
RCS file: /fetish/cu/lib/error.h,v
retrieving revision 1.20
diff -p -u -r1.20 error.h
--- lib/error.h 14 May 2005 07:58:06 -0000      1.20
+++ lib/error.h 9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
 #  define __attribute__(Spec) /* empty */
 # endif
 /* The __-protected variants of `format' and `printf' attributes
Index: lib/exitfail.c
===================================================================
RCS file: /fetish/cu/lib/exitfail.c,v
retrieving revision 1.5
diff -p -u -r1.5 exitfail.c
--- lib/exitfail.c      22 Sep 2005 06:05:39 -0000      1.5
+++ lib/exitfail.c      9 Aug 2006 23:38:35 -0000
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
Index: lib/full-write.c
===================================================================
RCS file: /fetish/cu/lib/full-write.c,v
retrieving revision 1.22
diff -p -u -r1.22 full-write.c
--- lib/full-write.c    22 Sep 2005 06:05:39 -0000      1.22
+++ lib/full-write.c    9 Aug 2006 23:38:35 -0000
@@ -1,7 +1,7 @@
 /* An interface to read and write that retries (if necessary) until complete.
 
    Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004 Free Software Foundation, Inc.
+   2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
Index: lib/getaddrinfo.c
===================================================================
RCS file: /fetish/cu/lib/getaddrinfo.c,v
retrieving revision 1.4
diff -p -u -r1.4 getaddrinfo.c
--- lib/getaddrinfo.c   9 Jul 2006 16:59:05 -0000       1.4
+++ lib/getaddrinfo.c   9 Aug 2006 23:38:35 -0000
@@ -140,7 +140,7 @@ getaddrinfo (const char *restrict nodena
     return getaddrinfo_ptr (nodename, servname, hints, res);
 #endif
 
-  if (hints && (hints->ai_flags & ~AI_CANONNAME))
+  if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE)))
     /* FIXME: Support more flags. */
     return EAI_BADFLAGS;
 
@@ -153,8 +153,16 @@ getaddrinfo (const char *restrict nodena
     return EAI_SOCKTYPE; /* FIXME: Better return code? */
 
   if (!nodename)
-    /* FIXME: Support server bind mode. */
-    return EAI_NONAME;
+    {
+      if (!(hints->ai_flags & AI_PASSIVE))
+       return EAI_NONAME;
+
+#ifdef HAVE_IPV6
+      nodename = (hint->ai_family == AF_INET6) ? "::" : "0.0.0.0";
+#else
+      nodename = "0.0.0.0";
+#endif
+    }
 
   if (servname)
     {
Index: lib/getaddrinfo.h
===================================================================
RCS file: /fetish/cu/lib/getaddrinfo.h,v
retrieving revision 1.8
diff -p -u -r1.8 getaddrinfo.h
--- lib/getaddrinfo.h   9 Jul 2006 16:59:05 -0000       1.8
+++ lib/getaddrinfo.h   9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,6 @@
 /* Get address information.
-   Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 Free Software Foundation, 
Inc.
+   Copyright (C) 1996-2002, 2003, 2004, 2005, 2006
+                 Free Software Foundation, Inc.
    Contributed by Simon Josefsson <address@hidden>.
 
    This program is free software; you can redistribute it and/or modify
@@ -17,20 +18,20 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef GETADDRINFO_H
-# define GETADDRINFO_H
+#define GETADDRINFO_H
 
 /* sys/socket.h in i386-unknown-freebsd4.10 and
    powerpc-apple-darwin5.5 require sys/types.h, so include it first.
    Then we'll also get 'socklen_t' and 'struct sockaddr' which are
    used below. */
-# include <sys/types.h>
+#include <sys/types.h>
 /* Get all getaddrinfo related declarations, if available.  */
-# include <sys/socket.h>
+#include <sys/socket.h>
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
 
-# ifndef HAVE_STRUCT_ADDRINFO
+#ifndef HAVE_STRUCT_ADDRINFO
 
 /* Structure to contain information about address of a service provider.  */
 struct addrinfo
@@ -44,69 +45,70 @@ struct addrinfo
   char *ai_canonname;          /* Canonical name for service location.  */
   struct addrinfo *ai_next;    /* Pointer to next in list.  */
 };
-# endif
+#endif
 
 /* Possible values for `ai_flags' field in `addrinfo' structure.  */
-# ifndef AI_PASSIVE
-#  define AI_PASSIVE    0x0001 /* Socket address is intended for `bind'.  */
-# endif
-# ifndef AI_CANONNAME
-#  define AI_CANONNAME  0x0002 /* Request for canonical name.  */
-# endif
-# ifndef AI_NUMERICHOST
-#  define AI_NUMERICHOST 0x0004        /* Don't use name resolution.  */
-# endif
-# ifndef AI_V4MAPPED
-#  define AI_V4MAPPED   0x0008 /* IPv4 mapped addresses are acceptable.  */
-# endif
-# ifndef AI_ALL
-#  define AI_ALL        0x0010 /* Return IPv4 mapped and IPv6 addresses.  */
-# endif
-# ifndef AI_ADDRCONFIG
-#  define AI_ADDRCONFIG         0x0020 /* Use configuration of this host to 
choose
-                                  returned address type..  */
+#ifndef AI_PASSIVE
+# define AI_PASSIVE    0x0001  /* Socket address is intended for `bind'.  */
+#endif
+#ifndef AI_CANONNAME
+# define AI_CANONNAME  0x0002  /* Request for canonical name.  */
 #endif
 #ifndef AI_NUMERICSERV
-#  define AI_NUMERICSERV 0x0400        /* Don't use name resolution.  */
-# endif
+# define AI_NUMERICSERV        0x0400  /* Don't use name resolution.  */
+#endif
+
+#if 0
+/* The commented out definitions below are not yet implemented in the
+   GNULIB getaddrinfo() replacement, so are not yet needed and may, in fact,
+   cause conflicts on systems with a getaddrinfo() function which does not
+   define them.
+
+   If they are restored, be sure to protect the definitions with #ifndef.  */
+#define AI_NUMERICHOST 0x0004  /* Don't use name resolution.  */
+#define AI_V4MAPPED    0x0008  /* IPv4 mapped addresses are acceptable.  */
+#define AI_ALL         0x0010  /* Return IPv4 mapped and IPv6 addresses.  */
+#define AI_ADDRCONFIG  0x0020  /* Use configuration of this host to choose
+                                  returned address type..  */
+#endif /* 0 */
 
 /* Error values for `getaddrinfo' function.  */
-# ifndef EAI_BADFLAGS
-#  define EAI_BADFLAGS   -1    /* Invalid value for `ai_flags' field.  */
-#  define EAI_NONAME     -2    /* NAME or SERVICE is unknown.  */
-#  define EAI_AGAIN      -3    /* Temporary failure in name resolution.  */
-#  define EAI_FAIL       -4    /* Non-recoverable failure in name res.  */
-#  define EAI_NODATA     -5    /* No address associated with NAME.  */
-#  define EAI_FAMILY     -6    /* `ai_family' not supported.  */
-#  define EAI_SOCKTYPE   -7    /* `ai_socktype' not supported.  */
-#  define EAI_SERVICE    -8    /* SERVICE not supported for `ai_socktype'.  */
-#  define EAI_MEMORY     -10   /* Memory allocation failure.  */
+#ifndef EAI_BADFLAGS
+# define EAI_BADFLAGS    -1    /* Invalid value for `ai_flags' field.  */
+# define EAI_NONAME      -2    /* NAME or SERVICE is unknown.  */
+# define EAI_AGAIN       -3    /* Temporary failure in name resolution.  */
+# define EAI_FAIL        -4    /* Non-recoverable failure in name res.  */
+# define EAI_NODATA      -5    /* No address associated with NAME.  */
+# define EAI_FAMILY      -6    /* `ai_family' not supported.  */
+# define EAI_SOCKTYPE    -7    /* `ai_socktype' not supported.  */
+# define EAI_SERVICE     -8    /* SERVICE not supported for `ai_socktype'.  */
+# define EAI_MEMORY      -10   /* Memory allocation failure.  */
 #endif
 #ifndef EAI_OVERFLOW
 /* Not defined on mingw32. */
-#  define EAI_OVERFLOW   -12   /* Argument buffer overflow.  */
+# define EAI_OVERFLOW    -12   /* Argument buffer overflow.  */
 #endif
-# ifndef EAI_ADDRFAMILY
+#ifndef EAI_ADDRFAMILY
 /* Not defined on mingw32. */
-#  define EAI_ADDRFAMILY  -9   /* Address family for NAME not supported.  */
-# endif
-# ifndef EAI_SYSTEM
+# define EAI_ADDRFAMILY  -9    /* Address family for NAME not supported.  */
+#endif
+#ifndef EAI_SYSTEM
 /* Not defined on mingw32. */
-#  define EAI_SYSTEM     -11   /* System error returned in `errno'.  */
-# endif
+# define EAI_SYSTEM      -11   /* System error returned in `errno'.  */
+#endif
 
-# ifdef __USE_GNU
-#  ifndef EAI_INPROGRESS
-#   define EAI_INPROGRESS      -100    /* Processing request in progress.  */
-#   define EAI_CANCELED                -101    /* Request canceled.  */
-#   define EAI_NOTCANCELED     -102    /* Request not canceled.  */
-#   define EAI_ALLDONE         -103    /* All requests done.  */
-#   define EAI_INTR            -104    /* Interrupted by a signal.  */
-#   define EAI_IDN_ENCODE      -105    /* IDN encoding failed.  */
-#  endif
+#ifdef __USE_GNU
+# ifndef EAI_INPROGRESS
+#  define EAI_INPROGRESS       -100    /* Processing request in progress.  */
+#  define EAI_CANCELED         -101    /* Request canceled.  */
+#  define EAI_NOTCANCELED      -102    /* Request not canceled.  */
+#  define EAI_ALLDONE          -103    /* All requests done.  */
+#  define EAI_INTR             -104    /* Interrupted by a signal.  */
+#  define EAI_IDN_ENCODE       -105    /* IDN encoding failed.  */
 # endif
+#endif
 
-# if !HAVE_DECL_GETADDRINFO
+#if !HAVE_DECL_GETADDRINFO
 /* Translate name of a service location and/or a service name to set of
    socket addresses.
    For more details, see the POSIX:2001 specification
@@ -115,23 +117,23 @@ extern int getaddrinfo (const char *rest
                        const char *restrict servname,
                        const struct addrinfo *restrict hints,
                        struct addrinfo **restrict res);
-# endif
+#endif
 
-# if !HAVE_DECL_FREEADDRINFO
+#if !HAVE_DECL_FREEADDRINFO
 /* Free `addrinfo' structure AI including associated storage.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
 extern void freeaddrinfo (struct addrinfo *ai);
-# endif
+#endif
 
-# if !HAVE_DECL_GAI_STRERROR
+#if !HAVE_DECL_GAI_STRERROR
 /* Convert error return from getaddrinfo() to a string.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/gai_strerror.html>.  */
 extern const char *gai_strerror (int ecode);
-# endif
+#endif
 
-# if !HAVE_DECL_GETNAMEINFO
+#if !HAVE_DECL_GETNAMEINFO
 /* Convert socket address to printable node and service names.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getnameinfo.html>.  */
@@ -140,14 +142,14 @@ extern int getnameinfo(const struct sock
                       char *restrict service, socklen_t servicelen,
                       int flags);
 
-# endif
+#endif
 
 /* Possible flags for getnameinfo.  */
-# ifndef NI_NUMERICHOST
-#  define NI_NUMERICHOST 1
-# endif
-# ifndef NI_NUMERICSERV
-#  define NI_NUMERICSERV 2
-# endif
+#ifndef NI_NUMERICHOST
+# define NI_NUMERICHOST 1
+#endif
+#ifndef NI_NUMERICSERV
+# define NI_NUMERICSERV 2
+#endif
 
 #endif /* GETADDRINFO_H */
Index: lib/gettext.h
===================================================================
RCS file: /fetish/cu/lib/gettext.h,v
retrieving revision 1.6
diff -p -u -r1.6 gettext.h
--- lib/gettext.h       14 May 2005 07:58:06 -0000      1.6
+++ lib/gettext.h       9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -75,4 +75,168 @@
    initializer for static 'char[]' or 'const char[]' variables.  */
 #define gettext_noop(String) String
 
+/* The separator between msgctxt and msgid in a .mo file.  */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
+   short and rarely need to change.
+   The letter 'p' stands for 'particular' or 'special'.  */
+#define pgettext(Msgctxt, Msgid) \
+  pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, 
LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, 
Category)
+#define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, 
N, LC_MESSAGES)
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, 
MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, 
MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+             const char *msg_ctxt_id, const char *msgid,
+             int category)
+{
+  const char *translation = dcgettext (domain, msg_ctxt_id, category);
+  if (translation == msg_ctxt_id)
+    return msgid;
+  else
+    return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+              const char *msg_ctxt_id, const char *msgid,
+              const char *msgid_plural, unsigned long int n,
+              int category)
+{
+  const char *translation =
+    dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+  if (translation == msg_ctxt_id || translation == msgid_plural)
+    return (n == 1 ? msgid : msgid_plural);
+  else
+    return translation;
+}
+
+/* The same thing extended for non-constant arguments.  Here MSGCTXT and MSGID
+   can be arbitrary expressions.  But for string literals these macros are
+   less efficient than those above.  */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+  (__GNUC__ >= 3 || defined __cplusplus)
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+  dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+                const char *msgctxt, const char *msgid,
+                int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+       free (msg_ctxt_id);
+#endif
+      if (translation != msg_ctxt_id)
+       return translation;
+    }
+  return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+                 const char *msgctxt, const char *msgid,
+                 const char *msgid_plural, unsigned long int n,
+                 int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, 
category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+       free (msg_ctxt_id);
+#endif
+      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+       return translation;
+    }
+  return (n == 1 ? msgid : msgid_plural);
+}
+
 #endif /* _LIBGETTEXT_H */
Index: lib/localcharset.c
===================================================================
RCS file: /fetish/cu/lib/localcharset.c,v
retrieving revision 1.19
diff -p -u -r1.19 localcharset.c
--- lib/localcharset.c  10 Jan 2006 17:47:56 -0000      1.19
+++ lib/localcharset.c  9 Aug 2006 23:38:35 -0000
@@ -25,23 +25,13 @@
 /* Specification.  */
 #include "localcharset.h"
 
-#if HAVE_STDDEF_H
-# include <stddef.h>
-#endif
-
+#include <stddef.h>
 #include <stdio.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <string.h>
+#include <stdlib.h>
 
 #if defined _WIN32 || defined __WIN32__
-# undef WIN32   /* avoid warning on mingw32 */
-# define WIN32
+# define WIN32_NATIVE
 #endif
 
 #if defined __EMX__
@@ -49,7 +39,7 @@
 # define OS2
 #endif
 
-#if !defined WIN32
+#if !defined WIN32_NATIVE
 # if HAVE_LANGINFO_CODESET
 #  include <langinfo.h>
 # else
@@ -57,7 +47,11 @@
 #   include <locale.h>
 #  endif
 # endif
-#elif defined WIN32
+# ifdef __CYGWIN__
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+# endif
+#elif defined WIN32_NATIVE
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 #endif
@@ -113,7 +107,7 @@ get_charset_aliases (void)
   cp = charset_aliases;
   if (cp == NULL)
     {
-#if !(defined VMS || defined WIN32)
+#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
       FILE *fp;
       const char *dir;
       const char *base = "charset.alias";
@@ -239,7 +233,7 @@ get_charset_aliases (void)
           "DECKOREAN" "\0" "EUC-KR" "\0";
 # endif
 
-# if defined WIN32
+# if defined WIN32_NATIVE || defined __CYGWIN__
       /* To avoid the troubles of installing a separate file in the same
         directory as the DLL and of retrieving the DLL's directory at
         runtime, simply inline the aliases here.  */
@@ -291,13 +285,60 @@ locale_charset (void)
   const char *codeset;
   const char *aliases;
 
-#if !(defined WIN32 || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2)
 
 # if HAVE_LANGINFO_CODESET
 
   /* Most systems support nl_langinfo (CODESET) nowadays.  */
   codeset = nl_langinfo (CODESET);
 
+#  ifdef __CYGWIN__
+  /* Cygwin 2006 does not have locales.  nl_langinfo (CODESET) always
+     returns "US-ASCII".  As long as this is not fixed, return the suffix
+     of the locale name from the environment variables (if present) or
+     the codepage as a number.  */
+  if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+    {
+      const char *locale;
+      static char buf[2 + 10 + 1];
+
+      locale = getenv ("LC_ALL");
+      if (locale == NULL || locale[0] == '\0')
+       {
+         locale = getenv ("LC_CTYPE");
+         if (locale == NULL || locale[0] == '\0')
+           locale = getenv ("LANG");
+       }
+      if (locale != NULL && locale[0] != '\0')
+       {
+         /* If the locale name contains an encoding after the dot, return
+            it.  */
+         const char *dot = strchr (locale, '.');
+
+         if (dot != NULL)
+           {
+             const char *modifier;
+
+             dot++;
+             /* Look for the possible @... trailer and remove it, if any.  */
+             modifier = strchr (dot, '@');
+             if (modifier == NULL)
+               return dot;
+             if (modifier - dot < sizeof (buf))
+               {
+                 memcpy (buf, dot, modifier - dot);
+                 buf [modifier - dot] = '\0';
+                 return buf;
+               }
+           }
+       }
+
+      /* Woe32 has a function returning the locale's codepage as a number.  */
+      sprintf (buf, "CP%u", GetACP ());
+      codeset = buf;
+    }
+#  endif
+
 # else
 
   /* On old systems which lack it, use setlocale or getenv.  */
@@ -328,7 +369,7 @@ locale_charset (void)
 
 # endif
 
-#elif defined WIN32
+#elif defined WIN32_NATIVE
 
   static char buf[2 + 10 + 1];
 
Index: lib/mbchar.h
===================================================================
RCS file: /fetish/cu/lib/mbchar.h,v
retrieving revision 1.2
diff -p -u -r1.2 mbchar.h
--- lib/mbchar.h        4 Jul 2006 05:39:07 -0000       1.2
+++ lib/mbchar.h        9 Aug 2006 23:38:35 -0000
@@ -157,6 +157,127 @@
 #include <wchar.h>
 
 #include <wctype.h>
+/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
+   Assume all 12 functions are implemented the same way, or not at all.  */
+#if !defined iswalnum && !HAVE_ISWCNTRL
+static inline int
+iswalnum (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 
'Z')
+         : 0);
+}
+# define iswalnum iswalnum
+#endif
+#if !defined iswalpha && !HAVE_ISWCNTRL
+static inline int
+iswalpha (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'
+         : 0);
+}
+# define iswalpha iswalpha
+#endif
+#if !defined iswblank && !HAVE_ISWCNTRL
+static inline int
+iswblank (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc == ' ' || wc == '\t'
+         : 0);
+}
+# define iswblank iswblank
+#endif
+#if !defined iswcntrl && !HAVE_ISWCNTRL
+static inline int
+iswcntrl (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? (wc & ~0x1f) == 0 || wc == 0x7f
+         : 0);
+}
+# define iswcntrl iswcntrl
+#endif
+#if !defined iswdigit && !HAVE_ISWCNTRL
+static inline int
+iswdigit (wint_t wc)
+{
+  return (wc >= '0' && wc <= '9');
+}
+# define iswdigit iswdigit
+#endif
+#if !defined iswgraph && !HAVE_ISWCNTRL
+static inline int
+iswgraph (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= '!' && wc <= '~'
+         : 1);
+}
+# define iswgraph iswgraph
+#endif
+#if !defined iswlower && !HAVE_ISWCNTRL
+static inline int
+iswlower (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= 'a' && wc <= 'z'
+         : 0);
+}
+# define iswlower iswlower
+#endif
+#if !defined iswprint && !HAVE_ISWCNTRL
+static inline int
+iswprint (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= ' ' && wc <= '~'
+         : 1);
+}
+# define iswprint iswprint
+#endif
+#if !defined iswpunct && !HAVE_ISWCNTRL
+static inline int
+iswpunct (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= '!' && wc <= '~'
+           && !((wc >= '0' && wc <= '9')
+                || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))
+         : 1);
+}
+# define iswpunct iswpunct
+#endif
+#if !defined iswspace && !HAVE_ISWCNTRL
+static inline int
+iswspace (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc == ' ' || wc == '\t'
+           || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'
+         : 0);
+}
+# define iswspace iswspace
+#endif
+#if !defined iswupper && !HAVE_ISWCNTRL
+static inline int
+iswupper (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= 'A' && wc <= 'Z'
+         : 0);
+}
+# define iswupper iswupper
+#endif
+#if !defined iswxdigit && !HAVE_ISWCNTRL
+static inline int
+iswxdigit (wint_t wc)
+{
+  return (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 
'F');
+}
+# define iswxdigit iswxdigit
+#endif
 
 #include "wcwidth.h"
 
Index: lib/mbswidth.c
===================================================================
RCS file: /fetish/cu/lib/mbswidth.c,v
retrieving revision 1.15
diff -p -u -r1.15 mbswidth.c
--- lib/mbswidth.c      9 Jul 2006 16:59:05 -0000       1.15
+++ lib/mbswidth.c      9 Aug 2006 23:38:35 -0000
@@ -51,7 +51,7 @@
 # include <wctype.h>
 #endif
 #if !defined iswcntrl && !HAVE_ISWCNTRL
-# define iswcntrl(wc) 0
+# define iswcntrl(wc) (((wc) & ~0x1f) == 0 || (wc) == 0x7f)
 #endif
 
 #ifndef mbsinit
Index: lib/mkstemp-safer.c
===================================================================
RCS file: /fetish/cu/lib/mkstemp-safer.c,v
retrieving revision 1.2
diff -p -u -r1.2 mkstemp-safer.c
--- lib/mkstemp-safer.c 13 Nov 2005 14:07:06 -0000      1.2
+++ lib/mkstemp-safer.c 9 Aug 2006 23:38:35 -0000
@@ -1,6 +1,6 @@
 /* Invoke mkstemp, but avoid some glitches.
 
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,6 +27,10 @@
 #include <stdlib.h>
 #include "unistd-safer.h"
 
+#if ! HAVE_MKSTEMP
+int mkstemp (char *);
+#endif
+
 /* Like mkstemp, but do not return STDIN_FILENO, STDOUT_FILENO, or
    STDERR_FILENO.  */
 
Index: lib/pipe-safer.c
===================================================================
RCS file: /fetish/cu/lib/pipe-safer.c,v
retrieving revision 1.2
diff -p -u -r1.2 pipe-safer.c
--- lib/pipe-safer.c    22 Sep 2005 06:05:39 -0000      1.2
+++ lib/pipe-safer.c    9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Invoke pipe, but avoid some glitches.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,13 +24,16 @@
 #include "unistd-safer.h"
 
 #include <unistd.h>
+#include <errno.h>
 
 /* Like pipe, but ensure that neither of the file descriptors is
-   STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO.  */
+   STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO.  Fail with ENOSYS on
+   platforms that lack pipe.  */
 
 int
 pipe_safer (int fd[2])
 {
+#if HAVE_FUNC_PIPE
   int fail = pipe (fd);
   if (fail)
     return fail;
@@ -47,4 +50,8 @@ pipe_safer (int fd[2])
   }
 
   return 0;
+#else /* ! HAVE_FUNC_PIPE */
+  errno = ENOSYS;
+  return -1;
+#endif
 }
Index: lib/printf-args.c
===================================================================
RCS file: /fetish/cu/lib/printf-args.c,v
retrieving revision 1.4
diff -p -u -r1.4 printf-args.c
--- lib/printf-args.c   14 May 2005 07:58:06 -0000      1.4
+++ lib/printf-args.c   9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2003, 2005-2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,15 +79,40 @@ printf_fetchargs (va_list args, argument
        break;
 #ifdef HAVE_WINT_T
       case TYPE_WIDE_CHAR:
-       ap->a.a_wide_char = va_arg (args, wint_t);
+       /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
+          default argument promotions", this is not the case in mingw32,
+          where wint_t is 'unsigned short'.  */
+       ap->a.a_wide_char =
+         (sizeof (wint_t) < sizeof (int)
+          ? va_arg (args, int)
+          : va_arg (args, wint_t));
        break;
 #endif
       case TYPE_STRING:
        ap->a.a_string = va_arg (args, const char *);
+       /* A null pointer is an invalid argument for "%s", but in practice
+          it occurs quite frequently in printf statements that produce
+          debug output.  Use a fallback in this case.  */
+       if (ap->a.a_string == NULL)
+         ap->a.a_string = "(NULL)";
        break;
 #ifdef HAVE_WCHAR_T
       case TYPE_WIDE_STRING:
        ap->a.a_wide_string = va_arg (args, const wchar_t *);
+       /* A null pointer is an invalid argument for "%ls", but in practice
+          it occurs quite frequently in printf statements that produce
+          debug output.  Use a fallback in this case.  */
+       if (ap->a.a_wide_string == NULL)
+         {
+           static const wchar_t wide_null_string[] =
+             {
+               (wchar_t)'(',
+               (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',
+               (wchar_t)')',
+               (wchar_t)0
+             };
+           ap->a.a_wide_string = wide_null_string;
+         }
        break;
 #endif
       case TYPE_POINTER:
Index: lib/quote.c
===================================================================
RCS file: /fetish/cu/lib/quote.c,v
retrieving revision 1.7
diff -p -u -r1.7 quote.c
--- lib/quote.c 22 Sep 2005 06:05:39 -0000      1.7
+++ lib/quote.c 9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* quote.c - quote arguments for output
-   Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 Free Software Foundation, 
Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
Index: lib/readlink.c
===================================================================
RCS file: /fetish/cu/lib/readlink.c,v
retrieving revision 1.4
diff -p -u -r1.4 readlink.c
--- lib/readlink.c      22 Sep 2005 06:05:39 -0000      1.4
+++ lib/readlink.c      9 Aug 2006 23:38:35 -0000
@@ -1,5 +1,5 @@
 /* Stub for readlink().
-   Copyright (C) 2003-2004 Free Software Foundation, Inc.
+   Copyright (C) 2003-2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
Index: lib/regex_internal.h
===================================================================
RCS file: /fetish/cu/lib/regex_internal.h,v
retrieving revision 1.9
diff -p -u -r1.9 regex_internal.h
--- lib/regex_internal.h        9 Jul 2006 16:59:05 -0000       1.9
+++ lib/regex_internal.h        9 Aug 2006 23:38:35 -0000
@@ -49,7 +49,6 @@
 #if defined _LIBC
 # include <bits/libc-lock.h>
 #else
-# define __libc_lock_define(CLASS,NAME)
 # define __libc_lock_init(NAME) do { } while (0)
 # define __libc_lock_lock(NAME) do { } while (0)
 # define __libc_lock_unlock(NAME) do { } while (0)
@@ -711,7 +710,9 @@ struct re_dfa_t
 #ifdef DEBUG
   char* re_str;
 #endif
+#ifdef _LIBC
   __libc_lock_define (, lock)
+#endif
 };
 
 #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
Index: lib/setenv.c
===================================================================
RCS file: /fetish/cu/lib/setenv.c,v
retrieving revision 1.15
diff -p -u -r1.15 setenv.c
--- lib/setenv.c        24 Sep 2005 13:32:49 -0000      1.15
+++ lib/setenv.c        9 Aug 2006 23:38:35 -0000
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -27,7 +27,9 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
+#if _LIBC || HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 #if !_LIBC
 # include "allocsa.h"
Index: lib/stdint_.h
===================================================================
RCS file: /fetish/cu/lib/stdint_.h,v
retrieving revision 1.6
diff -p -u -r1.6 stdint_.h
--- lib/stdint_.h       9 Jul 2006 16:59:05 -0000       1.6
+++ lib/stdint_.h       9 Aug 2006 23:38:36 -0000
@@ -394,8 +394,12 @@
 #define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, address@hidden@)
 
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
 /* 7.18.4. Macros for integer constants */
 
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
 /* 7.18.4.1. Macros for minimum-width integer constants */
 /* According to ISO C 99 Technical Corrigendum 1 */
 
Index: lib/stdio--.h
===================================================================
RCS file: /fetish/cu/lib/stdio--.h,v
retrieving revision 1.1
diff -p -u -r1.1 stdio--.h
--- lib/stdio--.h       3 Jul 2005 06:43:07 -0000       1.1
+++ lib/stdio--.h       9 Aug 2006 23:38:36 -0000
@@ -1,6 +1,6 @@
 /* Like stdio.h, but redefine some names to avoid glitches.
 
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,3 +23,6 @@
 
 #undef fopen
 #define fopen fopen_safer
+
+#undef tmpfile
+#define tmpfile tmpfile_safer
Index: lib/stdio-safer.h
===================================================================
RCS file: /fetish/cu/lib/stdio-safer.h,v
retrieving revision 1.3
diff -p -u -r1.3 stdio-safer.h
--- lib/stdio-safer.h   14 May 2005 07:58:07 -0000      1.3
+++ lib/stdio-safer.h   9 Aug 2006 23:38:36 -0000
@@ -1,6 +1,6 @@
 /* Invoke stdio functions, but avoid some glitches.
 
-   Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,3 +21,4 @@
 #include <stdio.h>
 
 FILE *fopen_safer (char const *, char const *);
+FILE *tmpfile_safer (void);
Index: lib/stpcpy.c
===================================================================
RCS file: /fetish/cu/lib/stpcpy.c,v
retrieving revision 1.12
diff -p -u -r1.12 stpcpy.c
--- lib/stpcpy.c        14 May 2005 07:58:07 -0000      1.12
+++ lib/stpcpy.c        9 Aug 2006 23:38:36 -0000
@@ -15,9 +15,8 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
Index: lib/strcspn.c
===================================================================
RCS file: /fetish/cu/lib/strcspn.c,v
retrieving revision 1.15
diff -p -u -r1.15 strcspn.c
--- lib/strcspn.c       22 Sep 2005 06:05:39 -0000      1.15
+++ lib/strcspn.c       9 Aug 2006 23:38:36 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996-1997, 2002-2003 Free Software Foundation, 
Inc.
+/* Copyright (C) 1991, 1994, 1996-1997, 2002-2003, 2005 Free Software 
Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C 
Library.
    Bugs can be reported to address@hidden
@@ -14,9 +14,8 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
Index: lib/strtoimax.c
===================================================================
RCS file: /fetish/cu/lib/strtoimax.c,v
retrieving revision 1.14
diff -p -u -r1.14 strtoimax.c
--- lib/strtoimax.c     2 Dec 2005 00:42:52 -0000       1.14
+++ lib/strtoimax.c     9 Aug 2006 23:38:36 -0000
@@ -23,12 +23,8 @@
 # include <config.h>
 #endif
 
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
+/* Verify interface.  */
+#include <inttypes.h>
 
 #include <stdlib.h>
 
Index: lib/vasprintf.h
===================================================================
RCS file: /fetish/cu/lib/vasprintf.h,v
retrieving revision 1.5
diff -p -u -r1.5 vasprintf.h
--- lib/vasprintf.h     14 May 2005 07:58:07 -0000      1.5
+++ lib/vasprintf.h     9 Aug 2006 23:38:36 -0000
@@ -11,8 +11,8 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, write to the Free Software Foundation,
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef _VASPRINTF_H
Index: lib/version-etc.c
===================================================================
RCS file: /fetish/cu/lib/version-etc.c,v
retrieving revision 1.25
diff -p -u -r1.25 version-etc.c
--- lib/version-etc.c   6 Jan 2006 16:48:24 -0000       1.25
+++ lib/version-etc.c   9 Aug 2006 23:38:36 -0000
@@ -50,11 +50,7 @@ version_etc_va (FILE *stream,
   {
     va_list tmp_authors;
 
-#ifdef __va_copy
-    __va_copy (tmp_authors, authors);
-#else
-    tmp_authors = authors;
-#endif
+    va_copy (tmp_authors, authors);
 
     n_authors = 0;
     while (va_arg (tmp_authors, const char *) != NULL)
Index: lib/wcwidth.h
===================================================================
RCS file: /fetish/cu/lib/wcwidth.h,v
retrieving revision 1.1
diff -p -u -r1.1 wcwidth.h
--- lib/wcwidth.h       4 Jul 2006 07:28:57 -0000       1.1
+++ lib/wcwidth.h       9 Aug 2006 23:38:36 -0000
@@ -36,7 +36,14 @@
 #  include <wctype.h>
 # endif
 # if !defined iswprint && !HAVE_ISWPRINT
-#  define iswprint(wc) 1
+static inline int
+iswprint (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= ' ' && wc <= '~'
+         : 1);
+}
+#  define iswprint iswprint
 # endif
 
 # ifndef HAVE_DECL_WCWIDTH
Index: po/ChangeLog
===================================================================
RCS file: /fetish/cu/po/ChangeLog,v
retrieving revision 1.46
diff -p -u -r1.46 ChangeLog
--- po/ChangeLog        9 Aug 2006 20:11:12 -0000       1.46
+++ po/ChangeLog        9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,7 @@
 2006-08-09  Paul Eggert  <address@hidden>
 
+       * Makefile.in.in: Sync from gettext 0.15.
+
        * LINGUAS: Add ro, sr, uk, wa.
        * ro.po, sr.po, uk,po, wa.po: New files,
        gotten from the following files relative to
Index: po/Makefile.in.in
===================================================================
RCS file: /fetish/cu/po/Makefile.in.in,v
retrieving revision 1.47
diff -p -u -r1.47 Makefile.in.in
--- po/Makefile.in.in   24 Oct 2005 09:01:02 -0000      1.47
+++ po/Makefile.in.in   9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
 # Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <address@hidden>
+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <address@hidden>
 #
 # This file can be copied and used freely without restrictions.  It can
 # be used in projects which are not available under the GNU General Public
@@ -25,17 +25,26 @@ prefix = @prefix@
 exec_prefix = @exec_prefix@
 datarootdir = @datarootdir@
 datadir = @datadir@
-localedir = $(datadir)/locale
+localedir = @localedir@
 gettextsrcdir = $(datadir)/gettext/po
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+mkinstalldirs = $(SHELL) @install_sh@ -d
+mkdir_p = @mkdir_p@
 
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
 MSGMERGE = msgmerge
 MSGMERGE_UPDATE = @MSGMERGE@ --update
 MSGINIT = msginit
@@ -159,7 +168,7 @@ install: install-exec install-data
 install-exec:
 install-data: address@hidden@
        if test "$(PACKAGE)" = "gettext-tools"; then \
-         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
          for file in $(DISTFILES.common) Makevars.template; do \
            $(INSTALL_DATA) $(srcdir)/$$file \
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -172,13 +181,13 @@ install-data: address@hidden@
        fi
 install-data-no: all
 install-data-yes: all
-       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       $(mkdir_p) $(DESTDIR)$(datadir)
        @catalogs='$(CATALOGS)'; \
        for cat in $$catalogs; do \
          cat=`basename $$cat`; \
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
          dir=$(localedir)/$$lang/LC_MESSAGES; \
-         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; 
fi; \
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -218,19 +227,19 @@ installdirs: installdirs-exec installdir
 installdirs-exec:
 installdirs-data: address@hidden@
        if test "$(PACKAGE)" = "gettext-tools"; then \
-         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
        else \
          : ; \
        fi
 installdirs-data-no:
 installdirs-data-yes:
-       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       $(mkdir_p) $(DESTDIR)$(datadir)
        @catalogs='$(CATALOGS)'; \
        for cat in $$catalogs; do \
          cat=`basename $$cat`; \
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
          dir=$(localedir)/$$lang/LC_MESSAGES; \
-         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         $(mkdir_p) $(DESTDIR)$$dir; \
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
            if test -n "$$lc"; then \
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 
2>/dev/null) | grep ' -> ' >/dev/null; then \
@@ -375,7 +384,7 @@ update-gmo: Makefile $(GMOFILES)
 
 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status 
@POMAKEFILEDEPS@
        cd $(top_builddir) \
-         && $(SHELL) ./config.status $(subdir)/address@hidden
+         && $(SHELL) ./config.status $(subdir)/address@hidden po-directories
 
 force:
 
Index: m4/ChangeLog
===================================================================
RCS file: /fetish/cu/m4/ChangeLog,v
retrieving revision 1.851
diff -p -u -r1.851 ChangeLog
--- m4/ChangeLog        8 Aug 2006 22:41:15 -0000       1.851
+++ m4/ChangeLog        9 Aug 2006 23:38:36 -0000
@@ -1,3 +1,13 @@
+2006-08-09  Paul Eggert  <address@hidden>
+
+       * inttypes-h.m4, stdarg.m4: New files, from gnulib.
+       * prereq.m4 (gl_PREREQ): Require gl_STDARG_H.
+       Require gl_FOPEN_SAFER rather than gl_STDIO_SAFER (due to renaming).
+       * getline.m4, gettext.m4, inttypes-pri.m4, lib-link.m4, localcharset.m4:
+       * mbchar.m4, nls.m4, po.m4, stdint.m4, stdio-safer.m4, unistd-safer.m4:
+       * wcwidth.m4:
+       Update from gnulib.
+
 2006-08-08  Paul Eggert  <address@hidden>
 
        * memxfrm.m4, randint.m4, randperm.m4, randread.m4: New files.
Index: m4/getline.m4
===================================================================
RCS file: /fetish/cu/m4/getline.m4,v
retrieving revision 1.15
diff -p -u -r1.15 getline.m4
--- m4/getline.m4       22 Sep 2005 06:44:26 -0000      1.15
+++ m4/getline.m4       9 Aug 2006 23:38:36 -0000
@@ -1,6 +1,6 @@
-# getline.m4 serial 13
+# getline.m4 serial 14
 
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software
 dnl Foundation, Inc.
 dnl
 dnl This file is free software; the Free Software Foundation
@@ -47,7 +47,18 @@ AC_DEFUN([gl_FUNC_GETLINE],
     }
     ], am_cv_func_working_getline=yes dnl The library version works.
     , am_cv_func_working_getline=no dnl The library version does NOT work.
-    , am_cv_func_working_getline=no dnl We're cross compiling.
+    , dnl We're cross compiling. Assume it works on glibc2 systems.
+      [AC_EGREP_CPP([Lucky GNU user],
+         [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
+         ],
+         [am_cv_func_working_getline=yes],
+         [am_cv_func_working_getline=no])]
     )])
   fi
 
Index: m4/gettext.m4
===================================================================
RCS file: /fetish/cu/m4/gettext.m4,v
retrieving revision 1.33
diff -p -u -r1.33 gettext.m4
--- m4/gettext.m4       2 May 2005 04:28:20 -0000       1.33
+++ m4/gettext.m4       9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# gettext.m4 serial 37 (gettext-0.14.4)
-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+# gettext.m4 serial 53 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
 
 dnl Authors:
 dnl   Ulrich Drepper <address@hidden>, 1995-2000.
-dnl   Bruno Haible <address@hidden>, 2000-2003.
+dnl   Bruno Haible <address@hidden>, 2000-2005.
 
 dnl Macro to add for using GNU gettext.
 
@@ -94,7 +94,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
   gt_INTL_MACOSX
 
   dnl Set USE_NLS.
-  AM_NLS
+  AC_REQUIRE([AM_NLS])
 
   ifelse(gt_included_intl, yes, [
     BUILD_INCLUDED_LIBINTL=no
@@ -130,13 +130,11 @@ AC_DEFUN([AM_GNU_GETTEXT],
         AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
          [AC_TRY_LINK([#include <libintl.h>
 ]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 #endif
-changequote(,)dnl
 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+]], [])[extern int _nl_msg_cat_cntr;
 extern int *_nl_domain_bindings;],
             [bindtextdomain ("", "");
 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 
0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
@@ -162,13 +160,11 @@ return * gettext ("")]ifelse([$2], [need
             dnl Now see whether libintl exists and does not depend on libiconv.
             AC_TRY_LINK([#include <libintl.h>
 ]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 #endif
-changequote(,)dnl
 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+]], [])[extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
@@ -183,13 +179,11 @@ return * gettext ("")]ifelse([$2], [need
               LIBS="$LIBS $LIBICONV"
               AC_TRY_LINK([#include <libintl.h>
 ]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 #endif
-changequote(,)dnl
 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+]], [])[extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
@@ -234,8 +228,8 @@ return * gettext ("")]ifelse([$2], [need
         dnl Mark actions used to generate GNU NLS library.
         BUILD_INCLUDED_LIBINTL=yes
         USE_INCLUDED_LIBINTL=yes
-        
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LIBICONV"
-        
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LTLIBICONV"
+        
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LIBICONV $LIBTHREAD"
+        
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
 $LTLIBICONV $LTLIBTHREAD"
         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
@@ -359,33 +353,22 @@ dnl            USE_INCLUDED_LIBINTL, BUI
 AC_DEFUN([AM_INTL_SUBDIR],
 [
   AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
   AC_REQUIRE([AC_PROG_CC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl
   AC_REQUIRE([gt_GLIBC2])dnl
   AC_REQUIRE([AC_PROG_RANLIB])dnl
-  AC_REQUIRE([AC_ISC_POSIX])dnl
-  AC_REQUIRE([AC_HEADER_STDC])dnl
-  AC_REQUIRE([AC_C_CONST])dnl
+  AC_REQUIRE([gl_VISIBILITY])dnl
+  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
   AC_REQUIRE([bh_C_SIGNED])dnl
-  AC_REQUIRE([AC_C_INLINE])dnl
-  AC_REQUIRE([AC_TYPE_OFF_T])dnl
-  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
   AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
   AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
   AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
   AC_REQUIRE([gt_TYPE_WINT_T])dnl
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
   AC_REQUIRE([gt_TYPE_INTMAX_T])
   AC_REQUIRE([gt_PRINTF_POSIX])
-  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-  AC_REQUIRE([AC_FUNC_MMAP])dnl
   AC_REQUIRE([gl_GLIBC21])dnl
-  AC_REQUIRE([gt_INTDIV0])dnl
-  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
-  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
-  AC_REQUIRE([gt_INTTYPES_PRI])dnl
   AC_REQUIRE([gl_XSIZE])dnl
   AC_REQUIRE([gt_INTL_MACOSX])dnl
 
@@ -393,12 +376,8 @@ AC_DEFUN([AM_INTL_SUBDIR],
     [AC_DEFINE([ptrdiff_t], [long],
        [Define as the type of the result of subtracting two pointers, if the 
system doesn't define it.])
     ])
-  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-stdlib.h string.h unistd.h sys/param.h])
-  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
-mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
-strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
-__fsetlocking])
+  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+  AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
 
   dnl Use the _snprintf function only if it is declared (because on NetBSD it
   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
@@ -410,8 +389,6 @@ __fsetlocking])
   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
   dnl on Solaris 2.5.1 to run on Solaris 2.6).
   dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
-  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
   gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
 
   case $gt_cv_func_printf_posix in
@@ -438,14 +415,125 @@ __fsetlocking])
   fi
   AC_SUBST([HAVE_WPRINTF])
 
-  AM_ICONV
   AM_LANGINFO_CODESET
-  if test $ac_cv_header_locale_h = yes; then
-    gt_LC_MESSAGES
+  gt_LC_MESSAGES
+
+  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+  dnl 1. when we install a shared library, we must arrange to export
+  dnl    auxiliary pointer variables for every exported variable,
+  dnl 2. when we install a shared library and a static library simultaneously,
+  dnl    the include file specifies __declspec(dllimport) and therefore we
+  dnl    must arrange to define the auxiliary pointer variables for the
+  dnl    exported variables _also_ in the static library.
+  if test "$enable_shared" = yes; then
+    case "$host_os" in
+      cygwin*) is_woe32dll=yes ;;
+      *) is_woe32dll=no ;;
+    esac
+  else
+    is_woe32dll=no
   fi
+  WOE32DLL=$is_woe32dll
+  AC_SUBST([WOE32DLL])
 
-  if test -n "$INTL_MACOSX_LIBS"; then
-    CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+  dnl Rename some macros and functions used for locking.
+  AH_BOTTOM([
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  
gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init     libintl_lock_init
+#define glthread_lock_lock     libintl_lock_lock
+#define glthread_lock_unlock   libintl_lock_unlock
+#define glthread_lock_destroy  libintl_lock_destroy
+#define glthread_rwlock_init     libintl_rwlock_init
+#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
+#define glthread_rwlock_unlock   libintl_rwlock_unlock
+#define glthread_rwlock_destroy  libintl_rwlock_destroy
+#define glthread_recursive_lock_init     libintl_recursive_lock_init
+#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
+#define glthread_once                 libintl_once
+#define glthread_once_call            libintl_once_call
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl   dcigettext.c
+dnl   eval-plural.h
+dnl   explodename.c
+dnl   finddomain.c
+dnl   gettextP.h
+dnl   gmo.h
+dnl   hash-string.h hash-string.c
+dnl   l10nflist.c
+dnl   libgnuintl.h.in (except the *printf stuff)
+dnl   loadinfo.h
+dnl   loadmsgcat.c
+dnl   localealias.c
+dnl   log.c
+dnl   plural-exp.h plural-exp.c
+dnl   plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gl_HEADER_INTTYPES_H])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_LOCK])dnl
+
+  AC_TRY_LINK(
+    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; 
}],
+    [],
+    [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+       [Define to 1 if the compiler understands __builtin_expect.])])
+
+  AC_CHECK_HEADERS([argz.h limits.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+    stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+    argz_next __fsetlocking])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+  AM_ICONV
+
+  dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+  dnl and a _NL_LOCALE_NAME macro always.
+  AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+    [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+      [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
+      gt_cv_nl_locale_name=yes,
+      gt_cv_nl_locale_name=no)
+    ])
+  if test $gt_cv_nl_locale_name = yes; then
+    AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+      [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro 
if _GNU_SOURCE is defined.])
   fi
 
   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
@@ -488,15 +576,12 @@ AC_DEFUN([gt_INTL_MACOSX],
   dnl Check for API introduced in MacOS X 10.2.
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     gt_cv_func_CFPreferencesCopyAppValue,
-    [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
-     gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -framework CoreFoundation"
-     AC_TRY_LINK([#include <CFPreferences.h>],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
        [CFPreferencesCopyAppValue(NULL, NULL)],
        [gt_cv_func_CFPreferencesCopyAppValue=yes],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
-     CPPFLAGS="$gt_save_CPPFLAGS"
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
@@ -504,14 +589,11 @@ AC_DEFUN([gt_INTL_MACOSX],
   fi
   dnl Check for API introduced in MacOS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
-    [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
-     gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -framework CoreFoundation"
-     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], 
[CFLocaleCopyCurrent();],
        [gt_cv_func_CFLocaleCopyCurrent=yes],
        [gt_cv_func_CFLocaleCopyCurrent=no])
-     CPPFLAGS="$gt_save_CPPFLAGS"
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
Index: m4/inttypes-pri.m4
===================================================================
RCS file: /fetish/cu/m4/inttypes-pri.m4,v
retrieving revision 1.4
diff -p -u -r1.4 inttypes-pri.m4
--- m4/inttypes-pri.m4  26 Feb 2005 07:31:20 -0000      1.4
+++ m4/inttypes-pri.m4  9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# inttypes-pri.m4 serial 1 (gettext-0.11.4)
-dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+# inttypes-pri.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,8 +11,8 @@ dnl From Bruno Haible.
 
 AC_DEFUN([gt_INTTYPES_PRI],
 [
-  AC_REQUIRE([gt_HEADER_INTTYPES_H])
-  if test $gt_cv_header_inttypes_h = yes; then
+  AC_REQUIRE([gl_HEADER_INTTYPES_H])
+  if test $gl_cv_header_inttypes_h = yes; then
     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
       gt_cv_inttypes_pri_broken,
       [
Index: m4/lib-link.m4
===================================================================
RCS file: /fetish/cu/m4/lib-link.m4,v
retrieving revision 1.8
diff -p -u -r1.8 lib-link.m4
--- m4/lib-link.m4      22 Sep 2005 06:05:39 -0000      1.8
+++ m4/lib-link.m4      9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 7 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-link.m4 serial 8 (gettext-0.15)
+dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -552,3 +552,79 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
     fi
   done
 ])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; 
then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
Index: m4/localcharset.m4
===================================================================
RCS file: /fetish/cu/m4/localcharset.m4,v
retrieving revision 1.2
diff -p -u -r1.2 localcharset.m4
--- m4/localcharset.m4  10 Jan 2006 17:47:57 -0000      1.2
+++ m4/localcharset.m4  9 Aug 2006 23:38:36 -0000
@@ -1,4 +1,4 @@
-# localcharset.m4 serial 3
+# localcharset.m4 serial 4
 dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,6 @@ dnl with or without modifications, as lo
 AC_DEFUN([gl_LOCALCHARSET],
 [
   dnl Prerequisites of lib/localcharset.c.
-  AC_CHECK_HEADERS_ONCE(stddef.h stdlib.h string.h)
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CHECK_DECLS_ONCE(getc_unlocked)
   AC_CHECK_FUNCS_ONCE(setlocale)
Index: m4/mbchar.m4
===================================================================
RCS file: /fetish/cu/m4/mbchar.m4,v
retrieving revision 1.3
diff -p -u -r1.3 mbchar.m4
--- m4/mbchar.m4        2 Dec 2005 00:42:52 -0000       1.3
+++ m4/mbchar.m4        9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# mbchar.m4 serial 2
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# mbchar.m4 serial 3
+dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,5 +16,7 @@ AC_DEFUN([gl_MBCHAR],
   dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H.
   if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; 
then
     AC_LIBOBJ([mbchar])
+    dnl Prerequisites of mbchar.h and mbchar.c.
+    AC_CHECK_FUNCS([iswcntrl])
   fi
 ])
Index: m4/nls.m4
===================================================================
RCS file: /fetish/cu/m4/nls.m4,v
retrieving revision 1.5
diff -p -u -r1.5 nls.m4
--- m4/nls.m4   21 Mar 2005 07:42:08 -0000      1.5
+++ m4/nls.m4   9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# nls.m4 serial 2 (gettext-0.14.3)
-dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,23 +29,3 @@ AC_DEFUN([AM_NLS],
   AC_MSG_RESULT($USE_NLS)
   AC_SUBST(USE_NLS)
 ])
-
-AC_DEFUN([AM_MKINSTALLDIRS],
-[
-  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
-  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
-  dnl Try to locate it.
-  MKINSTALLDIRS=
-  if test -n "$ac_aux_dir"; then
-    case "$ac_aux_dir" in
-      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
-      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
-    esac
-  fi
-  if test -z "$MKINSTALLDIRS"; then
-    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-  fi
-  AC_SUBST(MKINSTALLDIRS)
-])
Index: m4/po.m4
===================================================================
RCS file: /fetish/cu/m4/po.m4,v
retrieving revision 1.6
diff -p -u -r1.6 po.m4
--- m4/po.m4    21 Mar 2005 07:42:08 -0000      1.6
+++ m4/po.m4    9 Aug 2006 23:38:36 -0000
@@ -1,5 +1,5 @@
-# po.m4 serial 7 (gettext-0.14.3)
-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
 [
   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
   AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
   AC_REQUIRE([AM_NLS])dnl
 
   dnl Perform the following tests also if --disable-nls has been given,
@@ -39,6 +39,22 @@ AC_DEFUN([AM_PO_SUBDIRS],
     :)
   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
   dnl Search for GNU xgettext 0.12 or newer in the PATH.
   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
   dnl The second test excludes FreeBSD xgettext.
@@ -49,44 +65,26 @@ AC_DEFUN([AM_PO_SUBDIRS],
   dnl Remove leftover from FreeBSD xgettext call.
   rm -f messages.po
 
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 
2>&1], :)
 
-  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-  dnl Test whether we really found GNU msgfmt.
-  if test "$GMSGFMT" != ":"; then
-    dnl If it is no GNU msgfmt we define it as : so that the
-    dnl Makefiles still can work.
-    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
-       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage 
>/dev/null; then exit 1; else exit 0; fi); then
-      : ;
-    else
-      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
-      AC_MSG_RESULT(
-        [found $GMSGFMT program is not GNU msgfmt; ignore it])
-      GMSGFMT=":"
-    fi
-  fi
-
-  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-  dnl Test whether we really found GNU xgettext.
-  if test "$XGETTEXT" != ":"; then
-    dnl If it is no GNU xgettext we define it as : so that the
-    dnl Makefiles still can work.
-    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= 
/dev/null >/dev/null 2>&1 &&
-       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= 
/dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; 
fi); then
-      : ;
-    else
-      AC_MSG_RESULT(
-        [found xgettext program is not GNU xgettext; ignore it])
-      XGETTEXT=":"
-    fi
-    dnl Remove leftover from FreeBSD xgettext call.
-    rm -f messages.po
-  fi
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
 
-  AC_OUTPUT_COMMANDS([
+  AC_CONFIG_COMMANDS([po-directories], [[
     for ac_file in $CONFIG_FILES; do
       # Support "outfile[:infile[:infile...]]"
       case "$ac_file" in
@@ -123,11 +121,12 @@ AC_DEFUN([AM_PO_SUBDIRS],
               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in 
configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is 
obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" 
"$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
             # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           # Compute POFILES
@@ -197,10 +196,10 @@ AC_DEFUN([AM_PO_SUBDIRS],
         fi
         ;;
       esac
-    done],
+    done]],
    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
-    # from automake.
+    # from automake < 1.5.
     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
     # Capture the value of LINGUAS because we need it to compute CATALOGS.
     LINGUAS="${LINGUAS-%UNSET%}"
@@ -286,7 +285,7 @@ x
 changequote([,])dnl
 
   # Set POTFILES to the value of the Makefile variable POTFILES.
-  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 
's/VARIABLE/POTFILES/g'`"
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 
's/VARIABLE/POTFILES/g'`
   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
   # Compute POTFILES_DEPS as
   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
@@ -305,10 +304,10 @@ changequote([,])dnl
     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
   else
     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
-    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 
's/VARIABLE/LINGUAS/g'`"
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 
's/VARIABLE/LINGUAS/g'`
     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
   fi
-  # Hide the ALL_LINGUAS assigment from automake.
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
   # Compute POFILES
   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
Index: m4/prereq.m4
===================================================================
RCS file: /fetish/cu/m4/prereq.m4,v
retrieving revision 1.129
diff -p -u -r1.129 prereq.m4
--- m4/prereq.m4        8 Aug 2006 22:16:51 -0000       1.129
+++ m4/prereq.m4        9 Aug 2006 23:38:36 -0000
@@ -1,4 +1,4 @@
-#serial 69
+#serial 71
 
 dnl We use gl_ for non Autoconf macros.
 m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
@@ -53,6 +53,7 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_FILE_NAME_CONCAT])
   AC_REQUIRE([gl_FILE_TYPE])
   AC_REQUIRE([gl_FSUSAGE])
+  AC_REQUIRE([gl_FOPEN_SAFER])
   AC_REQUIRE([gl_FUNC_ALLOCA])
   AC_REQUIRE([gl_FUNC_ATEXIT])
   AC_REQUIRE([gl_FUNC_DUP2])
@@ -147,8 +148,8 @@ AC_DEFUN([gl_PREREQ],
   AC_REQUIRE([gl_SHA512])
   AC_REQUIRE([gl_STAT_MACROS])
   AC_REQUIRE([gl_STAT_TIME])
+  AC_REQUIRE([gl_STDARG_H])
   AC_REQUIRE([gl_STDINT_H])
-  AC_REQUIRE([gl_STDIO_SAFER])
   AC_REQUIRE([gl_STDLIB_SAFER])
   AC_REQUIRE([gl_STRCASE])
   AC_REQUIRE([gl_STRINTCMP])
Index: m4/stdint.m4
===================================================================
RCS file: /fetish/cu/m4/stdint.m4,v
retrieving revision 1.5
diff -p -u -r1.5 stdint.m4
--- m4/stdint.m4        11 Jul 2006 03:29:56 -0000      1.5
+++ m4/stdint.m4        9 Aug 2006 23:38:37 -0000
@@ -1,4 +1,4 @@
-# stdint.m4 serial 15
+# stdint.m4 serial 18
 dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -71,18 +71,23 @@ AC_DEFUN([gl_STDINT_H],
         AC_LANG_PROGRAM([[
 #include <stddef.h>
 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
 #include ABSOLUTE_STDINT_H
 #ifdef INT8_MAX
 int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
 #endif
 #ifdef INT16_MAX
 int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
 #endif
 #ifdef INT32_MAX
 int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
 #endif
 #ifdef INT64_MAX
 int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
 #endif
 #ifdef UINT8_MAX
 uint8_t b1 = UINT8_MAX;
@@ -99,23 +104,40 @@ uint32_t b3 = UINT32_MAX;
 uint64_t b4 = UINT64_MAX;
 #endif
 int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
 int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
 int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
 uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
 uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
 uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
 int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
 int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
 int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
 int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
 uint_fast8_t f1 = UINT_FAST8_MAX;
 uint_fast16_t f2 = UINT_FAST16_MAX;
 uint_fast32_t f3 = UINT_FAST32_MAX;
 uint_fast64_t f4 = UINT_FAST64_MAX;
 #ifdef INTPTR_MAX
 intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
 #endif
 #ifdef UINTPTR_MAX
 uintptr_t h = UINTPTR_MAX;
@@ -296,7 +318,8 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
              extern $gltype foo;
              extern $gltype1 foo;])],
           [eval gl_cv_type_${gltype}_suffix=\$glsuf])
-        eval test \"\$gl_cv_type_${gltype}_suffix\" != no && break
+        eval result=\$gl_cv_type_${gltype}_suffix
+        test "$result" != no && break
        done])
     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
     eval result=\$gl_cv_type_${gltype}_suffix
Index: m4/stdio-safer.m4
===================================================================
RCS file: /fetish/cu/m4/stdio-safer.m4,v
retrieving revision 1.6
diff -p -u -r1.6 stdio-safer.m4
--- m4/stdio-safer.m4   22 Sep 2005 06:05:40 -0000      1.6
+++ m4/stdio-safer.m4   9 Aug 2006 23:38:37 -0000
@@ -1,11 +1,17 @@
-#serial 5
-dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+#serial 7
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_STDIO_SAFER],
+AC_DEFUN([gl_FOPEN_SAFER],
 [
   AC_LIBSOURCES([fopen-safer.c, stdio-safer.h, stdio--.h])
   AC_LIBOBJ([fopen-safer])
 ])
+
+AC_DEFUN([gl_TMPFILE_SAFER],
+[
+  AC_LIBSOURCES([tmpfile-safer.c, stdio-safer.h, stdio--.h])
+  AC_LIBOBJ([tmpfile-safer])
+])
Index: m4/unistd-safer.m4
===================================================================
RCS file: /fetish/cu/m4/unistd-safer.m4,v
retrieving revision 1.7
diff -p -u -r1.7 unistd-safer.m4
--- m4/unistd-safer.m4  22 Sep 2005 06:05:40 -0000      1.7
+++ m4/unistd-safer.m4  9 Aug 2006 23:38:37 -0000
@@ -1,11 +1,12 @@
-#serial 7
-dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+#serial 8
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_UNISTD_SAFER],
 [
+  AC_CHECK_FUNCS_ONCE([pipe])
   AC_LIBSOURCES([dup-safer.c, fd-safer.c, pipe-safer.c, unistd-safer.h, 
unistd--.h])
   AC_LIBOBJ([dup-safer])
   AC_LIBOBJ([fd-safer])
Index: m4/wcwidth.m4
===================================================================
RCS file: /fetish/cu/m4/wcwidth.m4,v
retrieving revision 1.1
diff -p -u -r1.1 wcwidth.m4
--- m4/wcwidth.m4       4 Jul 2006 07:17:34 -0000       1.1
+++ m4/wcwidth.m4       9 Aug 2006 23:38:37 -0000
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 3
+# wcwidth.m4 serial 4
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,9 +17,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
 
   AC_CHECK_DECLS([wcwidth], [], [], [
 /* AIX 3.2.5 declares wcwidth in <string.h>. */
-#if HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
 #if HAVE_WCHAR_H
 # include <wchar.h>
 #endif
--- /dev/null   2005-09-24 22:00:15.000000000 -0700
+++ m4/inttypes-pri.m4  2006-08-09 15:08:25.000000000 -0700
@@ -0,0 +1,30 @@
+# inttypes-pri.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_REQUIRE([gl_HEADER_INTTYPES_H])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+  fi
+])
--- /dev/null   2005-09-24 22:00:15.000000000 -0700
+++ m4/stdarg.m4        2006-08-09 15:05:04.000000000 -0700
@@ -0,0 +1,40 @@
+# stdarg.m4 serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Provide a working va_copy in combination with <stdarg.h>.
+
+AC_DEFUN([gl_STDARG_H],
+[
+  AC_MSG_CHECKING([for va_copy])
+  AC_CACHE_VAL([gl_cv_func_va_copy], [
+    AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+],
+      [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
+  AC_MSG_RESULT([$gl_cv_func_va_copy])
+  if test $gl_cv_func_va_copy = no; then
+    # Provide a substitute, either __va_copy or as a simple assignment.
+    AC_CACHE_VAL([gl_cv_func___va_copy], [
+      AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+        [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+    if test $gl_cv_func___va_copy = yes; then
+      AC_DEFINE([va_copy], [__va_copy],
+        [Define as a macro for copying va_list variables.])
+    else
+      AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed.  */
+#define gl_va_copy(a,b) ((a) = (b))])
+      AC_DEFINE([va_copy], [gl_va_copy],
+        [Define as a macro for copying va_list variables.])
+    fi
+  fi
+])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]