Commit b7402ddb authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

widl: Guard RPC includes with #ifdef _WIN32.

This makes it easier to use header files generated by widl without Windows headers. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f86e7965
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment