* df.c (df_insn_refs_record): Use XEXP (x, 0) for USE.
[official-gcc.git] / libjava / win32.cc
blobf425462523db0e0df0964392dca36bf5647e7d96
1 // win32.cc - Helper functions for Microsoft-flavored OSs.
3 /* Copyright (C) 2002 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #include <config.h>
12 #include <jvm.h>
14 #include "platform.h"
15 #include <java/lang/ArithmeticException.h>
17 static LONG CALLBACK
18 win32_exception_handler (LPEXCEPTION_POINTERS e)
20 if (e->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
21 _Jv_ThrowNullPointerException();
22 else if (e->ExceptionRecord->ExceptionCode == EXCEPTION_INT_DIVIDE_BY_ZERO)
23 throw new java::lang::ArithmeticException;
24 else
25 return EXCEPTION_CONTINUE_SEARCH;
28 // Platform-specific VM initialization.
29 void
30 _Jv_platform_initialize (void)
32 // Initialise winsock for networking
33 WSADATA data;
34 if (WSAStartup (MAKEWORD (1, 1), &data))
35 MessageBox (NULL, "Error initialising winsock library.", "Error",
36 MB_OK | MB_ICONEXCLAMATION);
37 // Install exception handler
38 SetUnhandledExceptionFilter (win32_exception_handler);
41 // gettimeofday implementation.
42 void
43 _Jv_platform_gettimeofday (struct timeval *tv)
45 // FIXME
46 return;