summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-28 10:56:54 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:08 +0200
commite1b7a5c750cf1dc09d7e14909234c7079ee9fabf (patch)
tree35b9a4c737aa82788f3c33d641566e573a9bd4fa /source3
parenta329c72f0718d593d1215924814a8bd2b5df4a77 (diff)
downloadsamba-e1b7a5c750cf1dc09d7e14909234c7079ee9fabf.tar.gz
samba-e1b7a5c750cf1dc09d7e14909234c7079ee9fabf.tar.bz2
samba-e1b7a5c750cf1dc09d7e14909234c7079ee9fabf.zip
build: combine off_t 64 bit and largefile test
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in34
1 files changed, 10 insertions, 24 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5aaa4587d4..e278a390b0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2071,13 +2071,21 @@ if test x"$samba_cv_TIME_T_MAX" = x"yes"; then
fi
+#
+# As a gating factor for large file support, in order to
+# use >4GB files we must have the following minimal support
+# available: a 64 bit off_t
+# If we don't have all of these then fail the build
+#
+
+AC_MSG_CHECKING([if large file support can be enabled])
AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[
AC_TRY_RUN([#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(off_t) == 8) ? 0 : 1); }],
samba_cv_SIZEOF_OFF_T=yes,samba_cv_SIZEOF_OFF_T=no,samba_cv_SIZEOF_OFF_T=cross)])
-if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
- AC_DEFINE(SIZEOF_OFF_T,8,[The size of the 'off_t' type])
+if test x"$samba_cv_SIZEOF_OFF_T" = x"no"; then
+ AC_MSG_ERROR(["large file support support not available: sizeof(off_t) != 8"])
fi
AC_CACHE_CHECK([for 64 bit ino_t],samba_cv_SIZEOF_INO_T,[
@@ -5067,28 +5075,6 @@ if test $space = no; then
fi
fi
-#
-# As a gating factor for large file support, in order to
-# use <4GB files we must have the following minimal support
-# available: a 64 bit off_t
-# If we don't have all of these then fail the build
-#
-AC_MSG_CHECKING([if large file support can be enabled])
-AC_TRY_COMPILE([
-#if (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))
-#include <sys/types.h>
-#else
-__COMPILE_ERROR_
-#endif
-],
-[int i],
-samba_cv_HAVE_LARGEFILE_SUPPORT=yes,samba_cv_HAVE_LARGEFILE_SUPPORT=no)
-if test x"$samba_cv_HAVE_LARGEFILE_SUPPORT" != x"yes"; then
- AC_MSG_ERROR(["large file support support not available: sizeof(off_t) != 8"])
-fi
-AC_MSG_RESULT([$samba_cv_HAVE_LARGEFILE_SUPPORT])
-
-
#################################################
# check for cluster extensions