1 /* 2 * Copyright (c) 1999, 2017, 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 #include <dirent.h> /* For DIR */ 44 45 // Must redefine NULL because the macro gets redefined to int 0 46 // by dirent.h. This redefinition is included later then the standard definition in 47 // globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization. 48 // We definitely need NULL to have the same lengh as an address pointer. 49 #ifdef _LP64 50 #undef NULL 51 #define NULL 0L 52 #else 53 #ifndef NULL 54 #define NULL 0 55 #endif 56 #endif 57 58 #include <sys/param.h> /* For MAXPATHLEN */ 59 #include <sys/socket.h> /* For socklen_t */ 60 #include <unistd.h> /* For F_OK, R_OK, W_OK */ 61 62 #define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"} 63 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"} 64 #define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"} 65 #define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"} 66 #define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"} 67 #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"} 68 69 #define JNI_LIB_PREFIX "lib" 70 #define JNI_LIB_SUFFIX ".so" 71 72 #define JVM_MAXPATHLEN MAXPATHLEN 73 74 #define JVM_R_OK R_OK 75 #define JVM_W_OK W_OK 76 #define JVM_X_OK X_OK 77 #define JVM_F_OK F_OK 78 79 /* 80 * File I/O 81 */ 82 83 #include <sys/types.h> 84 #include <sys/stat.h> 85 #include <fcntl.h> 86 #include <errno.h> 87 88 /* O Flags */ 89 90 #define JVM_O_RDONLY O_RDONLY 91 #define JVM_O_WRONLY O_WRONLY 92 #define JVM_O_RDWR O_RDWR 93 #define JVM_O_O_APPEND O_APPEND 94 #define JVM_O_EXCL O_EXCL 95 #define JVM_O_CREAT O_CREAT 96 97 /* Signal definitions */ 98 99 #define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */ 100 #define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */ 101 #define SHUTDOWN2_SIGNAL SIGINT 102 #define SHUTDOWN3_SIGNAL SIGTERM 103 104 #endif /* JVM_MD_H */ 105 106 #endif // OS_AIX_VM_JVM_AIX_H