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@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f86e796574
commit
b7402ddbbe
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue