vsnprintf.h is replaced with <stdio.h>.
authorBruno Haible <bruno@clisp.org>
Wed, 21 Feb 2007 02:21:08 +0000 (02:21 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 21 Feb 2007 02:21:08 +0000 (02:21 +0000)
ChangeLog
lib/vsnprintf.c
lib/vsnprintf.h [deleted file]
m4/vsnprintf.m4
modules/vsnprintf

index 25a74f3..0208eda 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-02-20  Bruno Haible  <bruno@clisp.org>
 
+       * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
+       (Depends-on): Add stdio.
+       (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
+       (Include): Use <stdio.h> instead of vsnprintf.h.
+       * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
+       HAVE_DECL_VSNPRINTF.
+       * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
+
        * modules/snprintf (Files): Remove lib/snprintf.h.
        (Depends-on): Add stdio.
        (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
index af567d2..d84e4de 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
    Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
 
    This program is free software; you can redistribute it and/or modify
 #endif
 
 /* Specification.  */
-#include "vsnprintf.h"
+#include <stdio.h>
 
 #include <errno.h>
 #include <limits.h>
 #include <stdarg.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/lib/vsnprintf.h b/lib/vsnprintf.h
deleted file mode 100644 (file)
index f80c77a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Formatted output to strings.
-   Copyright (C) 2004 Free Software Foundation, Inc.
-   Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef VSNPRINTF_H
-#define VSNPRINTF_H
-
-#include <stdarg.h>
-
-/* Get vsnprintf declaration, if available.  */
-#include <stdio.h>
-
-#if defined HAVE_DECL_VSNPRINTF && !HAVE_DECL_VSNPRINTF
-int vsnprintf (char *str, size_t size, const char *format, va_list args);
-#endif
-
-#endif /* VSNPRINTF_H */
index cb8a9b1..2b9bb4e 100644 (file)
@@ -1,13 +1,17 @@
-# vsnprintf.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# vsnprintf.m4 serial 3
+dnl Copyright (C) 2002, 2003, 2004, 2007 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_VSNPRINTF],
 [
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REPLACE_FUNCS(vsnprintf)
   AC_CHECK_DECLS_ONCE(vsnprintf)
+  if test $ac_cv_have_decl_vsnprintf = no; then
+    HAVE_DECL_VSNPRINTF=0
+  fi
   gl_PREREQ_VSNPRINTF
 ])
 
index 81510cb..0ae33e6 100644 (file)
@@ -3,21 +3,22 @@ vsnprintf() function: print formatted output from an stdarg argument list
 to a fixed length string
 
 Files:
-lib/vsnprintf.h
 lib/vsnprintf.c
 m4/vsnprintf.m4
 
 Depends-on:
+stdio
 vasnprintf
 minmax
 
 configure.ac:
 gl_FUNC_VSNPRINTF
+gl_STDIO_MODULE_INDICATOR([vsnprintf])
 
 Makefile.am:
 
 Include:
-"vsnprintf.h"
+<stdio.h>
 
 License:
 LGPL