[RFC] xfullpath and new regression test xfullpath.exp

Joel Brobecker brobecker@ACT-Europe.FR
Wed Apr 3 05:19:00 GMT 2002


> So please use HAVE_DOS_BASED_FILE_SYSTEM instead.

Sure, thanks for the tip.

> >    if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1]))
> >      result = concat (real_path, base_name, NULL);
> >    else
> >      result = concat (real_path, SLASH_STRING, base_name, NULL);
> 
> Yes, I think this is better, thanks.
> 
> > (can I consider that SLASH_STRING will always be one character long?):
> 
> Where does the code assume it's a single character?  `concat' conses
> up a new string, right?  If so, the length of SLASH_STRING shouldn't
> matter, I think.  Or am I missing something?

I implicitely make this assumption when I use the IS_DIR_SEPARATOR
macro to check the value of the last character in the real_path string,
and then use SLASH_STRING during the concat.

If all is fine, I'll resubmit a new patch shortly.

-- 
Joel



More information about the Gdb-patches mailing list