+2010-02-09 Eric Blake <ebb9@byu.net>
+ and Bruno Haible <bruno@clisp.org>
+
+ obstack-printf-posix: ensure declaration
+ * m4/obstack-printf.m4 (gl_DECL_OBSTACK_PRINTF): New macro,
+ extracted from gl_FUNC_OBSTACK_PRINTF.
+ (gl_FUNC_OBSTACK_PRINTF): Invoke it.
+ * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
+ Likewise.
+ * lib/stdio.in.h (obstack_printf, obstack_vprintf): Declare also
+ if GNULIB_OBSTACK_PRINTF_POSIX is 1 and GNULIB_OBSTACK_PRINTF is
+ 0.
+
2010-02-08 Bruno Haible <bruno@clisp.org>
gnulib-tool: Fix typo in 2010-02-07 commit.
# endif
#endif
-#if @GNULIB_OBSTACK_PRINTF@
+#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
# if @REPLACE_OBSTACK_PRINTF@
# define obstack_printf rpl_osbtack_printf
# define obstack_vprintf rpl_obstack_vprintf
-# obstack-printf-posix.m4 serial 3
+# obstack-printf-posix.m4 serial 4
dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_REPLACE_VASNPRINTF
gl_REPLACE_OBSTACK_PRINTF
fi
+ gl_DECL_OBSTACK_PRINTF
])
-# obstack-printf.m4 serial 2
+# obstack-printf.m4 serial 3
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_REPLACE_OBSTACK_PRINTF
fi
- AC_CHECK_DECLS_ONCE([obstack_printf])
- if test $ac_cv_have_decl_obstack_printf = no; then
- HAVE_DECL_OBSTACK_PRINTF=0
- fi
+ gl_DECL_OBSTACK_PRINTF
])
AC_DEFUN([gl_REPLACE_OBSTACK_PRINTF],
REPLACE_OBSTACK_PRINTF=1
fi
])
+
+dnl Ensure obstack_printf() and obstack_vprintf() are declared
+dnl (whether or not they are being replaced).
+AC_DEFUN([gl_DECL_OBSTACK_PRINTF],
+[
+ AC_CHECK_DECLS_ONCE([obstack_printf])
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+])