This is the mail archive of the java@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]

Re: mingw32 gcj (not yet)




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


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