Author: fireball
Date: Sun Dec 30 13:21:51 2007
New Revision: 31498
URL:
http://svn.reactos.org/svn/reactos?rev=31498&view=rev
Log:
- ReactOS Specific! WIDL in ReactOS is called with a header name including the relative
path to it. Thus, the generated #ifndef __WIDL directive also includes the tokenized path
to the file, which doesn't conform to its usage in Wine (where it's just
__WIDL_HEADERNAME_H). In order to solve this, a small piece of code was added, which omits
the relative path from the string sent to the tokenizer.
The only drawback is that the headername passed to the WIDL must never mix different style
path separators ('/' and '\\').
Modified:
trunk/reactos/tools/widl/widl.c
Modified: trunk/reactos/tools/widl/widl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl.c?rev=3149…
==============================================================================
--- trunk/reactos/tools/widl/widl.c (original)
+++ trunk/reactos/tools/widl/widl.c Sun Dec 30 13:21:51 2007
@@ -327,7 +327,12 @@
}
if(do_header) {
- header_token = make_token(header_name);
+ if (strrchr(header_name, '\\'))
+ header_token = make_token(strrchr(header_name, '\\') + 1);
+ else if (strrchr(header_name, '/'))
+ header_token = make_token(strrchr(header_name, '/') + 1);
+ else
+ header_token = make_token(header_name);
if(!(header = fopen(header_name, "w"))) {
fprintf(stderr, "Could not open %s for output\n", header_name);