[Pvfs2-cvs] commit by vilayann in pvfs2-1/maint/config: kernel.m4

CVS commit program cvs at parl.clemson.edu
Wed Aug 9 16:17:29 EDT 2006


Update of /projects/cvsroot/pvfs2-1/maint/config
In directory parlweb1:/tmp/cvs-serv7687/maint/config

Modified Files:
      Tag: posix-extensions-branch
	kernel.m4 
Log Message:
Reverse merge changes from HEAD to posix-extensions-branch.



Index: kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/maint/config/kernel.m4,v
diff -p -u -r1.5.2.6 -r1.5.2.7
--- kernel.m4	31 May 2006 02:07:38 -0000	1.5.2.6
+++ kernel.m4	9 Aug 2006 20:17:29 -0000	1.5.2.7
@@ -15,7 +15,7 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 
 	NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
 
-	CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty)"
+	CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
 
 
 	AC_MSG_CHECKING(for i_size_write in kernel)
@@ -230,21 +230,6 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 		have_aio=no
 	)
 
-	AC_MSG_CHECKING(for touch_atime support in kernel)
-	AC_TRY_COMPILE([
-		#define __KERNEL__
-		#include <linux/fs.h>
-		void stuff()
-		{
-			struct vfsmnount *mnt;
-			struct dentry *dentry; 
-			touch_atime(mnt, dentry);
-		}
-		], [],
-		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_TOUCH_ATIME, 1, Define if kernel has touch_atime routine),
-		AC_MSG_RESULT(no)
-	)
 	if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then
 		AC_MSG_CHECKING(for ki_dtor in kiocb structure of kernel)
 		dnl if this test passes, the kernel does have it and we enable
@@ -264,6 +249,43 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 		)
 	fi
 
+	tmp_cflags=$CFLAGS
+	dnl if this test passes, there is a struct dentry* argument
+	CFLAGS="$CFLAGS -Werror"
+	AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument)
+	dnl if this test passes, the kernel has it
+	dnl if this test fails, the kernel does not have it
+	AC_TRY_COMPILE([
+		#define __KERNEL__
+		#include <linux/fs.h>
+		extern int pvfs_statfs(struct dentry *, struct kstatfs *);
+			  static struct super_operations s_op = {
+				  .statfs = pvfs_statfs,
+			  };
+		], [],
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(HAVE_DENTRY_STATFS_SOP, 1, Define if statfs callback has struct dentry argument),
+		AC_MSG_RESULT(no)
+	)
+
+	AC_MSG_CHECKING(if get_sb callbacks' in kernel has struct vfsmount argument)
+	dnl if this test passes, the kernel has it
+	dnl if this test fails, the kernel does not have it
+	AC_TRY_COMPILE([
+		#define __KERNEL__
+		#include <linux/fs.h>
+		#include <linux/mount.h>
+		extern int pvfs_get_sb(struct file_system_type *fst, int flags, const char *devname, void *data, struct vfsmount *);
+			  static struct file_system_type fst = {
+				  .get_sb = pvfs_get_sb,
+			  };
+		], [],
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(HAVE_VFSMOUNT_GETSB, 1, Define if get_sb callback has struct vfsmount argument),
+		AC_MSG_RESULT(no)
+	)
+	CFLAGS=$tmp_cflags
+
 	AC_MSG_CHECKING(for xattr support in kernel)
 	dnl if this test passes, the kernel has it
 	dnl if this test fails, the kernel does not have it
@@ -343,6 +365,10 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 		 #endif
 		 ] )
 
+	AC_CHECK_HEADERS([linux/mount.h], [], [], 
+		[#define __KERNEL__
+		 #include <linux/mount.h>
+		 ] )
 	AC_CHECK_HEADERS([linux/ioctl32.h], [], [], 
 		[#define __KERNEL__
 		 #include <linux/ioctl32.h>
@@ -440,6 +466,31 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 	    AC_DEFINE(HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK, 1, Define if return value from follow_link in inode_operations is type int),
 	    AC_MSG_RESULT(no)
 	)
+
+	dnl more 2.6 api changes.  return type for the invalidatepage
+	dnl address_space_operation is 'void' in new kernels but 'int' in old
+	dnl I had to turn on -Werror for this test because i'm not sure how
+	dnl else to make dnl "initialization from incompatible pointer type"
+	dnl fail.  
+	tmp_cflags=${CFLAGS}
+	CFLAGS="${CFLAGS} -Werror"
+	AC_MSG_CHECKING(for older int return in invalidatepage)
+	AC_TRY_COMPILE([
+		#define __KERNEL__
+		#include <linux/fs.h>
+		static int cfg_invalidate_page(struct page * page, unsigned long offset) {
+			return 0;
+		}
+		struct address_space_operations aso = 
+		{
+		    .invalidatepage = cfg_invalidate_page,
+		};
+		], [],
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE, 1, Define if return type of invalidatepage should be int),
+		AC_MSG_RESULT(NO)
+		)
+	CFLAGS=$tmp_cflags
 
 	AC_MSG_CHECKING(for compat_ioctl member in file_operations structure)
 	AC_TRY_COMPILE([



More information about the Pvfs2-cvs mailing list