1 #serial 1 -*- autoconf -*-
4 AC_DEFUN(jm_SYS_OFF_T_PRINTF_FORMAT,
6 AC_CHECK_HEADERS(string.h stdlinb.h)
7 AC_CACHE_CHECK([for printf format that works with type off_t],
8 jm_cv_sys_off_t_printf_format,
10 for i in '' L ll q; do
12 export jm_OFF_T_FORMAT
14 # include <sys/types.h>
26 static off_t x[] = {1, 255, 65535, 99999999};
29 /* this envvar should have one of these values: "", "L", "ll", "q" */
30 char *f = getenv ("jm_OFF_T_FORMAT");
31 sprintf (fmt, "%%%sd %%%sx %%%sx %%%sd", f, f, f, f);
33 sprintf (buf, fmt, x[0], x[1], x[2], x[3]);
34 exit (strcmp (buf, "1 ff ffff 99999999"));
36 ], jm_cv_sys_off_t_printf_format=yes dnl The library version works.
37 , jm_cv_sys_off_t_printf_format=no dnl The library version does NOT work.
38 , jm_cv_sys_off_t_printf_format=no dnl We're cross compiling.
44 if test $am_cv_func_working_getline = no; then