lock/unlock filechannel Win32 implementation

Marco Trudel mtrudel@gmx.ch
Tue Nov 7 08:26:00 GMT 2006


Martin wrote:
> I hope this works, but i can't test!

I needed to change
  throw new IllegalArgumentException(...) to
  throw new ::java::lang::IllegalArgumentException(...)
I don't know why other exception types do not need the package name 
(name space)...

Also I included <java.lang.IllegalArgumentException>.

A patch of the final version is attached. Please supply patches, not 
code snippets. You can create them with "svn diff".


> i have followed, the instruction at 
> http://rmathew.com/articles/gcj/bldgcj.html i get this error at step 11 
> of paragraph "Building a Cross Compiler", i am using archlinux 
> 0.7.2(bundled with gcc 4.0.3) inside Microsoft Virtual PC, with the last 
> svn from gcc and last cvs from binutils the error is:
> 
> /gnubuild/xgcc_build/gcc/gcj 
> -B/gnubuild/xgcc_build/i686-pc-mingw32/libjava/ -B
> gnubuild/xgcc_build/gcc/ -Wno-deprecated --encoding=UTF-8 
> --bootclasspath '' --
> lasspath 
> ..:/gnu/gcc/libjava:/gnubuild/xgcc_build/i686-pc-mingw32/libjava:/gnu/
> cc/libjava/classpath:/gnu/gcc/libjava/classpath/external/w3c_dom:/gnu/gcc/libja 
> 
> a/classpath/external/sax:/gnu/gcc/libjava/classpath/external/relaxngDatatype:.: 
> 
>  -C -d . -MD -MF lists/javax-swing-plaf.deps -MT 
> lists/javax-swing-plaf.stamp -
> P @lists/javax-swing-plaf.list
> gcj: Internal error: Killed (program jc1)

I built a Windows GCJ last week from the most recent source. It seems 
that there are some major regressions because it was killed by "Internal 
error: Killed" most of the time I used it. But I was able to compile it 
without problems, so this might be another problem.
I now currently work with revision 117'867. There you have to add 
--disable-tls to Ranjits manual. GCC was changed in the core and they 
broke libjava. I was ignored when reporting it...


> anyway this is the code that should be replaced in 
> /libjava/gnu/java/nio/channels/natFileChannelWin32.cc:

In order to get the patch into GCJ, you will have to make copyright 
assignment and then someone has to commit it for you.
Unfortunately the only one that seems to care about such things (Tom 
Tromey) is away for a month. So you will have to wait for him to come 
back (I'm already sitting on 8 fixes that do not find it's way into GCJ 
because no one commits them). Or is there someone else that might give a 
little help here? Please!
Anyway, I included your patch in my newest built that I will release 
quite soon (locking didn't work before, so it only can get better or 
stay useless).


Marco
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fileLock-win32-patch.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20061107/8a22eefb/attachment.txt>


More information about the Java-patches mailing list