[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2194] nagiosplug/trunk/gl

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Wed May 20 00:43:04 CEST 2009


Revision: 2194
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2194&view=rev
Author:   dermoth
Date:     2009-05-19 22:43:01 +0000 (Tue, 19 May 2009)

Log Message:
-----------
Sync with the latest Gnulib code (cb75dc5)

Signed-off-by: Holger Weiss <holger at zedat.fu-berlin.de>

Modified Paths:
--------------
    nagiosplug/trunk/gl/Makefile.am
    nagiosplug/trunk/gl/arpa_inet.in.h
    nagiosplug/trunk/gl/c-strtod.c
    nagiosplug/trunk/gl/c-strtod.h
    nagiosplug/trunk/gl/config.charset
    nagiosplug/trunk/gl/dup-safer.c
    nagiosplug/trunk/gl/fd-safer.c
    nagiosplug/trunk/gl/fsusage.c
    nagiosplug/trunk/gl/gai_strerror.c
    nagiosplug/trunk/gl/getloadavg.c
    nagiosplug/trunk/gl/getopt1.c
    nagiosplug/trunk/gl/gettext.h
    nagiosplug/trunk/gl/localcharset.c
    nagiosplug/trunk/gl/m4/btowc.m4
    nagiosplug/trunk/gl/m4/c-strtod.m4
    nagiosplug/trunk/gl/m4/errno_h.m4
    nagiosplug/trunk/gl/m4/extensions.m4
    nagiosplug/trunk/gl/m4/fcntl_h.m4
    nagiosplug/trunk/gl/m4/floorf.m4
    nagiosplug/trunk/gl/m4/gnulib-common.m4
    nagiosplug/trunk/gl/m4/gnulib-comp.m4
    nagiosplug/trunk/gl/m4/include_next.m4
    nagiosplug/trunk/gl/m4/inet_ntop.m4
    nagiosplug/trunk/gl/m4/lib-link.m4
    nagiosplug/trunk/gl/m4/lib-prefix.m4
    nagiosplug/trunk/gl/m4/locale-fr.m4
    nagiosplug/trunk/gl/m4/locale-ja.m4
    nagiosplug/trunk/gl/m4/locale-zh.m4
    nagiosplug/trunk/gl/m4/mbrtowc.m4
    nagiosplug/trunk/gl/m4/mktime.m4
    nagiosplug/trunk/gl/m4/multiarch.m4
    nagiosplug/trunk/gl/m4/printf.m4
    nagiosplug/trunk/gl/m4/regex.m4
    nagiosplug/trunk/gl/m4/stdint.m4
    nagiosplug/trunk/gl/m4/stdio_h.m4
    nagiosplug/trunk/gl/m4/stdlib_h.m4
    nagiosplug/trunk/gl/m4/sys_socket_h.m4
    nagiosplug/trunk/gl/m4/unistd_h.m4
    nagiosplug/trunk/gl/m4/vasnprintf.m4
    nagiosplug/trunk/gl/m4/wchar.m4
    nagiosplug/trunk/gl/m4/wcrtomb.m4
    nagiosplug/trunk/gl/math.in.h
    nagiosplug/trunk/gl/mbrtowc.c
    nagiosplug/trunk/gl/mountlist.c
    nagiosplug/trunk/gl/regex_internal.h
    nagiosplug/trunk/gl/stdint.in.h
    nagiosplug/trunk/gl/stdio.in.h
    nagiosplug/trunk/gl/stdlib.in.h
    nagiosplug/trunk/gl/strerror.c
    nagiosplug/trunk/gl/sys_socket.in.h
    nagiosplug/trunk/gl/unistd.in.h
    nagiosplug/trunk/gl/vasnprintf.c
    nagiosplug/trunk/gl/wchar.in.h
    nagiosplug/trunk/gl/xmalloc.c

Added Paths:
-----------
    nagiosplug/trunk/gl/alignof.h
    nagiosplug/trunk/gl/m4/00gnulib.m4
    nagiosplug/trunk/gl/m4/strdup.m4
    nagiosplug/trunk/gl/strdup.c

Modified: nagiosplug/trunk/gl/Makefile.am
===================================================================
--- nagiosplug/trunk/gl/Makefile.am	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/Makefile.am	2009-05-19 22:43:01 UTC (rev 2194)
@@ -28,6 +28,7 @@
 EXTRA_DIST += m4/gnulib-cache.m4
 
 AM_CPPFLAGS =
+AM_CFLAGS =
 
 noinst_LIBRARIES += libgnu.a
 
@@ -36,6 +37,13 @@
 libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
 EXTRA_libgnu_a_SOURCES =
 
+## begin gnulib module alignof
+
+
+EXTRA_DIST += alignof.h
+
+## end   gnulib module alignof
+
 ## begin gnulib module alloca
 
 
@@ -70,7 +78,7 @@
 
 # We need the following in order to create <arpa/inet.h> when the system
 # doesn't have one.
-arpa/inet.h:
+arpa/inet.h: arpa_inet.in.h
 	@MKDIR_P@ arpa
 	rm -f $@-t $@
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@@ -146,7 +154,7 @@
 # The Automake-defined pkg* macros are appended, in the order
 # listed in the Automake 1.10a+ documentation.
 configmake.h: Makefile
-	rm -f $@-t $@
+	rm -f $@-t
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
 	  echo '#define PREFIX "$(prefix)"'; \
 	  echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
@@ -176,7 +184,12 @@
 	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
 	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
 	} | sed '/""/d' > $@-t
-	mv $@-t $@
+	if test -f $@ && cmp $@-t $@ > /dev/null; then \
+	  rm -f $@-t; \
+	else \
+	  rm -f $@; mv $@-t $@; \
+	fi
+
 BUILT_SOURCES += configmake.h
 CLEANFILES += configmake.h configmake.h-t
 
@@ -433,21 +446,37 @@
 
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
-install-exec-local: all-local
-	test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+	if test $(GLIBC21) = no; then \
+	  case '$(host_os)' in \
+	    darwin[56]*) \
+	      need_charset_alias=true ;; \
+	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+	      need_charset_alias=false ;; \
+	    *) \
+	      need_charset_alias=true ;; \
+	  esac ; \
+	else \
+	  need_charset_alias=false ; \
+	fi ; \
+	if $$need_charset_alias; then \
+	  $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+	fi ; \
 	if test -f $(charset_alias); then \
 	  sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
 	  $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
 	  rm -f $(charset_tmp) ; \
 	else \
-	  if test $(GLIBC21) = no; then \
+	  if $$need_charset_alias; then \
 	    sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
 	    $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
 	    rm -f $(charset_tmp) ; \
 	  fi ; \
 	fi
 
-uninstall-local: all-local
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
 	if test -f $(charset_alias); then \
 	  sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
 	  if grep '^# Packages using this file: $$' $(charset_tmp) \
@@ -794,6 +823,8 @@
 	      -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
 	      -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
 	      -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+	      -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+	      -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
 	      -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
 	      -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
 	      -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
@@ -826,6 +857,10 @@
 	      -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
 	      -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
 	      -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+	      -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+	      -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+	      -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+	      -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
 	      -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
 	      -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
 	      -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
@@ -866,6 +901,7 @@
 	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
 	      -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
 	      -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
@@ -912,6 +948,15 @@
 
 ## end   gnulib module stdlib
 
+## begin gnulib module strdup-posix
+
+
+EXTRA_DIST += strdup.c
+
+EXTRA_libgnu_a_SOURCES += strdup.c
+
+## end   gnulib module strdup-posix
+
 ## begin gnulib module streq
 
 
@@ -1054,6 +1099,7 @@
 	      -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \
 	      -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
 	      -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+	      -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
 	      -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
 	      < $(srcdir)/sys_socket.in.h; \
 	} > $@-t
@@ -1139,6 +1185,7 @@
 	      -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
 	      -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
 	      -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+	      -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
 	      -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
 	      -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
 	      -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
@@ -1153,6 +1200,7 @@
 	      -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
 	      -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
 	      -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+	      -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
 	      -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
 	      -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
 	      -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
@@ -1266,6 +1314,7 @@
 	      -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
 	      -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
 	      -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+	      -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
 	      -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
 	      -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
 	    < $(srcdir)/wchar.in.h; \

Added: nagiosplug/trunk/gl/alignof.h
===================================================================
--- nagiosplug/trunk/gl/alignof.h	                        (rev 0)
+++ nagiosplug/trunk/gl/alignof.h	2009-05-19 22:43:01 UTC (rev 2194)
@@ -0,0 +1,33 @@
+/* Determine alignment of types.
+   Copyright (C) 2003-2004, 2006, 2009 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
+   the Free Software Foundation; either version 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _ALIGNOF_H
+#define _ALIGNOF_H
+
+#include <stddef.h>
+
+/* Determine the alignment of a type at compile time.  */
+#if defined __GNUC__
+# define alignof __alignof__
+#elif defined __cplusplus
+  template <class type> struct alignof_helper { char __slot1; type __slot2; };
+# define alignof(type) offsetof (alignof_helper<type>, __slot2)
+#else
+# define alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+#endif
+
+#endif /* _ALIGNOF_H */

Modified: nagiosplug/trunk/gl/arpa_inet.in.h
===================================================================
--- nagiosplug/trunk/gl/arpa_inet.in.h	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/arpa_inet.in.h	2009-05-19 22:43:01 UTC (rev 2194)
@@ -38,6 +38,10 @@
 
 /* The definition of GL_LINK_WARNING is copied here.  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if @GNULIB_INET_NTOP@
 # if !@HAVE_DECL_INET_NTOP@
 /* Converts an internet address from internal format to a printable,
@@ -78,5 +82,9 @@
    inet_pton (af, src, dst))
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _GL_ARPA_INET_H */
 #endif /* _GL_ARPA_INET_H */

Modified: nagiosplug/trunk/gl/c-strtod.c
===================================================================
--- nagiosplug/trunk/gl/c-strtod.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/c-strtod.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,6 @@
 /* Convert string to double, using the C locale.
 
-   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,11 +21,11 @@
 
 #include "c-strtod.h"
 
+#include <errno.h>
 #include <locale.h>
 #include <stdlib.h>
+#include <string.h>
 
-#include "xalloc.h"
-
 #if LONG
 # define C_STRTOD c_strtold
 # define DOUBLE long double
@@ -43,6 +43,25 @@
 # define STRTOD strtod
 #endif
 
+#ifdef LC_ALL_MASK
+
+/* Cache for the C locale object.
+   Marked volatile so that different threads see the same value
+   (avoids locking).  */
+static volatile locale_t c_locale_cache;
+
+/* Return the C locale object, or (locale_t) 0 with errno set
+   if it cannot be created.  */
+static inline locale_t
+c_locale (void)
+{
+  if (!c_locale_cache)
+    c_locale_cache = newlocale (LC_ALL_MASK, "C", (locale_t) 0);
+  return c_locale_cache;
+}
+
+#endif
+
 DOUBLE
 C_STRTOD (char const *nptr, char **endptr)
 {
@@ -50,17 +69,29 @@
 
 #ifdef LC_ALL_MASK
 
-  locale_t c_locale = newlocale (LC_ALL_MASK, "C", 0);
-  r = STRTOD_L (nptr, endptr, c_locale);
-  freelocale (c_locale);
+  locale_t locale = c_locale ();
+  if (!locale)
+    {
+      if (endptr)
+	*endptr = (char *) nptr;
+      return 0; /* errno is set here */
+    }
 
+  r = STRTOD_L (nptr, endptr, locale);
+
 #else
 
   char *saved_locale = setlocale (LC_NUMERIC, NULL);
 
   if (saved_locale)
     {
-      saved_locale = xstrdup (saved_locale);
+      saved_locale = strdup (saved_locale);
+      if (saved_locale == NULL)
+	{
+	  if (endptr)
+	    *endptr = (char *) nptr;
+	  return 0; /* errno is set here */
+	}
       setlocale (LC_NUMERIC, "C");
     }
 
@@ -68,8 +99,11 @@
 
   if (saved_locale)
     {
+      int saved_errno = errno;
+
       setlocale (LC_NUMERIC, saved_locale);
       free (saved_locale);
+      errno = saved_errno;
     }
 
 #endif

Modified: nagiosplug/trunk/gl/c-strtod.h
===================================================================
--- nagiosplug/trunk/gl/c-strtod.h	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/c-strtod.h	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,2 +1,37 @@
-double c_strtod (char const *, char **);
-long double c_strtold (char const *, char **);
+/* Convert string to double, using the C locale.
+
+   Copyright (C) 2003-2004, 2009 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
+   the Free Software Foundation; either version 3 of the License, 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, see <http://www.gnu.org/licenses/>.  */
+
+/* Parse the initial portion of the string pointed to by NPTR as a floating-
+   point number (in decimal or hexadecimal notation), like in the C locale:
+   accepting only the ASCII digits '0'..'9', and only '.' as decimal point
+   character.
+   If ENDPTR is not NULL, set *ENDPTR to point to the first byte beyond the
+   parsed number or to NPTR if the string does not start with a parseable
+   number.
+   Return value:
+   - If successful, return the value as a double or 'long double',
+     respectively, and don't modify errno.
+   - In case of overflow, return ±HUGE_VAL or ±HUGE_VALL, respectively, and
+     set errno to ERANGE.
+   - In case of underflow, return a value very near to 0 and set errno to
+     ERANGE.
+   - If the string does not start with a number at all, return 0 (and recall
+     that if ENDPTR != NULL, *ENDPTR is set to NPTR), and maybe set errno to
+     EINVAL.
+   - In case of other error, return 0 and set errno, for example to ENOMEM.  */
+extern double      c_strtod  (char const *nptr, char **endptr);
+extern long double c_strtold (char const *nptr, char **endptr);

Modified: nagiosplug/trunk/gl/config.charset
===================================================================
--- nagiosplug/trunk/gl/config.charset	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/config.charset	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004, 2006-2008 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006-2009 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
@@ -63,12 +63,13 @@
 #   CP922                       aix
 #   CP932                       aix woe32 dos
 #   CP943                       aix
-#   CP949                       osf woe32 dos
+#   CP949                       osf darwin woe32 dos
 #   CP950                       woe32 dos
 #   CP1046                      aix
 #   CP1124                      aix
 #   CP1125                      dos
 #   CP1129                      aix
+#   CP1131                      darwin
 #   CP1250                      woe32
 #   CP1251                      glibc solaris netbsd openbsd darwin woe32
 #   CP1252                      aix woe32
@@ -82,15 +83,17 @@
 #   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin
 #   EUC-TW                      glibc aix hpux irix osf solaris netbsd
 #   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin
-#   BIG5-HKSCS                  glibc solaris
-#   GBK                         glibc aix osf solaris woe32 dos
-#   GB18030                     glibc solaris netbsd
+#   BIG5-HKSCS                  glibc solaris darwin
+#   GBK                         glibc aix osf solaris darwin woe32 dos
+#   GB18030                     glibc solaris netbsd darwin
 #   SHIFT_JIS               Y   hpux osf solaris freebsd netbsd darwin
 #   JOHAB                       glibc solaris woe32
 #   TIS-620                     glibc aix hpux osf solaris
 #   VISCII                  Y   glibc
 #   TCVN5712-1                  glibc
+#   ARMSCII-8                   glibc darwin
 #   GEORGIAN-PS                 glibc
+#   PT154                       glibc
 #   HP-ROMAN8                   hpux
 #   HP-ARABIC8                  hpux
 #   HP-GREEK8                   hpux
@@ -449,7 +452,8 @@
 	echo "ko_KR.EUC EUC-KR"
 	;;
     darwin*)
-	# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
+	# Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+	# useless:
 	# - It returns the empty string when LANG is set to a locale of the
 	#   form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
 	#   LC_CTYPE file.
@@ -476,6 +480,36 @@
 	# minimize the use of decomposed Unicode. Unfortunately, through the
 	# Darwin file system, decomposed UTF-8 strings are leaked into user
 	# space nevertheless.
+	# Then there are also the locales with encodings other than US-ASCII
+	# and UTF-8. These locales can be occasionally useful to users (e.g.
+	# when grepping through ISO-8859-1 encoded text files), when all their
+	# file names are in US-ASCII.
+	echo "ISO8859-1 ISO-8859-1"
+	echo "ISO8859-2 ISO-8859-2"
+	echo "ISO8859-4 ISO-8859-4"
+	echo "ISO8859-5 ISO-8859-5"
+	echo "ISO8859-7 ISO-8859-7"
+	echo "ISO8859-9 ISO-8859-9"
+	echo "ISO8859-13 ISO-8859-13"
+	echo "ISO8859-15 ISO-8859-15"
+	echo "KOI8-R KOI8-R"
+	echo "KOI8-U KOI8-U"
+	echo "CP866 CP866"
+	echo "CP949 CP949"
+	echo "CP1131 CP1131"
+	echo "CP1251 CP1251"
+	echo "eucCN GB2312"
+	echo "GB2312 GB2312"
+	echo "eucJP EUC-JP"
+	echo "eucKR EUC-KR"
+	echo "Big5 BIG5"
+	echo "Big5HKSCS BIG5-HKSCS"
+	echo "GBK GBK"
+	echo "GB18030 GB18030"
+	echo "SJIS SHIFT_JIS"
+	echo "ARMSCII-8 ARMSCII-8"
+	echo "PT154 PT154"
+	#echo "ISCII-DEV ?"
 	echo "* UTF-8"
 	;;
     beos* | haiku*)

Modified: nagiosplug/trunk/gl/dup-safer.c
===================================================================
--- nagiosplug/trunk/gl/dup-safer.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/dup-safer.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,7 @@
 /* Invoke dup, but avoid some glitches.
 
-   Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004, 2005, 2006, 2009 Free Software
+   Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,9 +25,6 @@
 #include <fcntl.h>
 
 #include <unistd.h>
-#ifndef STDERR_FILENO
-# define STDERR_FILENO 2
-#endif
 
 /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
    STDERR_FILENO.  */

Modified: nagiosplug/trunk/gl/fd-safer.c
===================================================================
--- nagiosplug/trunk/gl/fd-safer.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/fd-safer.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,6 @@
 /* Return a safer copy of a file descriptor.
 
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,12 +24,6 @@
 #include <errno.h>
 
 #include <unistd.h>
-#ifndef STDIN_FILENO
-# define STDIN_FILENO 0
-#endif
-#ifndef STDERR_FILENO
-# define STDERR_FILENO 2
-#endif
 
 /* Return FD, unless FD would be a copy of standard input, output, or
    error; in that case, return a duplicate of FD, closing FD.  On

Modified: nagiosplug/trunk/gl/fsusage.c
===================================================================
--- nagiosplug/trunk/gl/fsusage.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/fsusage.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,6 @@
 /* fsusage.c -- return space usage of mounted file systems
 
-   Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009
    Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -232,6 +232,7 @@
 
 #endif
 
+  (void) disk;  /* avoid argument-unused warning */
   return 0;
 }
 

Modified: nagiosplug/trunk/gl/gai_strerror.c
===================================================================
--- nagiosplug/trunk/gl/gai_strerror.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/gai_strerror.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <pjb27 at cam.ac.uk>, 1997.
 
@@ -50,7 +50,7 @@
     { EAI_SOCKTYPE, N_("ai_socktype not supported") },
     { EAI_SYSTEM, N_("System error") },
     { EAI_OVERFLOW, N_("Argument buffer too small") },
-#ifdef __USE_GNU
+#ifdef EAI_INPROGRESS
     { EAI_INPROGRESS, N_("Processing request in progress") },
     { EAI_CANCELED, N_("Request canceled") },
     { EAI_NOTCANCELED, N_("Request not canceled") },

Modified: nagiosplug/trunk/gl/getloadavg.c
===================================================================
--- nagiosplug/trunk/gl/getloadavg.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/getloadavg.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,8 +1,8 @@
 /* Get the system load averages.
 
    Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
-   1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
-   Foundation, Inc.
+   1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+   Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with gnulib.
    Bugs can be reported to bug-gnulib at gnu.org.
@@ -621,8 +621,11 @@
   for (elem = 0; elem < nelem; elem++)
     {
       char *endptr;
-      double d = c_strtod (ptr, &endptr);
-      if (ptr == endptr)
+      double d;
+
+      errno = 0;
+      d = c_strtod (ptr, &endptr);
+      if (ptr == endptr || (d == 0 && errno != 0))
 	{
 	  if (elem == 0)
 	    return -1;

Modified: nagiosplug/trunk/gl/getopt1.c
===================================================================
--- nagiosplug/trunk/gl/getopt1.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/getopt1.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006,2009
      Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -91,7 +91,7 @@
     {
       int this_option_optind = optind ? optind : 1;
       int option_index = 0;
-      static struct option long_options[] =
+      static const struct option long_options[] =
       {
 	{"add", 1, 0, 0},
 	{"append", 0, 0, 0},

Modified: nagiosplug/trunk/gl/gettext.h
===================================================================
--- nagiosplug/trunk/gl/gettext.h	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/gettext.h	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 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
@@ -63,21 +63,30 @@
    for invalid uses of the value returned from these functions.
    On pre-ANSI systems without 'const', the config.h file is supposed to
    contain "#define const".  */
+# undef gettext
 # define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
 # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
 # define dcgettext(Domainname, Msgid, Category) \
     ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
 # define ngettext(Msgid1, Msgid2, N) \
     ((N) == 1 \
      ? ((void) (Msgid2), (const char *) (Msgid1)) \
      : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
 # define dngettext(Domainname, Msgid1, Msgid2, N) \
     ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
     ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# undef textdomain
 # define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
 # define bindtextdomain(Domainname, Dirname) \
     ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
 # define bind_textdomain_codeset(Domainname, Codeset) \
     ((void) (Domainname), (const char *) (Codeset))
 

Modified: nagiosplug/trunk/gl/localcharset.c
===================================================================
--- nagiosplug/trunk/gl/localcharset.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/localcharset.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2009 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
@@ -28,6 +28,10 @@
 #include <string.h>
 #include <stdlib.h>
 
+#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
+# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+#endif
+
 #if defined _WIN32 || defined __WIN32__
 # define WIN32_NATIVE
 #endif
@@ -112,7 +116,7 @@
   cp = charset_aliases;
   if (cp == NULL)
     {
-#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
       FILE *fp;
       const char *dir;
       const char *base = "charset.alias";
@@ -213,6 +217,39 @@
 
 #else
 
+# if defined DARWIN7
+      /* To avoid the trouble of installing a file that is shared by many
+	 GNU packages -- many packaging systems have problems with this --,
+	 simply inline the aliases here.  */
+      cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+	   "ISO8859-2" "\0" "ISO-8859-2" "\0"
+	   "ISO8859-4" "\0" "ISO-8859-4" "\0"
+	   "ISO8859-5" "\0" "ISO-8859-5" "\0"
+	   "ISO8859-7" "\0" "ISO-8859-7" "\0"
+	   "ISO8859-9" "\0" "ISO-8859-9" "\0"
+	   "ISO8859-13" "\0" "ISO-8859-13" "\0"
+	   "ISO8859-15" "\0" "ISO-8859-15" "\0"
+	   "KOI8-R" "\0" "KOI8-R" "\0"
+	   "KOI8-U" "\0" "KOI8-U" "\0"
+	   "CP866" "\0" "CP866" "\0"
+	   "CP949" "\0" "CP949" "\0"
+	   "CP1131" "\0" "CP1131" "\0"
+	   "CP1251" "\0" "CP1251" "\0"
+	   "eucCN" "\0" "GB2312" "\0"
+	   "GB2312" "\0" "GB2312" "\0"
+	   "eucJP" "\0" "EUC-JP" "\0"
+	   "eucKR" "\0" "EUC-KR" "\0"
+	   "Big5" "\0" "BIG5" "\0"
+	   "Big5HKSCS" "\0" "BIG5-HKSCS" "\0"
+	   "GBK" "\0" "GBK" "\0"
+	   "GB18030" "\0" "GB18030" "\0"
+	   "SJIS" "\0" "SHIFT_JIS" "\0"
+	   "ARMSCII-8" "\0" "ARMSCII-8" "\0"
+	   "PT154" "\0" "PT154" "\0"
+	 /*"ISCII-DEV" "\0" "?" "\0"*/
+	   "*" "\0" "UTF-8" "\0";
+# endif
+
 # if defined VMS
       /* To avoid the troubles of an extra file charset.alias_vms in the
 	 sources of many GNU packages, simply inline the aliases here.  */

Added: nagiosplug/trunk/gl/m4/00gnulib.m4
===================================================================
--- nagiosplug/trunk/gl/m4/00gnulib.m4	                        (rev 0)
+++ nagiosplug/trunk/gl/m4/00gnulib.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files.  It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect.  Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+  [AC][_DEFUN([$1],
+    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])

Modified: nagiosplug/trunk/gl/m4/btowc.m4
===================================================================
--- nagiosplug/trunk/gl/m4/btowc.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/btowc.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# btowc.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# btowc.m4 serial 4
+dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -47,7 +47,7 @@
 }],
             [gl_cv_func_btowc_eof=yes],
             [gl_cv_func_btowc_eof=no],
-            [])
+            [:])
         fi
       ])
     case "$gl_cv_func_btowc_eof" in

Modified: nagiosplug/trunk/gl/m4/c-strtod.m4
===================================================================
--- nagiosplug/trunk/gl/m4/c-strtod.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/c-strtod.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# c-strtod.m4 serial 10
+# c-strtod.m4 serial 11
 
 # Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -39,6 +39,8 @@
 
   dnl Prerequisites of lib/c-strtod.c.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([AC_C_INLINE])
   :
 ])
 
@@ -49,5 +51,7 @@
   dnl Prerequisites of lib/c-strtold.c.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([gl_C99_STRTOLD])
+
+  AC_REQUIRE([AC_C_INLINE])
   :
 ])

Modified: nagiosplug/trunk/gl/m4/errno_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/errno_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/errno_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,18 +1,11 @@
-# errno_h.m4 serial 3
+# errno_h.m4 serial 5
 dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_HEADER_ERRNO_H],
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_ERRNO_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
-[
   AC_REQUIRE([AC_PROG_CC])
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
     AC_EGREP_CPP([booboo],[

Modified: nagiosplug/trunk/gl/m4/extensions.m4
===================================================================
--- nagiosplug/trunk/gl/m4/extensions.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/extensions.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,7 +1,7 @@
-# serial 6  -*- Autoconf -*-
+# serial 8  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,7 +20,7 @@
 # AC_DEFINE.  The goal here is to define all known feature-enabling
 # macros, then, if reports of conflicts are made, disable macros that
 # cause problems on some platforms (such as __EXTENSIONS__).
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
@@ -90,5 +90,15 @@
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-  [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+  dnl gnulib does not need it. But if it gets required by third-party macros
+  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])

Modified: nagiosplug/trunk/gl/m4/fcntl_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/fcntl_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/fcntl_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -9,6 +9,8 @@
 AC_DEFUN([gl_FCNTL_H],
 [
   AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
   AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(

Modified: nagiosplug/trunk/gl/m4/floorf.m4
===================================================================
--- nagiosplug/trunk/gl/m4/floorf.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/floorf.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# floorf.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# floorf.m4 serial 4
+dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,7 +34,7 @@
 # Sets FLOORF_LIBM.
 AC_DEFUN([gl_FUNC_FLOORF_LIBS],
 [
-  AC_CACHE_VAL([gl_cv_func_floorf_libm], [
+  gl_CACHE_VAL_SILENT([gl_cv_func_floorf_libm], [
     gl_cv_func_floorf_libm=?
     AC_TRY_LINK([
        #ifndef __NO_MATH_INLINES

Modified: nagiosplug/trunk/gl/m4/gnulib-common.m4
===================================================================
--- nagiosplug/trunk/gl/m4/gnulib-common.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/gnulib-common.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 7
+# gnulib-common.m4 serial 11
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@
 # is expanded unconditionally through gnulib-tool magic.
 AC_DEFUN([gl_COMMON], [
   dnl Use AC_REQUIRE here, so that the code is expanded once only.
+  AC_REQUIRE([gl_00GNULIB])
   AC_REQUIRE([gl_COMMON_BODY])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
@@ -52,7 +53,7 @@
 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
 # Remove this macro when we can assume autoconf >= 2.60.
 m4_ifdef([AC_PROG_MKDIR_P], [], [
-  AC_DEFUN([AC_PROG_MKDIR_P],
+  AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
@@ -99,3 +100,25 @@
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
 ])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+  AC_C_BIGENDIAN
+])
+
+# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
+# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
+# output a spurious "(cached)" mark in the midst of other configure output.
+# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
+# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
+AC_DEFUN([gl_CACHE_VAL_SILENT],
+[
+  saved_as_echo_n="$as_echo_n"
+  as_echo_n=':'
+  AC_CACHE_VAL([$1], [$2])
+  as_echo_n="$saved_as_echo_n"
+])

Modified: nagiosplug/trunk/gl/m4/gnulib-comp.m4
===================================================================
--- nagiosplug/trunk/gl/m4/gnulib-comp.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/gnulib-comp.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -25,7 +25,6 @@
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([AC_PROG_RANLIB])
-  AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 ])
 
@@ -116,6 +115,8 @@
   gl_STDINT_H
   gl_STDIO_H
   gl_STDLIB_H
+  gl_FUNC_STRDUP_POSIX
+  gl_STRING_MODULE_INDICATOR([strdup])
   gl_FUNC_STRERROR
   gl_STRING_MODULE_INDICATOR([strerror])
   gl_HEADER_STRING_H
@@ -124,7 +125,6 @@
   gl_FUNC_STRNLEN
   gl_STRING_MODULE_INDICATOR([strnlen])
   gl_HEADER_SYS_SOCKET
-  gl_MODULE_INDICATOR([sys_socket])
   AC_PROG_MKDIR_P
   gl_HEADER_TIME_H
   gl_TIME_R
@@ -282,6 +282,7 @@
 AC_DEFUN([gl_FILE_LIST], [
   build-aux/config.rpath
   build-aux/link-warning.h
+  lib/alignof.h
   lib/alloca.c
   lib/alloca.in.h
   lib/arpa_inet.in.h
@@ -367,6 +368,7 @@
   lib/stdio-write.c
   lib/stdio.in.h
   lib/stdlib.in.h
+  lib/strdup.c
   lib/streq.h
   lib/strerror.c
   lib/string.in.h
@@ -395,6 +397,7 @@
   lib/xsize.h
   lib/xstrndup.c
   lib/xstrndup.h
+  m4/00gnulib.m4
   m4/alloca.m4
   m4/arpa_inet_h.m4
   m4/base64.m4
@@ -478,6 +481,7 @@
   m4/stdint_h.m4
   m4/stdio_h.m4
   m4/stdlib_h.m4
+  m4/strdup.m4
   m4/strerror.m4
   m4/string_h.m4
   m4/strndup.m4

Modified: nagiosplug/trunk/gl/m4/include_next.m4
===================================================================
--- nagiosplug/trunk/gl/m4/include_next.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/include_next.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# include_next.m4 serial 10
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# include_next.m4 serial 12
+dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,14 +32,15 @@
     [gl_cv_have_include_next],
     [rm -rf conftestd1a conftestd1b conftestd2
      mkdir conftestd1a conftestd1b conftestd2
-     dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
-     dnl include_next when used as first preprocessor directive in a file,
-     dnl but not when preceded by another include directive. Additionally,
-     dnl with this same compiler, include_next is a no-op when used in a
-     dnl header file that was included by specifying its absolute file name.
-     dnl Despite these two bugs, include_next is used in the compiler's
-     dnl <math.h>. By virtue of the second bug, we need to use include_next
-     dnl as well in this case.
+     dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
+     dnl AIX 6.1 support include_next when used as first preprocessor directive
+     dnl in a file, but not when preceded by another include directive. Check
+     dnl for this bug by including <stdio.h>.
+     dnl Additionally, with this same compiler, include_next is a no-op when
+     dnl used in a header file that was included by specifying its absolute
+     dnl file name. Despite these two bugs, include_next is used in the
+     dnl compiler's <math.h>. By virtue of the second bug, we need to use
+     dnl include_next as well in this case.
      cat <<EOF > conftestd1a/conftest.h
 #define DEFINED_IN_CONFTESTD1
 #include_next <conftest.h>

Modified: nagiosplug/trunk/gl/m4/inet_ntop.m4
===================================================================
--- nagiosplug/trunk/gl/m4/inet_ntop.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/inet_ntop.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 8
+# inet_ntop.m4 serial 9
 dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,18 @@
 
   gl_REPLACE_ARPA_INET_H
 
-  AC_REPLACE_FUNCS([inet_ntop])
+  dnl The AC_SEARCH_LIBS call is a hack to persuade the Solaris 8 linker to
+  dnl find inet_ntop.
+  dnl
+  dnl It is the responsibility of gl_INET_NTOP's caller to arrange for
+  dnl -lnsl if it is needed.  Normally -lnsl is not needed on Solaris 8,
+  dnl since inet_ntop is needed only by getaddrinfo, and getaddrinfo
+  dnl isn't built on Solaris 8.
+  gl_save_LIBS=$LIBS
+  AC_SEARCH_LIBS([inet_ntop], [nsl], [],
+    [AC_REPLACE_FUNCS([inet_ntop])])
+  LIBS=$gl_save_LIBS
+
   gl_PREREQ_INET_NTOP
 ])
 

Modified: nagiosplug/trunk/gl/m4/lib-link.m4
===================================================================
--- nagiosplug/trunk/gl/m4/lib-link.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/lib-link.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 18 (gettext-0.18)
+# lib-link.m4 serial 19 (gettext-0.18)
 dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,12 +43,13 @@
   popdef([Name])
 ])
 
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
 dnl searches for libname and the libraries corresponding to explicit and
 dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
@@ -74,12 +75,14 @@
   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    AC_TRY_LINK([$3], [$4],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
     LIBS="$ac_save_LIBS"
   ])
   if test "$ac_cv_lib[]Name" = yes; then
     HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib[]$1 library.])
     AC_MSG_CHECKING([how to link with lib[]$1])
     AC_MSG_RESULT([$LIB[]NAME])
   else

Modified: nagiosplug/trunk/gl/m4/lib-prefix.m4
===================================================================
--- nagiosplug/trunk/gl/m4/lib-prefix.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/lib-prefix.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -206,6 +206,9 @@
           if test -d "$searchdir"; then
             case "$searchdir" in
               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
               *) searchdir=`cd "$searchdir" && pwd`
                  case "$searchdir" in
                    */lib64 ) acl_libdirstem=lib64 ;;

Modified: nagiosplug/trunk/gl/m4/locale-fr.m4
===================================================================
--- nagiosplug/trunk/gl/m4/locale-fr.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/locale-fr.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# locale-fr.m4 serial 10
+# locale-fr.m4 serial 11
 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,26 +12,8 @@
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
-    macosx=
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
 changequote(,)dnl
-    case "$host_os" in
-      darwin[56]*) ;;
-      darwin*) macosx=yes;;
-    esac
-changequote([,])dnl
-    if test -n "$macosx"; then
-      # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8
-      # encodings, but the kernel does not support them. The documentation
-      # says:
-      #   "... all code that calls BSD system routines should ensure
-      #    that the const *char parameters of these routines are in UTF-8
-      #    encoding. All BSD system functions expect their string
-      #    parameters to be in UTF-8 encoding and nothing else."
-      # See the comments in config.charset. Therefore we bypass the test.
-      gt_cv_locale_fr=none
-    else
-      AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -75,42 +57,41 @@
   return 0;
 }
 changequote([,])dnl
-        ])])
-      if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-        # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-        # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-        # configure script would override the LC_ALL setting. Likewise for
-        # LC_CTYPE, which is also set at the beginning of the configure script.
-        # Test for the usual locale name.
-        if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_fr=fr_FR
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+      # configure script would override the LC_ALL setting. Likewise for
+      # LC_CTYPE, which is also set at the beginning of the configure script.
+      # Test for the usual locale name.
+      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+        gt_cv_locale_fr=fr_FR
+      else
+        # Test for the locale name with explicit encoding suffix.
+        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+          gt_cv_locale_fr=fr_FR.ISO-8859-1
         else
-          # Test for the locale name with explicit encoding suffix.
-          if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr=fr_FR.ISO-8859-1
+          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR.ISO8859-1
           else
-            # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
-            if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr=fr_FR.ISO8859-1
+            # Test for the HP-UX locale name.
+            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.iso88591
             else
-              # Test for the HP-UX locale name.
-              if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr=fr_FR.iso88591
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr=fr
               else
-                # Test for the Solaris 7 locale name.
-                if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_fr=fr
-                else
-                  # None found.
-                  gt_cv_locale_fr=none
-                fi
+                # None found.
+                gt_cv_locale_fr=none
               fi
             fi
           fi
         fi
       fi
-      rm -fr conftest*
     fi
+    rm -fr conftest*
   ])
   LOCALE_FR=$gt_cv_locale_fr
   AC_SUBST([LOCALE_FR])

Modified: nagiosplug/trunk/gl/m4/locale-ja.m4
===================================================================
--- nagiosplug/trunk/gl/m4/locale-ja.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/locale-ja.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# locale-ja.m4 serial 6
+# locale-ja.m4 serial 7
 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,26 +12,8 @@
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
-    macosx=
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
 changequote(,)dnl
-    case "$host_os" in
-      darwin[56]*) ;;
-      darwin*) macosx=yes;;
-    esac
-changequote([,])dnl
-    if test -n "$macosx"; then
-      # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8
-      # encodings, but the kernel does not support them. The documentation
-      # says:
-      #   "... all code that calls BSD system routines should ensure
-      #    that the const *char parameters of these routines are in UTF-8
-      #    encoding. All BSD system functions expect their string
-      #    parameters to be in UTF-8 encoding and nothing else."
-      # See the comments in config.charset. Therefore we bypass the test.
-      gt_cv_locale_ja=none
-    else
-      AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -79,47 +61,46 @@
   return 0;
 }
 changequote([,])dnl
-        ])])
-      if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-        # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-        # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-        # configure script would override the LC_ALL setting. Likewise for
-        # LC_CTYPE, which is also set at the beginning of the configure script.
-        # Test for the AIX locale name.
-        if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_ja=ja_JP
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+      # configure script would override the LC_ALL setting. Likewise for
+      # LC_CTYPE, which is also set at the beginning of the configure script.
+      # Test for the AIX locale name.
+      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+        gt_cv_locale_ja=ja_JP
+      else
+        # Test for the locale name with explicit encoding suffix.
+        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+          gt_cv_locale_ja=ja_JP.EUC-JP
         else
-          # Test for the locale name with explicit encoding suffix.
-          if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP.EUC-JP
+          # Test for the HP-UX, OSF/1, NetBSD locale name.
+          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP.eucJP
           else
-            # Test for the HP-UX, OSF/1, NetBSD locale name.
-            if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.eucJP
+            # Test for the IRIX, FreeBSD locale name.
+            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC
             else
-              # Test for the IRIX, FreeBSD locale name.
-              if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.EUC
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja
               else
-                # Test for the Solaris 7 locale name.
-                if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja
+                # Special test for NetBSD 1.6.
+                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                  gt_cv_locale_ja=ja_JP.eucJP
                 else
-                  # Special test for NetBSD 1.6.
-                  if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                    gt_cv_locale_ja=ja_JP.eucJP
-                  else
-                    # None found.
-                    gt_cv_locale_ja=none
-                  fi
+                  # None found.
+                  gt_cv_locale_ja=none
                 fi
               fi
             fi
           fi
         fi
       fi
-      rm -fr conftest*
     fi
+    rm -fr conftest*
   ])
   LOCALE_JA=$gt_cv_locale_ja
   AC_SUBST([LOCALE_JA])

Modified: nagiosplug/trunk/gl/m4/locale-zh.m4
===================================================================
--- nagiosplug/trunk/gl/m4/locale-zh.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/locale-zh.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# locale-zh.m4 serial 5
+# locale-zh.m4 serial 6
 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,26 +12,8 @@
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
-    macosx=
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([
 changequote(,)dnl
-    case "$host_os" in
-      darwin[56]*) ;;
-      darwin*) macosx=yes;;
-    esac
-changequote([,])dnl
-    if test -n "$macosx"; then
-      # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8
-      # encodings, but the kernel does not support them. The documentation
-      # says:
-      #   "... all code that calls BSD system routines should ensure
-      #    that the const *char parameters of these routines are in UTF-8
-      #    encoding. All BSD system functions expect their string
-      #    parameters to be in UTF-8 encoding and nothing else."
-      # See the comments in config.charset. Therefore we bypass the test.
-      gt_cv_locale_zh_CN=none
-    else
-      AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
 #include <locale.h>
 #include <stdlib.h>
 #include <time.h>
@@ -80,31 +62,30 @@
   return 0;
 }
 changequote([,])dnl
-        ])])
-      if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-        # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-        # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
-        # configure script would override the LC_ALL setting. Likewise for
-        # LC_CTYPE, which is also set at the beginning of the configure script.
-        # Test for the locale name without encoding suffix.
-        if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-          gt_cv_locale_zh_CN=zh_CN
+      ])])
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+      # configure script would override the LC_ALL setting. Likewise for
+      # LC_CTYPE, which is also set at the beginning of the configure script.
+      # Test for the locale name without encoding suffix.
+      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+        gt_cv_locale_zh_CN=zh_CN
+      else
+        # Test for the locale name with explicit encoding suffix.
+        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+          gt_cv_locale_zh_CN=zh_CN.GB18030
         else
-          # Test for the locale name with explicit encoding suffix.
-          if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN.GB18030
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
+          # None found.
+          gt_cv_locale_zh_CN=none
         fi
-      else
-        # If there was a link error, due to mblen(), the system is so old that
-        # it certainly doesn't have a chinese locale.
-        gt_cv_locale_zh_CN=none
       fi
-      rm -fr conftest*
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
     fi
+    rm -fr conftest*
   ])
   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
   AC_SUBST([LOCALE_ZH_CN])

Modified: nagiosplug/trunk/gl/m4/mbrtowc.m4
===================================================================
--- nagiosplug/trunk/gl/m4/mbrtowc.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/mbrtowc.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 13
+# mbrtowc.m4 serial 15
 dnl Copyright (C) 2001-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -65,10 +65,16 @@
   AC_CHECK_FUNCS_ONCE([mbrtowc])
   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
     gl_MBRTOWC_INCOMPLETE_STATE
+    gl_MBRTOWC_SANITYCHECK
+    REPLACE_MBSTATE_T=0
     case "$gl_cv_func_mbrtowc_incomplete_state" in
-      *yes) REPLACE_MBSTATE_T=0 ;;
-      *)    REPLACE_MBSTATE_T=1 ;;
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
     esac
+    case "$gl_cv_func_mbrtowc_sanitycheck" in
+      *yes) ;;
+      *) REPLACE_MBSTATE_T=1 ;;
+    esac
   else
     REPLACE_MBSTATE_T=1
   fi
@@ -121,11 +127,62 @@
 }],
           [gl_cv_func_mbrtowc_incomplete_state=yes],
           [gl_cv_func_mbrtowc_incomplete_state=no],
-          [])
+          [:])
       fi
     ])
 ])
 
+dnl Test whether mbrtowc works not worse than mbtowc.
+dnl Result is gl_cv_func_mbrtowc_sanitycheck.
+
+AC_DEFUN([gl_MBRTOWC_SANITYCHECK],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+    [gl_cv_func_mbrtowc_sanitycheck],
+    [
+      dnl Initial guess, used when cross-compiling or when no suitable locale
+      dnl is present.
+changequote(,)dnl
+      case "$host_os" in
+                    # Guess no on Solaris 8.
+        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+                    # Guess yes otherwise.
+        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+      esac
+changequote([,])dnl
+      if test $LOCALE_ZH_CN != none; then
+        AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8:
+     mbrtowc returns 2, and sets wc to 0x00F0.
+     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+      mbstate_t state;
+      wchar_t wc;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 6, &state) != 4
+          && mbtowc (&wc, input + 3, 6) == 4)
+        return 1;
+    }
+  return 0;
+}],
+          [gl_cv_func_mbrtowc_sanitycheck=yes],
+          [gl_cv_func_mbrtowc_sanitycheck=no],
+          [:])
+      fi
+    ])
+])
+
 dnl Test whether mbrtowc supports a NULL string argument correctly.
 dnl Result is gl_cv_func_mbrtowc_null_arg.
 
@@ -168,7 +225,7 @@
         return 1;
     }
   return 0;
-}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [])
+}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
       fi
     ])
 ])
@@ -238,7 +295,7 @@
 }],
           [gl_cv_func_mbrtowc_retval=yes],
           [gl_cv_func_mbrtowc_retval=no],
-          [])
+          [:])
       fi
     ])
 ])
@@ -258,10 +315,10 @@
       dnl is present.
 changequote(,)dnl
       case "$host_os" in
-                    # Guess no on Solaris 9.
-        solaris2.9) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
-                    # Guess yes otherwise.
-        *)          gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+                       # Guess no on Solaris 8 and 9.
+        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+                       # Guess yes otherwise.
+        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
       esac
 changequote([,])dnl
       if test $LOCALE_ZH_CN != none; then
@@ -271,7 +328,7 @@
 #include <wchar.h>
 int main ()
 {
-  /* This fails on Solaris 9.  */
+  /* This fails on Solaris 8 and 9.  */
   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       mbstate_t state;
@@ -285,7 +342,7 @@
 }],
           [gl_cv_func_mbrtowc_nul_retval=yes],
           [gl_cv_func_mbrtowc_nul_retval=no],
-          [])
+          [:])
       fi
     ])
 ])

Modified: nagiosplug/trunk/gl/m4/mktime.m4
===================================================================
--- nagiosplug/trunk/gl/m4/mktime.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/mktime.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# serial 14
+# serial 15
 dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,13 @@
 AC_DEFUN([AC_FUNC_MKTIME],
 [AC_CHECK_HEADERS_ONCE([unistd.h])
 AC_CHECK_FUNCS_ONCE([alarm])
+AC_REQUIRE([gl_MULTIARCH])
+if test $APPLE_UNIVERSAL_BUILD = 1; then
+  # A universal build on Apple MacOS X platforms.
+  # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
+  # But we need a configuration result that is valid in both modes.
+  ac_cv_func_working_mktime=no
+fi
 AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime],
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Test program from Paul Eggert and Tony Leneis.  */

Modified: nagiosplug/trunk/gl/m4/multiarch.m4
===================================================================
--- nagiosplug/trunk/gl/m4/multiarch.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/multiarch.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# multiarch.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# multiarch.m4 serial 5
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -19,17 +19,8 @@
 # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
 # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
 
-AC_DEFUN([gl_MULTIARCH],
+AC_DEFUN_ONCE([gl_MULTIARCH],
 [
-  dnl This AC_REQUIRE is not necessary in theory. It works around a bug in
-  dnl autoconf <= 2.63: AC_REQUIRE invocations inside AC_REQUIREd macros are
-  dnl being handled better than AC_REQUIRE invocations inside normally invoked
-  dnl macros.
-  AC_REQUIRE([gl_MULTIARCH_BODY])
-])
-
-AC_DEFUN([gl_MULTIARCH_BODY],
-[
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
   gl_cv_c_multiarch=no
   AC_COMPILE_IFELSE(

Modified: nagiosplug/trunk/gl/m4/printf.m4
===================================================================
--- nagiosplug/trunk/gl/m4/printf.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/printf.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# printf.m4 serial 26
+# printf.m4 serial 33
 dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -125,7 +125,8 @@
 ])
 
 dnl Test whether the *printf family of functions supports infinite and NaN
-dnl 'double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+dnl 'double' arguments and negative zero arguments in the %f, %e, %g
+dnl directives. (ISO C99, POSIX:2001)
 dnl Result is gl_cv_func_printf_infinite.
 
 AC_DEFUN([gl_PRINTF_INFINITE],
@@ -156,6 +157,13 @@
     }
   return 0;
 }
+static int
+have_minus_zero ()
+{
+  static double plus_zero = 0.0;
+  double minus_zero = - plus_zero;
+  return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
 static char buf[10000];
 static double zero = 0.0;
 int main ()
@@ -187,6 +195,11 @@
   if (sprintf (buf, "%g", zero / zero) < 0
       || !strisnan (buf, 0, strlen (buf)))
     return 1;
+  /* This test fails on HP-UX 10.20.  */
+  if (have_minus_zero ())
+    if (sprintf (buf, "%g", - zero) < 0
+        || strcmp (buf, "-0") != 0)
+    return 1;
   return 0;
 }], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
       [
@@ -225,7 +238,7 @@
 [
   AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
   AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_C_BIGENDIAN])
+  AC_REQUIRE([gl_BIGENDIAN])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   dnl The user can set or unset the variable gl_printf_safe to indicate
   dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
@@ -545,7 +558,7 @@
   if (sprintf (buf, "%F", 1.0 / 0.0) < 0
       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
     return 1;
-  /* This catches a Cygwin 2007 bug.  */
+  /* This catches a Cygwin 1.5.x bug.  */
   if (sprintf (buf, "%.F", 1234.0) < 0
       || strcmp (buf, "1234") != 0)
     return 1;
@@ -612,6 +625,84 @@
     ])
 ])
 
+dnl Test whether the *printf family of functions supports the %ls format
+dnl directive and in particular, when a precision is specified, whether
+dnl the functions stop converting the wide string argument when the number
+dnl of bytes that have been produced by this conversion equals or exceeds
+dnl the precision.
+dnl Result is gl_cv_func_printf_directive_ls.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether printf supports the 'ls' directive],
+    [gl_cv_func_printf_directive_ls],
+    [
+      AC_TRY_RUN([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+  char buf[100];
+  /* Test whether %ls works at all.
+     This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+     Cygwin 1.5.  */
+  {
+    static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%ls", wstring) < 0
+        || strcmp (buf, "abc") != 0)
+      return 1;
+  }
+  /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+     assertion failure inside libc), but not on OpenBSD 4.0.  */
+  {
+    static const wchar_t wstring[] = { 'a', 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%ls", wstring) < 0
+        || strcmp (buf, "a") != 0)
+      return 1;
+  }
+  /* Test whether precisions in %ls are supported as specified in ISO C 99
+     section 7.19.6.1:
+       "If a precision is specified, no more than that many bytes are written
+        (including shift sequences, if any), and the array shall contain a
+        null wide character if, to equal the multibyte character sequence
+        length given by the precision, the function would need to access a
+        wide character one past the end of the array."
+     This test fails on Solaris 10.  */
+  {
+    static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+    buf[0] = '\0';
+    if (sprintf (buf, "%.2ls", wstring) < 0
+        || strcmp (buf, "ab") != 0)
+      return 1;
+  }
+  return 0;
+}], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no],
+      [
+changequote(,)dnl
+       case "$host_os" in
+         openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
+         irix*)           gl_cv_func_printf_directive_ls="guessing no";;
+         solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
+         cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
+         beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
+         *)               gl_cv_func_printf_directive_ls="guessing yes";;
+       esac
+changequote([,])dnl
+      ])
+    ])
+])
+
 dnl Test whether the *printf family of functions supports POSIX/XSI format
 dnl strings with positions. (POSIX:2001)
 dnl Result is gl_cv_func_printf_positions.
@@ -1142,7 +1233,7 @@
 #include <stdio.h>
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   snprintf (buf, 1, "%d", 12345);
   return buf[1] != 'E';
 }],
@@ -1160,7 +1251,7 @@
 dnl     #include <stdio.h>
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1181,7 +1272,7 @@
 dnl     }
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       my_snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1209,7 +1300,7 @@
 }
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   my_snprintf (buf, 0, "%d", 12345);
   return buf[0] != 'D';
 }],
@@ -1261,18 +1352,19 @@
 dnl 5 = gl_PRINTF_DIRECTIVE_A
 dnl 6 = gl_PRINTF_DIRECTIVE_F
 dnl 7 = gl_PRINTF_DIRECTIVE_N
-dnl 8 = gl_PRINTF_POSITIONS
-dnl 9 = gl_PRINTF_FLAG_GROUPING
-dnl 10 = gl_PRINTF_FLAG_LEFTADJUST
-dnl 11 = gl_PRINTF_FLAG_ZERO
-dnl 12 = gl_PRINTF_PRECISION
-dnl 13 = gl_PRINTF_ENOMEM
-dnl 14 = gl_SNPRINTF_PRESENCE
-dnl 15 = gl_SNPRINTF_TRUNCATION_C99
-dnl 16 = gl_SNPRINTF_RETVAL_C99
-dnl 17 = gl_SNPRINTF_DIRECTIVE_N
-dnl 18 = gl_SNPRINTF_SIZE1
-dnl 19 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 8 = gl_PRINTF_DIRECTIVE_LS
+dnl 9 = gl_PRINTF_POSITIONS
+dnl 10 = gl_PRINTF_FLAG_GROUPING
+dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 12 = gl_PRINTF_FLAG_ZERO
+dnl 13 = gl_PRINTF_PRECISION
+dnl 14 = gl_PRINTF_ENOMEM
+dnl 15 = gl_SNPRINTF_PRESENCE
+dnl 16 = gl_SNPRINTF_TRUNCATION_C99
+dnl 17 = gl_SNPRINTF_RETVAL_C99
+dnl 18 = gl_SNPRINTF_DIRECTIVE_N
+dnl 19 = gl_SNPRINTF_SIZE1
+dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
 dnl
 dnl 1 = checking whether printf supports size specifiers as in C99...
 dnl 2 = checking whether printf supports 'long double' arguments...
@@ -1281,42 +1373,44 @@
 dnl 5 = checking whether printf supports the 'a' and 'A' directives...
 dnl 6 = checking whether printf supports the 'F' directive...
 dnl 7 = checking whether printf supports the 'n' directive...
-dnl 8 = checking whether printf supports POSIX/XSI format strings with positions...
-dnl 9 = checking whether printf supports the grouping flag...
-dnl 10 = checking whether printf supports the left-adjust flag correctly...
-dnl 11 = checking whether printf supports the zero flag correctly...
-dnl 12 = checking whether printf supports large precisions...
-dnl 13 = checking whether printf survives out-of-memory conditions...
-dnl 14 = checking for snprintf...
-dnl 15 = checking whether snprintf truncates the result as in C99...
-dnl 16 = checking whether snprintf returns a byte count as in C99...
-dnl 17 = checking whether snprintf fully supports the 'n' directive...
-dnl 18 = checking whether snprintf respects a size of 1...
-dnl 19 = checking whether vsnprintf respects a zero size as in C99...
+dnl 8 = checking whether printf supports the 'ls' directive...
+dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 10 = checking whether printf supports the grouping flag...
+dnl 11 = checking whether printf supports the left-adjust flag correctly...
+dnl 12 = checking whether printf supports the zero flag correctly...
+dnl 13 = checking whether printf supports large precisions...
+dnl 14 = checking whether printf survives out-of-memory conditions...
+dnl 15 = checking for snprintf...
+dnl 16 = checking whether snprintf truncates the result as in C99...
+dnl 17 = checking whether snprintf returns a byte count as in C99...
+dnl 18 = checking whether snprintf fully supports the 'n' directive...
+dnl 19 = checking whether snprintf respects a size of 1...
+dnl 20 = checking whether vsnprintf respects a zero size as in C99...
 dnl
 dnl . = yes, # = no.
 dnl
-dnl                                  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19
-dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
-dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .
-dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  #  .  #  .  .  .  .  .  .
-dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  #  .  #  .  .  .  .  .  .
-dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  .  #  .  #  .  #  .  .  .  .  .  .
-dnl   Cygwin 2007 (= Cygwin 1.5.24)  .  .  .  .  #  #  .  .  .  ?  #  ?  ?  .  .  .  .  .  .
-dnl   Cygwin 2006 (= Cygwin 1.5.19)  #  .  .  .  #  #  .  .  #  ?  #  ?  ?  .  .  .  .  .  .
-dnl   Solaris 10                     .  .  #  #  #  .  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  .  .  .  #  .  .  #  #  #  #  #  #
-dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  #  .  .  .  .  #  #  .  .
-dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  #  .  .  .  .  #  #  .  #
-dnl   HP-UX 10.20                    #  .  .  .  #  #  .  .  .  #  #  .  .  .  .  #  #  ?  #
-dnl   IRIX 6.5                       #  .  #  #  #  #  .  .  .  .  #  .  .  .  .  #  .  .  .
-dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  #  .  .  .  .  #  .  .  #
-dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  #  .  .  #  #  #  #  #  #
-dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
-dnl   NetBSD 3.0                     .  .  .  .  #  #  .  #  #  ?  #  .  #  .  .  .  .  .  .
-dnl   Haiku                          .  .  .  #  #  #  .  .  .  .  .  .  ?  .  .  .  .  .  .
-dnl   BeOS                           #  #  .  #  #  #  .  #  .  ?  .  #  ?  .  .  .  .  .  .
-dnl   mingw                          #  #  #  #  #  #  .  #  #  .  #  #  ?  .  #  #  #  .  .
+dnl                                  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
+dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  .  .  .  .  .  .
+dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  .  .  .  .  .  .
+dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .
+dnl   Cygwin 1.5.19 (2006)           #  .  .  #  #  #  .  #  .  #  .  #  #  #  .  .  .  .  .  .
+dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  #  #  #  #  #  #
+dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  .  .  #  #  .  .
+dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  .  .  #  #  .  #
+dnl   HP-UX 10.20                    #  .  #  .  #  #  .  ?  .  .  #  #  .  .  .  .  #  #  ?  #
+dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  .  .  #  .  .  .
+dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  #
+dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  #  #  #  #  #  #
+dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
+dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  .  .  .  .  .  .
+dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  .  .  .  .  .  .
+dnl   BeOS                           #  #  .  #  #  #  .  ?  #  .  ?  .  #  ?  .  .  .  .  .  .
+dnl   mingw                          #  #  #  #  #  #  .  .  #  #  .  #  #  ?  .  #  #  #  .  .

Modified: nagiosplug/trunk/gl/m4/regex.m4
===================================================================
--- nagiosplug/trunk/gl/m4/regex.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/regex.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# serial 53
+# serial 54
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 # 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -18,12 +18,9 @@
 
   AC_ARG_WITH([included-regex],
     [AS_HELP_STRING([--without-included-regex],
-		    [don't compile regex; this is the default on 32-bit
-		     systems with recent-enough versions of the GNU C
-		     Library (use with caution on other systems).
-		     On systems with 64-bit ptrdiff_t and 32-bit int,
-		     --with-included-regex is the default, in case
-		     regex functions operate on very long strings (>2GB)])])
+		    [don't compile regex; this is the default on systems
+		     with recent-enough versions of the GNU C Library
+		     (use with caution on other systems).])])
 
   case $with_included_regex in #(
   yes|no) ac_use_included_regex=$with_included_regex

Modified: nagiosplug/trunk/gl/m4/stdint.m4
===================================================================
--- nagiosplug/trunk/gl/m4/stdint.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/stdint.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# stdint.m4 serial 33
+# stdint.m4 serial 34
 dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -201,7 +201,75 @@
   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
 };
          ]])],
-         [gl_cv_header_working_stdint_h=yes])])
+         [dnl Determine whether the various *_MIN, *_MAX macros are usable
+          dnl in preprocessor expression. We could do it by compiling a test
+          dnl program for each of these macros. It is faster to run a program
+          dnl that inspects the macro expansion.
+          dnl This detects a bug on HP-UX 11.23/ia64.
+          AC_RUN_IFELSE([
+            AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+]], [[
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return 1;
+    }
+  return 0;
+]])],
+              [gl_cv_header_working_stdint_h=yes],
+              [],
+              [dnl When cross-compiling, assume it works.
+               gl_cv_header_working_stdint_h=yes
+              ])
+         ])
+      ])
   fi
   if test "$gl_cv_header_working_stdint_h" = yes; then
     STDINT_H=

Modified: nagiosplug/trunk/gl/m4/stdio_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/stdio_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/stdio_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 14
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# stdio_h.m4 serial 15
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -53,6 +53,8 @@
   GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
   GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
   GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
+  GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
   GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
@@ -86,6 +88,10 @@
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
   REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
+  HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
   REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
   HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])

Modified: nagiosplug/trunk/gl/m4/stdlib_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/stdlib_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/stdlib_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 13
-dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 15
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,9 +8,20 @@
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_CHECK_NEXT_HEADERS([stdlib.h])
+  AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+  if test $ac_cv_header_random_h = yes; then
+    HAVE_RANDOM_H=1
+  else
+    HAVE_RANDOM_H=0
+  fi
+  AC_SUBST([HAVE_RANDOM_H])
   AC_CHECK_TYPES([struct random_data],
     [], [HAVE_STRUCT_RANDOM_DATA=0],
-    [[#include <stdlib.h>]])
+    [[#include <stdlib.h>
+      #if HAVE_RANDOM_H
+      # include <random.h>
+      #endif
+    ]])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],

Added: nagiosplug/trunk/gl/m4/strdup.m4
===================================================================
--- nagiosplug/trunk/gl/m4/strdup.m4	                        (rev 0)
+++ nagiosplug/trunk/gl/m4/strdup.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -0,0 +1,38 @@
+# strdup.m4 serial 11
+
+dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRDUP],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REPLACE_FUNCS([strdup])
+  AC_CHECK_DECLS_ONCE([strdup])
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+  gl_PREREQ_STRDUP
+])
+
+AC_DEFUN([gl_FUNC_STRDUP_POSIX],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+  if test $gl_cv_func_malloc_posix != yes; then
+    REPLACE_STRDUP=1
+    AC_LIBOBJ([strdup])
+  else
+    AC_REPLACE_FUNCS([strdup])
+  fi
+  AC_CHECK_DECLS_ONCE([strdup])
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+  gl_PREREQ_STRDUP
+])
+
+# Prerequisites of lib/strdup.c.
+AC_DEFUN([gl_PREREQ_STRDUP], [:])

Modified: nagiosplug/trunk/gl/m4/sys_socket_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/sys_socket_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/sys_socket_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
 # sys_socket_h.m4 serial 12
-dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -40,32 +40,54 @@
   else
     SYS_SOCKET_H='sys/socket.h'
   fi
+  # We need to check for ws2tcpip.h now.
+  gl_PREREQ_SYS_H_SOCKET
+  AC_CHECK_TYPES([struct sockaddr_storage],,,[
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+  if test $ac_cv_type_struct_sockaddr_storage = no; then
+    HAVE_STRUCT_SOCKADDR_STORAGE=0
+    SYS_SOCKET_H='sys/socket.h'
+  fi
   if test -n "$SYS_SOCKET_H"; then
-    dnl Check prerequisites of the <sys/socket.h> replacement.
-    gl_CHECK_NEXT_HEADERS([sys/socket.h])
-    if test $ac_cv_header_sys_socket_h = yes; then
-      HAVE_SYS_SOCKET_H=1
-      HAVE_WS2TCPIP_H=0
-    else
-      HAVE_SYS_SOCKET_H=0
-      dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
-      dnl the check for those headers unconditional; yet cygwin reports
-      dnl that the headers are present but cannot be compiled (since on
-      dnl cygwin, all socket information should come from sys/socket.h).
-      AC_CHECK_HEADERS([ws2tcpip.h])
-      if test $ac_cv_header_ws2tcpip_h = yes; then
-        HAVE_WS2TCPIP_H=1
-      else
-        HAVE_WS2TCPIP_H=0
-      fi
-    fi
     gl_PREREQ_SYS_H_WINSOCK2
-    AC_SUBST([HAVE_SYS_SOCKET_H])
-    AC_SUBST([HAVE_WS2TCPIP_H])
   fi
   AC_SUBST([SYS_SOCKET_H])
 ])
 
+AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
+[
+  dnl Check prerequisites of the <sys/socket.h> replacement.
+  gl_CHECK_NEXT_HEADERS([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_SYS_SOCKET_H=1
+    HAVE_WS2TCPIP_H=0
+  else
+    HAVE_SYS_SOCKET_H=0
+    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+    dnl the check for those headers unconditional; yet cygwin reports
+    dnl that the headers are present but cannot be compiled (since on
+    dnl cygwin, all socket information should come from sys/socket.h).
+    AC_CHECK_HEADERS([ws2tcpip.h])
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+  AC_SUBST([HAVE_SYS_SOCKET_H])
+  AC_SUBST([HAVE_WS2TCPIP_H])
+])
+
 # Common prerequisites of of the <sys/socket.h> replacement and of the
 # <sys/select.h> replacement.
 # Sets and substitutes HAVE_WINSOCK2_H.
@@ -114,4 +136,5 @@
   GNULIB_SENDTO=0;      AC_SUBST([GNULIB_SENDTO])
   GNULIB_SETSOCKOPT=0;  AC_SUBST([GNULIB_SETSOCKOPT])
   GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
+  HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
 ])

Modified: nagiosplug/trunk/gl/m4/unistd_h.m4
===================================================================
--- nagiosplug/trunk/gl/m4/unistd_h.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/unistd_h.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 16
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# unistd_h.m4 serial 17
+dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -48,6 +48,7 @@
   GNULIB_GETPAGESIZE=0;      AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;     AC_SUBST([GNULIB_GETUSERSHELL])
   GNULIB_LCHOWN=0;           AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LINK=0;             AC_SUBST([GNULIB_LINK])
   GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
   GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
@@ -63,6 +64,7 @@
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
   HAVE_GETUSERSHELL=1;    AC_SUBST([HAVE_GETUSERSHELL])
+  HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])

Modified: nagiosplug/trunk/gl/m4/vasnprintf.m4
===================================================================
--- nagiosplug/trunk/gl/m4/vasnprintf.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/vasnprintf.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 26
+# vasnprintf.m4 serial 29
 dnl Copyright (C) 2002-2004, 2006-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -52,13 +52,13 @@
 ])
 
 # Prerequisites of lib/vasnprintf.c.
-AC_DEFUN([gl_PREREQ_VASNPRINTF],
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
 [
   AC_REQUIRE([AC_FUNC_ALLOCA])
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
-  AC_CHECK_FUNCS([snprintf wcslen])
+  AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
   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).
   AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
@@ -66,7 +66,7 @@
 
 # Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
 # arguments.
-AC_DEFUN([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
 [
   AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
   case "$gl_cv_func_printf_long_double" in
@@ -150,6 +150,21 @@
   esac
 ])
 
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+  case "$gl_cv_func_printf_directive_ls" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1],
+        [Define if the vasnprintf implementation needs special code for
+         the 'ls' directive.])
+      ;;
+  esac
+])
+
 # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
 AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
 [
@@ -247,6 +262,7 @@
   gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
   gl_PREREQ_VASNPRINTF_DIRECTIVE_A
   gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
   gl_PREREQ_VASNPRINTF_FLAG_GROUPING
   gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
   gl_PREREQ_VASNPRINTF_FLAG_ZERO

Modified: nagiosplug/trunk/gl/m4/wchar.m4
===================================================================
--- nagiosplug/trunk/gl/m4/wchar.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/wchar.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,13 +1,13 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar.m4 serial 22
+# wchar.m4 serial 23
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -73,27 +73,28 @@
   GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
   GNULIB_WCWIDTH=0;    AC_SUBST([GNULIB_WCWIDTH])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_BTOWC=1;        AC_SUBST([HAVE_BTOWC])
-  HAVE_MBSINIT=1;      AC_SUBST([HAVE_MBSINIT])
-  HAVE_MBRTOWC=1;      AC_SUBST([HAVE_MBRTOWC])
-  HAVE_MBRLEN=1;       AC_SUBST([HAVE_MBRLEN])
-  HAVE_MBSRTOWCS=1;    AC_SUBST([HAVE_MBSRTOWCS])
-  HAVE_MBSNRTOWCS=1;   AC_SUBST([HAVE_MBSNRTOWCS])
-  HAVE_WCRTOMB=1;      AC_SUBST([HAVE_WCRTOMB])
-  HAVE_WCSRTOMBS=1;    AC_SUBST([HAVE_WCSRTOMBS])
-  HAVE_WCSNRTOMBS=1;   AC_SUBST([HAVE_WCSNRTOMBS])
-  HAVE_DECL_WCTOB=1;   AC_SUBST([HAVE_DECL_WCTOB])
-  HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
-  REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
-  REPLACE_BTOWC=0;     AC_SUBST([REPLACE_BTOWC])
-  REPLACE_WCTOB=0;     AC_SUBST([REPLACE_WCTOB])
-  REPLACE_MBSINIT=0;   AC_SUBST([REPLACE_MBSINIT])
-  REPLACE_MBRTOWC=0;   AC_SUBST([REPLACE_MBRTOWC])
-  REPLACE_MBRLEN=0;    AC_SUBST([REPLACE_MBRLEN])
-  REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
-  REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS])
-  REPLACE_WCRTOMB=0;   AC_SUBST([REPLACE_WCRTOMB])
-  REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
-  REPLACE_WCWIDTH=0;   AC_SUBST([REPLACE_WCWIDTH])
-  WCHAR_H='';          AC_SUBST([WCHAR_H])
+  HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
+  HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
+  HAVE_MBRTOWC=1;       AC_SUBST([HAVE_MBRTOWC])
+  HAVE_MBRLEN=1;        AC_SUBST([HAVE_MBRLEN])
+  HAVE_MBSRTOWCS=1;     AC_SUBST([HAVE_MBSRTOWCS])
+  HAVE_MBSNRTOWCS=1;    AC_SUBST([HAVE_MBSNRTOWCS])
+  HAVE_WCRTOMB=1;       AC_SUBST([HAVE_WCRTOMB])
+  HAVE_WCSRTOMBS=1;     AC_SUBST([HAVE_WCSRTOMBS])
+  HAVE_WCSNRTOMBS=1;    AC_SUBST([HAVE_WCSNRTOMBS])
+  HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
+  HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
+  REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
+  REPLACE_BTOWC=0;      AC_SUBST([REPLACE_BTOWC])
+  REPLACE_WCTOB=0;      AC_SUBST([REPLACE_WCTOB])
+  REPLACE_MBSINIT=0;    AC_SUBST([REPLACE_MBSINIT])
+  REPLACE_MBRTOWC=0;    AC_SUBST([REPLACE_MBRTOWC])
+  REPLACE_MBRLEN=0;     AC_SUBST([REPLACE_MBRLEN])
+  REPLACE_MBSRTOWCS=0;  AC_SUBST([REPLACE_MBSRTOWCS])
+  REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
+  REPLACE_WCRTOMB=0;    AC_SUBST([REPLACE_WCRTOMB])
+  REPLACE_WCSRTOMBS=0;  AC_SUBST([REPLACE_WCSRTOMBS])
+  REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
+  REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
+  WCHAR_H='';           AC_SUBST([WCHAR_H])
 ])

Modified: nagiosplug/trunk/gl/m4/wcrtomb.m4
===================================================================
--- nagiosplug/trunk/gl/m4/wcrtomb.m4	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/m4/wcrtomb.m4	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 4
+dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,12 +9,16 @@
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
 
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
+  gl_MBSTATE_T_BROKEN
+  if test $REPLACE_MBSTATE_T = 1; then
+    REPLACE_WCRTOMB=1
+  fi
   AC_CHECK_FUNCS_ONCE([wcrtomb])
   if test $ac_cv_func_wcrtomb = no; then
     HAVE_WCRTOMB=0
-  else
-
-    dnl On OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
+  fi
+  if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+    dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
     dnl returns 0 instead of 1.
     AC_REQUIRE([AC_PROG_CC])
     AC_REQUIRE([gt_LOCALE_FR])
@@ -29,10 +33,10 @@
         dnl is present.
 changequote(,)dnl
         case "$host_os" in
-                           # Guess no on OSF/1 and Solaris.
-          osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
-                           # Guess yes otherwise.
-          *)               gl_cv_func_wcrtomb_retval="guessing yes" ;;
+                                   # Guess no on AIX 4, OSF/1 and Solaris.
+          aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+          *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
         esac
 changequote([,])dnl
         if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
@@ -67,7 +71,7 @@
 }],
             [gl_cv_func_wcrtomb_retval=yes],
             [gl_cv_func_wcrtomb_retval=no],
-            [])
+            [:])
         fi
       ])
     case "$gl_cv_func_wcrtomb_retval" in

Modified: nagiosplug/trunk/gl/math.in.h
===================================================================
--- nagiosplug/trunk/gl/math.in.h	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/math.in.h	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,6 +1,6 @@
 /* A GNU-like <math.h>.
 
-   Copyright (C) 2002-2003, 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2007-2009 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
@@ -518,7 +518,8 @@
 extern int gl_signbitd (double arg);
 extern int gl_signbitl (long double arg);
 #  if __GNUC__ >= 2 && !__STRICT_ANSI__
-#   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT
+#   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
+#    define gl_signbitf_OPTIMIZED_MACRO
 #    define gl_signbitf(arg) \
        ({ union { float _value;						\
                   unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
@@ -527,7 +528,8 @@
           (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;		\
         })
 #   endif
-#   if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT
+#   if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
+#    define gl_signbitd_OPTIMIZED_MACRO
 #    define gl_signbitd(arg) \
        ({ union { double _value;						\
                   unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
@@ -536,7 +538,8 @@
           (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;		\
         })
 #   endif
-#   if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT
+#   if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
+#    define gl_signbitl_OPTIMIZED_MACRO
 #    define gl_signbitl(arg) \
        ({ union { long double _value;					\
                   unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \

Modified: nagiosplug/trunk/gl/mbrtowc.c
===================================================================
--- nagiosplug/trunk/gl/mbrtowc.c	2009-05-19 22:16:36 UTC (rev 2193)
+++ nagiosplug/trunk/gl/mbrtowc.c	2009-05-19 22:43:01 UTC (rev 2194)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2008 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2009 Free Software Foundation, Inc.

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list