Ziemowit Laski <zlaski@apple.com> writes:
Sure. Everywhere you _check for_ a directory separator, should be
using IS_DIR_SEPARATOR so that it properly handles \ on Windows. But
pathnames embedded in the program can unconditionally use /. (it'd
be
okay, for instance, to produce C:\...\objc/objc-act.h - weird as that
looks to a human, the Windows kernel will be perfectly happy with
it.)
Going back to my patch,
+ else if (strcmp (basename, "objc/objc-act.h") == 0)
+ output_name = "gt-objc-objc-act.h", for_name = "objc/objc-act.c";
the fragment _checks_ the 'basename' variable, which is an input to
gengtype.
Oh, now I get it. Sorry. This is probably going to have to be
if (strncmp (basename, "objc", 4) && IS_DIR_SEPARATOR (basename[4])
&& strcmp (basename + 5, "objc-act.h"))
ugly as that is.