diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-10-02 19:26:43 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-10-02 19:26:43 -0400 |
commit | e66e7a75b3bc20f3aec5536c458ad8c53582125c (patch) | |
tree | 8ccebe30fb13dbcbe48f35714befca218694578e /build_posix | |
parent | 4e0b75067edb5eb0b09f27f45d381304e47177bd (diff) | |
download | mongo-e66e7a75b3bc20f3aec5536c458ad8c53582125c.tar.gz |
Typedef wt_off_t as an off_t if the type is available on the system.
Fix long lines.
Diffstat (limited to 'build_posix')
-rw-r--r-- | build_posix/aclocal/types.m4 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/build_posix/aclocal/types.m4 b/build_posix/aclocal/types.m4 index 4e01965ef9b..439034c89d2 100644 --- a/build_posix/aclocal/types.m4 +++ b/build_posix/aclocal/types.m4 @@ -12,12 +12,10 @@ AC_DEFUN([AM_TYPES], [ AC_SUBST(wiredtiger_includes_decl) wiredtiger_includes_decl="$std_includes" - # We require FILE, off_t, pid_t, size_t, ssize_t, time_t, uintmax_t + # We require FILE, pid_t, size_t, ssize_t, time_t, uintmax_t # and uintptr_t. AC_SUBST(FILE_t_decl) AC_CHECK_TYPE(FILE *,, AC_MSG_ERROR([No FILE type.]), $std_includes) - AC_SUBST(off_t_decl) - AC_CHECK_TYPE(off_t,, AC_MSG_ERROR([No off_t type.]), $std_includes) AC_SUBST(pid_t_decl) AC_CHECK_TYPE(pid_t,, AC_MSG_ERROR([No pid_t type.]), $std_includes) AC_SUBST(size_t_decl) @@ -27,6 +25,14 @@ AC_DEFUN([AM_TYPES], [ AC_SUBST(time_t_decl) AC_CHECK_TYPE(time_t,, AC_MSG_ERROR([No time_t type.]), $std_includes) + # We require off_t, but use a local version for portability to Windows + # where it's 4B, not 8B. + AC_SUBST(off_t_decl) + AC_CHECK_TYPE(off_t, + [off_t_decl="typedef off_t wt_off_t;"], + [AC_MSG_ERROR([No off_t type.])], + $std_includes) + # Some systems don't have a uintmax_t type (for example, FreeBSD 6.2. # In this case, use an unsigned long long. AC_SUBST(uintmax_t_decl) |