comparison src/os/aix/vm/jvm_aix.h @ 14415:666e6ce3976c

8023038: PPC64 (part 15): Platform files for AIX/PPC64 support Reviewed-by: kvn
author simonis
date Fri, 06 Sep 2013 20:16:09 +0200
parents
children
comparison
equal deleted inserted replaced
14414:b83f7d608548 14415:666e6ce3976c
1 /*
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2013 SAP AG. 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 // Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
85 // cause problems if JVM and the rest of JDK are built on different
86 // Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
87 // so buffers declared in VM are always >= 4096.
88 #define JVM_MAXPATHLEN MAXPATHLEN + 1
89
90 #define JVM_R_OK R_OK
91 #define JVM_W_OK W_OK
92 #define JVM_X_OK X_OK
93 #define JVM_F_OK F_OK
94
95 /*
96 * File I/O
97 */
98
99 #include <sys/types.h>
100 #include <sys/stat.h>
101 #include <fcntl.h>
102 #include <errno.h>
103
104 /* O Flags */
105
106 #define JVM_O_RDONLY O_RDONLY
107 #define JVM_O_WRONLY O_WRONLY
108 #define JVM_O_RDWR O_RDWR
109 #define JVM_O_O_APPEND O_APPEND
110 #define JVM_O_EXCL O_EXCL
111 #define JVM_O_CREAT O_CREAT
112
113 /* Signal definitions */
114
115 #define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
116 #define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */
117 #define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
118 #define SHUTDOWN2_SIGNAL SIGINT
119 #define SHUTDOWN3_SIGNAL SIGTERM
120
121 #endif /* JVM_MD_H */
122
123 #endif // OS_AIX_VM_JVM_AIX_H