0N/A/*
1879N/A * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
2993N/A#ifndef OS_WINDOWS_VM_JVM_WINDOWS_H
2993N/A#define OS_WINDOWS_VM_JVM_WINDOWS_H
2993N/A
0N/A#ifndef _JAVASOFT_JVM_MD_H_
0N/A#define _JAVASOFT_JVM_MD_H_
0N/A
0N/A/*
0N/A * This file is currently collecting system-specific dregs for the
0N/A * JNI conversion, which should be sorted out later.
0N/A */
0N/A
2658N/A// JDK7 requires VS2010
2658N/A#if _MSC_VER >= 1600
2658N/A// JDK7 minimum platform requirement: Windows XP
2658N/A#if _WIN32_WINNT < 0x0501
2658N/A#undef _WIN32_WINNT
2658N/A#define _WIN32_WINNT 0x0501
2658N/A#endif
2658N/A#endif
2658N/A
0N/A#include <windows.h>
0N/A
2658N/A#if _MSC_VER <= 1200
2658N/A// Psapi.h doesn't come with Visual Studio 6; it can be downloaded as Platform
2658N/A// SDK from Microsoft. Here are the definitions copied from Psapi.h
2658N/Atypedef struct _MODULEINFO {
2658N/A LPVOID lpBaseOfDll;
2658N/A DWORD SizeOfImage;
2658N/A LPVOID EntryPoint;
2658N/A} MODULEINFO, *LPMODULEINFO;
2658N/A
2658N/A#else
2658N/A#include <Psapi.h>
2658N/A#endif
2658N/A
2993N/A#include <Tlhelp32.h>
2658N/A
3713N/Atypedef int socklen_t;
0N/A
0N/A// #include "jni.h"
0N/A
0N/A#define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"}
0N/A#define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}
0N/A#define JVM_ONLOAD_SYMBOLS {"_JVM_OnLoad@12", "JVM_OnLoad"}
0N/A#define AGENT_ONLOAD_SYMBOLS {"_Agent_OnLoad@12", "Agent_OnLoad"}
0N/A#define AGENT_ONUNLOAD_SYMBOLS {"_Agent_OnUnload@4", "Agent_OnUnload"}
0N/A#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12", "Agent_OnAttach"}
0N/A
0N/A#define JNI_LIB_PREFIX ""
0N/A#define JNI_LIB_SUFFIX ".dll"
0N/A
0N/Astruct dirent {
0N/A char d_name[MAX_PATH];
0N/A};
0N/A
0N/Atypedef struct {
0N/A struct dirent dirent;
0N/A char *path;
0N/A HANDLE handle;
0N/A WIN32_FIND_DATA find_data;
0N/A} DIR;
0N/A
0N/A#include <stdlib.h>
0N/A
0N/A#define JVM_MAXPATHLEN _MAX_PATH
0N/A
0N/A#define JVM_R_OK 4
0N/A#define JVM_W_OK 2
0N/A#define JVM_X_OK 1
0N/A#define JVM_F_OK 0
0N/A
0N/A#ifdef __cplusplus
0N/Aextern "C" {
0N/A#endif
0N/A
0N/AJNIEXPORT void * JNICALL
0N/AJVM_GetThreadInterruptEvent();
0N/A
0N/A#ifdef __cplusplus
0N/A} /* extern "C" */
0N/A#endif /* __cplusplus */
0N/A
0N/A/*
0N/A * File I/O
0N/A */
0N/A
0N/A// #include <sys/types.h>
0N/A// #include <sys/stat.h>
0N/A// #include <fcntl.h>
0N/A// #include <errno.h>
0N/A
0N/A/* O Flags */
0N/A
0N/A#define JVM_O_RDONLY O_RDONLY
0N/A#define JVM_O_WRONLY O_WRONLY
0N/A#define JVM_O_RDWR O_RDWR
0N/A#define JVM_O_O_APPEND O_APPEND
0N/A#define JVM_O_EXCL O_EXCL
0N/A#define JVM_O_CREAT O_CREAT
0N/A#define JVM_O_DELETE O_TEMPORARY
0N/A
0N/A/* Signals */
0N/A
0N/A#define JVM_SIGINT SIGINT
0N/A#define JVM_SIGTERM SIGTERM
0N/A
0N/A#define SHUTDOWN1_SIGNAL SIGINT /* Shutdown Hooks support. */
0N/A#define SHUTDOWN2_SIGNAL SIGTERM
0N/A
0N/A#endif /* !_JAVASOFT_JVM_MD_H_ */
2993N/A
2993N/A#endif // OS_WINDOWS_VM_JVM_WINDOWS_H