Path: blob/master/src/hotspot/os/posix/include/jvm_md.h
40941 views
/*1* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 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 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef _JAVASOFT_JVM_MD_H_26#define _JAVASOFT_JVM_MD_H_2728/*29* This file is currently collecting system-specific dregs for the30* JNI conversion, which should be sorted out later.31*/3233#include <dirent.h> /* For DIR */34#include <sys/param.h> /* For MAXPATHLEN */35#include <unistd.h> /* For F_OK, R_OK, W_OK */36#include <stddef.h> /* For ptrdiff_t */37#include <stdint.h> /* For uintptr_t */3839#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}40#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}41#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}42#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}43#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}44#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}4546#define JNI_LIB_PREFIX "lib"47#ifdef __APPLE__48#define JNI_LIB_SUFFIX ".dylib"49#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX50#else51#define JNI_LIB_SUFFIX ".so"52#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX "." VERSION53#endif54#define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX5556#if defined(AIX)57#define JVM_MAXPATHLEN MAXPATHLEN58#else59// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may60// cause problems if JVM and the rest of JDK are built on different61// Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,62// so buffers declared in VM are always >= 4096.63#define JVM_MAXPATHLEN MAXPATHLEN + 164#endif6566#define JVM_R_OK R_OK67#define JVM_W_OK W_OK68#define JVM_X_OK X_OK69#define JVM_F_OK F_OK7071/*72* File I/O73*/7475#include <sys/types.h>76#include <sys/stat.h>77#include <fcntl.h>78#include <errno.h>79#include <signal.h>8081/* Signals */8283#include <sys/socket.h> // for socklen_t8485#define JVM_SIGINT SIGINT86#define JVM_SIGTERM SIGTERM8788#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */89#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */90#define SHUTDOWN2_SIGNAL SIGINT91#define SHUTDOWN3_SIGNAL SIGTERM9293#endif /* !_JAVASOFT_JVM_MD_H_ */949596