diff --git a/tools/widl/header.c b/tools/widl/header.c index defc7f85037..ef141d93481 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 \n" ); fprintf(header, "#include \n" ); if (!for_each_serializable(stmts, NULL, serializable_exists)) fprintf(header, "#include \n" ); - fprintf(header, "\n" ); + fprintf(header, "#endif\n\n"); fprintf(header, "#ifndef COM_NO_WINDOWS_H\n"); fprintf(header, "#include \n");