aboutsummaryrefslogtreecommitdiff
path: root/libjava/win32.cc
diff options
context:
space:
mode:
authormegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 05:26:42 +0000
committermegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 05:26:42 +0000
commitfd8011b8f25faaea4bc290033bf9ab7c7fefa434 (patch)
treedb9c18a5924f33eb9b557f63d50e0b0489bc296d /libjava/win32.cc
parent3674b5a96ef460b93f3f6912504b5cd5215c2775 (diff)
2002-02-06 Adam Megacz <adam@xwt.org>
* configure.in: Changed mingw) to *mingw*). * win32.cc: Created this file. * win32.h: Created this file. * win32.cc, prims.cc, win32.h (win32_exception_handler): Moved win32_exception_handler from prims.cc to win32.cc, added header in win32.h. * prims.cc: removed some #ifdef-WIN32'd headers which are no longer needed now that we have platform.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49566 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/win32.cc')
-rw-r--r--libjava/win32.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/libjava/win32.cc b/libjava/win32.cc
new file mode 100644
index 00000000000..daccf0f94fb
--- /dev/null
+++ b/libjava/win32.cc
@@ -0,0 +1,23 @@
+// win32.cc - Helper functions for Microsoft-flavored OSs.
+
+/* Copyright (C) 2002 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+#include <windows.h>
+
+LONG CALLBACK
+win32_exception_handler (LPEXCEPTION_POINTERS e)
+{
+ if (e->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
+ _Jv_ThrowNullPointerException();
+ else if (e->ExceptionRecord->ExceptionCode == EXCEPTION_INT_DIVIDE_BY_ZERO)
+ throw new java::lang::ArithmeticException;
+ else
+ return EXCEPTION_CONTINUE_SEARCH;
+}