mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Use the same include guard in WIDL generated files and MIDL generated files
svn path=/trunk/; revision=32274
This commit is contained in:
parent
b84c9620fb
commit
00d89c1d5d
2 changed files with 36 additions and 4 deletions
|
@ -174,7 +174,7 @@ static char *make_token(const char *name)
|
|||
token = xstrdup(name);
|
||||
for (i=0; token[i]; i++) {
|
||||
if (!isalnum(token[i])) token[i] = '_';
|
||||
else token[i] = toupper(token[i]);
|
||||
else token[i] = tolower(token[i]);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
@ -561,8 +561,8 @@ int main(int argc,char *argv[])
|
|||
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
|
||||
fprintf(header, "#include <rpc.h>\n" );
|
||||
fprintf(header, "#include <rpcndr.h>\n\n" );
|
||||
fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#define __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#ifndef __%s__\n", header_token);
|
||||
fprintf(header, "#define __%s__\n", header_token);
|
||||
start_cplusplus_guard(header);
|
||||
}
|
||||
|
||||
|
@ -606,7 +606,7 @@ int main(int argc,char *argv[])
|
|||
fprintf(header, "/* End additional prototypes */\n");
|
||||
fprintf(header, "\n");
|
||||
end_cplusplus_guard(header);
|
||||
fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
|
||||
fprintf(header, "#endif /* __%s__ */\n", header_token);
|
||||
fclose(header);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,38 @@ Index: typelib.c
|
|||
|
||||
#include "widl.h"
|
||||
#include "utils.h"
|
||||
Index: widl.c
|
||||
===================================================================
|
||||
--- widl.c (revision 32187)
|
||||
+++ widl.c (working copy)
|
||||
@@ -174,7 +174,7 @@
|
||||
token = xstrdup(name);
|
||||
for (i=0; token[i]; i++) {
|
||||
if (!isalnum(token[i])) token[i] = '_';
|
||||
- else token[i] = toupper(token[i]);
|
||||
+ else token[i] = tolower(token[i]);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
@@ -561,8 +561,8 @@
|
||||
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
|
||||
fprintf(header, "#include <rpc.h>\n" );
|
||||
fprintf(header, "#include <rpcndr.h>\n\n" );
|
||||
- fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
||||
- fprintf(header, "#define __WIDL_%s\n", header_token);
|
||||
+ fprintf(header, "#ifndef __%s__\n", header_token);
|
||||
+ fprintf(header, "#define __%s__\n", header_token);
|
||||
start_cplusplus_guard(header);
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@
|
||||
fprintf(header, "/* End additional prototypes */\n");
|
||||
fprintf(header, "\n");
|
||||
end_cplusplus_guard(header);
|
||||
- fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
|
||||
+ fprintf(header, "#endif /* __%s__ */\n", header_token);
|
||||
fclose(header);
|
||||
}
|
||||
Index: widltypes.h
|
||||
===================================================================
|
||||
--- widltypes.h (revision 32187)
|
||||
|
|
Loading…
Reference in a new issue