widl patch

Ove Kaaven ovehk at ping.uio.no
Sat Dec 14 07:57:19 CST 2002


This patch reverses Alexandre's change on
http://www.winehq.com/hypermail/wine-cvs/2002/11/0130.html
("Make sure widl doesn't depend on the headers it has to generate.")
and replaces it with a much simpler fix - just include rpc.h, which I
doubt will ever be autogenerated. It defines the needed UUID type.

Log:
Ove Kaaven <ovek at transgaming.com>
Include rpc.h in widltypes.h.

Index: tools/widl/header.c
===================================================================
RCS file: /home/wine/wine/tools/widl/header.c,v
retrieving revision 1.8
diff -u -r1.8 header.c
--- tools/widl/header.c	3 Dec 2002 19:12:07 -0000	1.8
+++ tools/widl/header.c	14 Dec 2002 13:48:11 -0000
@@ -603,7 +603,7 @@
 
 void write_guid(type_t *iface)
 {
-  uuid_t *uuid = get_attrp(iface->attrs, ATTR_UUID);
+  UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
   if (!uuid) return;
   fprintf(header, "DEFINE_GUID(IID_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
           iface->name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1],
Index: tools/widl/parser.l
===================================================================
RCS file: /home/wine/wine/tools/widl/parser.l,v
retrieving revision 1.10
diff -u -r1.10 parser.l
--- tools/widl/parser.l	3 Dec 2002 19:12:07 -0000	1.10
+++ tools/widl/parser.l	14 Dec 2002 13:48:11 -0000
@@ -75,9 +75,9 @@
 
 static void pop_import(void);
 
-static uuid_t* parse_uuid(const char*u)
+static UUID* parse_uuid(const char*u)
 {
-  uuid_t* uuid = xmalloc(sizeof(uuid_t));
+  UUID* uuid = xmalloc(sizeof(UUID));
   char b[3];
   /* it would be nice to use UuidFromStringA */
   uuid->Data1 = strtoul(u, NULL, 16);
Index: tools/widl/parser.y
===================================================================
RCS file: /home/wine/wine/tools/widl/parser.y,v
retrieving revision 1.8
diff -u -r1.8 parser.y
--- tools/widl/parser.y	3 Dec 2002 19:12:07 -0000	1.8
+++ tools/widl/parser.y	14 Dec 2002 13:48:11 -0000
@@ -106,7 +106,7 @@
 	var_t *var;
 	func_t *func;
 	char *str;
-	uuid_t *uuid;
+	UUID *uuid;
 	int num;
 }
 
Index: tools/widl/widltypes.h
===================================================================
RCS file: /home/wine/wine/tools/widl/widltypes.h,v
retrieving revision 1.7
diff -u -r1.7 widltypes.h
--- tools/widl/widltypes.h	3 Dec 2002 19:12:07 -0000	1.7
+++ tools/widl/widltypes.h	14 Dec 2002 13:48:11 -0000
@@ -22,6 +22,7 @@
 #define __WIDL_WIDLTYPES_H
 
 #include "windef.h"
+#include "rpc.h"
 #include "wine/rpcfc.h"
 
 typedef struct _attr_t attr_t;
@@ -30,7 +31,6 @@
 typedef struct _typeref_t typeref_t;
 typedef struct _var_t var_t;
 typedef struct _func_t func_t;
-typedef struct _uuid_t uuid_t;
 
 #define DECL_LINK(type) \
   type *l_next; \
@@ -157,13 +157,6 @@
 
   /* parser-internal */
   DECL_LINK(func_t)
-};
-
-struct _uuid_t {
-    DWORD Data1;
-    WORD  Data2;
-    WORD  Data3;
-    BYTE  Data4[8];
 };
 
 #endif




More information about the wine-patches mailing list