[Pvfs2-cvs] commit by slang in pvfs2/src/common/misc: pvfs2-internal.h

CVS commit program cvs at parl.clemson.edu
Fri Dec 1 04:53:34 EST 2006


Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv849/src/common/misc

Modified Files:
	pvfs2-internal.h 
Log Message:
merge of bug fixes commmitted to 2.6 branch


Index: pvfs2-internal.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-internal.h,v
diff -p -u -r1.6 -r1.7
--- pvfs2-internal.h	26 Sep 2006 03:44:17 -0000	1.6
+++ pvfs2-internal.h	1 Dec 2006 09:53:34 -0000	1.7
@@ -25,6 +25,27 @@
  * specifier and a parameter are mismatched, that machine will issue
  * a warning, while 64-bit machines will silently perform the cast.
  */
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+#ifdef BITS_PER_LONG
+/* don't use SIZEOF_* fields generated at configure */
+#if BITS_PER_LONG == 32
+#  define llu(x) (x)
+#  define lld(x) (x)
+#  define SCANF_lld "%lld"
+#elif BITS_PER_LONG == 64
+#  define llu(x) (unsigned long long)(x)
+#  define lld(x) (long long)(x)
+#define SCANF_lld "%ld"
+#else
+#  error Unexpected  BITS_PER_LONG
+#endif
+
+#else
+ 
 #if SIZEOF_LONG_INT == 4 
 #  define llu(x) (x)
 #  define lld(x) (x)
@@ -36,6 +57,8 @@
 #else
 #  error Unexpected sizeof(long int)
 #endif
+
+#endif /* BITS_PER_LONG */
 
 /* key string definition macros.  These are used by the server and
  * by the client (in the case of xattrs with viewdist, etc).



More information about the Pvfs2-cvs mailing list