New module 'stdarg'.
authorBruno Haible <bruno@clisp.org>
Mon, 8 May 2006 13:13:13 +0000 (13:13 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 8 May 2006 13:13:13 +0000 (13:13 +0000)
ChangeLog
MODULES.html.sh
m4/ChangeLog
m4/stdarg.m4 [new file with mode: 0644]
modules/stdarg [new file with mode: 0644]

index 626a2c7..d4a6dfd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
+2006-05-08  Bruno Haible  <bruno@clisp.org>
+
+       * modules/stdarg: New file.
+       * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
+
 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
 
-2006-04-25  Bruno Haible  <bruno@clisp.org>
+2006-04-29  Bruno Haible  <bruno@clisp.org>
 
        * gnulib-tool: Make --update option actually work.
 
index f2dcdfc..57ce10f 100755 (executable)
@@ -1665,6 +1665,16 @@ func_all_modules ()
   func_module size_max
   func_end_table
 
+  element="Variable arguments <stdarg.h>"
+  element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
+  func_section_wrap isoc_sup_stdarg
+  func_wrap H3
+  func_echo "$element"
+
+  func_begin_table
+  func_module stdarg
+  func_end_table
+
   element="Boolean type and values <stdbool.h>"
   element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
   func_section_wrap isoc_sup_stdbool
index b60da3c..97b0dca 100644 (file)
@@ -1,3 +1,7 @@
+2006-05-08  Bruno Haible  <bruno@clisp.org>
+
+       * stdarg.m4: New file, from GNU gettext.
+
 2006-05-05  Jim Meyering  <jim@meyering.net>
 
        * warning.m4: New file, derived from bison's file by the same name.
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
new file mode 100644 (file)
index 0000000..3424d41
--- /dev/null
@@ -0,0 +1,39 @@
+# stdarg.m4 serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Provide a working va_copy in combination with <stdarg.h>.
+
+AC_DEFUN([gl_STDARG_H],
+[
+  AC_MSG_CHECKING([for va_copy])
+  AC_CACHE_VAL([gl_cv_func_va_copy], [
+    AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+],
+      [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
+  AC_MSG_RESULT([$gl_cv_func_va_copy])
+  if test $gl_cv_func_va_copy = no; then
+    # Provide a substitute, either __va_copy or as a simple assignment.
+    AC_CACHE_VAL([gl_cv_func___va_copy], [
+      AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+        [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+    if test $gl_cv_func___va_copy = yes; then
+      AC_DEFINE([va_copy], [__va_copy],
+        [Define as a macro for copying va_list variables.])
+    else
+      AH_VERBATIM([#define gl_va_copy(a,b) (a) = (b)])
+      AC_DEFINE([va_copy], [gl_va_copy],
+        [Define as a macro for copying va_list variables.])
+    fi
+  fi
+])
diff --git a/modules/stdarg b/modules/stdarg
new file mode 100644 (file)
index 0000000..01acff8
--- /dev/null
@@ -0,0 +1,21 @@
+Description:
+An <stdarg.h> that conforms to C99.
+
+Files:
+m4/stdarg.m4
+
+Depends-on:
+
+configure.ac:
+gl_STDARG_H
+
+Makefile.am:
+
+Include:
+#include <stdarg.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible