equal
deleted
inserted
replaced
29 /* |
29 /* |
30 * This file is currently collecting system-specific dregs for the |
30 * This file is currently collecting system-specific dregs for the |
31 * JNI conversion, which should be sorted out later. |
31 * JNI conversion, which should be sorted out later. |
32 */ |
32 */ |
33 |
33 |
|
34 #include <windows.h> |
34 #include <windef.h> |
35 #include <windef.h> |
35 #include <winbase.h> |
36 #include <winbase.h> |
36 |
37 |
37 #include "jni.h" |
38 #include "jni.h" |
38 |
39 |
|
40 typedef int socklen_t; |
|
41 |
39 #define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"} |
42 #define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"} |
40 #define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"} |
43 #define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"} |
|
44 #define JVM_ONLOAD_SYMBOLS {"_JVM_OnLoad@12", "JVM_OnLoad"} |
|
45 #define AGENT_ONLOAD_SYMBOLS {"_Agent_OnLoad@12", "Agent_OnLoad"} |
|
46 #define AGENT_ONUNLOAD_SYMBOLS {"_Agent_OnUnload@4", "Agent_OnUnload"} |
|
47 #define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12", "Agent_OnAttach"} |
41 |
48 |
42 #define JNI_LIB_PREFIX "" |
49 #define JNI_LIB_PREFIX "" |
43 #define JNI_LIB_SUFFIX ".dll" |
50 #define JNI_LIB_SUFFIX ".dll" |
44 |
51 |
45 struct dirent { |
52 struct dirent { |
61 #define JVM_R_OK 4 |
68 #define JVM_R_OK 4 |
62 #define JVM_W_OK 2 |
69 #define JVM_W_OK 2 |
63 #define JVM_X_OK 1 |
70 #define JVM_X_OK 1 |
64 #define JVM_F_OK 0 |
71 #define JVM_F_OK 0 |
65 |
72 |
|
73 #ifdef __cplusplus |
|
74 extern "C" { |
|
75 #endif |
|
76 |
66 JNIEXPORT void * JNICALL |
77 JNIEXPORT void * JNICALL |
67 JVM_GetThreadInterruptEvent(); |
78 JVM_GetThreadInterruptEvent(); |
68 |
79 |
69 /* |
80 #ifdef __cplusplus |
70 * These routines are only reentrant on Windows |
81 } /* extern "C" */ |
71 */ |
82 #endif /* __cplusplus */ |
72 |
|
73 JNIEXPORT struct protoent * JNICALL |
|
74 JVM_GetProtoByName(char* name); |
|
75 |
|
76 JNIEXPORT struct hostent* JNICALL |
|
77 JVM_GetHostByAddr(const char* name, int len, int type); |
|
78 |
|
79 JNIEXPORT struct hostent* JNICALL |
|
80 JVM_GetHostByName(char* name); |
|
81 |
83 |
82 /* |
84 /* |
83 * File I/O |
85 * File I/O |
84 */ |
86 */ |
85 |
87 |
87 #include <sys/stat.h> |
89 #include <sys/stat.h> |
88 #include <fcntl.h> |
90 #include <fcntl.h> |
89 #include <errno.h> |
91 #include <errno.h> |
90 #include <signal.h> |
92 #include <signal.h> |
91 |
93 |
92 /* O Flags */ |
|
93 |
|
94 #define JVM_O_RDONLY O_RDONLY |
|
95 #define JVM_O_WRONLY O_WRONLY |
|
96 #define JVM_O_RDWR O_RDWR |
|
97 #define JVM_O_O_APPEND O_APPEND |
|
98 #define JVM_O_EXCL O_EXCL |
|
99 #define JVM_O_CREAT O_CREAT |
|
100 |
|
101 /* Signals */ |
94 /* Signals */ |
102 |
95 |
103 #define JVM_SIGINT SIGINT |
96 #define JVM_SIGINT SIGINT |
104 #define JVM_SIGTERM SIGTERM |
97 #define JVM_SIGTERM SIGTERM |
105 |
98 |
|
99 #define SHUTDOWN1_SIGNAL SIGINT /* Shutdown Hooks support. */ |
|
100 #define SHUTDOWN2_SIGNAL SIGTERM |
106 |
101 |
107 #endif /* !_JAVASOFT_JVM_MD_H_ */ |
102 #endif /* !_JAVASOFT_JVM_MD_H_ */ |