From 0bde2bbe010c68a54f8928469e89637a2322ae44 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 3 Sep 2003 19:31:14 +0000 Subject: [PATCH] Use <> format in generated #include statements. Integer constants should be unsigned. --- include/objidl.h | 2 +- tools/widl/parser.l | 6 +++--- tools/widl/parser.y | 2 +- tools/widl/widl.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/objidl.h b/include/objidl.h index 2732e440dd1..8eb440cc449 100644 --- a/include/objidl.h +++ b/include/objidl.h @@ -8522,7 +8522,7 @@ struct tagPROPVARIANT { typedef struct tagPROPVARIANT *LPPROPVARIANT; -#define PRSPEC_INVALID (0x7fffffff) +#define PRSPEC_INVALID (0xffffffff) #define PRSPEC_LPWSTR (0) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 09167a22681..f723d5449eb 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -141,11 +141,11 @@ static UUID* parse_uuid(const char*u) return aUUID; } {hex} { - yylval.num = strtol(yytext, NULL, 0); + yylval.num = strtoul(yytext, NULL, 0); return aHEXNUM; } {int} { - yylval.num = strtol(yytext, NULL, 0); + yylval.num = strtoul(yytext, NULL, 0); return aNUM; } {cident} return kw_token(yytext); @@ -360,7 +360,7 @@ int do_import(char *fname) p = hname + strlen(hname) - 2; if (p <= hname || strcmp( p, ".h" )) strcat(hname, ".h"); - fprintf(header, "#include \"%s\"\n", hname); + fprintf(header, "#include <%s>\n", hname); free(hname); } diff --git a/tools/widl/parser.y b/tools/widl/parser.y index f842f1566de..820f6db989e 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -107,7 +107,7 @@ static type_t std_uhyper = { "MIDL_uhyper" }; func_t *func; char *str; UUID *uuid; - int num; + unsigned int num; } %token aIDENTIFIER diff --git a/tools/widl/widl.c b/tools/widl/widl.c index ccf849da96a..791d9a53298 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -239,8 +239,8 @@ int main(int argc,char *argv[]) header = fopen(header_name, "w"); fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", WIDL_FULLVERSION, input_name); - fprintf(header, "#include \"rpc.h\"\n" ); - fprintf(header, "#include \"rpcndr.h\"\n\n" ); + 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, "#ifdef __cplusplus\n");