aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-12-03 20:31:35 +0000
committerThomas Schwinge <tschwinge@gnu.org>2006-12-03 20:31:35 +0000
commitcd10961665bf2786bed6935f1666d18c6241a97d (patch)
tree49edf39718bb0e416df726c0f4149ee3481994e8
parent079c59208254be81a5fd81238f6ffb4b82e037ff (diff)
downloadmig-cd10961665bf2786bed6935f1666d18c6241a97d.tar.gz
mig-cd10961665bf2786bed6935f1666d18c6241a97d.tar.bz2
mig-cd10961665bf2786bed6935f1666d18c6241a97d.zip
2006-12-03 Leonardo Lopes Pereira <leonardolopespereira@gmail.com>
[patch #5018 --- ``Remove support to msg_send interface.''] * global.c (UseMsgRPC): Removed definition. * global.h (UseMsgRPC): Removed declaration. * mig.in (--help): Removed information about `-r' and `-R' options. * migcom.c (parseArgs): Changed the switches `-r' and `-R' to deal with the absence of obsolete the send/receive pairs. * user.c (WriteRoutine): Adapted the use of `UseMsgRPC' as if it was defined to `TRUE'. (WriteMsgSendReceive): Removed, since it is not used anymore.
-rw-r--r--ChangeLog12
-rw-r--r--global.c1
-rw-r--r--global.h1
-rw-r--r--mig.in2
-rw-r--r--migcom.c7
-rw-r--r--user.c42
6 files changed, 17 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index 38eff7c..ccf305a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-12-03 Leonardo Lopes Pereira <leonardolopespereira@gmail.com>
+
+ [patch #5018 --- ``Remove support to msg_send interface.'']
+ * global.c (UseMsgRPC): Removed definition.
+ * global.h (UseMsgRPC): Removed declaration.
+ * mig.in (--help): Removed information about `-r' and `-R' options.
+ * migcom.c (parseArgs): Changed the switches `-r' and `-R' to deal with
+ the absence of obsolete the send/receive pairs.
+ * user.c (WriteRoutine): Adapted the use of `UseMsgRPC' as if it was
+ defined to `TRUE'.
+ (WriteMsgSendReceive): Removed, since it is not used anymore.
+
2006-11-29 Thomas Schwinge <tschwinge@gnu.org>
* configure: Regenerate.
diff --git a/global.c b/global.c
index 4a8a42c..0a27a9e 100644
--- a/global.c
+++ b/global.c
@@ -30,7 +30,6 @@
boolean_t DefaultFiles = TRUE;
boolean_t BeQuiet = FALSE;
boolean_t BeVerbose = FALSE;
-boolean_t UseMsgRPC = TRUE;
boolean_t GenSymTab = FALSE;
boolean_t IsKernelUser = FALSE;
diff --git a/global.h b/global.h
index af6a8b4..300e5c6 100644
--- a/global.h
+++ b/global.h
@@ -35,7 +35,6 @@
extern boolean_t DefaultFiles; /* default output file names if no arguments */
extern boolean_t BeQuiet; /* no warning messages */
extern boolean_t BeVerbose; /* summarize types, routines */
-extern boolean_t UseMsgRPC;
extern boolean_t GenSymTab;
extern boolean_t IsKernelUser;
diff --git a/mig.in b/mig.in
index 1802a52..25053b9 100644
--- a/mig.in
+++ b/mig.in
@@ -82,8 +82,6 @@ Usage: @MIG@ [OPTION]... [FILE]...
This is the GNU implementation of the Mach interface generator \`MIG', which
generates Mach RPC stubs from definition files.
- -r use msg_rpc [default]
- -R use msg_send
-q suppress warning statements
-Q print warning statements [default]
-v verbose
diff --git a/migcom.c b/migcom.c
index 5da52b8..d64c4b2 100644
--- a/migcom.c
+++ b/migcom.c
@@ -31,8 +31,6 @@
* -[V,q] not verbose or quiet : don't print
* information during compilation
* (this is the default)
- * -[r,R] do or don't use rpc calls instead of
- * send/receive pairs. Default is -r.
* -[s,S] generate symbol table or not: generate a
* table of rpc-name, number, routine triplets
* as an external data structure -- main use is
@@ -108,10 +106,11 @@ parseArgs(int argc, char **argv)
BeVerbose = FALSE;
break;
case 'r':
- UseMsgRPC = TRUE;
+ /* This is the default and `-R' doesn't work anymore. */
break;
case 'R':
- UseMsgRPC = FALSE;
+ fatal("the option `-R' cannot be used anymore, use the rpc "
+ "calls (`-r', default) instead.");
break;
case 'l':
if (streql(argv[0], "-list"))
diff --git a/user.c b/user.c
index 16d4c02..8f5be36 100644
--- a/user.c
+++ b/user.c
@@ -245,7 +245,7 @@ WriteVarDecls(FILE *file, const routine_t *rt)
/*************************************************************
* Writes code to call the user provided error procedure
* when a MIG error occurs. Called by WriteMsgSend,
- * WriteMsgCheckReceive, WriteMsgSendReceive, WriteCheckIdentity,
+ * WriteMsgCheckReceive, WriteCheckIdentity,
* WriteRetCodeCheck, WriteTypeCheck, WritePackArgValue.
*************************************************************/
static void
@@ -339,41 +339,6 @@ WriteMsgCheckReceive(FILE *file, const routine_t *rt, const char *success)
}
/*************************************************************
- * Writes the send and receive calls and code to check
- * for errors. Normally the rpc code is generated instead
- * although, the subsytem can be compiled with the -R option
- * which will cause this code to be generated. Called by
- * WriteRoutine if UseMsgRPC option is false.
- *************************************************************/
-static void
-WriteMsgSendReceive(FILE *file, const routine_t *rt)
-{
- char SendSize[24];
-
- if (rt->rtNumRequestVar == 0)
- sprintf(SendSize, "%d", rt->rtRequestSize);
- else
- strcpy(SendSize, "msgh_size");
-
- fprintf(file, "\tmsg_result = %smach_msg(&InP->Head, MACH_SEND_MSG|%s, %s, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);\n",
- SubrPrefix,
- rt->rtMsgOption->argVarName,
- SendSize);
-
- fprintf(file, "\tif (msg_result != MACH_MSG_SUCCESS)\n");
- WriteMsgError(file, rt, "msg_result");
- fprintf(file, "\n");
-
- fprintf(file, "\tmsg_result = %smach_msg(&OutP->Head, MACH_RCV_MSG|%s%s, 0, sizeof(Reply), InP->Head.msgh_local_port, %s, MACH_PORT_NULL);\n",
- SubrPrefix,
- rt->rtMsgOption->argVarName,
- rt->rtWaitTime != argNULL ? "|MACH_RCV_TIMEOUT" : "",
- rt->rtWaitTime != argNULL ? rt->rtWaitTime->argVarName : "MACH_MSG_TIMEOUT_NONE");
- WriteMsgCheckReceive(file, rt, "MACH_MSG_SUCCESS");
- fprintf(file, "\n");
-}
-
-/*************************************************************
* Writes the rpc call and the code to check for errors.
* This is the default code to be generated. Called by WriteRoutine
* for all routine types except SimpleProcedure and SimpleRoutine.
@@ -1219,10 +1184,7 @@ WriteRoutine(FILE *file, register const routine_t *rt)
WriteMsgSend(file, rt);
else
{
- if (UseMsgRPC)
- WriteMsgRPC(file, rt);
- else
- WriteMsgSendReceive(file, rt);
+ WriteMsgRPC(file, rt);
/* Check the values that are returned in the reply message */