Win32 gcj: How to create a shared library and other w32 issues

Jeff Sturm
Fri May 30 19:02:00 GMT 2003

On Fri, 30 May 2003, Mohan Embar wrote:
> >Second question:  How do I convert libgcj.a into a shared library - the
> >naïve method using dllwrap -export-everything -olibgcj.dll does not seem to
> >work.  Building libgcj as a shared library is necessary because the library
> >contains symbols (locale, calendar) which are dlloaded at run-time (which is
> >probably a bug).
> Lots of people are interested in this. The person who cracks this will
> be elevated to the status of the guy who proved Fermat's Last Theorem.

I thought it had been done?

pseudo relocs were the missing piece, as I recall, since there's no
convenient way to dllexport things from jc1.

> >Third question: Does anyone know how to ask for the available bytes after
> >opening a socket connection? -- gcj says that it is not supported on Win32,
> >but somehow I don't believe this. :)

PlainSocketImpl.available() does a FIONREAD ioctl if available, else falls
back to a stupid select() call that only results in 0 (would block) or 1
(1 or more bytes available to read).

I don't know if FIONREAD is available on win32.  I'd guess not.  If win32
has a better way, it can be fixed...


More information about the Java mailing list