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