1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/os/windows/vm/jvm_windows.h Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,108 @@ 1.4 +/* 1.5 + * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. 1.11 + * 1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 + * version 2 for more details (a copy is included in the LICENSE file that 1.16 + * accompanied this code). 1.17 + * 1.18 + * You should have received a copy of the GNU General Public License version 1.19 + * 2 along with this work; if not, write to the Free Software Foundation, 1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 + * 1.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 1.24 + * have any questions. 1.25 + * 1.26 + */ 1.27 + 1.28 +#ifndef _JAVASOFT_JVM_MD_H_ 1.29 +#define _JAVASOFT_JVM_MD_H_ 1.30 + 1.31 +/* 1.32 + * This file is currently collecting system-specific dregs for the 1.33 + * JNI conversion, which should be sorted out later. 1.34 + */ 1.35 + 1.36 +#include <windows.h> 1.37 +// #include <windef.h> 1.38 +// #include <winbase.h> 1.39 + 1.40 + 1.41 +// #include "jni.h" 1.42 + 1.43 +#define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"} 1.44 +#define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"} 1.45 +#define JVM_ONLOAD_SYMBOLS {"_JVM_OnLoad@12", "JVM_OnLoad"} 1.46 +#define AGENT_ONLOAD_SYMBOLS {"_Agent_OnLoad@12", "Agent_OnLoad"} 1.47 +#define AGENT_ONUNLOAD_SYMBOLS {"_Agent_OnUnload@4", "Agent_OnUnload"} 1.48 +#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12", "Agent_OnAttach"} 1.49 + 1.50 +#define JNI_LIB_PREFIX "" 1.51 +#define JNI_LIB_SUFFIX ".dll" 1.52 + 1.53 +struct dirent { 1.54 + char d_name[MAX_PATH]; 1.55 +}; 1.56 + 1.57 +typedef struct { 1.58 + struct dirent dirent; 1.59 + char *path; 1.60 + HANDLE handle; 1.61 + WIN32_FIND_DATA find_data; 1.62 +} DIR; 1.63 + 1.64 +#include <stdlib.h> 1.65 + 1.66 +#define JVM_MAXPATHLEN _MAX_PATH 1.67 + 1.68 +#define JVM_R_OK 4 1.69 +#define JVM_W_OK 2 1.70 +#define JVM_X_OK 1 1.71 +#define JVM_F_OK 0 1.72 + 1.73 +#ifdef __cplusplus 1.74 +extern "C" { 1.75 +#endif 1.76 + 1.77 +JNIEXPORT void * JNICALL 1.78 +JVM_GetThreadInterruptEvent(); 1.79 + 1.80 +#ifdef __cplusplus 1.81 +} /* extern "C" */ 1.82 +#endif /* __cplusplus */ 1.83 + 1.84 +/* 1.85 + * File I/O 1.86 + */ 1.87 + 1.88 +// #include <sys/types.h> 1.89 +// #include <sys/stat.h> 1.90 +// #include <fcntl.h> 1.91 +// #include <errno.h> 1.92 + 1.93 +/* O Flags */ 1.94 + 1.95 +#define JVM_O_RDONLY O_RDONLY 1.96 +#define JVM_O_WRONLY O_WRONLY 1.97 +#define JVM_O_RDWR O_RDWR 1.98 +#define JVM_O_O_APPEND O_APPEND 1.99 +#define JVM_O_EXCL O_EXCL 1.100 +#define JVM_O_CREAT O_CREAT 1.101 +#define JVM_O_DELETE O_TEMPORARY 1.102 + 1.103 +/* Signals */ 1.104 + 1.105 +#define JVM_SIGINT SIGINT 1.106 +#define JVM_SIGTERM SIGTERM 1.107 + 1.108 +#define SHUTDOWN1_SIGNAL SIGINT /* Shutdown Hooks support. */ 1.109 +#define SHUTDOWN2_SIGNAL SIGTERM 1.110 + 1.111 +#endif /* !_JAVASOFT_JVM_MD_H_ */