oleaut32: Use widl to generate oaidl_p.c. [take 2]
Dan Hipschman
dsh at linux.ucla.edu
Wed Oct 24 20:05:04 CDT 2007
This is my second attempt to get widl to generate oaidl_p.c. Instead of
moving oaidl.idl into include/wine (so that the one in oleaut32 doesn't
suffer from #including itself accidentally), I'm just using a different
name for the IDL file in oleaut32. However, this comes with its own
complications. Since the generated header file #includes rpc.h, and
rpc.h #includes oaidl.h at some point, we end up redefining a bunch of
things which results in invalid C. Hence the workaround is to #if 0 out
the generated header file.
The actual patch is compressed and attached since the removal of
oaidl_p.c leads to a large diff. The significant part of the patch is
included below.
---
dlls/oleaut32/Makefile.in | 4 +-
dlls/oleaut32/oaidl_p.c |13781 --------------------------------------
dlls/oleaut32/oleaut32_oaidl.idl | 25 +
dlls/oleaut32/usrmarshal.c | 4 +-
4 files changed, 30 insertions(+), 13784 deletions(-)
delete mode 100644 dlls/oleaut32/oaidl_p.c
create mode 100644 dlls/oleaut32/oleaut32_oaidl.idl
diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in
index 0d2f99d..18390a6 100644
--- a/dlls/oleaut32/Makefile.in
+++ b/dlls/oleaut32/Makefile.in
@@ -13,7 +13,6 @@ C_SRCS = \
connpt.c \
dispatch.c \
hash.c \
- oaidl_p.c \
oleaut.c \
olefont.c \
olepicture.c \
@@ -40,6 +39,9 @@ SPEC_SRCS16 = \
RC_SRCS = oleaut32.rc
+IDL_P_SRCS = \
+ oleaut32_oaidl.idl
+
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/oleaut32/oleaut32_oaidl.idl b/dlls/oleaut32/oleaut32_oaidl.idl
new file mode 100644
index 0000000..320e7ec
--- /dev/null
+++ b/dlls/oleaut32/oleaut32_oaidl.idl
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2007 Google (Dan Hipschman)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* The header file generated from this includes rpc.h, which ends up
+ including oaidl.h at some point. This will cause all sorts of errors
+ so the easiest thing to do is just comment out our entire header. */
+
+cpp_quote("#if 0 /* oleaut32_oaidl.idl hack */")
+#include "oaidl.idl"
+cpp_quote("#endif /* oleaut32_oaidl.idl hack */")
diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c
index c97fc9e..49381b3 100644
--- a/dlls/oleaut32/usrmarshal.c
+++ b/dlls/oleaut32/usrmarshal.c
@@ -49,10 +49,10 @@ static CStdPSFactoryBuffer PSFactoryBuffer;
CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer)
-extern const ExtendedProxyFileInfo oaidl_ProxyFileInfo;
+extern const ExtendedProxyFileInfo oleaut32_oaidl_ProxyFileInfo;
static const ProxyFileInfo *OLEAUT32_ProxyFileList[] = {
- &oaidl_ProxyFileInfo,
+ &oleaut32_oaidl_ProxyFileInfo,
NULL
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-oleaut32-Remove-oaidl_p.c-use-widl-to-generate-oleaut32_oaidl_p.c.patch.bz2
Type: application/octet-stream
Size: 20623 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071024/344aadbe/attachment-0001.obj
More information about the wine-patches
mailing list