No subject


Tue Dec 2 03:01:20 GMT 2003


If I do something like the patch below (you need to run autoconf after
applying) it will detect LFS and the resulting smbd seems to work just
fine with large files.

I don't know if you actually have to check for 2.4, if you don't this
becomes identical to the hurd test and the patch much smaller. If there
are known issues with glibc2.1 the test should perhaps require 2.2.

/Urban


--- samba-2.0.7-orig/source/configure.in	Wed Apr 26 01:06:39 2000
+++ samba-2.0.7/source/configure.in	Sat Feb 17 19:28:26 2001
@@ -148,11 +148,41 @@
     ;;
 
 #
-# Tests needed for glibc 2.1 large file support.
-# 
-	*linux*)
-		AC_MSG_RESULT([disabling large file support for glibc2.1 on Linux])     
-		;;
+# Tests for linux LFS support. Need kernel 2.4 and glibc support.
+#
+    *linux*)
+        AC_MSG_CHECKING([for LFS support])
+        old_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+	AC_TRY_RUN([
+#include <unistd.h>
+#include <sys/utsname.h>
+main() {
+#if _LFS64_LARGEFILE == 1
+	struct utsname uts;
+	char *release;
+	int major, minor;
+
+	uname(&uts);
+	release = uts.release;
+	major = atoi(strsep(&release, "."));
+	minor = atoi(strsep(&release, "."));
+
+	if (major > 2 || (major == 2 && minor > 3))
+		exit(0);
+	exit(1);
+#else
+	exit(1);
+#endif
+}
+], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross])
+        CPPFLAGS="$old_CPPFLAGS"
+        if test x$LINUX_LFS_SUPPORT = xyes ; then
+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+        fi
+	AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
+	;;
+
     *hurd*)
         AC_MSG_CHECKING([for LFS support])
         old_CPPFLAGS="$CPPFLAGS"





More information about the samba-technical mailing list