bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vasnprintf.m4 simplification


From: Bruno Haible
Subject: vasnprintf.m4 simplification
Date: Wed, 7 Mar 2007 02:34:16 +0100
User-agent: KMail/1.5.4

This change causes the "checking for vasnprintf..." test to be executed always.
But it makes the callers of the gl_REPLACE_VASNPRINTF macro more maintainable.

2007-03-06  Bruno Haible  <address@hidden>

        * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
        * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.

--- m4/vasnprintf.m4    5 Mar 2007 00:37:10 -0000       1.12
+++ m4/vasnprintf.m4    7 Mar 2007 01:20:58 -0000
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 8
+# vasnprintf.m4 serial 9
 dnl Copyright (C) 2002-2004, 2006-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,
@@ -7,7 +7,7 @@
 AC_DEFUN([gl_FUNC_VASNPRINTF],
 [
   AC_REQUIRE([gl_EOVERFLOW])
-  AC_CHECK_FUNCS([vasnprintf])
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   if test $ac_cv_func_vasnprintf = no; then
     gl_REPLACE_VASNPRINTF
   fi
@@ -15,6 +15,7 @@
 
 AC_DEFUN([gl_REPLACE_VASNPRINTF],
 [
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   AC_LIBOBJ([vasnprintf])
   AC_LIBOBJ([printf-args])
   AC_LIBOBJ([printf-parse])
--- m4/vasnprintf-posix.m4      5 Mar 2007 00:37:10 -0000       1.3
+++ m4/vasnprintf-posix.m4      7 Mar 2007 01:20:58 -0000
@@ -1,4 +1,4 @@
-# vasnprintf-posix.m4 serial 1
+# vasnprintf-posix.m4 serial 2
 dnl Copyright (C) 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,
@@ -11,7 +11,7 @@
   AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
   AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
   AC_REQUIRE([gl_PRINTF_POSITIONS])
-  AC_CHECK_FUNCS([vasnprintf])
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   if expr "$gl_cv_func_printf_sizes_c99" : ".*yes" > /dev/null \
      && expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null \
      && expr "$gl_cv_func_printf_directive_n" : ".*yes" > /dev/null \
--- m4/vasprintf-posix.m4       5 Mar 2007 00:37:52 -0000       1.1
+++ m4/vasprintf-posix.m4       7 Mar 2007 01:20:58 -0000
@@ -1,4 +1,4 @@
-# vasprintf-posix.m4 serial 1
+# vasprintf-posix.m4 serial 2
 dnl Copyright (C) 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,
@@ -19,7 +19,6 @@
      && test $ac_cv_func_vasprintf = yes; then
     : # vasprintf exists and is already POSIX compliant.
   else
-    AC_CHECK_FUNCS([vasnprintf])
     if ! expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null; then
       AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
         [Define if the vasnprintf implementation needs special code for





reply via email to

[Prev in Thread] Current Thread [Next in Thread]