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