aboutsummaryrefslogtreecommitdiff
path: root/libjava/win32.cc
diff options
context:
space:
mode:
authorAdam Megacz <adam@xwt.org>2002-03-09 22:33:49 +0000
committerAdam Megacz <megacz@gcc.gnu.org>2002-03-09 22:33:49 +0000
commit9268f1c0a640df93831269921644ec7c09eaf430 (patch)
treef24c2114d750a51f5ec6ccc00a8703f27f17fd2e /libjava/win32.cc
parentbb0774f3304f57a7bd0ee8f16e45ff28b69343a0 (diff)
downloadgcc-9268f1c0a640df93831269921644ec7c09eaf430.zip
gcc-9268f1c0a640df93831269921644ec7c09eaf430.tar.gz
gcc-9268f1c0a640df93831269921644ec7c09eaf430.tar.bz2
2002-03-09 Adam Megacz <adam@xwt.org>
* win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake definitions to simulate -mthreads. From-SVN: r50515
Diffstat (limited to 'libjava/win32.cc')
-rw-r--r--libjava/win32.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/libjava/win32.cc b/libjava/win32.cc
index 22139c9..57c6378 100644
--- a/libjava/win32.cc
+++ b/libjava/win32.cc
@@ -48,3 +48,17 @@ _Jv_platform_gettimeofday ()
return t.time * 1000LL + t.millitm;
}
+// The following definitions "fake out" mingw to think that -mthreads
+// was enabled and that mingwthr.dll was linked. GCJ-compiled
+// applications don't need this helper library because we can safely
+// detect thread death (return from Thread.run()).
+
+int _CRT_MT = 1;
+
+extern "C" int
+__mingwthr_key_dtor (DWORD, void (*) (void *))
+{
+ // FIXME: for now we do nothing; this causes a memory leak of
+ // approximately 24 bytes per thread created.
+ return 0;
+}