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], [
11 memset(buf, 0, sizeof(buf));
12 snprintf(buf, 8, "%zu", sizeof(char));
13 if (buf[0] == '1' && buf[1] == '\0') {
19 [openafs_cv_printf_takes_z="yes"],
20 [openafs_cv_printf_takes_z="no"],
21 [openafs_cv_printf_takes_z="no"])
24 if test "x$openafs_cv_printf_takes_z" = "xyes"; then
25 AC_DEFINE([PRINTF_TAKES_Z_LEN], 1, [define if printf and friends understand the %z length modifier])