This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: mingw32 gcj (not yet)
- To: Tony Kimball <alk at pobox dot com>
- Subject: Re: mingw32 gcj (not yet)
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 13 Aug 2001 21:20:44 -0400 (EDT)
- cc: java at gcc dot gnu dot org
On Mon, 13 Aug 2001, Tony Kimball wrote:
> - I just copped out and used winsock select for Jv_select, which will break
> java.io.FileDescriptor.available for non-sockets, of course.
Nic Ferrier did some work to separate socket and file I/O, though I don't
think it has made it into the trunk yet:
http://gcc.gnu.org/ml/java-patches/2001-q3/msg00041.html
With this patch I think you could easily implement an alternative to
_Jv_select for plain files.
> - I've got some dumb hard to diagnose heisenbug that makes it
> puke in System.out.println.
What are you using for I/O? Native Win32 calls, or MSVCRT open/read/write
emulation? For the former, you need to somehow tell
java.io.FileDescriptor that 0, 1, and 2 are _not_ stdin, stdout and
stderr.
Back when I was hacking mingw I used
System.setOut(new PrintStream(new FileOutputStream("CONOUT$")))
// ... similar for in, err
as a workaround.
> But on the up side, I can do all manner of computations and even see
> the results with gdb or via System.exit(result) (ha!)
Cool!
Jeff