This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: DIR_SEPARATOR usage in jcf-write.c and jcf-io.c
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Tue, 11 Mar 2003 11:19:34 +0000 (GMT)
- Subject: Patch: DIR_SEPARATOR usage in jcf-write.c and jcf-io.c
- References: <3E59178A.C188A895@hotmail.com>
Ranjit Mathew writes:
> Hi,
>
> This is a resubmission of the DIR_SEPARATOR patch for jcf-io.c
> and jcf-write.c in the front-end.
>
> The last time I had submitted this, it was suggested that we
> might be able to use something from libiberty instead - AFAICT,
> the only relevant functions in libiberty seem to be the
> basename( )/lbasename( ) functions. AFAIK, if we are to use them,
> the code will still be as "untidy" as this, as they do not
> directly address the issue we are trying to resolve here.
>
> This patch resolves the bug on Win32 where "gcj -C foo\Bar.java"
> produces the class file in the current directory instead of in
> "foo" while "gcj -C foo/Bar.java" has the correct behaviour.
>
> Ranjit.
>
>
> Index: ChangeLog
> from Ranjit Mathew <rmathew at hotmail dot com>
>
> * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
> and DIR_SEPARATOR_2 for a target.
> Correct minor typos.
>
> * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
> and DIR_SEPARATOR_2 for a target into account.
This is a compiler patch, so it should have been sent to gcc-patches
as well as java-patches.
Also, I had to fix a warning.
Applied to mainline and 3.3 branch.
Andrew.