diff --git a/reactos/tools/widl/widl.c b/reactos/tools/widl/widl.c index 07f024cea1d..00762f42dec 100644 --- a/reactos/tools/widl/widl.c +++ b/reactos/tools/widl/widl.c @@ -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 \n" ); fprintf(header, "#include \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); } diff --git a/reactos/tools/widl/widl_ros.diff b/reactos/tools/widl/widl_ros.diff index 1a92d7f8069..84aff9839cd 100644 --- a/reactos/tools/widl/widl_ros.diff +++ b/reactos/tools/widl/widl_ros.diff @@ -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 \n" ); + fprintf(header, "#include \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)