[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    [WIDL 08/22] Write definitions for MIDL_user_allocate and
From:       Robert Shearman <rob () codeweavers ! com>
Date:       2006-03-31 11:45:29
Message-ID: 442D1659.5080105 () codeweavers ! com
[Download RAW message or body]

ChangeLog:
Write definitions for MIDL_user_allocate and MIDL_user_free in the
header when writing out RPC interfaces to prevent compile failures in
the generated client/server code.

   tools/widl/header.c |    8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)



["0d5ddef3940d94ee81213a20d99ead5ab0433fcb.diff" (text/x-patch)]

0d5ddef3940d94ee81213a20d99ead5ab0433fcb
diff --git a/tools/widl/header.c b/tools/widl/header.c
index ba241f6..c4f3a26 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -916,6 +916,14 @@ static void write_rpc_interface(const ty
 {
   unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION);
   const char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
+  static int allocate_written = 0;
+
+  if (!allocate_written)
+  {
+    allocate_written = 1;
+    fprintf(header, "void * __RPC_USER MIDL_user_allocate(size_t);\n");
+    fprintf(header, "void __RPC_USER MIDL_user_free(void *);\n\n");
+  }
 
   fprintf(header, "/*****************************************************************************\n");
   fprintf(header, " * %s interface (v%d.%d)\n", iface->name, LOWORD(ver), HIWORD(ver));






[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic