m4-patches
[Top][All Lists]
Advanced

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

FYI: m4--devo--1.0--patch-1


From: Gary V. Vaughan
Subject: FYI: m4--devo--1.0--patch-1
Date: Mon, 14 Jun 2004 12:28:12 +0100 (BST)
User-agent: mailnotify/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to HEAD.
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFAzYvMFRMICSmD1gYRAhEvAJ92/X1fN/f/00CNYA0xG3kk+zKpaACgqAo1
Sz2DgJUkqC9HpppS/t0LOjM=
=tfYB
-----END PGP SIGNATURE-----
* looking for address@hidden/m4--devo--1.0--base-0 to compare with
* comparing to address@hidden/m4--devo--1.0--base-0
D  gnulib/acm4/.arch-ids/libtool.m4.id
D  gnulib/acm4/.arch-ids/ltdl.m4.id
D  gnulib/acm4/libtool.m4
D  gnulib/acm4/ltdl.m4
A  gnulib/acm4/.arch-ids/intmax.m4.id
A  gnulib/acm4/.arch-ids/longdouble.m4.id
A  gnulib/acm4/.arch-ids/longlong.m4.id
A  gnulib/acm4/.arch-ids/printf-posix.m4.id
A  gnulib/acm4/.arch-ids/signed.m4.id
A  gnulib/acm4/.arch-ids/size_max.m4.id
A  gnulib/acm4/.arch-ids/wchar_t.m4.id
A  gnulib/acm4/.arch-ids/wint_t.m4.id
A  gnulib/acm4/.arch-ids/xsize.m4.id
A  gnulib/acm4/intmax.m4
A  gnulib/acm4/longdouble.m4
A  gnulib/acm4/longlong.m4
A  gnulib/acm4/printf-posix.m4
A  gnulib/acm4/signed.m4
A  gnulib/acm4/size_max.m4
A  gnulib/acm4/wchar_t.m4
A  gnulib/acm4/wint_t.m4
A  gnulib/acm4/xsize.m4
A  gnulib/m4/.arch-ids/getopt_int.h.id
A  gnulib/m4/.arch-ids/gnulib.am.id
A  gnulib/m4/getopt_int.h
A  gnulib/m4/gnulib.am
M  configure.ac
M  ChangeLog
M  gnulib/import
M  gnulib/acm4/alloca.m4
M  gnulib/acm4/inttypes_h.m4
M  gnulib/acm4/lib-ld.m4
M  gnulib/acm4/lib-prefix.m4
M  gnulib/acm4/error.m4
M  gnulib/acm4/po.m4
M  gnulib/acm4/regex.m4
M  gnulib/acm4/stdbool.m4
M  gnulib/acm4/stdint_h.m4
M  gnulib/acm4/uintmax_t.m4
M  gnulib/acm4/ulonglong.m4
M  gnulib/acm4/unlocked-io.m4
M  gnulib/acm4/xalloc.m4
M  gnulib/acm4/free.m4
M  gnulib/acm4/gettext.m4
M  gnulib/acm4/glibc21.m4
M  gnulib/m4/alloca.c
M  gnulib/m4/alloca_.h
M  gnulib/m4/getopt1.c
M  gnulib/m4/obstack.c
M  gnulib/m4/obstack.h
M  gnulib/m4/regex.c
M  gnulib/m4/unlocked-io.h
M  gnulib/m4/version-etc.c
M  gnulib/m4/xmalloc.c
M  gnulib/m4/getopt.c
M  gnulib/m4/getopt.h
M  gnulib/m4/Makefile.am

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>

        * gnulib/import: Now updates makefile fragments, and configure.ac.
        * gnulib/m4/gnulib.am: New file.  Generated makefile fragments.
        * gnulib/m4/Makefile.am: include it.
        * gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
        gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
        gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
        gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
        gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
        * gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
        gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
        gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
        gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
        gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
        gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
        gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
        gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
        import.
        * gnulib/m4/getopt_int.h: New source file from latest gnulib
        import.
        * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
        gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
        gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
        gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
        Updated source files from latest gnulib.

--- orig/configure.ac
+++ mod/configure.ac
@@ -1,5 +1,5 @@
 # Configure template for GNU m4.                       -*-Autoconf-*-
-# Copyright (C) 1991-1994, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1991-1994, 2000, 2001, 2002, 2004  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
@@ -97,11 +97,12 @@
 ## ------------------ ##
 AC_PROG_CC
 
-dnl ((( gnulib module extensions
 gl_USE_SYSTEM_EXTENSIONS
+dnl ((( gnulib module extensions
+dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
 dnl ))) gnulib module extensions
 dnl ((( gnulib module unlocked-io
-jm_FUNC_GLIBC_UNLOCKED_IO
+gl_FUNC_GLIBC_UNLOCKED_IO
 dnl ))) gnulib module unlocked-io
 
 AC_ISC_POSIX
@@ -125,11 +126,7 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AM_ENABLE_SHARED
-AC_LIBTOOL_DLOPEN
-AC_LIBTOOL_WIN32_DLL
-AC_LIBTOOL_TAGS([])
-AC_PROG_LIBTOOL
+LT_INIT([shared dlopen win32-dll])
 AC_LIB_LTDL
 
 AC_SUBST([LTDLINCL], ["${LTDLINCL-INCLTDL}"])
@@ -141,7 +138,7 @@
 ## ---------------- ##
 dnl <-- override gnulib module gettext
 AM_GNU_GETTEXT(external, need-ngettext)
-AM_GNU_GETTEXT_VERSION(0.12.1)
+AM_GNU_GETTEXT_VERSION(0.14.1)
 m4_GNU_GETTEXT
 dnl --> override gnulib module gettext
 


--- orig/gnulib/acm4/alloca.m4
+++ mod/gnulib/acm4/alloca.m4
@@ -1,5 +1,5 @@
-# alloca.m4 serial 3
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# alloca.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -18,15 +18,25 @@
   fi
 
   # Define an additional variable used in the Makefile substitution.
-
-  AC_EGREP_CPP([Need own alloca], [
-#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
-  Need own alloca
+  if test $ac_cv_working_alloca_h = yes; then
+    AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+       Need own alloca
 #endif
-    ],
-    ALLOCA_H=alloca.h,
-    ALLOCA_H=)
+      ],
+      [AC_DEFINE(HAVE_ALLOCA, 1,
+           [Define to 1 if you have `alloca' after including <alloca.h>,
+            a header that may be supplied by this distribution.])
+       ALLOCA_H=alloca.h],
+      [ALLOCA_H=])
+  else
+    ALLOCA_H=alloca.h
+  fi
   AC_SUBST([ALLOCA_H])
+
+  AC_DEFINE(HAVE_ALLOCA_H, 1,
+    [Define HAVE_ALLOCA_H for backward compatibility with older code
+     that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
 ])
 
 # Prerequisites of lib/alloca.c.


--- orig/gnulib/acm4/error.m4
+++ mod/gnulib/acm4/error.m4
@@ -1,14 +1,14 @@
-#serial 9
+#serial 10
 
 AC_DEFUN([gl_ERROR],
 [
   AC_FUNC_ERROR_AT_LINE
   dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
-  jm_PREREQ_ERROR
+  gl_PREREQ_ERROR
 ])
 
 # Prerequisites of lib/error.c.
-AC_DEFUN([jm_PREREQ_ERROR],
+AC_DEFUN([gl_PREREQ_ERROR],
 [
   AC_REQUIRE([AC_FUNC_STRERROR_R])
   :


--- orig/gnulib/acm4/free.m4
+++ mod/gnulib/acm4/free.m4
@@ -1,6 +1,6 @@
 # Check whether free (NULL) is supposed to work.
 
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -35,7 +35,7 @@
        [gl_cv_func_free=yes],
        [gl_cv_func_free=no])])
 
-  if test $gl_cv_func_free = yes; then
+  if test $gl_cv_func_free = no; then
     AC_LIBOBJ(free)
     AC_DEFINE(free, rpl_free,
       [Define to rpl_free if the replacement function should be used.])


--- orig/gnulib/acm4/gettext.m4
+++ mod/gnulib/acm4/gettext.m4
@@ -1,4 +1,4 @@
-# gettext.m4 serial 20 (gettext-0.12)
+# gettext.m4 serial 29
 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -354,24 +354,76 @@
   AC_REQUIRE([AC_ISC_POSIX])dnl
   AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_C_CONST])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([jm_GLIBC21])dnl
+  AC_REQUIRE([gl_GLIBC21])dnl
   AC_REQUIRE([gt_INTDIV0])dnl
-  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])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_CHECK_TYPE([ptrdiff_t], ,
+    [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([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
-geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
-strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+  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])
 
+  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).
+  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+  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>])
+  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
   AM_ICONV
   AM_LANGINFO_CODESET
   if test $ac_cv_header_locale_h = yes; then
@@ -411,5 +463,25 @@
 ])
 
 
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+    [AC_TRY_COMPILE([$2], [
+#ifndef $1
+  char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+  if test $ac_cv_have_decl_$1 = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
+
+
 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])


--- orig/gnulib/acm4/glibc21.m4
+++ mod/gnulib/acm4/glibc21.m4
@@ -1,5 +1,5 @@
-# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -9,7 +9,7 @@
 # Test for the GNU C Library, version 2.1 or newer.
 # From Bruno Haible.
 
-AC_DEFUN([jm_GLIBC21],
+AC_DEFUN([gl_GLIBC21],
   [
     AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
       ac_cv_gnu_library_2_1,


--- orig/gnulib/acm4/inttypes_h.m4
+++ mod/gnulib/acm4/inttypes_h.m4
@@ -1,5 +1,5 @@
-# inttypes_h.m4 serial 5 (gettext-0.12)
-dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+# inttypes_h.m4 serial 6
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -11,16 +11,16 @@
 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 # doesn't clash with <sys/types.h>, and declares uintmax_t.
 
-AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 [
-  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
   [AC_TRY_COMPILE(
     [#include <sys/types.h>
 #include <inttypes.h>],
     [uintmax_t i = (uintmax_t) -1;],
-    jm_ac_cv_header_inttypes_h=yes,
-    jm_ac_cv_header_inttypes_h=no)])
-  if test $jm_ac_cv_header_inttypes_h = yes; then
+    gl_cv_header_inttypes_h=yes,
+    gl_cv_header_inttypes_h=no)])
+  if test $gl_cv_header_inttypes_h = yes; then
     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])


--- orig/gnulib/acm4/lib-ld.m4
+++ mod/gnulib/acm4/lib-ld.m4
@@ -1,4 +1,4 @@
-# lib-ld.m4 serial 2 (gettext-0.12)
+# lib-ld.m4 serial 3 (gettext-0.13)
 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -14,11 +14,12 @@
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  acl_cv_prog_gnu_ld=yes
-else
-  acl_cv_prog_gnu_ld=no
-fi])
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
@@ -88,11 +89,12 @@
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > 
/dev/null; then
-       test "$with_gnu_ld" != no && break
-      else
-       test "$with_gnu_ld" != yes && break
-      fi
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
     fi
   done
   IFS="$ac_save_ifs"


--- orig/gnulib/acm4/lib-prefix.m4
+++ mod/gnulib/acm4/lib-prefix.m4
@@ -1,4 +1,4 @@
-# lib-prefix.m4 serial 2 (gettext-0.12)
+# lib-prefix.m4 serial 3 (gettext-0.13)
 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -13,7 +13,7 @@
 dnl require excessive bracketing.
 ifdef([AC_HELP_STRING],
 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 dnl to access previously installed libraries. The basic assumption is that


--- orig/gnulib/acm4/po.m4
+++ mod/gnulib/acm4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 1 (gettext-0.12)
+# po.m4 serial 3 (gettext-0.14)
 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -111,7 +111,7 @@
           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo 
"creating $ac_dir/POTFILES"
           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  
]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > 
"$ac_dir/POTFILES"
           POMAKEFILEDEPS="POTFILES.in"
-          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
           # on $ac_dir but don't depend on user-specified configuration
           # parameters.
           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
@@ -127,19 +127,27 @@
             # The set of available languages was given in configure.in.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
           case "$ac_given_srcdir" in
             .) srcdirpre= ;;
             *) srcdirpre='$(srcdir)/' ;;
           esac
           POFILES=
-          GMOFILES=
           UPDATEPOFILES=
           DUMMYPOFILES=
+          GMOFILES=
           for lang in $ALL_LINGUAS; do
             POFILES="$POFILES $srcdirpre$lang.po"
-            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
           done
           # CATALOGS depends on both $ac_dir and the user's LINGUAS
           # environment variable.
@@ -174,7 +182,7 @@
             done
           fi
           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo 
"creating $ac_dir/Makefile"
-          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r 
$ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e 
"s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e 
"s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > 
"$ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r 
$ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e 
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e 
"s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > 
"$ac_dir/Makefile"
           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
             if test -f "$f"; then
               case "$f" in
@@ -188,10 +196,231 @@
       esac
     done],
    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
-    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
     # from automake.
     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
     # Capture the value of LINGUAS because we need it to compute CATALOGS.
     LINGUAS="${LINGUAS-%UNSET%}"
    ])
 ])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[     ]*VARIABLE[     ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[  ]*VARIABLE[     ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+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'`"
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    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
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    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'`"
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), 
$(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), 
$(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob 
$(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES 
\$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES 
$srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e 
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e 
"s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e 
"s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e 
"s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e 
"s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e 
"s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" 
> "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm 
-f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po 
-r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r 
"\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])


--- orig/gnulib/acm4/regex.m4
+++ mod/gnulib/acm4/regex.m4
@@ -1,16 +1,16 @@
-#serial 20
+#serial 21
 
 dnl Initially derived from code in GNU grep.
 dnl Mostly written by Jim Meyering.
 
 AC_DEFUN([gl_REGEX],
 [
-  jm_INCLUDED_REGEX([lib/regex.c])
+  gl_INCLUDED_REGEX([lib/regex.c])
 ])
 
-dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
+dnl Usage: gl_INCLUDED_REGEX([lib/regex.c])
 dnl
-AC_DEFUN([jm_INCLUDED_REGEX],
+AC_DEFUN([gl_INCLUDED_REGEX],
   [
     dnl Even packages that don't use regex.c can use this macro.
     dnl Of course, for them it doesn't do anything.
@@ -93,7 +93,7 @@
                    jm_with_regex=$ac_use_included_regex)
        if test "$jm_with_regex" = yes; then
          AC_LIBOBJ(regex)
-         jm_PREREQ_REGEX
+         gl_PREREQ_REGEX
        fi
       ],
     )
@@ -101,7 +101,7 @@
 )
 
 # Prerequisites of lib/regex.c.
-AC_DEFUN([jm_PREREQ_REGEX],
+AC_DEFUN([gl_PREREQ_REGEX],
 [
   dnl FIXME: Maybe provide a btowc replacement someday: Solaris 2.5.1 lacks it.
   dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary


--- orig/gnulib/acm4/stdbool.m4
+++ mod/gnulib/acm4/stdbool.m4
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-# Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004 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
@@ -40,7 +40,7 @@
   AC_SUBST([HAVE__BOOL])
 ])
 
-# This macro is only needed in autoconf <= 2.54.  Newer versions of autoconf
+# This macro is only needed in autoconf <= 2.59.  Newer versions of autoconf
 # have this macro built-in.
 
 AC_DEFUN([AC_HEADER_STDBOOL],
@@ -59,7 +59,7 @@
           "error: false is not 0"
          #endif
          #ifndef true
-          "error: false is not defined"
+          "error: true is not defined"
          #endif
          #if true != 1
           "error: true is not 1"
@@ -79,8 +79,14 @@
          char g[true];
          char h[sizeof (_Bool)];
          char i[sizeof s.t];
+         enum { j = false, k = true, l = false * true, m = true * 256 };
+         _Bool n[m];
+         char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+       ],
+       [
+         return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l
+                 + !m + !n + !o);
        ],
-       [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
        [ac_cv_header_stdbool_h=yes],
        [ac_cv_header_stdbool_h=no])])
    AC_CHECK_TYPES([_Bool])


--- orig/gnulib/acm4/stdint_h.m4
+++ mod/gnulib/acm4/stdint_h.m4
@@ -1,5 +1,5 @@
-# stdint_h.m4 serial 3 (gettext-0.12)
-dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+# stdint_h.m4 serial 5
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -11,16 +11,16 @@
 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
 # doesn't clash with <sys/types.h>, and declares uintmax_t.
 
-AC_DEFUN([jm_AC_HEADER_STDINT_H],
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
 [
-  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
   [AC_TRY_COMPILE(
     [#include <sys/types.h>
 #include <stdint.h>],
     [uintmax_t i = (uintmax_t) -1;],
-    jm_ac_cv_header_stdint_h=yes,
-    jm_ac_cv_header_stdint_h=no)])
-  if test $jm_ac_cv_header_stdint_h = yes; then
+    gl_cv_header_stdint_h=yes,
+    gl_cv_header_stdint_h=no)])
+  if test $gl_cv_header_stdint_h = yes; then
     AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])


--- orig/gnulib/acm4/uintmax_t.m4
+++ mod/gnulib/acm4/uintmax_t.m4
@@ -1,5 +1,5 @@
-# uintmax_t.m4 serial 7 (gettext-0.12)
-dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+# uintmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -13,12 +13,12 @@
 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
 # if it is not already defined in <stdint.h> or <inttypes.h>.
 
-AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
 [
-  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = 
no; then
-    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; 
then
+    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
     test $ac_cv_type_unsigned_long_long = yes \
       && ac_type='unsigned long long' \
       || ac_type='unsigned long'


--- orig/gnulib/acm4/ulonglong.m4
+++ mod/gnulib/acm4/ulonglong.m4
@@ -1,5 +1,5 @@
-# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+# ulonglong.m4 serial 4
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -8,16 +8,18 @@
 
 dnl From Paul Eggert.
 
-AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
+
+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
 [
   AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
     [unsigned long long ullmax = (unsigned long long) -1;
      return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
     ac_cv_type_unsigned_long_long=yes,
     ac_cv_type_unsigned_long_long=no)])
   if test $ac_cv_type_unsigned_long_long = yes; then
     AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-      [Define if you have the unsigned long long type.])
+      [Define if you have the 'unsigned long long' type.])
   fi
 ])


--- orig/gnulib/acm4/unlocked-io.m4
+++ mod/gnulib/acm4/unlocked-io.m4
@@ -1,4 +1,4 @@
-#serial 8 -*- autoconf -*-
+#serial 9
 
 dnl From Jim Meyering.
 dnl
@@ -8,7 +8,7 @@
 dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
 dnl on Solaris 2.6).
 
-AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
+AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
 [
   dnl Persuade glibc and Solaris <stdio.h> to declare
   dnl fgets_unlocked(), fputs_unlocked() etc.


--- orig/gnulib/acm4/xalloc.m4
+++ mod/gnulib/acm4/xalloc.m4
@@ -1,5 +1,5 @@
-# xalloc.m4 serial 8
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# xalloc.m4 serial 9
+dnl Copyright (C) 2002-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -21,8 +21,6 @@
 # Prerequisites of lib/xmalloc.c.
 AC_DEFUN([gl_PREREQ_XMALLOC], [
   AC_REQUIRE([AC_C_INLINE])
-  AC_REQUIRE([jm_FUNC_MALLOC])
-  AC_REQUIRE([jm_FUNC_REALLOC])
   :
 ])
 


--- orig/gnulib/import
+++ mod/gnulib/import
@@ -1,6 +1,9 @@
 #! /bin/sh
+#
+# gnulib-import (GNU m4) version 0.2
+# Written by Gary V. Vaughan <address@hidden>
 
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,9 +18,23 @@
 # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Written by Gary V. Vaughan <address@hidden>
 
+# Usage: $progname [OPTION]...
+
+#           --debug          enable verbose shell tracing
+# -n        --dry-run        don't write out any files
+# -1        --list-modules   list all dependent modules and exit
+# -v        --verbose        run in verbose mode
+#           --version        print version information
+# -h,-?     --help           print short or long help message
+
+# Extract a list of gnulib modules used from project configure.ac, and
+# copy the relevant files from an adjacent gnulib directory.
+
+# Report bugs to <address@hidden>
+
+: ${TMPDIR="/tmp"}
+: ${SED="sed"}
 : ${AUTOCONF="autoconf"}
 : ${GNULIB_DIR="$HOME/devel/savannah/gnulib"}
 : ${CONFIGDIR=".."}
@@ -25,12 +42,181 @@
 : ${DEST_TRANSFORM='s:^m4/:acm4/:;s:^lib/:m4/:'}
 : ${LIB_TRANSFORM='s:^lib_:libgnu_la_:'}
 
-me=import
-mymodules=${*-`cd $CONFIGDIR; $AUTOCONF --trace=m4_GNULIB_MODULES |sed 
's,^.*:,,g'`}
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+PROGRAM=gnulib-import
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+opt_dryrun=false
+opt_list_modules=false
+opt_verbose=false
+
+exit_cmd=:
+
+gnulibtool_magic="## This file generated automatically by $progname "
+
+# func_echo arg...
+# Echo program name prefixed message.
+func_echo ()
+{
+    echo $progname: ${1+"$@"}
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    echo $progname: ${1+"$@"} 1>&2
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_error ${1+"$@"}
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "Try \`$progname --help' for more information."
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED '/^# Usage:/,/# -h/ {
+        s/^# //; s/^# *$//;
+       s/\$progname/'$progname'/;
+       p;
+    }; d' < "$progpath"
+    echo
+    echo "run \`$progname --help | more' for full usage"
+    exit $EXIT_SUCCESS
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED '/^# Usage:/,/# Report bugs to/ {
+        s/^# //; s/^# *$//;
+       s/\$progname/'$progname'/;
+       p;
+     }; d' < "$progpath"
+    exit $EXIT_SUCCESS
+}
 
-dryrun=false
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //; s/^# *$//;
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
+        p;
+     }; d' < "$progpath"
+     exit $EXIT_SUCCESS
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `gnulib-import --version' happen quickly.
+{
+  # sed scripts:
+  my_sed_single_opt='1s/^\(..\).*$/\1/;q'
+  my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
+  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+  my_sed_long_arg='1s/^--[^=]*=//'
+
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug)         func_echo "enabling shell trace mode"
+                       set -x
+                       ;;
+
+      -n|--dryrun)      opt_dryrun=:                   ;;
+      -1|--list-modules)
+                       opt_list_modules=:              ;;
+      -v|--verbose)    opt_verbose=:                   ;;
+
+      # Separate optargs to long options:
+      NYI)
+                       arg=`echo "$opt" | $SED "$my_sed_long_arg"`
+                       opt=`echo "$opt" | $SED "$my_sed_long_opt"`
+                       set -- "$opt" "$arg" ${1+"$@"}
+                       ;;
+
+      # Separate optargs to short options:
+      NYI)
+                       arg=`echo "$opt" |$SED "$my_sed_single_rest"`
+                       opt=`echo "$opt" |$SED "$my_sed_single_opt"`
+                       set -- "$opt" "$arg" ${1+"$@"}
+                       ;;
+
+      # Separate non-argument short options:
+      -1*|-h*|-n*|-v*)
+                       rest=`echo "$opt" |$SED "$my_sed_single_rest"`
+                       opt=`echo "$opt" |$SED "$my_sed_single_opt"`
+                       set -- "$opt" "-$rest" ${1+"$@"}
+                       ;;
+
+      -\?|-h)          func_usage                                      ;;
+      --help)          func_help                                       ;;
+      --version)       func_version                                    ;;
+      --)              break                                           ;;
+      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
+      *)               set -- "$opt" ${1+"$@"};      break             ;;
+    esac
+  done
+}
+
+# func_get_dependencies mod [...]
+func_get_dependencies ()
+{
+  my_modules=
+  for my_mod in ${1+"$@"}; do
+    my_modules="$my_modules
+$my_mod
+`( cd $GNULIB_DIR && ./gnulib-tool --extract-dependencies $my_mod )`"
+  done
 
-gnulibtool_magic="## This file generated automatically by $me "
+  echo "$my_modules" | sort | uniq | sed '/^[  ]*$/d'
+}
 
 # func_update_file dest
 func_update_file ()
@@ -39,7 +225,7 @@
 
   src="${dest}T"
   (
-    cd "${destdir-.}"
+    cd "$destdir"
 
     if test -f $dest; then
       if cmp -s $src $dest; then
@@ -47,62 +233,138 @@
        rm -f $src
       elif cat $dest | grep "^$gnulibtool_magic" >/dev/null 2>&1; then
         # Files differ, and contain correct magic: update
-       $dryrun || mv -f $src $dest
-       echo "$me: updating... $dest"
+       $opt_dryrun || mv -f $src $dest
+       func_echo "updating... $dest"
       else
        # DEST does not contain correct magic: ignore
-       echo "$me: ignoring... $dest (user edits)"
+       func_echo "ignoring... $dest (user edits)"
       fi
     else
       # DEST does not yet exist: create it
-      $dryrun || { echo "$gnulibtool_magic" > $dest; cat $src >> $dest; }
-      echo "$me: creating... $dest"
+      $opt_dryrun || { echo "$gnulibtool_magic" > $dest; cat $src >> $dest; }
+      func_echo "creating... $dest"
     fi
 
-    $dryrun || rm -f $src
+    $opt_dryrun || rm -f $src
   )
 }
 
-# func_get_dependencies mod [...]
-func_get_dependencies ()
+# func_update_makerules module ...
+# import Makefile snippets
+func_update_makerules ()
 {
-  my_modules=
-  for my_mod in ${1+"$@"}; do
-    my_modules="$my_modules
-$my_mod
-`( cd $GNULIB_DIR && ./gnulib-tool --extract-dependencies $my_mod )`"
-  done
+  dest=`echo "lib/gnulib.am" | sed $DEST_TRANSFORM`
 
-  echo "$my_modules" | sort | uniq | sed '/^[  ]*$/d'
+  rm -f "$destdir/${dest}T"
+  for mod in ${1+"$@"}
+  do
+    echo "## ((( gnulib module $mod"
+    (
+      cd $GNULIB_DIR
+      ./gnulib-tool --extract-automake-snippet $mod
+    ) | sed $LIB_TRANSFORM
+    echo "## ))) gnulib module $mod"
+  done >> "$destdir/${dest}T"
+  func_update_file "$destdir/$dest"
 }
-         
-# Calculate list of all modules
-modules=`func_get_dependencies $mymodules`
-while :; do
-    all_modules=`func_get_dependencies $modules`
-    test "X$modules" = "X$all_modules" && break
-    modules="$all_modules"
-done
 
-for mod in $all_modules; do
-    dest=m4/$mod.am
-    # import Makefile snippets
-#    (
-#      cd $GNULIB_DIR
-#      ./gnulib-tool --extract-automake-snippet $mod
-#    ) | sed $LIB_TRANSFORM > $destdir/${dest}T
-#    func_update_file $dest
+# func_update_configury module ...
+func_update_configury ()
+{
+  dest=
+  for dir in . ..
+  do
+    test -f "$dir/configure.in" && dest="$dir/configure.in"
+    test -f "$dir/configure.ac" && dest="$dir/configure.ac"
+    test -f "$dest" && break
+  done
+  cp $dest $dest.orig
 
+  for mod in ${1+"$@"}
+  do
+    fragment=`( cd $GNULIB_DIR; \
+      ./gnulib-tool --extract-autoconf-snippet $mod; \
+      )  | sed '/^[    ]*$/d'`
+    magic="gnulib module $mod"
+
+    if grep "^dnl <-- override $magic[         ]*\$" "$dest" >/dev/null 2>&1
+    then
+      func_error "WARNING: overridden m4 for $mod unchanged"
+    elif grep "^dnl ((( $magic[        ]*\$" "$dest" >/dev/null 2>&1
+    then
+      func_verbose "Updating m4 for $mod in $dest"
+      awk "/^dnl \(\(\( $magic[        ]*$/,/^dnl \)\)\) $magic[       ]*$/ {
+        if (DONE != 1)
+         {
+           print \"dnl ((( $magic\";
+           if (length(\"$fragment\") > 0) print \"$fragment\";
+           print \"dnl ))) $magic\";
+           DONE = 1;
+         }
+       next;
+      }
+      { print; }" "$dest" > "${dest}T"
+      mv -f "${dest}T" "$dest"
+    else
+      func_echo "WARNING: please move new $mod fragment in $dest"
+      echo "dnl ((( $magic" >> "$dest"
+      echo "$fragment" >> "$dest"
+      echo "dnl ((( $magic" >> "$dest"
+    fi
+  done
+}
+
+# func_update_gnulib_files module ...
+func_update_gnulib_files ()
+{
+  for mod in ${1+"$@"}
+  do
     # collect filelist
     filelist="$filelist
 `( cd $GNULIB_DIR && ./gnulib-tool --extract-filelist $mod )`"
-done
-all_files=`echo "$filelist" | sort | uniq`
+  done
+  all_files=`echo "$filelist" | sort | uniq`
 
-for file in $all_files; do
+  for file in $all_files; do
     # import files
     cp -f $GNULIB_DIR/$file $destdir/`echo $file | sed $DEST_TRANSFORM`
-    echo "$me: importing... $file"
+    func_echo "importing... $file"
+  done
+}
+
+# Get a list of named modules
+func_verbose "extracting required module names"
+mymodules=${*-`cd $CONFIGDIR; $AUTOCONF --trace=m4_GNULIB_MODULES |sed 
's,^.*:,,g'`}
+
+# Calculate list of all modules
+func_verbose "calculating module dependencies"
+modules=`func_get_dependencies $mymodules`
+while :; do
+    all_modules=`func_get_dependencies $modules`
+    test "X$modules" = "X$all_modules" && break
+    modules="$all_modules"
 done
 
-exit 0
+if $opt_list_modules; then
+  echo "$all_modules"
+  exit $EXIT_SUCCESS
+fi
+
+# Update gnulib sources and macros
+func_verbose "updating gnulib files"
+func_update_gnulib_files $all_modules
+
+# Update makefile fragments
+func_verbose "extracting make fragments"
+func_update_makerules $all_modules
+
+# Update autoconf fragments
+func_verbose "extracting autoconf fragments"
+func_update_configury $all_modules
+
+exit $EXIT_SUCCESS
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:


--- orig/gnulib/m4/Makefile.am
+++ mod/gnulib/m4/Makefile.am
@@ -1,5 +1,5 @@
 ## This file is part of GNU m4
-## Copyright (C) 2003 Free Software Foundation, Inc.
+## Copyright (C) 2003, 2004 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
@@ -37,79 +37,4 @@
 # --------------------------- #
 # Gnulib Makefile.am snippets #
 # --------------------------- #
-
-## ((( gnulib module alloca
-BUILT_SOURCES += $(ALLOCA_H)
-EXTRA_DIST += alloca_.h
-
-# We need the following in order to create an <alloca.h> when the system
-# doesn't have one that works with the given compiler.
-all-local $(lib_OBJECTS): $(ALLOCA_H)
-alloca.h: alloca_.h
-       cp $(srcdir)/alloca_.h address@hidden
-       mv address@hidden $@
-MOSTLYCLEANFILES += alloca.h alloca.h-t
-## ))) gnulib module alloca
-## ((( gnulib module error
-## ))) gnulib module error
-## ((( gnulib module exit
-libgnu_la_SOURCES += exit.h
-## ))) gnulib module exit
-## ((( gnulib module exitfail
-libgnu_la_SOURCES += exitfail.h exitfail.c
-## ))) gnulib module exitfail
-## ((( gnulib module extensions
-## ))) gnulib module extensions
-## ((( gnulib module free
-## ))) gnulib module free
-## ((( gnulib module getopt
-libgnu_la_SOURCES += getopt.h getopt.c getopt1.c
-## ))) gnulib module getopt
-## ((( gnulib module gettext
-libgnu_la_SOURCES += gettext.h
-## ))) gnulib module gettext
-## ((( gnulib module malloc
-## ))) gnulib module malloc
-## ((( gnulib module obstack
-## ))) gnulib module obstack
-## ((( gnulib module progname
-libgnu_la_SOURCES += progname.h progname.c
-## ))) gnulib module progname
-## ((( gnulib module realloc
-## ))) gnulib module realloc
-## ((( gnulib module regex
-libgnu_la_SOURCES += regex.h
-## ))) gnulib module regex
-## ((( gnulib module restrict
-## ))) gnulib module restrict
-## ((( gnulib module stdbool
-BUILT_SOURCES += $(STDBOOL_H)
-EXTRA_DIST += stdbool_.h
-
-# We need the following in order to create an <stdbool.h> when the system
-# doesn't have one that works.
-all-local $(lib_OBJECTS): $(STDBOOL_H)
-stdbool.h: stdbool_.h
-       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > 
address@hidden
-       mv address@hidden $@
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
-## ))) gnulib module stdbool
-## ((( gnulib module strndup
-libgnu_la_SOURCES += strndup.h
-## ))) gnulib module strndup
-## ((( gnulib module strnlen
-## ))) gnulib module strnlen
-## ((( gnulib module strtol
-## ))) gnulib module strtol
-## ((( gnulib module unlocked-io
-libgnu_la_SOURCES += unlocked-io.h
-## ))) gnulib module unlocked-io
-## ((( gnulib module version-etc
-libgnu_la_SOURCES += version-etc.h version-etc.c
-## ))) gnulib module version-etc
-## ((( gnulib module xalloc
-libgnu_la_SOURCES += xalloc.h xmalloc.c xstrdup.c
-## ))) gnulib module xalloc
-## ((( gnulib module xstrndup
-libgnu_la_SOURCES += xstrndup.h xstrndup.c
-## ))) gnulib module xstrndup
+include gnulib.am


--- orig/gnulib/m4/alloca.c
+++ mod/gnulib/m4/alloca.c
@@ -25,19 +25,20 @@
 # include <config.h>
 #endif
 
+#include <alloca.h>
+
 #include <string.h>
 #include <stdlib.h>
 
 #ifdef emacs
 # include "lisp.h"
 # include "blockinput.h"
-# define xalloc_die() memory_full ()
 # ifdef EMACS_FREE
 #  undef free
 #  define free EMACS_FREE
 # endif
 #else
-# include <xalloc.h>
+# define memory_full() abort ()
 #endif
 
 /* If compiling with GCC 2, this file's not needed.  */
@@ -196,22 +197,25 @@
 
   {
     /* Address of header.  */
-    register void *new;
+    register header *new;
 
     size_t combined_size = sizeof (header) + size;
     if (combined_size < sizeof (header))
-      xalloc_die ();
+      memory_full ();
+
+    new = malloc (combined_size);
 
-    new = xmalloc (combined_size);
+    if (! new)
+      memory_full ();
 
-    ((header *) new)->h.next = last_alloca_header;
-    ((header *) new)->h.deep = depth;
+    new->h.next = last_alloca_header;
+    new->h.deep = depth;
 
-    last_alloca_header = (header *) new;
+    last_alloca_header = new;
 
     /* User storage begins just after header.  */
 
-    return (void *) ((char *) new + sizeof (header));
+    return (void *) (new + 1);
   }
 }
 


--- orig/gnulib/m4/alloca_.h
+++ mod/gnulib/m4/alloca_.h
@@ -1,5 +1,7 @@
 /* Memory allocation on the stack.
-   Copyright (C) 1995, 1999, 2001-2003 Free Software Foundation, Inc.
+
+   Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 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
@@ -23,8 +25,8 @@
 #ifndef _ALLOCA_H
 # define _ALLOCA_H
 
-/* alloca(N) returns a pointer (void* or char*) to N bytes of memory
-   allocated on the stack, and which will last until the function returns.
+/* alloca (N) returns a pointer to N bytes of memory
+   allocated on the stack, which will last until the function returns.
    Use of alloca should be avoided:
      - inside arguments of function calls - undefined behaviour,
      - in inline functions - the allocation may actually last until the
@@ -34,35 +36,19 @@
        request, the program just crashes.
  */
 
-# ifdef __GNUC__
-#  ifndef alloca
-#   define alloca __builtin_alloca
-#  endif
-# else
-#  ifdef _MSC_VER
-#   include <malloc.h>
-#   define alloca _alloca
-#  else
-#   if HAVE_ALLOCA_H
-#    include <alloca.h>
-#   else
-#    ifdef _AIX
- #    pragma alloca
-#    else
-#     ifdef __hpux /* This section must match that of bison generated files. */
-#      ifdef __cplusplus
-extern "C" void *alloca (unsigned int);
-#      else /* not __cplusplus */
-extern void *alloca ();
-#      endif /* not __cplusplus */
-#     else /* not __hpux */
-#      ifndef alloca
-extern char *alloca ();
-#      endif
-#     endif /* __hpux */
-#    endif
-#   endif
-#  endif
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca 
+#elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+#else
+# include <stddef.h>
+# ifdef  __cplusplus
+extern "C"
 # endif
+void *alloca (size_t);
+#endif
 
 #endif /* _ALLOCA_H */


--- orig/gnulib/m4/getopt.c
+++ mod/gnulib/m4/getopt.c
@@ -2,11 +2,8 @@
    NOTE: getopt is now part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to address@hidden
    before changing it!
-
-   Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
-   Inc.
-
+   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004
+       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
@@ -72,10 +69,9 @@
 #ifdef _LIBC
 # include <libintl.h>
 #else
-/* This is for other GNU distributions with internationalized messages.  */
 # include "gettext.h"
+# define _(msgid) gettext (msgid)
 #endif
-#define _(msgid) gettext (msgid)
 
 #if defined _LIBC && defined USE_IN_LIBIO
 # include <wchar.h>
@@ -100,6 +96,7 @@
    they can distinguish the relative order of options and other arguments.  */
 
 #include "getopt.h"
+#include "getopt_int.h"
 
 /* For communication from `getopt' to the caller.
    When `getopt' finds an option that takes an argument,
@@ -124,21 +121,6 @@
 /* 1003.2 says this must be 1 before any call.  */
 int optind = 1;
 
-/* Formerly, initialization of getopt depended on optind==0, which
-   causes problems with re-calling getopt as programs generally don't
-   know that. */
-
-int __getopt_initialized attribute_hidden;
-
-/* The next char to be scanned in the option-element
-   in which the last option character we returned was found.
-   This allows us to pick up the scan where we left off.
-
-   If this is zero, or a null string, it means resume the scan
-   by advancing to the next ARGV-element.  */
-
-static char *nextchar;
-
 /* Callers store zero here to inhibit the error message
    for unrecognized options.  */
 
@@ -150,44 +132,12 @@
 
 int optopt = '?';
 
-/* Describe how to deal with options that follow non-option ARGV-elements.
+/* Keep a global copy of all internal members of getopt_data.  */
 
-   If the caller did not specify anything,
-   the default is REQUIRE_ORDER if the environment variable
-   POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
-   REQUIRE_ORDER means don't recognize them as options;
-   stop option processing when the first non-option is seen.
-   This is what Unix does.
-   This mode of operation is selected by either setting the environment
-   variable POSIXLY_CORRECT, or using `+' as the first character
-   of the list of option characters.
-
-   PERMUTE is the default.  We permute the contents of ARGV as we scan,
-   so that eventually all the non-options are at the end.  This allows options
-   to be given in any order, even with programs that were not written to
-   expect this.
-
-   RETURN_IN_ORDER is an option available to programs that were written
-   to expect options and other ARGV-elements in any order and that care about
-   the ordering of the two.  We describe each non-option ARGV-element
-   as if it were the argument of an option with character code 1.
-   Using `-' as the first character of the list of option characters
-   selects this mode of operation.
-
-   The special argument `--' forces an end of option-scanning regardless
-   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
-   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+static struct _getopt_data getopt_data;
 
-static enum
-{
-  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable.  */
-static char *posixly_correct;
 
-#ifndef        __GNU_LIBRARY__
+#ifndef __GNU_LIBRARY__
 
 /* Avoid depending on library functions or files
    whose names are inconsistent.  */
@@ -198,15 +148,6 @@
 
 #endif /* not __GNU_LIBRARY__ */
 
-/* Handle permutation of arguments.  */
-
-/* Describe the part of ARGV that contains non-options that have
-   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
-   `last_nonopt' is the index after the last of them.  */
-
-static int first_nonopt;
-static int last_nonopt;
-
 #ifdef _LIBC
 /* Stored original parameters.
    XXX This is no good solution.  We should rather copy the args so
@@ -220,14 +161,11 @@
 # ifdef USE_NONOPTION_FLAGS
 /* Defined in getopt_init.c  */
 extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
 # endif
 
 # ifdef USE_NONOPTION_FLAGS
 #  define SWAP_FLAGS(ch1, ch2) \
-  if (nonoption_flags_len > 0)                                               \
+  if (d->__nonoption_flags_len > 0)                                          \
     {                                                                        \
       char __tmp = __getopt_nonoption_flags[ch1];                            \
       __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];         \
@@ -250,11 +188,11 @@
    the new indices of the non-options in ARGV after they are moved.  */
 
 static void
-exchange (char **argv)
+exchange (char **argv, struct _getopt_data *d)
 {
-  int bottom = first_nonopt;
-  int middle = last_nonopt;
-  int top = optind;
+  int bottom = d->__first_nonopt;
+  int middle = d->__last_nonopt;
+  int top = d->optind;
   char *tem;
 
   /* Exchange the shorter segment with the far end of the longer segment.
@@ -266,19 +204,19 @@
   /* First make sure the handling of the `__getopt_nonoption_flags'
      string can work normally.  Our top argument must be in the range
      of the string.  */
-  if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+  if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
     {
       /* We must extend the array.  The user plays games with us and
         presents new arguments.  */
       char *new_str = malloc (top + 1);
       if (new_str == NULL)
-       nonoption_flags_len = nonoption_flags_max_len = 0;
+       d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
       else
        {
          memset (__mempcpy (new_str, __getopt_nonoption_flags,
-                            nonoption_flags_max_len),
-                 '\0', top + 1 - nonoption_flags_max_len);
-         nonoption_flags_max_len = top + 1;
+                            d->__nonoption_flags_max_len),
+                 '\0', top + 1 - d->__nonoption_flags_max_len);
+         d->__nonoption_flags_max_len = top + 1;
          __getopt_nonoption_flags = new_str;
        }
     }
@@ -324,70 +262,71 @@
 
   /* Update records for the slots the non-options now occupy.  */
 
-  first_nonopt += (optind - last_nonopt);
-  last_nonopt = optind;
+  d->__first_nonopt += (d->optind - d->__last_nonopt);
+  d->__last_nonopt = d->optind;
 }
 
 /* Initialize the internal data when the first call is made.  */
 
 static const char *
-_getopt_initialize (int argc, char *const *argv, const char *optstring)
+_getopt_initialize (int argc, char *const *argv, const char *optstring,
+                   struct _getopt_data *d)
 {
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
      is the program name); the sequence of previously skipped
      non-option ARGV-elements is empty.  */
 
-  first_nonopt = last_nonopt = optind;
+  d->__first_nonopt = d->__last_nonopt = d->optind;
 
-  nextchar = NULL;
+  d->__nextchar = NULL;
 
-  posixly_correct = getenv ("POSIXLY_CORRECT");
+  d->__posixly_correct = !!getenv ("POSIXLY_CORRECT");
 
   /* Determine how to handle the ordering of options and nonoptions.  */
 
   if (optstring[0] == '-')
     {
-      ordering = RETURN_IN_ORDER;
+      d->__ordering = RETURN_IN_ORDER;
       ++optstring;
     }
   else if (optstring[0] == '+')
     {
-      ordering = REQUIRE_ORDER;
+      d->__ordering = REQUIRE_ORDER;
       ++optstring;
     }
-  else if (posixly_correct != NULL)
-    ordering = REQUIRE_ORDER;
+  else if (d->__posixly_correct)
+    d->__ordering = REQUIRE_ORDER;
   else
-    ordering = PERMUTE;
+    d->__ordering = PERMUTE;
 
 #if defined _LIBC && defined USE_NONOPTION_FLAGS
-  if (posixly_correct == NULL
+  if (!d->__posixly_correct
       && argc == __libc_argc && argv == __libc_argv)
     {
-      if (nonoption_flags_max_len == 0)
+      if (d->__nonoption_flags_max_len == 0)
        {
          if (__getopt_nonoption_flags == NULL
              || __getopt_nonoption_flags[0] == '\0')
-           nonoption_flags_max_len = -1;
+           d->__nonoption_flags_max_len = -1;
          else
            {
              const char *orig_str = __getopt_nonoption_flags;
-             int len = nonoption_flags_max_len = strlen (orig_str);
-             if (nonoption_flags_max_len < argc)
-               nonoption_flags_max_len = argc;
+             int len = d->__nonoption_flags_max_len = strlen (orig_str);
+             if (d->__nonoption_flags_max_len < argc)
+               d->__nonoption_flags_max_len = argc;
              __getopt_nonoption_flags =
-               (char *) malloc (nonoption_flags_max_len);
+               (char *) malloc (d->__nonoption_flags_max_len);
              if (__getopt_nonoption_flags == NULL)
-               nonoption_flags_max_len = -1;
+               d->__nonoption_flags_max_len = -1;
              else
                memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
-                       '\0', nonoption_flags_max_len - len);
+                       '\0', d->__nonoption_flags_max_len - len);
            }
        }
-      nonoption_flags_len = nonoption_flags_max_len;
+      d->__nonoption_flags_len = d->__nonoption_flags_max_len;
     }
   else
-    nonoption_flags_len = 0;
+    d->__nonoption_flags_len = 0;
 #endif
 
   return optstring;
@@ -450,25 +389,25 @@
    long-named options.  */
 
 int
-_getopt_internal (int argc, char *const *argv,
-                 const char *optstring, const struct option *longopts,
-                 int *longind, int long_only)
+_getopt_internal_r (int argc, char *const *argv, const char *optstring,
+                   const struct option *longopts, int *longind,
+                   int long_only, struct _getopt_data *d)
 {
-  int print_errors = opterr;
+  int print_errors = d->opterr;
   if (optstring[0] == ':')
     print_errors = 0;
 
   if (argc < 1)
     return -1;
 
-  optarg = NULL;
+  d->optarg = NULL;
 
-  if (optind == 0 || !__getopt_initialized)
+  if (d->optind == 0 || !d->__initialized)
     {
-      if (optind == 0)
-       optind = 1;     /* Don't scan ARGV[0], the program name.  */
-      optstring = _getopt_initialize (argc, argv, optstring);
-      __getopt_initialized = 1;
+      if (d->optind == 0)
+       d->optind = 1;  /* Don't scan ARGV[0], the program name.  */
+      optstring = _getopt_initialize (argc, argv, optstring, d);
+      d->__initialized = 1;
     }
 
   /* Test whether ARGV[optind] points to a non-option argument.
@@ -476,40 +415,41 @@
      from the shell indicating it is not an option.  The later information
      is only used when the used in the GNU libc.  */
 #if defined _LIBC && defined USE_NONOPTION_FLAGS
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'        
      \
-                     || (optind < nonoption_flags_len                        \
-                         && __getopt_nonoption_flags[optind] == '1'))
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+                     || (d->optind < d->__nonoption_flags_len                \
+                         && __getopt_nonoption_flags[d->optind] == '1'))
 #else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
 #endif
 
-  if (nextchar == NULL || *nextchar == '\0')
+  if (d->__nextchar == NULL || *d->__nextchar == '\0')
     {
       /* Advance to the next ARGV-element.  */
 
       /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
         moved back by the user (who may also have changed the arguments).  */
-      if (last_nonopt > optind)
-       last_nonopt = optind;
-      if (first_nonopt > optind)
-       first_nonopt = optind;
+      if (d->__last_nonopt > d->optind)
+       d->__last_nonopt = d->optind;
+      if (d->__first_nonopt > d->optind)
+       d->__first_nonopt = d->optind;
 
-      if (ordering == PERMUTE)
+      if (d->__ordering == PERMUTE)
        {
          /* If we have just processed some options following some non-options,
             exchange them so that the options come first.  */
 
-         if (first_nonopt != last_nonopt && last_nonopt != optind)
-           exchange ((char **) argv);
-         else if (last_nonopt != optind)
-           first_nonopt = optind;
+         if (d->__first_nonopt != d->__last_nonopt
+             && d->__last_nonopt != d->optind)
+           exchange ((char **) argv, d);
+         else if (d->__last_nonopt != d->optind)
+           d->__first_nonopt = d->optind;
 
          /* Skip any additional non-options
             and extend the range of non-options previously skipped.  */
 
-         while (optind < argc && NONOPTION_P)
-           optind++;
-         last_nonopt = optind;
+         while (d->optind < argc && NONOPTION_P)
+           d->optind++;
+         d->__last_nonopt = d->optind;
        }
 
       /* The special ARGV-element `--' means premature end of options.
@@ -517,28 +457,29 @@
         then exchange with previous non-options as if it were an option,
         then skip everything else like a non-option.  */
 
-      if (optind != argc && !strcmp (argv[optind], "--"))
+      if (d->optind != argc && !strcmp (argv[d->optind], "--"))
        {
-         optind++;
+         d->optind++;
 
-         if (first_nonopt != last_nonopt && last_nonopt != optind)
-           exchange ((char **) argv);
-         else if (first_nonopt == last_nonopt)
-           first_nonopt = optind;
-         last_nonopt = argc;
+         if (d->__first_nonopt != d->__last_nonopt
+             && d->__last_nonopt != d->optind)
+           exchange ((char **) argv, d);
+         else if (d->__first_nonopt == d->__last_nonopt)
+           d->__first_nonopt = d->optind;
+         d->__last_nonopt = argc;
 
-         optind = argc;
+         d->optind = argc;
        }
 
       /* If we have done all the ARGV-elements, stop the scan
         and back over any non-options that we skipped and permuted.  */
 
-      if (optind == argc)
+      if (d->optind == argc)
        {
          /* Set the next-arg-index to point at the non-options
             that we previously skipped, so the caller will digest them.  */
-         if (first_nonopt != last_nonopt)
-           optind = first_nonopt;
+         if (d->__first_nonopt != d->__last_nonopt)
+           d->optind = d->__first_nonopt;
          return -1;
        }
 
@@ -547,17 +488,17 @@
 
       if (NONOPTION_P)
        {
-         if (ordering == REQUIRE_ORDER)
+         if (d->__ordering == REQUIRE_ORDER)
            return -1;
-         optarg = argv[optind++];
+         d->optarg = argv[d->optind++];
          return 1;
        }
 
       /* We have found another option-ARGV-element.
         Skip the initial punctuation.  */
 
-      nextchar = (argv[optind] + 1
-                 + (longopts != NULL && argv[optind][1] == '-'));
+      d->__nextchar = (argv[d->optind] + 1
+                 + (longopts != NULL && argv[d->optind][1] == '-'));
     }
 
   /* Decode the current option-ARGV-element.  */
@@ -576,9 +517,9 @@
      This distinction seems to be the most useful approach.  */
 
   if (longopts != NULL
-      && (argv[optind][1] == '-'
-         || (long_only
-             && (argv[optind][2] || !strchr (optstring, argv[optind][1])))))
+      && (argv[d->optind][1] == '-'
+         || (long_only && (argv[d->optind][2]
+                           || !strchr (optstring, argv[d->optind][1])))))
     {
       char *nameend;
       const struct option *p;
@@ -588,15 +529,15 @@
       int indfound = -1;
       int option_index;
 
-      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+      for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
        /* Do nothing.  */ ;
 
       /* Test all long options for either exact match
         or abbreviated matches.  */
       for (p = longopts, option_index = 0; p->name; p++, option_index++)
-       if (!strncmp (p->name, nextchar, nameend - nextchar))
+       if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
          {
-           if ((unsigned int) (nameend - nextchar)
+           if ((unsigned int) (nameend - d->__nextchar)
                == (unsigned int) strlen (p->name))
              {
                /* Exact match found.  */
@@ -627,37 +568,44 @@
              char *buf;
 
              if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
-                             argv[0], argv[optind]) >= 0)
+                             argv[0], argv[d->optind]) >= 0)
                {
+                 _IO_flockfile (stderr);
+
+                 int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                 ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
                  if (_IO_fwide (stderr, 0) > 0)
                    __fwprintf (stderr, L"%s", buf);
                  else
                    fputs (buf, stderr);
 
+                 ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                 _IO_funlockfile (stderr);
+
                  free (buf);
                }
 #else
              fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
-                      argv[0], argv[optind]);
+                      argv[0], argv[d->optind]);
 #endif
            }
-         nextchar += strlen (nextchar);
-         optind++;
-         optopt = 0;
+         d->__nextchar += strlen (d->__nextchar);
+         d->optind++;
+         d->optopt = 0;
          return '?';
        }
 
       if (pfound != NULL)
        {
          option_index = indfound;
-         optind++;
+         d->optind++;
          if (*nameend)
            {
              /* Don't test has_arg with >, because some C compilers don't
                 allow it to be used on enums.  */
              if (pfound->has_arg)
-               optarg = nameend + 1;
+               d->optarg = nameend + 1;
              else
                {
                  if (print_errors)
@@ -667,7 +615,7 @@
                      int n;
 #endif
 
-                     if (argv[optind - 1][1] == '-')
+                     if (argv[d->optind - 1][1] == '-')
                        {
                          /* --option */
 #if defined _LIBC && defined USE_IN_LIBIO
@@ -686,38 +634,48 @@
 #if defined _LIBC && defined USE_IN_LIBIO
                          n = __asprintf (&buf, _("\
 %s: option `%c%s' doesn't allow an argument\n"),
-                                         argv[0], argv[optind - 1][0],
+                                         argv[0], argv[d->optind - 1][0],
                                          pfound->name);
 #else
                          fprintf (stderr, _("\
 %s: option `%c%s' doesn't allow an argument\n"),
-                                  argv[0], argv[optind - 1][0], pfound->name);
+                                  argv[0], argv[d->optind - 1][0],
+                                  pfound->name);
 #endif
                        }
 
 #if defined _LIBC && defined USE_IN_LIBIO
                      if (n >= 0)
                        {
+                         _IO_flockfile (stderr);
+
+                         int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                         ((_IO_FILE *) stderr)->_flags2
+                           |= _IO_FLAGS2_NOTCANCEL;
+
                          if (_IO_fwide (stderr, 0) > 0)
                            __fwprintf (stderr, L"%s", buf);
                          else
                            fputs (buf, stderr);
 
+                         ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                         _IO_funlockfile (stderr);
+
                          free (buf);
                        }
 #endif
                    }
 
-                 nextchar += strlen (nextchar);
+                 d->__nextchar += strlen (d->__nextchar);
 
-                 optopt = pfound->val;
+                 d->optopt = pfound->val;
                  return '?';
                }
            }
          else if (pfound->has_arg == 1)
            {
-             if (optind < argc)
-               optarg = argv[optind++];
+             if (d->optind < argc)
+               d->optarg = argv[d->optind++];
              else
                {
                  if (print_errors)
@@ -727,27 +685,36 @@
 
                      if (__asprintf (&buf, _("\
 %s: option `%s' requires an argument\n"),
-                                     argv[0], argv[optind - 1]) >= 0)
+                                     argv[0], argv[d->optind - 1]) >= 0)
                        {
+                         _IO_flockfile (stderr);
+
+                         int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                         ((_IO_FILE *) stderr)->_flags2
+                           |= _IO_FLAGS2_NOTCANCEL;
+
                          if (_IO_fwide (stderr, 0) > 0)
                            __fwprintf (stderr, L"%s", buf);
                          else
                            fputs (buf, stderr);
 
+                         ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                         _IO_funlockfile (stderr);
+
                          free (buf);
                        }
 #else
                      fprintf (stderr,
                               _("%s: option `%s' requires an argument\n"),
-                              argv[0], argv[optind - 1]);
+                              argv[0], argv[d->optind - 1]);
 #endif
                    }
-                 nextchar += strlen (nextchar);
-                 optopt = pfound->val;
+                 d->__nextchar += strlen (d->__nextchar);
+                 d->optopt = pfound->val;
                  return optstring[0] == ':' ? ':' : '?';
                }
            }
-         nextchar += strlen (nextchar);
+         d->__nextchar += strlen (d->__nextchar);
          if (longind != NULL)
            *longind = option_index;
          if (pfound->flag)
@@ -762,8 +729,8 @@
         or the option starts with '--' or is not a valid short
         option, then it's an error.
         Otherwise interpret it as a short option.  */
-      if (!long_only || argv[optind][1] == '-'
-         || strchr (optstring, *nextchar) == NULL)
+      if (!long_only || argv[d->optind][1] == '-'
+         || strchr (optstring, *d->__nextchar) == NULL)
        {
          if (print_errors)
            {
@@ -772,15 +739,15 @@
              int n;
 #endif
 
-             if (argv[optind][1] == '-')
+             if (argv[d->optind][1] == '-')
                {
                  /* --option */
 #if defined _LIBC && defined USE_IN_LIBIO
                  n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
-                                 argv[0], nextchar);
+                                 argv[0], d->__nextchar);
 #else
                  fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
-                          argv[0], nextchar);
+                          argv[0], d->__nextchar);
 #endif
                }
              else
@@ -788,28 +755,36 @@
                  /* +option or -option */
 #if defined _LIBC && defined USE_IN_LIBIO
                  n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
-                                 argv[0], argv[optind][0], nextchar);
+                                 argv[0], argv[d->optind][0], d->__nextchar);
 #else
                  fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
-                          argv[0], argv[optind][0], nextchar);
+                          argv[0], argv[d->optind][0], d->__nextchar);
 #endif
                }
 
 #if defined _LIBC && defined USE_IN_LIBIO
              if (n >= 0)
                {
+                 _IO_flockfile (stderr);
+
+                 int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                 ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
                  if (_IO_fwide (stderr, 0) > 0)
                    __fwprintf (stderr, L"%s", buf);
                  else
                    fputs (buf, stderr);
 
+                 ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                 _IO_funlockfile (stderr);
+
                  free (buf);
                }
 #endif
            }
-         nextchar = (char *) "";
-         optind++;
-         optopt = 0;
+         d->__nextchar = (char *) "";
+         d->optind++;
+         d->optopt = 0;
          return '?';
        }
     }
@@ -817,12 +792,12 @@
   /* Look at and handle the next short option-character.  */
 
   {
-    char c = *nextchar++;
+    char c = *d->__nextchar++;
     char *temp = strchr (optstring, c);
 
     /* Increment `optind' when we start to process its last character.  */
-    if (*nextchar == '\0')
-      ++optind;
+    if (*d->__nextchar == '\0')
+      ++d->optind;
 
     if (temp == NULL || c == ':')
       {
@@ -833,7 +808,7 @@
              int n;
 #endif
 
-           if (posixly_correct)
+           if (d->__posixly_correct)
              {
                /* 1003.2 specifies the format of this message.  */
 #if defined _LIBC && defined USE_IN_LIBIO
@@ -856,16 +831,24 @@
 #if defined _LIBC && defined USE_IN_LIBIO
            if (n >= 0)
              {
+               _IO_flockfile (stderr);
+
+               int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+               ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
                if (_IO_fwide (stderr, 0) > 0)
                  __fwprintf (stderr, L"%s", buf);
                else
                  fputs (buf, stderr);
 
+               ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+               _IO_funlockfile (stderr);
+
                free (buf);
              }
 #endif
          }
-       optopt = c;
+       d->optopt = c;
        return '?';
       }
     /* Convenience. Treat POSIX -W foo same as long option --foo */
@@ -880,14 +863,14 @@
        int option_index;
 
        /* This is an option that requires an argument.  */
-       if (*nextchar != '\0')
+       if (*d->__nextchar != '\0')
          {
-           optarg = nextchar;
+           d->optarg = d->__nextchar;
            /* If we end this ARGV-element by taking the rest as an arg,
               we must advance to the next element now.  */
-           optind++;
+           d->optind++;
          }
-       else if (optind == argc)
+       else if (d->optind == argc)
          {
            if (print_errors)
              {
@@ -899,11 +882,19 @@
                                _("%s: option requires an argument -- %c\n"),
                                argv[0], c) >= 0)
                  {
+                   _IO_flockfile (stderr);
+
+                   int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                   ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
                    if (_IO_fwide (stderr, 0) > 0)
                      __fwprintf (stderr, L"%s", buf);
                    else
                      fputs (buf, stderr);
 
+                   ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                   _IO_funlockfile (stderr);
+
                    free (buf);
                  }
 #else
@@ -911,7 +902,7 @@
                         argv[0], c);
 #endif
              }
-           optopt = c;
+           d->optopt = c;
            if (optstring[0] == ':')
              c = ':';
            else
@@ -919,22 +910,23 @@
            return c;
          }
        else
-         /* We already incremented `optind' once;
+         /* We already incremented `d->optind' once;
             increment it again when taking next ARGV-elt as argument.  */
-         optarg = argv[optind++];
+         d->optarg = argv[d->optind++];
 
        /* optarg is now the argument, see if it's in the
           table of longopts.  */
 
-       for (nextchar = nameend = optarg; *nameend && *nameend != '='; 
nameend++)
+       for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+            nameend++)
          /* Do nothing.  */ ;
 
        /* Test all long options for either exact match
           or abbreviated matches.  */
        for (p = longopts, option_index = 0; p->name; p++, option_index++)
-         if (!strncmp (p->name, nextchar, nameend - nextchar))
+         if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
            {
-             if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+             if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
                {
                  /* Exact match found.  */
                  pfound = p;
@@ -960,22 +952,30 @@
                char *buf;
 
                if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
-                               argv[0], argv[optind]) >= 0)
+                               argv[0], argv[d->optind]) >= 0)
                  {
+                   _IO_flockfile (stderr);
+
+                   int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                   ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
                    if (_IO_fwide (stderr, 0) > 0)
                      __fwprintf (stderr, L"%s", buf);
                    else
                      fputs (buf, stderr);
 
+                   ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                   _IO_funlockfile (stderr);
+
                    free (buf);
                  }
 #else
                fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
-                        argv[0], argv[optind]);
+                        argv[0], argv[d->optind]);
 #endif
              }
-           nextchar += strlen (nextchar);
-           optind++;
+           d->__nextchar += strlen (d->__nextchar);
+           d->optind++;
            return '?';
          }
        if (pfound != NULL)
@@ -986,7 +986,7 @@
                /* Don't test has_arg with >, because some C compilers don't
                   allow it to be used on enums.  */
                if (pfound->has_arg)
-                 optarg = nameend + 1;
+                 d->optarg = nameend + 1;
                else
                  {
                    if (print_errors)
@@ -998,11 +998,20 @@
 %s: option `-W %s' doesn't allow an argument\n"),
                                        argv[0], pfound->name) >= 0)
                          {
+                           _IO_flockfile (stderr);
+
+                           int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                           ((_IO_FILE *) stderr)->_flags2
+                             |= _IO_FLAGS2_NOTCANCEL;
+
                            if (_IO_fwide (stderr, 0) > 0)
                              __fwprintf (stderr, L"%s", buf);
                            else
                              fputs (buf, stderr);
 
+                           ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                           _IO_funlockfile (stderr);
+
                            free (buf);
                          }
 #else
@@ -1012,14 +1021,14 @@
 #endif
                      }
 
-                   nextchar += strlen (nextchar);
+                   d->__nextchar += strlen (d->__nextchar);
                    return '?';
                  }
              }
            else if (pfound->has_arg == 1)
              {
-               if (optind < argc)
-                 optarg = argv[optind++];
+               if (d->optind < argc)
+                 d->optarg = argv[d->optind++];
                else
                  {
                    if (print_errors)
@@ -1029,26 +1038,35 @@
 
                        if (__asprintf (&buf, _("\
 %s: option `%s' requires an argument\n"),
-                                       argv[0], argv[optind - 1]) >= 0)
+                                       argv[0], argv[d->optind - 1]) >= 0)
                          {
+                           _IO_flockfile (stderr);
+
+                           int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                           ((_IO_FILE *) stderr)->_flags2
+                             |= _IO_FLAGS2_NOTCANCEL;
+
                            if (_IO_fwide (stderr, 0) > 0)
                              __fwprintf (stderr, L"%s", buf);
                            else
                              fputs (buf, stderr);
 
+                           ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                           _IO_funlockfile (stderr);
+
                            free (buf);
                          }
 #else
                        fprintf (stderr,
                                 _("%s: option `%s' requires an argument\n"),
-                                argv[0], argv[optind - 1]);
+                                argv[0], argv[d->optind - 1]);
 #endif
                      }
-                   nextchar += strlen (nextchar);
+                   d->__nextchar += strlen (d->__nextchar);
                    return optstring[0] == ':' ? ':' : '?';
                  }
              }
-           nextchar += strlen (nextchar);
+           d->__nextchar += strlen (d->__nextchar);
            if (longind != NULL)
              *longind = option_index;
            if (pfound->flag)
@@ -1058,7 +1076,7 @@
              }
            return pfound->val;
          }
-         nextchar = NULL;
+         d->__nextchar = NULL;
          return 'W';   /* Let the application handle it.   */
       }
     if (temp[1] == ':')
@@ -1066,26 +1084,26 @@
        if (temp[2] == ':')
          {
            /* This is an option that accepts an argument optionally.  */
-           if (*nextchar != '\0')
+           if (*d->__nextchar != '\0')
              {
-               optarg = nextchar;
-               optind++;
+               d->optarg = d->__nextchar;
+               d->optind++;
              }
            else
-             optarg = NULL;
-           nextchar = NULL;
+             d->optarg = NULL;
+           d->__nextchar = NULL;
          }
        else
          {
            /* This is an option that requires an argument.  */
-           if (*nextchar != '\0')
+           if (*d->__nextchar != '\0')
              {
-               optarg = nextchar;
+               d->optarg = d->__nextchar;
                /* If we end this ARGV-element by taking the rest as an arg,
                   we must advance to the next element now.  */
-               optind++;
+               d->optind++;
              }
-           else if (optind == argc)
+           else if (d->optind == argc)
              {
                if (print_errors)
                  {
@@ -1097,11 +1115,19 @@
 %s: option requires an argument -- %c\n"),
                                    argv[0], c) >= 0)
                      {
+                       _IO_flockfile (stderr);
+
+                       int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                       ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
                        if (_IO_fwide (stderr, 0) > 0)
                          __fwprintf (stderr, L"%s", buf);
                        else
                          fputs (buf, stderr);
 
+                       ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                       _IO_funlockfile (stderr);
+
                        free (buf);
                      }
 #else
@@ -1110,7 +1136,7 @@
                             argv[0], c);
 #endif
                  }
-               optopt = c;
+               d->optopt = c;
                if (optstring[0] == ':')
                  c = ':';
                else
@@ -1119,8 +1145,8 @@
            else
              /* We already incremented `optind' once;
                 increment it again when taking next ARGV-elt as argument.  */
-             optarg = argv[optind++];
-           nextchar = NULL;
+             d->optarg = argv[d->optind++];
+           d->__nextchar = NULL;
          }
       }
     return c;
@@ -1128,6 +1154,25 @@
 }
 
 int
+_getopt_internal (int argc, char *const *argv, const char *optstring,
+                 const struct option *longopts, int *longind, int long_only)
+{
+  int result;
+
+  getopt_data.optind = optind;
+  getopt_data.opterr = opterr;
+
+  result = _getopt_internal_r (argc, argv, optstring, longopts,
+                              longind, long_only, &getopt_data);
+
+  optind = getopt_data.optind;
+  optarg = getopt_data.optarg;
+  optopt = getopt_data.optopt;
+
+  return result;
+}
+
+int
 getopt (int argc, char *const *argv, const char *optstring)
 {
   return _getopt_internal (argc, argv, optstring,


--- orig/gnulib/m4/getopt.h
+++ mod/gnulib/m4/getopt.h
@@ -1,8 +1,6 @@
 /* Declarations for getopt.
-
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
-   1999, 2001, 2003 Free Software Foundation, Inc.
-
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+   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
@@ -36,6 +34,17 @@
 # include <ctype.h>
 #endif
 
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+#  define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+#  define __THROW      throw ()
+# else
+#  define __THROW
+# endif
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -139,7 +148,8 @@
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
-extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+       __THROW;
 #else /* not __GNU_LIBRARY__ */
 extern int getopt ();
 #endif /* __GNU_LIBRARY__ */
@@ -147,16 +157,13 @@
 #ifndef __need_getopt
 extern int getopt_long (int ___argc, char *const *___argv,
                        const char *__shortopts,
-                       const struct option *__longopts, int *__longind);
+                       const struct option *__longopts, int *__longind)
+       __THROW;
 extern int getopt_long_only (int ___argc, char *const *___argv,
                             const char *__shortopts,
-                            const struct option *__longopts, int *__longind);
+                            const struct option *__longopts, int *__longind)
+       __THROW;
 
-/* Internal only.  Users should not call this directly.  */
-extern int _getopt_internal (int ___argc, char *const *___argv,
-                            const char *__shortopts,
-                            const struct option *__longopts, int *__longind,
-                            int __long_only);
 #endif
 
 #ifdef __cplusplus


--- orig/gnulib/m4/getopt1.c
+++ mod/gnulib/m4/getopt1.c
@@ -1,8 +1,6 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-
-   Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996,
-   1997, 1998, 2003 Free Software Foundation, Inc.
-
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
+     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
@@ -28,6 +26,7 @@
 #else
 # include "getopt.h"
 #endif
+#include "getopt_int.h"
 
 #include <stdio.h>
 
@@ -61,34 +60,41 @@
 #endif
 
 int
-getopt_long (int argc,
-            char *const *argv,
-            const char *options,
-            const struct option *long_options,
-            int *opt_index)
+getopt_long (int argc, char *const *argv, const char *options,
+            const struct option *long_options, int *opt_index)
 {
   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
 }
 
+int
+_getopt_long_r (int argc, char *const *argv, const char *options,
+               const struct option *long_options, int *opt_index,
+               struct _getopt_data *d)
+{
+  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+                            0, d);
+}
+
 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
    If an option that starts with '-' (not '--') doesn't match a long option,
    but does match a short option, it is parsed as a short option
    instead.  */
 
 int
-getopt_long_only (int argc,
-                 char *const *argv,
-                 const char *options,
-                 const struct option *long_options,
-                 int *opt_index)
+getopt_long_only (int argc, char *const *argv, const char *options,
+                 const struct option *long_options, int *opt_index)
 {
   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
 }
 
-# ifdef _LIBC
-libc_hidden_def (getopt_long)
-libc_hidden_def (getopt_long_only)
-# endif
+int
+_getopt_long_only_r (int argc, char *const *argv, const char *options,
+                    const struct option *long_options, int *opt_index,
+                    struct _getopt_data *d)
+{
+  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+                            1, d);
+}
 
 #endif /* Not ELIDE_CODE.  */
 


--- orig/gnulib/m4/obstack.c
+++ mod/gnulib/m4/obstack.c
@@ -1,7 +1,8 @@
 /* obstack.c - subroutines used implicitly by object stack macros
 
    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2001, 2002, 2003, 2004 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
@@ -22,9 +23,9 @@
 #endif
 
 #ifdef _LIBC
-#include <obstack.h>
+# include <obstack.h>
 #else
-#include "obstack.h"
+# include "obstack.h"
 #endif
 
 /* NOTE BEFORE MODIFYING THIS FILE: This version number must be
@@ -53,18 +54,26 @@
 # include <wchar.h>
 #endif
 
+#include <stddef.h>
+
 #ifndef ELIDE_CODE
 
 
 /* Determine default alignment.  */
-struct fooalign {char x; double d;};
-# define DEFAULT_ALIGNMENT  \
-  ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
+union fooround
+{
+  long int i;
+  long double d;
+  void *p;
+};
 /* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
    But in fact it might be less smart and round addresses to as much as
    DEFAULT_ROUNDING.  So we prepare for it to do that.  */
-union fooround {long x; double d;};
-# define DEFAULT_ROUNDING (sizeof (union fooround))
+enum
+  {
+    DEFAULT_ALIGNMENT = offsetof (struct { char c; union fooround u; }, u),
+    DEFAULT_ROUNDING = sizeof (union fooround)
+  };
 
 /* When we copy a long block of data, this is the unit to do it with.
    On some machines, copying successive ints does not work;
@@ -86,15 +95,19 @@
 
 /* Exit value used when `print_and_abort' is used.  */
 # include <stdlib.h>
-# ifndef _LIBC
-#  include "exit.h"
-# endif
+# ifdef _LIBC
 int obstack_exit_failure = EXIT_FAILURE;
+# else
+#  include "exitfail.h"
+#  define obstack_exit_failure exit_failure
+# endif
 
-/* The non-GNU-C macros copy the obstack into this global variable
-   to avoid multiple evaluation.  */
-
+# ifdef _LIBC
+/* A looong time ago (before 1994, anyway; we're not sure) this global variable
+   was used by non-GNU-C macros to avoid multiple evaluation.  The GNU C
+   library still exports it because somebody might use it.  */
 struct obstack *_obstack;
+# endif
 
 /* Define a macro that either calls functions with the traditional malloc/free
    calling interface, or calls functions with the mmalloc/mfree interface
@@ -133,7 +146,7 @@
   register struct _obstack_chunk *chunk; /* points to new chunk */
 
   if (alignment == 0)
-    alignment = (int) DEFAULT_ALIGNMENT;
+    alignment = DEFAULT_ALIGNMENT;
   if (size == 0)
     /* Default size is what GNU malloc can fit in a 4096-byte block.  */
     {
@@ -179,7 +192,7 @@
   register struct _obstack_chunk *chunk; /* points to new chunk */
 
   if (alignment == 0)
-    alignment = (int) DEFAULT_ALIGNMENT;
+    alignment = DEFAULT_ALIGNMENT;
   if (size == 0)
     /* Default size is what GNU malloc can fit in a 4096-byte block.  */
     {
@@ -249,8 +262,7 @@
 
   /* Compute an aligned object_base in the new chunk */
   object_base =
-    __INT_TO_PTR ((__PTR_TO_INT (new_chunk->contents) + h->alignment_mask)
-                 & ~ (h->alignment_mask));
+    __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
 
   /* Move the existing object to the new chunk.
      Word at a time is fast and is safe if the object
@@ -286,9 +298,9 @@
   /* The new chunk certainly contains no empty object yet.  */
   h->maybe_empty_object = 0;
 }
-#ifdef _LIBC
+# ifdef _LIBC
 libc_hidden_def (_obstack_newchunk)
-#endif
+# endif
 
 /* Return nonzero if object OBJ has been allocated from obstack H.
    This is here for debugging.
@@ -351,11 +363,11 @@
     abort ();
 }
 
-#ifdef _LIBC
+# ifdef _LIBC
 /* Older versions of libc used a function _obstack_free intended to be
    called by non-GCC compilers.  */
 strong_alias (obstack_free, _obstack_free)
-#endif
+# endif
 
 int
 _obstack_memory_used (struct obstack *h)
@@ -376,7 +388,9 @@
 # else
 #  include "gettext.h"
 # endif
-# define _(msgid) gettext (msgid)
+# ifndef _
+#  define _(msgid) gettext (msgid)
+# endif
 
 # ifdef _LIBC
 #  include <libio/iolibio.h>


--- orig/gnulib/m4/obstack.h
+++ mod/gnulib/m4/obstack.h
@@ -1,5 +1,5 @@
 /* obstack.h - object stack macros
-   Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99,2003 Free Software 
Foundation, Inc.
+   Copyright (C) 1988-1994,1996-1999,2003,2004 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.  Its master source is NOT part of
    the C library, however.  The master source lives in /gd/gnu/lib.
@@ -113,19 +113,7 @@
 extern "C" {
 #endif
 
-/* We use subtraction of (char *) 0 instead of casting to int
-   because on word-addressable machines a simple cast to int
-   may ignore the byte-within-word field of the pointer.  */
-
-#ifndef __PTR_TO_INT
-# define __PTR_TO_INT(P) ((P) - (char *) 0)
-#endif
-
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((P) + (char *) 0)
-#endif
-
-/* We need the type of the resulting object.  If __PTRDIFF_TYPE__ is
+/* We need the type of a pointer subtraction.  If __PTRDIFF_TYPE__ is
    defined, as with GNU C, use that; that way we don't pollute the
    namespace with <stddef.h>'s symbols.  Otherwise, include <stddef.h>
    and use ptrdiff_t.  */
@@ -137,6 +125,23 @@
 # define PTR_INT_TYPE ptrdiff_t
 #endif
 
+/* If B is the base of an object addressed by P, return the result of
+   aligning P to the next multiple of A + 1.  B and P must be of type
+   char *.  A + 1 must be a power of 2.  */
+
+#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
+
+/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+   where pointers can be converted to integers, aligned as integers,
+   and converted back again.  If PTR_INT_TYPE is narrower than a
+   pointer (e.g., the AS/400), play it safe and compute the alignment
+   relative to B.  Otherwise, use the faster strategy of computing the
+   alignment relative to 0.  */
+
+#define __PTR_ALIGN(B, P, A)                                               \
+  __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
+               P, A)
+
 #include <string.h>
 
 struct _obstack_chunk          /* Lives at front of each chunk. */
@@ -153,7 +158,11 @@
   char *object_base;           /* address of object we are building */
   char *next_free;             /* where to add next char to current object */
   char *chunk_limit;           /* address of char after current chunk */
-  PTR_INT_TYPE temp;           /* Temporary for some macros.  */
+  union
+  {
+    PTR_INT_TYPE tempint;
+    void *tempptr;
+  } temp;                      /* Temporary for some macros.  */
   int   alignment_mask;                /* Mask of alignment for each object. */
   /* These prototypes vary based on `use_extra_arg', and we use
      casts to the prototypeless function type in all assignments,
@@ -174,52 +183,16 @@
 /* Declare the external functions we use; they are in obstack.c.  */
 
 extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
 extern int _obstack_begin (struct obstack *, int, int,
                            void *(*) (long), void (*) (void *));
 extern int _obstack_begin_1 (struct obstack *, int, int,
                             void *(*) (void *, long),
                             void (*) (void *, void *), void *);
 extern int _obstack_memory_used (struct obstack *);
-
-/* Do the function-declarations after the structs
-   but before defining the macros.  */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, const void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, const void *address, int size);
 
 void obstack_free (struct obstack *obstack, void *block);
 
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, const void *data, int size);
-void obstack_grow0 (struct obstack *obstack, const void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, const void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, const void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-
+
 /* Error handler called when `obstack_chunk_alloc' failed to allocate
    more memory.  This can be set to a user defined function which
    should either abort gracefully or use longjump - but shouldn't
@@ -409,18 +382,17 @@
 # define obstack_finish(OBSTACK)                                       \
 __extension__                                                          \
 ({ struct obstack *__o1 = (OBSTACK);                                   \
-   void *value;                                                                
\
-   value = (void *) __o1->object_base;                                 \
-   if (__o1->next_free == value)                                       \
+   void *__value = (void *) __o1->object_base;                         \
+   if (__o1->next_free == __value)                                     \
      __o1->maybe_empty_object = 1;                                     \
    __o1->next_free                                                     \
-     = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
-                    & ~ (__o1->alignment_mask));                       \
+     = __PTR_ALIGN (__o1->object_base, __o1->next_free,                        
\
+                   __o1->alignment_mask);                              \
    if (__o1->next_free - (char *)__o1->chunk                           \
        > __o1->chunk_limit - (char *)__o1->chunk)                      \
      __o1->next_free = __o1->chunk_limit;                              \
    __o1->object_base = __o1->next_free;                                        
\
-   value; })
+   __value; })
 
 # define obstack_free(OBSTACK, OBJ)                                    \
 __extension__                                                          \
@@ -448,23 +420,23 @@
    but some compilers won't accept it.  */
 
 # define obstack_make_room(h,length)                                   \
-( (h)->temp = (length),                                                        
\
-  (((h)->next_free + (h)->temp > (h)->chunk_limit)                     \
-   ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
+( (h)->temp.tempint = (length),                                                
\
+  (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit)             \
+   ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
 
 # define obstack_grow(h,where,length)                                  \
-( (h)->temp = (length),                                                        
\
-  (((h)->next_free + (h)->temp > (h)->chunk_limit)                     \
-   ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),                     \
-  memcpy ((h)->next_free, where, (h)->temp),                           \
-  (h)->next_free += (h)->temp)
+( (h)->temp.tempint = (length),                                                
\
+  (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit)             \
+   ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0),             \
+  memcpy ((h)->next_free, where, (h)->temp.tempint),                   \
+  (h)->next_free += (h)->temp.tempint)
 
 # define obstack_grow0(h,where,length)                                 \
-( (h)->temp = (length),                                                        
\
-  (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit)                 \
-   ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0),                 \
-  memcpy ((h)->next_free, where, (h)->temp),                           \
-  (h)->next_free += (h)->temp,                                         \
+( (h)->temp.tempint = (length),                                                
\
+  (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit)         \
+   ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0),         \
+  memcpy ((h)->next_free, where, (h)->temp.tempint),                   \
+  (h)->next_free += (h)->temp.tempint,                                 \
   *((h)->next_free)++ = 0)
 
 # define obstack_1grow(h,datum)                                                
\
@@ -489,10 +461,10 @@
   (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
 
 # define obstack_blank(h,length)                                       \
-( (h)->temp = (length),                                                        
\
-  (((h)->chunk_limit - (h)->next_free < (h)->temp)                     \
-   ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),                     \
-  obstack_blank_fast (h, (h)->temp))
+( (h)->temp.tempint = (length),                                                
\
+  (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint)             \
+   ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0),             \
+  obstack_blank_fast (h, (h)->temp.tempint))
 
 # define obstack_alloc(h,length)                                       \
  (obstack_blank ((h), (length)), obstack_finish ((h)))
@@ -507,22 +479,23 @@
 ( ((h)->next_free == (h)->object_base                                  \
    ? (((h)->maybe_empty_object = 1), 0)                                        
\
    : 0),                                                               \
-  (h)->temp = __PTR_TO_INT ((h)->object_base),                         \
+  (h)->temp.tempptr = (h)->object_base,                                        
\
   (h)->next_free                                                       \
-    = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask)        
\
-                   & ~ ((h)->alignment_mask)),                         \
+    = __PTR_ALIGN ((h)->object_base, (h)->next_free,                   \
+                  (h)->alignment_mask),                                \
   (((h)->next_free - (char *) (h)->chunk                               \
     > (h)->chunk_limit - (char *) (h)->chunk)                          \
    ? ((h)->next_free = (h)->chunk_limit) : 0),                         \
   (h)->object_base = (h)->next_free,                                   \
-  (void *) __INT_TO_PTR ((h)->temp))
+  (h)->temp.tempptr)
 
 # define obstack_free(h,obj)                                           \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk,                    \
-  (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
+( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk,            \
+  ((((h)->temp.tempint > 0                                             \
+    && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk))    \
    ? (int) ((h)->next_free = (h)->object_base                          \
-           = (h)->temp + (char *) (h)->chunk)                          \
-   : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
+           = (h)->temp.tempint + (char *) (h)->chunk)                  \
+   : (((obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
 
 #endif /* not __GNUC__ or not __STDC__ */
 


--- orig/gnulib/m4/regex.c
+++ mod/gnulib/m4/regex.c
@@ -4,7 +4,7 @@
    internationalization features.)
 
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003 Free Software Foundation, Inc.
+   2002, 2003, 2004 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
@@ -275,13 +275,7 @@
 #  ifndef alloca
 
 /* Make alloca work the best possible way.  */
-#   ifdef __GNUC__
-#    define alloca __builtin_alloca
-#   else /* not __GNUC__ */
-#    if HAVE_ALLOCA_H
-#     include <alloca.h>
-#    endif /* HAVE_ALLOCA_H */
-#   endif /* not __GNUC__ */
+#   include <alloca.h>
 
 #  endif /* not alloca */
 


--- orig/gnulib/m4/unlocked-io.h
+++ mod/gnulib/m4/unlocked-io.h
@@ -1,6 +1,6 @@
 /* Prefer faster, non-thread-safe stdio functions if available.
 
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 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


--- orig/gnulib/m4/version-etc.c
+++ mod/gnulib/m4/version-etc.c
@@ -1,5 +1,5 @@
 /* Utility to help print --version output in a consistent format.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999-2004 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
@@ -36,7 +36,7 @@
 
 const char* version_etc_copyright =
   /* Do *not* mark this string for translation.  */
-  "Copyright (C) 2003 Free Software Foundation, Inc.";
+  "Copyright (C) 2004 Free Software Foundation, Inc.";
 
 
 /* Like version_etc, below, but with the NULL-terminated author list


--- orig/gnulib/m4/xmalloc.c
+++ mod/gnulib/m4/xmalloc.c
@@ -1,7 +1,7 @@
 /* xmalloc.c -- malloc with out of memory checking
 
    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2003,
-   1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2002, 2003, 2004 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
@@ -37,14 +37,6 @@
 # define SIZE_MAX ((size_t) -1)
 #endif
 
-#ifndef HAVE_MALLOC
-"you must run the autoconf test for a GNU libc compatible malloc"
-#endif
-
-#ifndef HAVE_REALLOC
-"you must run the autoconf test for a GNU libc compatible realloc"
-#endif
-
 /* If non NULL, call this function when memory is exhausted. */
 void (*xalloc_fail_func) (void) = 0;
 
@@ -71,7 +63,7 @@
 xnmalloc_inline (size_t n, size_t s)
 {
   void *p;
-  if (xalloc_oversized (n, s) || ! (p = malloc (n * s)))
+  if (xalloc_oversized (n, s) || (! (p = malloc (n * s)) && n != 0))
     xalloc_die ();
   return p;
 }
@@ -96,7 +88,7 @@
 static inline void *
 xnrealloc_inline (void *p, size_t n, size_t s)
 {
-  if (xalloc_oversized (n, s) || ! (p = realloc (p, n * s)))
+  if (xalloc_oversized (n, s) || (! (p = realloc (p, n * s)) && n != 0))
     xalloc_die ();
   return p;
 }
@@ -136,8 +128,8 @@
    Here is an example of use:
 
      int *p = NULL;
-     size used = 0;
-     size allocated = 0;
+     size_t used = 0;
+     size_t allocated = 0;
 
      void
      append_int (int value)
@@ -155,9 +147,9 @@
    example:
 
      int *p = NULL;
-     size used = 0;
-     size allocated = 0;
-     size allocated1 = 1000;
+     size_t used = 0;
+     size_t allocated = 0;
+     size_t allocated1 = 1000;
 
      void
      append_int (int value)
@@ -239,7 +231,7 @@
   void *p;
   /* Test for overflow, since some calloc implementations don't have
      proper overflow checks.  */
-  if (xalloc_oversized (n, s) || ! (p = calloc (n, s)))
+  if (xalloc_oversized (n, s) || (! (p = calloc (n, s)) && n != 0))
     xalloc_die ();
   return p;
 }



* added files

--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/intmax.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9234.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/longdouble.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9235.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/longlong.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9236.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/printf-posix.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9237.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/signed.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9238.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/size_max.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9239.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/wchar_t.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9240.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/wint_t.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9241.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/.arch-ids/xsize.m4.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9242.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/intmax.m4
@@ -0,0 +1,32 @@
+# intmax.m4 serial 2
+dnl Copyright (C) 2002-2004 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+    [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE(HAVE_INTMAX_T, 1,
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/longdouble.m4
@@ -0,0 +1,30 @@
+# longdouble.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+    [if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       AC_TRY_COMPILE([
+         /* The Stardent Vistra knows sizeof(long double), but does not 
support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+         ], ,
+         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+     fi])
+  if test $gt_cv_c_long_double = yes; then
+    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' 
type.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/longlong.m4
@@ -0,0 +1,25 @@
+# longlong.m4 serial 5
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG if 'long long' works.
+
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
+  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
+    [long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;],
+    ac_cv_type_long_long=yes,
+    ac_cv_type_long_long=no)])
+  if test $ac_cv_type_long_long = yes; then
+    AC_DEFINE(HAVE_LONG_LONG, 1,
+      [Define if you have the 'long long' type.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/printf-posix.m4
@@ -0,0 +1,46 @@
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+      [
+        AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined 
__CYGWIN__
+  notposix
+#endif
+        ], gt_cv_func_printf_posix="guessing no",
+           gt_cv_func_printf_posix="guessing yes")
+      ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+        [Define if your printf() function supports format strings with 
positions.])
+      ;;
+  esac
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/signed.m4
@@ -0,0 +1,19 @@
+# signed.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([bh_C_SIGNED],
+[
+  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
+   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+  if test $bh_cv_c_signed = no; then
+    AC_DEFINE(signed, ,
+              [Define to empty if the C compiler doesn't support this 
keyword.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/size_max.m4
@@ -0,0 +1,61 @@
+# size_max.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS(stdint.h)
+  dnl First test whether the system already has SIZE_MAX.
+  AC_MSG_CHECKING([for SIZE_MAX])
+  result=
+  AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], result=yes)
+  if test -z "$result"; then
+    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+    dnl than the type 'unsigned long'.
+    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
+    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
+    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+      [#include <stddef.h>], result=?)
+    if test "$fits_in_uint" = 1; then
+      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+      AC_TRY_COMPILE([#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+        ], [], fits_in_uint=0)
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+      dnl Shouldn't happen, but who knows...
+      result='~(size_t)0'
+    fi
+  fi
+  AC_MSG_RESULT([$result])
+  if test "$result" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
+      [Define as the maximum value of type 'size_t', if the system doesn't 
define it.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/wchar_t.m4
@@ -0,0 +1,22 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+    [AC_TRY_COMPILE([#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/wint_t.m4
@@ -0,0 +1,22 @@
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+    [AC_TRY_COMPILE([#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+  fi
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/acm4/xsize.m4
@@ -0,0 +1,15 @@
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_HEADERS(stdint.h)
+])
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/m4/.arch-ids/getopt_int.h.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:17:03 2004 9243.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/m4/.arch-ids/gnulib.am.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Mon Jun 14 12:11:57 2004 9185.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/m4/getopt_int.h
@@ -0,0 +1,129 @@
+/* Internal declarations for getopt.
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+   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
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   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,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+#ifndef _GETOPT_INT_H
+#define _GETOPT_INT_H  1
+
+extern int _getopt_internal (int ___argc, char *const *___argv,
+                            const char *__shortopts,
+                            const struct option *__longopts, int *__longind,
+                            int __long_only);
+
+
+/* Reentrant versions which can handle parsing multiple argument
+   vectors at the same time.  */
+
+/* Data type for reentrant functions.  */
+struct _getopt_data
+{
+  /* These have exactly the same meaning as the corresponding global
+     variables, except that they are used for the reentrant
+     versions of getopt.  */
+  int optind;
+  int opterr;
+  int optopt;
+  char *optarg;
+
+  /* Internal members.  */
+
+  /* True if the internal members have been initialized.  */
+  int __initialized;
+
+  /* The next char to be scanned in the option-element
+     in which the last option character we returned was found.
+     This allows us to pick up the scan where we left off.
+
+     If this is zero, or a null string, it means resume the scan
+     by advancing to the next ARGV-element.  */
+  char *__nextchar;
+
+  /* Describe how to deal with options that follow non-option ARGV-elements.
+
+     If the caller did not specify anything,
+     the default is REQUIRE_ORDER if the environment variable
+     POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+     REQUIRE_ORDER means don't recognize them as options;
+     stop option processing when the first non-option is seen.
+     This is what Unix does.
+     This mode of operation is selected by either setting the environment
+     variable POSIXLY_CORRECT, or using `+' as the first character
+     of the list of option characters.
+
+     PERMUTE is the default.  We permute the contents of ARGV as we
+     scan, so that eventually all the non-options are at the end.
+     This allows options to be given in any order, even with programs
+     that were not written to expect this.
+
+     RETURN_IN_ORDER is an option available to programs that were
+     written to expect options and other ARGV-elements in any order
+     and that care about the ordering of the two.  We describe each
+     non-option ARGV-element as if it were the argument of an option
+     with character code 1.  Using `-' as the first character of the
+     list of option characters selects this mode of operation.
+
+     The special argument `--' forces an end of option-scanning regardless
+     of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+     `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+
+  enum
+    {
+      REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+    } __ordering;
+
+  /* If the POSIXLY_CORRECT environment variable is set.  */
+  int __posixly_correct;
+
+
+  /* Handle permutation of arguments.  */
+
+  /* Describe the part of ARGV that contains non-options that have
+     been skipped.  `first_nonopt' is the index in ARGV of the first
+     of them; `last_nonopt' is the index after the last of them.  */
+
+  int __first_nonopt;
+  int __last_nonopt;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+  int __nonoption_flags_max_len;
+  int __nonoption_flags_len;
+# endif
+};
+
+/* The initializer is necessary to set OPTIND and OPTERR to their
+   default values and to clear the initialization flag.  */
+#define _GETOPT_DATA_INITIALIZER       { 1, 1 }
+
+extern int _getopt_internal_r (int ___argc, char *const *___argv,
+                              const char *__shortopts,
+                              const struct option *__longopts, int *__longind,
+                              int __long_only, struct _getopt_data *__data);
+
+extern int _getopt_long_r (int ___argc, char *const *___argv,
+                          const char *__shortopts,
+                          const struct option *__longopts, int *__longind,
+                          struct _getopt_data *__data);
+
+extern int _getopt_long_only_r (int ___argc, char *const *___argv,
+                               const char *__shortopts,
+                               const struct option *__longopts,
+                               int *__longind,
+                               struct _getopt_data *__data);
+
+#endif /* getopt_int.h */
--- /dev/null
+++ 
/Users/gary/devel/savannah/m4--devo--1.0/,,address@hidden/new-files-archive/./gnulib/m4/gnulib.am
@@ -0,0 +1,91 @@
+## ((( gnulib module alloca
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create an <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): $(ALLOCA_H)
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+## ))) gnulib module alloca
+## ((( gnulib module error
+
+## ))) gnulib module error
+## ((( gnulib module exit
+libgnu_la_SOURCES += exit.h
+
+## ))) gnulib module exit
+## ((( gnulib module exitfail
+libgnu_la_SOURCES += exitfail.h exitfail.c
+
+## ))) gnulib module exitfail
+## ((( gnulib module extensions
+
+## ))) gnulib module extensions
+## ((( gnulib module free
+
+## ))) gnulib module free
+## ((( gnulib module getopt
+libgnu_la_SOURCES += getopt.h getopt.c getopt1.c getopt_int.h
+
+## ))) gnulib module getopt
+## ((( gnulib module gettext
+libgnu_la_SOURCES += gettext.h
+
+## ))) gnulib module gettext
+## ((( gnulib module obstack
+
+## ))) gnulib module obstack
+## ((( gnulib module progname
+libgnu_la_SOURCES += progname.h progname.c
+
+## ))) gnulib module progname
+## ((( gnulib module regex
+libgnu_la_SOURCES += regex.h
+
+## ))) gnulib module regex
+## ((( gnulib module restrict
+
+## ))) gnulib module restrict
+## ((( gnulib module stdbool
+BUILT_SOURCES += $(STDBOOL_H)
+EXTRA_DIST += stdbool_.h
+
+# We need the following in order to create an <stdbool.h> when the system
+# doesn't have one that works.
+all-local $(lib_OBJECTS): $(STDBOOL_H)
+stdbool.h: stdbool_.h
+       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > 
address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+## ))) gnulib module stdbool
+## ((( gnulib module strndup
+libgnu_la_SOURCES += strndup.h
+
+## ))) gnulib module strndup
+## ((( gnulib module strnlen
+
+## ))) gnulib module strnlen
+## ((( gnulib module strtol
+
+## ))) gnulib module strtol
+## ((( gnulib module unlocked-io
+libgnu_la_SOURCES += unlocked-io.h
+
+## ))) gnulib module unlocked-io
+## ((( gnulib module version-etc
+libgnu_la_SOURCES += version-etc.h version-etc.c
+
+## ))) gnulib module version-etc
+## ((( gnulib module xalloc
+libgnu_la_SOURCES += xalloc.h xmalloc.c xstrdup.c
+
+## ))) gnulib module xalloc
+## ((( gnulib module xstrndup
+libgnu_la_SOURCES += xstrndup.h xstrndup.c
+
+## ))) gnulib module xstrndup


reply via email to

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