[Pvfs2-cvs] commit by pw in pvfs2/include: pvfs2-types.h
CVS commit program
cvs at parl.clemson.edu
Thu Jul 19 18:28:26 EDT 2007
Update of /projects/cvsroot/pvfs2/include
In directory parlweb1:/tmp/cvs-serv20789/include
Modified Files:
pvfs2-types.h
Log Message:
A couple more error values not on some random machine. Also avoid the error in case statements when you find more than one of these unhandled things.
Index: pvfs2-types.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-types.h,v
diff -u -p -p -u -r1.142 -r1.143
--- pvfs2-types.h 6 Jul 2007 05:23:19 -0000 1.142
+++ pvfs2-types.h 19 Jul 2007 22:28:26 -0000 1.143
@@ -21,6 +21,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <limits.h>
+#include <errno.h>
#endif
#ifndef INT32_MAX
@@ -28,6 +29,10 @@
#define INT32_MAX (2147483647)
#endif
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
+
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
@@ -603,28 +608,41 @@ PVFS_error PVFS_get_errno_mapping(PVFS_e
*/
#define PVFS_ERRNO_MAX 60
+/*
+ * If system headers do not define these, assign them, with arbitrary
+ * numbers. These values must be unique with respect to defined errors
+ * and each other to avoid collisions in case statements elsewhere.
+ */
#ifndef EUNATCH
-#define EUNATCH -1
+#define EUNATCH -6060842
#endif
#ifndef EBADR
-#define EBADR -1
+#define EBADR -6060843
#endif
#ifndef EDEADLOCK
-#define EDEADLOCK -1
+#define EDEADLOCK -6060844
#endif
#ifndef ENONET
-#define ENONET -1
+#define ENONET -6060845
#endif
#ifndef ECOMM
-#define ECOMM -1
+#define ECOMM -6060846
#endif
#ifndef ERESTART
-#define ERESTART -1
+#define ERESTART -6060847
+#endif
+
+#ifndef ETIME
+#define ETIME -6060848
+#endif
+
+#ifndef EBADMSG
+#define EBADMSG -6060849
#endif
#define DECLARE_ERRNO_MAPPING() \
More information about the Pvfs2-cvs
mailing list