build: Require 64-bit files support and do not define HAVE_EXPLICIT_LARGEFILE_SUPPORT
authorAndrew Bartlett <abartlet@samba.org>
Tue, 27 Mar 2012 22:47:53 +0000 (09:47 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 00:39:08 +0000 (02:39 +0200)
buildtools/wafsamba/wscript
source3/configure.in
source3/wscript

index 49d21078c47aa5759266a58b1536736b4637dc17..a302280038aa62d829f420553bcfb241f88ee8e3 100755 (executable)
@@ -362,7 +362,8 @@ def configure(conf):
     conf.CHECK_HEADERS('limits.h assert.h')
 
     # see if we need special largefile flags
-    conf.CHECK_LARGEFILE()
+    if not conf.CHECK_LARGEFILE():
+        raise Utils.WafError('Samba requires large file support support, but not available on this platform: sizeof(off_t) < 8')
 
     if 'HAVE_STDDEF_H' in conf.env and 'HAVE_STDLIB_H' in conf.env:
         conf.DEFINE('STDC_HEADERS', 1)
index ba9ae375feb37deb8ef85821fd5daaa73e549872..74c962652f784616738d641c152181a92066171e 100644 (file)
@@ -5268,25 +5268,23 @@ fi
 #
 # As a gating factor for large file support, in order to
 # use <4GB files we must have the following minimal support
-# available.
-# long long, and a 64 bit off_t or off64_t.
-# If we don't have all of these then disable large
-# file 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(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
+#if (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))
 #include <sys/types.h>
 #else
 __COMPILE_ERROR_
 #endif
 ],
 [int i],
-samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes,samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no)
-if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
-       AC_DEFINE(HAVE_EXPLICIT_LARGEFILE_SUPPORT,1,[Whether large file support can be enabled])
+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_EXPLICIT_LARGEFILE_SUPPORT])
+AC_MSG_RESULT([$samba_cv_HAVE_LARGEFILE_SUPPORT])
 
 
 #################################################
index dc80bdbbfdc3fcef3e0a79c3ef7fab3d53237ba4..1e703dd2b17f56496f5f3968bab61483a18a9994 100644 (file)
@@ -356,16 +356,6 @@ return acl_get_perm_np(permset_d, perm);
                 headers='unistd.h fcntl.h')
     conf.CHECK_DECLS('readahead', headers='fcntl.h', always=True)
 
-    conf.CHECK_CODE('''
-                #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
-                #include <sys/types.h>
-                #else
-                __COMPILE_ERROR_
-                #endif
-                int i;''',
-                'HAVE_EXPLICIT_LARGEFILE_SUPPORT',
-                msg="Checking whether large file support can be enabled")
-
     if Options.options.with_aio_support:
         conf.CHECK_FUNCS_IN('aio_read', 'aio')
         conf.CHECK_FUNCS_IN('aio_read', 'rt')