widl: Fix generated proxy code, GCC can't compile

Dan Hipschman dsh at linux.ucla.edu
Fri Jul 28 20:08:13 CDT 2006


Currently, WIDL outputs the exact same code as MIDL for this set of
definitions.  Unfortunately, the code doesn't compile with gcc.  The
error is:

static declaration __MIDL_ProcFormatStringof follows non-static declaration
static declaration __MIDL_TypeFormatStringof follows non-static declaration

This replaces the extern declarations with static declarations.  The types
of the declarations are defined in the source file (not the header) so the
declarations shouldn't be extern anyway.

ChangeLog:
* Fix "static declaration follows non-static declaration" in generated code
---
 tools/widl/proxy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 6449bad..1710cdc 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -110,8 +110,8 @@ static void write_formatstringsdecl(void
   write_formatdesc( "TYPE" );
   write_formatdesc( "PROC" );
   fprintf(proxy, "\n");
-  print_proxy( "extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n");
-  print_proxy( "extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\n");
+  print_proxy( "static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n");
+  print_proxy( "static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\n");
   print_proxy( "\n");
 }
 



More information about the wine-patches mailing list