This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] xfullpath and new regression test xfullpath.exp
> 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