0N/A/*
1879N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef OS_LINUX_VM_JVM_LINUX_H
1879N/A#define OS_LINUX_VM_JVM_LINUX_H
1879N/A
0N/A/*
0N/A// HotSpot integration note:
0N/A//
0N/A// This is derived from the JDK classic file:
0N/A// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
0N/A// All local includes have been commented out.
0N/A*/
0N/A
0N/A#ifndef JVM_MD_H
0N/A#define JVM_MD_H
0N/A
0N/A/*
0N/A * This file is currently collecting system-specific dregs for the
0N/A * JNI conversion, which should be sorted out later.
0N/A */
0N/A
0N/A#include <dirent.h> /* For DIR */
0N/A#include <sys/param.h> /* For MAXPATHLEN */
2993N/A#include <sys/socket.h> /* For socklen_t */
0N/A#include <unistd.h> /* For F_OK, R_OK, W_OK */
0N/A
0N/A#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
0N/A#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
0N/A#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
0N/A#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
0N/A#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
0N/A#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
0N/A
0N/A#define JNI_LIB_PREFIX "lib"
0N/A#define JNI_LIB_SUFFIX ".so"
0N/A
0N/A// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
0N/A// cause problems if JVM and the rest of JDK are built on different
0N/A// Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
0N/A// so buffers declared in VM are always >= 4096.
0N/A#define JVM_MAXPATHLEN MAXPATHLEN + 1
0N/A
0N/A#define JVM_R_OK R_OK
0N/A#define JVM_W_OK W_OK
0N/A#define JVM_X_OK X_OK
0N/A#define JVM_F_OK F_OK
0N/A
0N/A/*
0N/A * File I/O
0N/A */
0N/A
0N/A#include <sys/types.h>
0N/A#include <sys/stat.h>
0N/A#include <fcntl.h>
0N/A#include <errno.h>
0N/A
0N/A/* O Flags */
0N/A
0N/A#define JVM_O_RDONLY O_RDONLY
0N/A#define JVM_O_WRONLY O_WRONLY
0N/A#define JVM_O_RDWR O_RDWR
0N/A#define JVM_O_O_APPEND O_APPEND
0N/A#define JVM_O_EXCL O_EXCL
0N/A#define JVM_O_CREAT O_CREAT
0N/A
0N/A/* Signal definitions */
0N/A
0N/A#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
0N/A#define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */
0N/A#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
0N/A#define SHUTDOWN2_SIGNAL SIGINT
0N/A#define SHUTDOWN3_SIGNAL SIGTERM
0N/A
0N/A#endif /* JVM_MD_H */
0N/A
1879N/A#endif // OS_LINUX_VM_JVM_LINUX_H