widl patch

Ove Kaaven ovehk at ping.uio.no
Sat Dec 14 08:47:32 CST 2002


On Sat, 14 Dec 2002, Ove Kaaven wrote:

> 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.

OK, I get it, our makedep is too braindead to ignore the conditional
include of windows.h in rpc.h. Maybe this'll work instead for now?
(not that I remember my full justification for doing this anymore, maybe
it was because I'm going to need more types and definitions from rpcdce.h
and friends in the future anyway, and this is a start?)

Log:
Ove Kaaven <ovek at transgaming.com>
Include guiddef.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 14:10:36 -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 14:10:36 -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 14:10:36 -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 14:10:37 -0000
@@ -22,15 +22,20 @@
 #define __WIDL_WIDLTYPES_H
 
 #include "windef.h"
+#include "guiddef.h"
 #include "wine/rpcfc.h"
 
+#ifndef UUID_DEFINED
+#define UUID_DEFINED
+typedef GUID UUID;
+#endif
+
 typedef struct _attr_t attr_t;
 typedef struct _expr_t expr_t;
 typedef struct _type_t type_t;
 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 +162,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