This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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 for Preview: jcf-io.c and Win32 case-insensitive filename handling


> 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 


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