This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: FYI: Problems solved by switching to gcc 3.3 (was RE: Win32 gcj: How to create a shared library and other w32 issues)
- From: Jost Boekemeier <JBoekemeier at inetsoftware dot de>
- To: "'tromey at redhat dot com'" <tromey at redhat dot com>
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Fri, 13 Jun 2003 13:50:14 +0200
- Subject: RE: FYI: Problems solved by switching to gcc 3.3 (was RE: Win32 gcj: How to create a shared library and other w32 issues)
> Could you be more specific? Where does this happen?
In libstdc++-v3/config/io/basic_file_studio.cc:
@@ -246,7 +246,11 @@
#ifdef FIONREAD
// Pipes and sockets.
int __num = 0;
+#ifdef __MINGW32__
+ int __r = ioctlsocket(this->fd(), FIONREAD, (u_long*)&__num);
+#else
int __r = ioctl(this->fd(), FIONREAD, &__num);
+#endif
if (!__r && __num >= 0)
return __num;
#endif
The above change is probably wrong (at least untested).
> Could you go into more detail here?
The JNIIMPEXP which is defined as
__declspec(dllexport)
causes this. If you re-declare the three methods (JN_CreateVM etc.) as
extern jint JNICALL, then this will work.
Jost