Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:7f0131cf03fd4e10ff131d75eb8fa0c5f2a721a2
Author...:karl <>
Committer:karl <>
Date.....:Fri Nov 10 14:23:27 2006 +0000
Parents..:a99a80a41cb9d9aa989ecdebba46c8b3a87f3dae

Message
[project @ 2006-11-10 14:23:27 by karl]
gnulib update

Changes
diff --git a/gnulib/lib/quotearg.c b/gnulib/lib/quotearg.c
line changes: +28/-6
index dae2915..6f3ee9e
--- a/gnulib/lib/quotearg.c
+++ b/gnulib/lib/quotearg.c
@@ -567,6 +567,34 @@ struct slotvec
   char *val;
 };
 
+/* Preallocate a slot 0 buffer, so that the caller can always quote
+   one small component of a "memory exhausted" message in slot 0.  */
+static char slot0[256];
+static unsigned int nslots = 1;
+static struct slotvec slotvec0 = {sizeof slot0, slot0};
+static struct slotvec *slotvec = &slotvec0;
+
+void
+quotearg_free (void)
+{
+  struct slotvec *sv = slotvec;
+  unsigned int i;
+  for (i = 1; i < nslots; i++)
+    free (sv[i].val);
+  if (sv[0].val != slot0)
+    {
+      free (sv[0].val);
+      slotvec0.size = sizeof slot0;
+      slotvec0.val = slot0;
+    }
+  if (sv != &slotvec0)
+    {
+      free (sv);
+      slotvec = &slotvec0;
+    }
+  nslots = 1;
+}
+
 /* Use storage slot N to return a quoted version of argument ARG.
    ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a
    null-terminated string.
@@ -581,13 +609,7 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
 {
   int e = errno;
 
-  /* Preallocate a slot 0 buffer, so that the caller can always quote
-     one small component of a "memory exhausted" message in slot 0.  */
-  static char slot0[256];
-  static unsigned int nslots = 1;
   unsigned int n0 = n;
-  static struct slotvec slotvec0 = {sizeof slot0, slot0};
-  static struct slotvec *slotvec = &slotvec0;
   struct slotvec *sv = slotvec;
 
   if (n < 0)

diff --git a/gnulib/lib/quotearg.h b/gnulib/lib/quotearg.h
line changes: +5/-2
index 24f26f7..4887df3
--- a/gnulib/lib/quotearg.h
+++ b/gnulib/lib/quotearg.h
@@ -1,7 +1,7 @@
 /* quotearg.h - quote arguments for output
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Free Software
-   Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Free
+   Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -134,4 +134,7 @@ char *quotearg_char (char const *arg, char ch);
 /* Equivalent to quotearg_char (ARG, ':').  */
 char *quotearg_colon (char const *arg);
 
+/* Free any dynamically allocated memory.  */
+void quotearg_free (void);
+
 #endif /* !QUOTEARG_H_ */

diff --git a/gnulib/m4/inline.m4 b/gnulib/m4/inline.m4
line changes: +21/-5
index 18f8ebf..2810dd1
--- a/gnulib/m4/inline.m4
+++ b/gnulib/m4/inline.m4
@@ -1,4 +1,4 @@
-# inline.m4 serial 1
+# inline.m4 serial 2
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,13 +7,29 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl Test for the 'inline' keyword or equivalent.
 dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
 dnl like AC_C_INLINE does.  Also, define HAVE_INLINE if 'inline' or an
-dnl equivalent is supported, i.e. if the compiler is likely to drop unused
-dnl 'static inline' functions.
+dnl equivalent is effectively supported, i.e. if the compiler is likely to
+dnl drop unused 'static inline' functions.
 AC_DEFUN([gl_INLINE],
 [
   AC_REQUIRE([AC_C_INLINE])
-  if test $ac_cv_c_inline != no; then
+  AC_CACHE_CHECK([whether the compiler generally respects inline],
+    [gl_cv_c_inline_effective],
+    [if test $ac_cv_c_inline = no; then
+       gl_cv_c_inline_effective=no
+     else
+       dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+       dnl specified.
+       AC_EGREP_CPP([bummer], [
+         #ifdef __NO_INLINE__
+         bummer
+         #endif
+       ], [gl_cv_c_inline_effective=no], [gl_cv_c_inline_effective=yes])
+     fi
+    ])
+  if test $gl_cv_c_inline_effective = yes; then
     AC_DEFINE([HAVE_INLINE], 1,
-      [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline'.])
+      [Define to 1 if the compiler supports one of the keywords
+       'inline', '__inline__', '__inline' and effectively inlines
+       functions marked as such.])
   fi
 ])

diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4
line changes: +3/-3
index 48e70fc..1f9e862
--- a/gnulib/m4/longlong.m4
+++ b/gnulib/m4/longlong.m4
@@ -1,4 +1,4 @@
-# longlong.m4 serial 9
+# longlong.m4 serial 10
 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -52,9 +52,9 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
 	       return 0;]])],
 	  [ac_cv_type_long_long_int=yes],
 	  [ac_cv_type_long_long_int=no],
-	  [ac_cv_type_long_long_int=cross-compiling])],
+	  [ac_cv_type_long_long_int=yes])],
        [ac_cv_type_long_long_int=no])])
-  if test $ac_cv_type_long_long_int != no; then
+  if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], 1,
       [Define to 1 if the system has the type `long long int'.])
   fi

This website is licensed under AGPL-3.0. Feel free to copy!