This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch for Preview: jcf-io.c and Win32 case-insensitive filename handling
- From: "Ranjit Mathew" <rmathew4lists at hotmail dot com>
- To: <gnustuff at thisiscool dot com>,<java-patches at gcc dot gnu dot org>
- Date: Tue, 11 Mar 2003 11:46:51 +0530
- Subject: Re: Patch for Preview: jcf-io.c and Win32 case-insensitive filename handling
- References: <SOWVWQ87B7GEQKIJET3Z8OI2YB8TN.3e6d7651@p733>
- Reply-to: "Ranjit Mathew" <rmathew at hotmail dot com>
> This proposed patch aims to resolve gcj compilation glitches due
> to the Win32 case-insensitive filesystem. For my native MingW
BTW, does it fix the following test case?
Create files "Foo.java" and "foo/Bar.java" within a single
folder on Win32 (note the case of the names).
Foo.java just contains "public class Foo { }".
"foo/Bar.java" just contains "package foo; public class Bar { }".
Now:
1. if you do "gcj -C foo/Bar.java" *without* compiling Foo.java first,
you get:
-------------------------------- 8< --------------------------------
.\foo.java:1: error: Public class `Foo' must be defined in a file called `Foo.java'.
public class Foo { }
^
1 error
-------------------------------- 8< --------------------------------
2. if you do "gcj -C foo/Bar.java" *after* compiling Foo.java to
Foo.class, you get:
-------------------------------- 8< --------------------------------
Foo.java: In class `foo.Bar':
Foo.java: In constructor `()':
Foo.java:0: fatal error: reading class Foo for the second time from .\foo.class
compilation terminated.
-------------------------------- 8< --------------------------------
Note that for some reason, GCJ has lower-cased "foo.class" in the
second error message - I could not find an explicit tolower( )/TOLOWER( )
anywhere, so there's something else going on here.
Even for the test case in the ZIP file that Mohan has attached, I get
the following error (with Mohan's 3.3 build), in which the name has
been mysteriously "lowercased" for MyTest.java:
-------------------------------- 8< --------------------------------
E:\src\Test\GCJ\Case>gcj -C mytest\MyTest.java
.\mytest/mytest.java:3: error: Class `mytest.MyTest' already defined in mytest\MyTest.java:3.
public class MyTest
^
.\mytest/mytest.java:12: confused by earlier errors, bailing out
-------------------------------- 8< --------------------------------
How/Why?
Ranjit