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

CVS commit program cvs at parl.clemson.edu
Fri Dec 1 02:23:17 EST 2006


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

Modified Files:
      Tag: pvfs-2-6-branch
	kernel.m4 
Log Message:
fix problems on ppc64:

* make all segment count variables unsigned long
* cleanup warnings caused by config checks failing due to warnings
* cleanup warnings caused by invalid llu macros defined from configure


Index: kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
diff -p -u -r1.21 -r1.21.6.1
--- kernel.m4	24 Oct 2006 15:51:59 -0000	1.21
+++ kernel.m4	1 Dec 2006 07:23:17 -0000	1.21.6.1
@@ -381,23 +381,26 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 	if test "x$have_xattr" = "xyes"; then
 	   dnl Test to check if setxattr function has a const void * argument
 	   AC_MSG_CHECKING(for const argument to setxattr function)
-	   tmp_cflags=$CFLAGS
 	   dnl if this test passes, there is a const void* argument
-	   CFLAGS="$CFLAGS -Werror"
 	   AC_TRY_COMPILE([
 		#define __KERNEL__
 		#include <linux/fs.h>
-		int pvfs2_setxattr(struct dentry *dentry, const char *name,
-		const void *value, size_t size, int flags) { return (0);};
-		static struct inode_operations in_op = {
-			.setxattr = pvfs2_setxattr
-		};
-		], [],
+		], 
+		[
+			struct inode_operations inode_ops;
+			int ret;
+			struct dentry * dent = NULL;
+			const char * name = NULL;
+			const void * val = NULL;
+			size_t size = 0;
+			int flags = 0;
+
+			ret = inode_ops.setxattr(dent, name, val, size, flags);
+		],
 		AC_MSG_RESULT(yes)
 		AC_DEFINE(HAVE_SETXATTR_CONST_ARG, 1, Define if kernel setxattr has const void* argument),
 		AC_MSG_RESULT(no)
 		)
-		CFLAGS=$tmp_cflags
 	fi
 
 	dnl Test to see if sysctl proc handlers have a 6th argument
@@ -566,25 +569,24 @@ AC_DEFUN([AX_KERNEL_FEATURES],
 	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,
-		};
-		], [],
+		], 
+                [
+			struct address_space_operations aso;
+
+			int ret;
+			struct page * page = NULL;
+			unsigned long offset;
+
+			ret = aso.invalidatepage(page, offset);
+		],
 		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
 
 	dnl In 2.6.18.1 and newer, including <linux/config.h> will throw off a
 	dnl warning 



More information about the Pvfs2-cvs mailing list