1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/os/aix/vm/jvm_aix.h Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,123 @@ 1.4 +/* 1.5 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright 2012, 2013 SAP AG. All rights reserved. 1.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 + * 1.9 + * This code is free software; you can redistribute it and/or modify it 1.10 + * under the terms of the GNU General Public License version 2 only, as 1.11 + * published by the Free Software Foundation. 1.12 + * 1.13 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 + * version 2 for more details (a copy is included in the LICENSE file that 1.17 + * accompanied this code). 1.18 + * 1.19 + * You should have received a copy of the GNU General Public License version 1.20 + * 2 along with this work; if not, write to the Free Software Foundation, 1.21 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 + * 1.23 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 + * or visit www.oracle.com if you need additional information or have any 1.25 + * questions. 1.26 + * 1.27 + */ 1.28 + 1.29 +#ifndef OS_AIX_VM_JVM_AIX_H 1.30 +#define OS_AIX_VM_JVM_AIX_H 1.31 + 1.32 +// HotSpot integration note: 1.33 +// 1.34 +// This is derived from the JDK classic file: 1.35 +// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22) 1.36 +// All local includes have been commented out. 1.37 + 1.38 +#ifndef JVM_MD_H 1.39 +#define JVM_MD_H 1.40 + 1.41 +/* 1.42 + * This file is currently collecting system-specific dregs for the 1.43 + * JNI conversion, which should be sorted out later. 1.44 + */ 1.45 + 1.46 +// Since we are compiling with c++, we need the following to make c macros 1.47 +// visible. 1.48 +#if !defined(__STDC_LIMIT_MACROS) 1.49 +# define __STDC_LIMIT_MACROS 1 1.50 +#endif 1.51 +#if !defined(__STDC_CONSTANT_MACROS) 1.52 +# define __STDC_CONSTANT_MACROS 1 1.53 +#endif 1.54 +#if !defined(__STDC_FORMAT_MACROS) 1.55 +# define __STDC_FORMAT_MACROS 1 1.56 +#endif 1.57 + 1.58 +#include <dirent.h> /* For DIR */ 1.59 + 1.60 +// Must redefine NULL because the macro gets redefined to int 0 1.61 +// by dirent.h. This redefinition is included later then the standard definition in 1.62 +// globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization. 1.63 +// We definitely need NULL to have the same lengh as an address pointer. 1.64 +#ifdef _LP64 1.65 +#undef NULL 1.66 +#define NULL 0L 1.67 +#else 1.68 +#ifndef NULL 1.69 +#define NULL 0 1.70 +#endif 1.71 +#endif 1.72 + 1.73 +#include <sys/param.h> /* For MAXPATHLEN */ 1.74 +#include <sys/socket.h> /* For socklen_t */ 1.75 +#include <unistd.h> /* For F_OK, R_OK, W_OK */ 1.76 + 1.77 +#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"} 1.78 +#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"} 1.79 +#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"} 1.80 +#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"} 1.81 +#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"} 1.82 +#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"} 1.83 + 1.84 +#define JNI_LIB_PREFIX "lib" 1.85 +#define JNI_LIB_SUFFIX ".so" 1.86 + 1.87 +// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may 1.88 +// cause problems if JVM and the rest of JDK are built on different 1.89 +// Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1, 1.90 +// so buffers declared in VM are always >= 4096. 1.91 +#define JVM_MAXPATHLEN MAXPATHLEN + 1 1.92 + 1.93 +#define JVM_R_OK R_OK 1.94 +#define JVM_W_OK W_OK 1.95 +#define JVM_X_OK X_OK 1.96 +#define JVM_F_OK F_OK 1.97 + 1.98 +/* 1.99 + * File I/O 1.100 + */ 1.101 + 1.102 +#include <sys/types.h> 1.103 +#include <sys/stat.h> 1.104 +#include <fcntl.h> 1.105 +#include <errno.h> 1.106 + 1.107 +/* O Flags */ 1.108 + 1.109 +#define JVM_O_RDONLY O_RDONLY 1.110 +#define JVM_O_WRONLY O_WRONLY 1.111 +#define JVM_O_RDWR O_RDWR 1.112 +#define JVM_O_O_APPEND O_APPEND 1.113 +#define JVM_O_EXCL O_EXCL 1.114 +#define JVM_O_CREAT O_CREAT 1.115 + 1.116 +/* Signal definitions */ 1.117 + 1.118 +#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */ 1.119 +#define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */ 1.120 +#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */ 1.121 +#define SHUTDOWN2_SIGNAL SIGINT 1.122 +#define SHUTDOWN3_SIGNAL SIGTERM 1.123 + 1.124 +#endif /* JVM_MD_H */ 1.125 + 1.126 +#endif // OS_AIX_VM_JVM_AIX_H