=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: widl: Guard RPC includes with #ifdef _WIN32.

Alexandre Julliard julliard at winehq.org
Tue Nov 20 15:39:50 CST 2018


Module: wine
Branch: master
Commit: b7402ddbbecdfaa81daa657fbb5d37661f401434
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b7402ddbbecdfaa81daa657fbb5d37661f401434

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Mon Nov 19 15:07:02 2018 +0100

widl: Guard RPC includes with #ifdef _WIN32.

This makes it easier to use header files generated by widl without
Windows headers.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/header.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index defc7f8..ef141d9 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1784,15 +1784,15 @@ void write_header(const statement_list_t *stmts)
   }
   fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n\n", PACKAGE_VERSION, input_name);
 
+  fprintf(header, "#ifdef _WIN32\n");
   fprintf(header, "#ifndef __REQUIRED_RPCNDR_H_VERSION__\n");
   fprintf(header, "#define __REQUIRED_RPCNDR_H_VERSION__ 475\n");
-  fprintf(header, "#endif\n\n");
-
+  fprintf(header, "#endif\n");
   fprintf(header, "#include <rpc.h>\n" );
   fprintf(header, "#include <rpcndr.h>\n" );
   if (!for_each_serializable(stmts, NULL, serializable_exists))
     fprintf(header, "#include <midles.h>\n" );
-  fprintf(header, "\n" );
+  fprintf(header, "#endif\n\n");
 
   fprintf(header, "#ifndef COM_NO_WINDOWS_H\n");
   fprintf(header, "#include <windows.h>\n");




More information about the wine-cvs mailing list