1 dnl ### A macro to determine if off_t is a long long
2 AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
3 [AC_MSG_CHECKING(for long long off_t)
4 AC_CACHE_VAL(ac_cv_have_long_long_off_t,
5 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
6 char a[(sizeof (off_t) == sizeof (long long) &&
7 sizeof (off_t) > sizeof (long)) - 1];
8 ]])],[ac_cv_have_long_long_off_t=yes],[ac_cv_have_long_long_off_t=no])])
9 AC_MSG_RESULT($ac_cv_have_long_long_off_t)
10 if test "$ac_cv_have_long_long_off_t" = yes
12 AC_DEFINE([HAVE_LONG_LONG_OFF_T], 1, [Define if off_t is a long long.])
16 dnl ### A macro to determine if rlim_t is a long long
17 AC_DEFUN([AC_RLIM_T_IS_LONG_LONG],
18 [AC_MSG_CHECKING(for long long rlim_t)
19 AC_CACHE_VAL(ac_cv_have_long_long_rlim_t,
20 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
22 #include <sys/resource.h>
23 char a[(sizeof (rlim_t) == sizeof (long long) &&
24 sizeof (rlim_t) > sizeof (long)) - 1];
25 ]])],[ac_cv_have_long_long_rlim_t=yes],[ac_cv_have_long_long_rlim_t=no])])
26 AC_MSG_RESULT($ac_cv_have_long_long_rlim_t)
27 if test "$ac_cv_have_long_long_rlim_t" = yes
29 AC_DEFINE([HAVE_LONG_LONG_RLIM_T], 1, [Define if rlim_t is a long long.])
33 dnl ### A macro to determine endianness of long long
34 AC_DEFUN([AC_LITTLE_ENDIAN_LONG_LONG],
35 [AC_MSG_CHECKING(for little endian long long)
36 AC_CACHE_VAL(ac_cv_have_little_endian_long_long,
37 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
44 if (u.l[0] == 0x12345678)
48 ]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[
49 if test "x$ac_cv_c_bigendian" = "xyes"; then
50 ac_cv_have_little_endian_long_long=no
52 ac_cv_have_little_endian_long_long=yes
55 AC_MSG_RESULT($ac_cv_have_little_endian_long_long)
56 if test "$ac_cv_have_little_endian_long_long" = yes
58 AC_DEFINE([HAVE_LITTLE_ENDIAN_LONG_LONG], 1,
59 [Define if long long is little-endian.])