Use <> format in generated #include statements.
Integer constants should be unsigned.
diff --git a/include/objidl.h b/include/objidl.h
index 2732e44..8eb440c 100644
--- a/include/objidl.h
+++ b/include/objidl.h
@@ -8522,7 +8522,7 @@
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 09167a2..f723d54 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -141,11 +141,11 @@
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 @@
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 f842f15..820f6db 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -107,7 +107,7 @@
func_t *func;
char *str;
UUID *uuid;
- int num;
+ unsigned int num;
}
%token <str> aIDENTIFIER
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index ccf849d..791d9a5 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -239,8 +239,8 @@
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 <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, "#ifdef __cplusplus\n");