mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot
Removed hotspot version of jvm*h and jni*h files. Reviewed-by: ihse, mchung, dholmes
This commit is contained in:
parent
b36ba5ff60
commit
e908052a71
177 changed files with 308 additions and 2713 deletions
|
@ -30,8 +30,13 @@
|
|||
#define __has_attribute(x) 0
|
||||
#endif
|
||||
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
|
||||
#define JNIEXPORT __attribute__((visibility("default")))
|
||||
#define JNIIMPORT __attribute__((visibility("default")))
|
||||
#ifdef ARM
|
||||
#define JNIEXPORT __attribute__((externally_visible,visibility("default")))
|
||||
#define JNIIMPORT __attribute__((externally_visible,visibility("default")))
|
||||
#else
|
||||
#define JNIEXPORT __attribute__((visibility("default")))
|
||||
#define JNIIMPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
#else
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
|
@ -40,7 +45,7 @@
|
|||
#define JNICALL
|
||||
|
||||
typedef int jint;
|
||||
#ifdef _LP64 /* 64-bit Solaris */
|
||||
#ifdef _LP64
|
||||
typedef long jlong;
|
||||
#else
|
||||
typedef long long jlong;
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
|
||||
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
|
||||
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
|
||||
#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
|
||||
#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
|
||||
#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
|
||||
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
|
||||
|
||||
#define JNI_LIB_PREFIX "lib"
|
||||
#ifdef __APPLE__
|
||||
|
@ -50,7 +54,15 @@
|
|||
#endif
|
||||
#define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
|
||||
|
||||
#if defined(AIX) || defined(SOLARIS)
|
||||
#define JVM_MAXPATHLEN MAXPATHLEN
|
||||
#else
|
||||
// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
|
||||
// cause problems if JVM and the rest of JDK are built on different
|
||||
// Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
|
||||
// so buffers declared in VM are always >= 4096.
|
||||
#define JVM_MAXPATHLEN MAXPATHLEN + 1
|
||||
#endif
|
||||
|
||||
#define JVM_R_OK R_OK
|
||||
#define JVM_W_OK W_OK
|
||||
|
@ -67,19 +79,22 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* O Flags */
|
||||
|
||||
#define JVM_O_RDONLY O_RDONLY
|
||||
#define JVM_O_WRONLY O_WRONLY
|
||||
#define JVM_O_RDWR O_RDWR
|
||||
#define JVM_O_O_APPEND O_APPEND
|
||||
#define JVM_O_EXCL O_EXCL
|
||||
#define JVM_O_CREAT O_CREAT
|
||||
|
||||
/* Signals */
|
||||
|
||||
#include <sys/socket.h> // for socklen_t
|
||||
|
||||
#define JVM_SIGINT SIGINT
|
||||
#define JVM_SIGTERM SIGTERM
|
||||
|
||||
#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
|
||||
#ifdef SOLARIS
|
||||
#define ASYNC_SIGNAL SIGJVM2 /* Event-based suspend/resume support */
|
||||
#endif // SOLARIS
|
||||
#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
|
||||
#define SHUTDOWN2_SIGNAL SIGINT
|
||||
#define SHUTDOWN3_SIGNAL SIGTERM
|
||||
|
||||
/* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
|
||||
#define JSIG_VERSION_1_4_1 0x30140100
|
||||
|
||||
#endif /* !_JAVASOFT_JVM_MD_H_ */
|
||||
|
|
|
@ -38,11 +38,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "jni.h"
|
||||
#include "jni_util.h"
|
||||
#include "jlong.h"
|
||||
#include "jvm.h"
|
||||
#include "io_util.h"
|
||||
#include "io_util_md.h"
|
||||
#include "java_io_FileSystem.h"
|
||||
|
@ -97,9 +99,9 @@ Java_java_io_UnixFileSystem_canonicalize0(JNIEnv *env, jobject this,
|
|||
jstring rv = NULL;
|
||||
|
||||
WITH_PLATFORM_STRING(env, pathname, path) {
|
||||
char canonicalPath[JVM_MAXPATHLEN];
|
||||
char canonicalPath[PATH_MAX];
|
||||
if (canonicalize((char *)path,
|
||||
canonicalPath, JVM_MAXPATHLEN) < 0) {
|
||||
canonicalPath, PATH_MAX) < 0) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Bad pathname");
|
||||
} else {
|
||||
#ifdef MACOSX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue