1 AC_DEFUN([OPENAFS_PRINTF_TAKES_Z_LEN],
3 AC_CACHE_CHECK([whether printf understands the %z length modifier],
4 [openafs_cv_printf_takes_z],
12 memset(buf, 0, sizeof(buf));
13 snprintf(buf, 8, "%zu", sizeof(char));
14 if (buf[0] == '1' && buf[1] == '\0') {
20 [openafs_cv_printf_takes_z="yes"],
21 [openafs_cv_printf_takes_z="no"],
22 [openafs_cv_printf_takes_z="no"])
25 if test "x$openafs_cv_printf_takes_z" = "xyes"; then
26 AC_DEFINE([PRINTF_TAKES_Z_LEN], 1,
27 [define if printf and friends understand the %z length modifier])