| Back to the Main Page. | Download the M4 Source. |
AC_FUNC_SNPRINTF
1.1.1.1 (2001/07/26) C_Support @ ac-archive-0.5.32
Caolan McNamara <caolan@skynet.ie>
Provides a test for a fully C9x complient snprintf function. defines HAVE_SNPRINTF if it is found, and sets ac_cv_func_snprintf to yes, otherwise to no.
AC_DEFUN([AC_FUNC_SNPRINTF],
[AC_CACHE_CHECK(for working snprintf, ac_cv_func_snprintf,
[AC_TRY_RUN([#include <stdio.h>
int main () { exit (!(3 <= snprintf(NULL,0,"%d",100))); }
], ac_cv_func_snprintf=yes, ac_cv_func_snprintf=no,
ac_cv_func_snprintf=no)])
if test $ac_cv_func_snprintf = yes; then
AC_DEFINE(HAVE_SNPRINTF)
fi
])