WIN-16: win32_exception_handler relocated to win32.cc
Adam Megacz
patches@lists.megacz.com
Wed Feb 6 21:25:00 GMT 2002
Andrew, sorry I was slow getting to this..
I also made a minor fix in configure.in (mingw -> *mingw*) and dropped
some no-longer-needed headers in #ifdef-WIN32 regions of prims.cc... I
figure this is probably treading a bit close to the edge of my
win32-commit-without-review priviledges... =) Spirit of the law and
all that...
- a
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
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.111
diff -u -r1.111 configure.in
--- configure.in 2002/02/07 04:36:58 1.111
+++ configure.in 2002/02/07 05:22:42
@@ -204,7 +204,7 @@
PLATFORMOBJS=
case "$TARGET_ECOS" in
no) case "$host" in
- mingw)
+ *mingw*)
PLATFORM=Win32
PLATFORMOBJS=win32.lo
PLATFORMH=win32.h
@@ -250,7 +250,7 @@
AC_LINK_FILES(java/lang/nat${PLATFORM}Process.cc, java/lang/natConcreteProcess.cc)
case "${host}" in
- mingw)
+ *mingw*)
SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
;;
*)
@@ -852,7 +852,7 @@
alpha*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
- mingw)
+ *mingw*)
SIGNAL_HANDLER=include/win32-signal.h
;;
*)
Index: prims.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/prims.cc,v
retrieving revision 1.69
diff -u -r1.69 prims.cc
--- prims.cc 2002/02/07 03:24:08 1.69
+++ prims.cc 2002/02/07 05:22:42
@@ -9,17 +9,8 @@
details. */
#include <config.h>
+#include <platform.h>
-#ifdef WIN32
-#include <windows.h>
-#undef STRICT
-#endif /* WIN32 */
-
-#ifdef WIN32
-#undef __INSIDE_CYGWIN__
-#include <winsock.h>
-#endif /* WIN32 */
-
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
@@ -730,23 +721,6 @@
strcpy (_Jv_execName, name);
}
}
-
-#ifdef WIN32
-
-extern "C" int* win32_get_restart_frame (void *);
-
-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;
-}
-
-#endif
#ifndef DISABLE_GETENV_PROPERTIES
More information about the Java-patches
mailing list