diff options
author | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-09 22:33:49 +0000 |
---|---|---|
committer | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-09 22:33:49 +0000 |
commit | 25343425782b5cedb6533a3309a4e17f2bb197bf (patch) | |
tree | f24c2114d750a51f5ec6ccc00a8703f27f17fd2e | |
parent | fc7a06c1bddb973e6af84c65fb94d410b5bcf60d (diff) | |
download | gcc-25343425782b5cedb6533a3309a4e17f2bb197bf.tar.gz |
2002-03-09 Adam Megacz <adam@xwt.org>
* win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake
definitions to simulate -mthreads.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50515 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/win32.cc | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 6e7863fed37..ad2364093c5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,10 @@ 2002-03-09 Adam Megacz <adam@xwt.org> + * win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake + definitions to simulate -mthreads. + +2002-03-09 Adam Megacz <adam@xwt.org> + * win32.cc (_Jv_platform_gettimeofday) Cast 1000 to long long to avoid precision loss. diff --git a/libjava/win32.cc b/libjava/win32.cc index 22139c99f4a..57c63789f36 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; +} |