summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-30 13:26:21 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-30 13:26:21 +0200
commit644fdff7c1a80b3cf9a52f422df7f7ed2a084072 (patch)
tree6126ef1d44c7149de26bca96702b0a123868cfe2 /src/configure.in
parent9db580634c0055674017eab535b1b9eec7d6939d (diff)
downloadvim-git-644fdff7c1a80b3cf9a52f422df7f7ed2a084072.tar.gz
A few more fixes for undo file. Split test in two parts so that it doesn't
fail with tiny features.
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in
index 1d8cb09e1..35ecde3b8 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -2988,6 +2988,29 @@ main()
AC_MSG_RESULT($ac_cv_sizeof_int)
AC_DEFINE_UNQUOTED(SIZEOF_INT, $ac_cv_sizeof_int)
+dnl Figure out sizeof(time_t) so that it can be used in #ifdef.
+AC_MSG_CHECKING(size of time_t)
+AC_CACHE_VAL(ac_cv_sizeof_time_t,
+ [AC_TRY_RUN([
+#include <stdio.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#endif
+#include <time.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", (int)sizeof(time_t));
+ exit(0);
+}],
+ ac_cv_sizeof_time_t=`cat conftestval`,
+ AC_MSG_ERROR([failed to determine sizeof(time_t)]),
+ AC_MSG_ERROR([failed to compile test program]))])
+AC_MSG_RESULT($ac_cv_sizeof_time_t)
+AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t)
+
dnl Make sure that uint32_t is really 32 bits unsigned.
AC_MSG_CHECKING([uint32_t is 32 bits])
AC_TRY_RUN([