This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: ObjC++-related common code mods



On 17 Aug 2004, at 18.19, Zack Weinberg wrote:


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.

Will do; thanks.


--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]