[MPICH2-dev] [patch] create valid default defmsg.h if building one fails
Ashley Pittman
ashley at quadrics.com
Wed Oct 5 11:38:23 CDT 2005
Hi,
We've hit a bug several times now where we add error codes to the source
without writing a long description for it, this in turn causes
maint/extracterrmsgs to fail (as it should) but the fallback defmsg.h
that updatefiles creates is un-usable leading to compile errors later
on.
This patch causes the fallback file to be generated properly. It's
tested in so much as the code compiles but I haven't tried running any
code with it yet, I'll let you know the results of the testsuite
tomorrow.
Ashley,
Index: maint/updatefiles
===================================================================
RCS file: /cvs/master/quadrics/mpi2/mpich2/maint/updatefiles,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -3 -p -r1.1.1.2 -r1.4
--- maint/updatefiles 23 Jun 2005 13:56:39 -0000 1.1.1.2
+++ maint/updatefiles 5 Oct 2005 16:30:50 -0000 1.4
@@ -287,18 +287,19 @@ Error message files in src/mpi/errhan we
if [ ! -s src/mpi/errhan/defmsg.h ] ; then
echo "Creating a dummy defmsg.h file"
cat > src/mpi/errhan/defmsg.h <<EOF
-typedef struct { const char *short_name, *long_name; } msgpair;
+typedef struct { const unsigned int sentinal1; const char *short_name,
*long_name; const unsigned int sentinal2; } msgpair;
static const int generic_msgs_len = 0;
-static msgpair generic_err_msgs[] { {0, "no error catalog"}, };
+static msgpair generic_err_msgs[] = { {0xacebad03, 0, "no error
catalog", 0xcb0bfa11}, };
static const int specific_msgs_len = 0;
-static msgpair specific_err_msgs[] { {0,0}, };
+static msgpair specific_err_msgs[] = { {0xacebad03,0,0,0xcb0bfa11}, };
static int class_to_index[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-0, 0, 0, 0 }
+0, 0, 0, 0 };
+#define MPIR_MAX_ERROR_CLASS_INDEX 1
EOF
fi
fi
More information about the mpich2-dev
mailing list