Move definition to the build system

0 /*                                                                                                                         
1  * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.                                            
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.                                                           
3  *                                                                                                                         
4  * This code is free software; you can redistribute it and/or modify it                                                    
5  * under the terms of the GNU General Public License version 2 only, as                                                    
6  * published by the Free Software Foundation.  Oracle designates this                                                      
7  * particular file as subject to the "Classpath" exception as provided                                                     
8  * by Oracle in the LICENSE file that accompanied this code.                                                               
9  *                                                                                                                         
10  * This code is distributed in the hope that it will be useful, but WITHOUT                                                
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or                                                   
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License                                                   
13  * version 2 for more details (a copy is included in the LICENSE file that                                                 
14  * accompanied this code).                                                                                                 
15  *                                                                                                                         
16  * You should have received a copy of the GNU General Public License version                                               
17  * 2 along with this work; if not, write to the Free Software Foundation,                                                  
18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.                                                           
19  *                                                                                                                         
20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA                                                 
21  * or visit www.oracle.com if you need additional information or have any                                                  
22  * questions.                                                                                                              
23  */                                                                                                                        
24 
25 #ifndef _JAVASOFT_JVM_MD_H_                                                                                                
26 #define _JAVASOFT_JVM_MD_H_                                                                                                
27 
28 /*                                                                                                                         
29  * This file is currently collecting system-specific dregs for the                                                         
30  * JNI conversion, which should be sorted out later.                                                                       
31  */                                                                                                                        
32 
33 #ifndef WIN32_LEAN_AND_MEAN                                                                                                
34 #define WIN32_LEAN_AND_MEAN                                                                                                
35 #endif                                                                                                                     
36                                                                                                                            
37 #include <windows.h>                                                                                                       
38 #include <windef.h>                                                                                                        
39 #include <winbase.h>                                                                                                       
40 
41 #include "jni.h"                                                                                                           
42 
43 typedef int socklen_t;                                                                                                     
44 
45 #define JNI_ONLOAD_SYMBOLS   {"_JNI_OnLoad@8", "JNI_OnLoad"}                                                               
46 #define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}                                                           
47 #define JVM_ONLOAD_SYMBOLS      {"_JVM_OnLoad@12", "JVM_OnLoad"}                                                           
48 #define AGENT_ONLOAD_SYMBOLS    {"_Agent_OnLoad@12", "Agent_OnLoad"}                                                       
49 #define AGENT_ONUNLOAD_SYMBOLS  {"_Agent_OnUnload@4", "Agent_OnUnload"}                                                    
50 #define AGENT_ONATTACH_SYMBOLS  {"_Agent_OnAttach@12", "Agent_OnAttach"}                                                   
51 
52 #define JNI_LIB_PREFIX ""                                                                                                  
53 #define JNI_LIB_SUFFIX ".dll"                                                                                              
54 
55 struct dirent {                                                                                                            
56     char d_name[MAX_PATH];                                                                                                 
57 };                                                                                                                         
58 
59 typedef struct {                                                                                                           
60     struct dirent dirent;                                                                                                  
61     char *path;                                                                                                            
62     HANDLE handle;                                                                                                         
63     WIN32_FIND_DATA find_data;                                                                                             
64 } DIR;                                                                                                                     
65 
66 #include <stddef.h>  /* For uintptr_t */                                                                                   
67 #include <stdlib.h>                                                                                                        
68 
69 #define JVM_MAXPATHLEN _MAX_PATH                                                                                           
70 
71 #define JVM_R_OK    4                                                                                                      
72 #define JVM_W_OK    2                                                                                                      
73 #define JVM_X_OK    1                                                                                                      
74 #define JVM_F_OK    0                                                                                                      
75 
76 #ifdef __cplusplus                                                                                                         
77 extern "C" {                                                                                                               
78 #endif                                                                                                                     
79 
80 JNIEXPORT void * JNICALL                                                                                                   
81 JVM_GetThreadInterruptEvent();                                                                                             
82 
83 #ifdef __cplusplus                                                                                                         
84 } /* extern "C" */                                                                                                         
85 #endif /* __cplusplus */                                                                                                   
86 
87 /*                                                                                                                         
88  * File I/O                                                                                                                
89  */                                                                                                                        
90 
91 #include <sys/types.h>                                                                                                     
92 #include <sys/stat.h>                                                                                                      
93 #include <fcntl.h>                                                                                                         
94 #include <errno.h>                                                                                                         
95 #include <signal.h>                                                                                                        
96 
97 /* Signals */                                                                                                              
98 
99 #define JVM_SIGINT     SIGINT                                                                                              
100 #define JVM_SIGTERM    SIGTERM                                                                                             
101 
102 #define SHUTDOWN1_SIGNAL SIGINT            /* Shutdown Hooks support. */                                                   
103 #define SHUTDOWN2_SIGNAL SIGTERM                                                                                           
104 
105 #endif /* !_JAVASOFT_JVM_MD_H_ */                                                                                          
--- EOF ---