]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
update from gnulib
authorJim Meyering <meyering@redhat.com>
Tue, 27 Jan 2009 10:29:55 +0000 (10:29 +0000)
committerJim Meyering <meyering@redhat.com>
Tue, 27 Jan 2009 10:29:55 +0000 (10:29 +0000)
ChangeLog
gnulib/lib/Makefile.am
gnulib/lib/stdlib.in.h
gnulib/m4/00gnulib.m4 [new file with mode: 0644]
gnulib/m4/extensions.m4
gnulib/m4/gnulib-common.m4
gnulib/m4/gnulib-comp.m4
gnulib/m4/stdlib_h.m4

index 38c700a78fd1ec7e224263dcc9f155821de2519b..15facf3848cd8e1ea159b5a781beec553e3bf9fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jan 27 10:38:09 +0100 2009 Jim Meyering <meyering@redhat.com>
+
+       update from gnulib
+
 Mon Jan 26 20:40:35 +0100 2009 Jim Meyering <meyering@redhat.com>
 
        build: avoid format warnings
index bf558608eb15200e9323bf97a3d0e01d54939a1a..1e23d0985817b418d9632b68c5820abd886aa496 100644 (file)
@@ -686,6 +686,7 @@ stdlib.h: stdlib.in.h
          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' \
index baf21a4415f6420ce7fbde0b9132bffbb598fed0..4e6dfd3bf95c0440e94efbbc909f4e013f34df12 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-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 Lesser General Public License as published by
 # include <sys/loadavg.h>
 #endif
 
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+   from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
 #if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
 # include <stdint.h>
 #endif
diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4
new file mode 100644 (file)
index 0000000..a6b5e21
--- /dev/null
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 1
+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])
index 611fcfdbc402350d9f3e7fdc6f10c5a7a748e5e0..ba6d5e190f9f2df6ae1b080fc8f2d16490b5e3b2 100644 (file)
@@ -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 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 # ------------------------
 # 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])
+])
index cfd1b99f82ed204e10cf865c4e3bb511a711c138..fff9d0f9675e0dd412141766ba360a2157c13f50 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 8
+# gnulib-common.m4 serial 9
 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 @@ dnl with or without modifications, as long as this notice is preserved.
 # 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], [
index 38798431229ac87bcfa076ec8b3de2eeaa2f392b..80281c3c0759bab716c22482209607d23c975e0d 100644 (file)
@@ -408,6 +408,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/w32sock.h
   lib/wchar.in.h
   lib/xsize.h
+  m4/00gnulib.m4
   m4/alloca.m4
   m4/arpa_inet_h.m4
   m4/close.m4
index 582db13dffa0080a12b651d532b4ed8a2280aec7..515befeb7e962adf71c50171bf854d0a3402ca1e 100644 (file)
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 13
-dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 14
+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_DEFUN([gl_STDLIB_H],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_CHECK_NEXT_HEADERS([stdlib.h])
+  AC_CHECK_HEADERS([random.h])
+  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],