1 /* 2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. 3 * Copyright (c) 2012, 2013 SAP SE. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. 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 26 #ifndef OS_AIX_VM_JVM_AIX_H 27 #define OS_AIX_VM_JVM_AIX_H 28 29 // HotSpot integration note: 30 // 31 // This is derived from the JDK classic file: 32 // "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22) 33 // All local includes have been commented out. 34 35 #ifndef JVM_MD_H 36 #define JVM_MD_H 37 38 /* 39 * This file is currently collecting system-specific dregs for the 40 * JNI conversion, which should be sorted out later. 41 */ 42 43 // Since we are compiling with c++, we need the following to make c macros 44 // visible. 45 #if !defined(__STDC_LIMIT_MACROS) 46 # define __STDC_LIMIT_MACROS 1 47 #endif 48 #if !defined(__STDC_CONSTANT_MACROS) 49 # define __STDC_CONSTANT_MACROS 1 50 #endif 51 #if !defined(__STDC_FORMAT_MACROS) 52 # define __STDC_FORMAT_MACROS 1 53 #endif 54 55 #include <dirent.h> /* For DIR */ 56 57 // Must redefine NULL because the macro gets redefined to int 0 58 // by dirent.h. This redefinition is included later then the standard definition in 59 // globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization. 60 // We definitely need NULL to have the same lengh as an address pointer. 61 #ifdef _LP64 62 #undef NULL 63 #define NULL 0L 64 #else 65 #ifndef NULL 66 #define NULL 0 67 #endif 68 #endif 69 70 #include <sys/param.h> /* For MAXPATHLEN */ 71 #include <sys/socket.h> /* For socklen_t */ 72 #include <unistd.h> /* For F_OK, R_OK, W_OK */ 73 74 #define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"} 75 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"} 76 #define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"} 77 #define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"} 78 #define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"} 79 #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"} 80 81 #define JNI_LIB_PREFIX "lib" 82 #define JNI_LIB_SUFFIX ".so" 83 84 #define JVM_MAXPATHLEN MAXPATHLEN 85 86 #define JVM_R_OK R_OK 87 #define JVM_W_OK W_OK 88 #define JVM_X_OK X_OK 89 #define JVM_F_OK F_OK 90 91 /* 92 * File I/O 93 */ 94 95 #include <sys/types.h> 96 #include <sys/stat.h> 97 #include <fcntl.h> 98 #include <errno.h> 99 100 /* O Flags */ 101 102 #define JVM_O_RDONLY O_RDONLY 103 #define JVM_O_WRONLY O_WRONLY 104 #define JVM_O_RDWR O_RDWR 105 #define JVM_O_O_APPEND O_APPEND 106 #define JVM_O_EXCL O_EXCL 107 #define JVM_O_CREAT O_CREAT 108 109 /* Signal definitions */ 110 111 #define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */ 112 #define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */ 113 #define SHUTDOWN2_SIGNAL SIGINT 114 #define SHUTDOWN3_SIGNAL SIGTERM 115 116 #endif /* JVM_MD_H */ 117 118 #endif // OS_AIX_VM_JVM_AIX_H