autoconf: reformat long lines
[openafs.git] / src / cf / sizet.m4
1 AC_DEFUN([OPENAFS_PRINTF_TAKES_Z_LEN],
2 [
3 AC_CACHE_CHECK([whether printf understands the %z length modifier],
4 [openafs_cv_printf_takes_z],
5   [AC_RUN_IFELSE(
6     [AC_LANG_SOURCE([[
7 #include <stdio.h>
8 #include <string.h>
9
10 int main(void) {
11         char buf[8];
12         memset(buf, 0, sizeof(buf));
13         snprintf(buf, 8, "%zu", sizeof(char));
14         if (buf[0] == '1' && buf[1] == '\0') {
15                 return 0;
16         } else {
17                 return 1;
18         }
19 }]])],
20     [openafs_cv_printf_takes_z="yes"],
21     [openafs_cv_printf_takes_z="no"],
22     [openafs_cv_printf_takes_z="no"])
23 ])
24
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])
28 fi
29 ])