Robert Shearman : widl: Don't output __RPC_FAR in generated code.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 12 06:44:26 CST 2005


Module: wine
Branch: refs/heads/master
Commit: fea330364bbf4109e3465d2ee0cca84b6ff34400
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=fea330364bbf4109e3465d2ee0cca84b6ff34400

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon Dec 12 11:51:11 2005 +0100

widl: Don't output __RPC_FAR in generated code.

---

 tools/widl/client.c  |   10 +++++-----
 tools/widl/server.c  |    6 +++---
 tools/widl/typegen.c |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/widl/client.c b/tools/widl/client.c
index a371be6..6c33692 100644
--- a/tools/widl/client.c
+++ b/tools/widl/client.c
@@ -153,9 +153,9 @@ static void write_function_stubs(type_t 
         print_client("NdrSendReceive(\n");
         indent++;
         print_client("(PMIDL_STUB_MESSAGE)&_StubMsg,\n");
-        print_client("(unsigned char __RPC_FAR *)_StubMsg.Buffer);\n");
-        /* print_client("(unsigned char __RPC_FAR *)_StubMsg.Buffer,\n"); */
-        /* print_client("(RPC_BINDING_HANDLE __RPC_FAR *) &%s__MIDL_AutoBindHandle);\n", iface->name); */
+        print_client("(unsigned char *)_StubMsg.Buffer);\n");
+        /* print_client("(unsigned char *)_StubMsg.Buffer,\n"); */
+        /* print_client("(RPC_BINDING_HANDLE *) &%s__MIDL_AutoBindHandle);\n", iface->name); */
         indent--;
 
         /* unmarshal return value */
@@ -174,7 +174,7 @@ static void write_function_stubs(type_t 
 
             print_client("_RetVal = *((");
             write_type(client, def->type, def, def->tname);
-            fprintf(client, " __RPC_FAR *)_StubMsg.Buffer)++;\n");
+            fprintf(client, " *)_StubMsg.Buffer)++;\n");
         }
 
         /* update proc_offset */
@@ -244,7 +244,7 @@ static void write_stubdescriptor(type_t 
     print_client("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
     print_client("{\n");
     indent++;
-    print_client("(void __RPC_FAR *)& %s___RpcClientInterface,\n", iface->name);
+    print_client("(void *)& %s___RpcClientInterface,\n", iface->name);
     print_client("MIDL_user_allocate,\n");
     print_client("MIDL_user_free,\n");
     if (implicit_handle)
diff --git a/tools/widl/server.c b/tools/widl/server.c
index 4009bb2..668e492 100644
--- a/tools/widl/server.c
+++ b/tools/widl/server.c
@@ -216,12 +216,12 @@ static void write_function_stubs(type_t 
             print_server("RpcRaiseException(_Status);\n");
             indent--;
             fprintf(server, "\n");
-            print_server("_StubMsg.Buffer = (unsigned char __RPC_FAR *)_pRpcMessage->Buffer;\n");
+            print_server("_StubMsg.Buffer = (unsigned char *)_pRpcMessage->Buffer;\n");
             fprintf(server, "\n");
 
             print_server("*((");
             write_type(server, def->type, def, def->tname);
-            fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = _RetVal;\n");
+            fprintf(server, " *)_StubMsg.Buffer)++ = _RetVal;\n");
         }
 
         indent--;
@@ -306,7 +306,7 @@ static void write_stubdescriptor(type_t 
     print_server("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name);
     print_server("{\n");
     indent++;
-    print_server("(void __RPC_FAR *)& %s___RpcServerInterface,\n", iface->name);
+    print_server("(void *)& %s___RpcServerInterface,\n", iface->name);
     print_server("MIDL_user_allocate,\n");
     print_server("MIDL_user_free,\n");
     print_server("0,\n");
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 8883b3f..1ae84f1 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -236,7 +236,7 @@ void marshall_arguments(FILE *file, int 
 
         print_file(file, indent, "*((");
         write_type(file, var->type, var, var->tname);
-        fprintf(file, " __RPC_FAR*)_StubMsg.Buffer)++ = ");
+        fprintf(file, " *)_StubMsg.Buffer)++ = ");
         write_name(file, var);
         fprintf(file, ";\n");
         fprintf(file, "\n");
@@ -306,7 +306,7 @@ void unmarshall_arguments(FILE *file, in
         write_name(file, var);
         fprintf(file, " = *((");
         write_type(file, var->type, var, var->tname);
-        fprintf(file, " __RPC_FAR*)_StubMsg.Buffer)++;\n");
+        fprintf(file, " *)_StubMsg.Buffer)++;\n");
         fprintf(file, "\n");
 
         last_size = size;




More information about the wine-cvs mailing list