[PATCH] 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(a)codeweavers.com> --- tools/widl/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index defc7f850371..1720587926d3 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -1784,6 +1784,7 @@ 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"); @@ -1792,7 +1793,7 @@ void write_header(const statement_list_t *stmts) 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"); -- 2.18.1
participants (1)
-
Józef Kucia