Path: blob/master/src/java.base/unix/native/libjli/java_md.h
41119 views
/*1* Copyright (c) 1998, 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 JAVA_MD_H26#define JAVA_MD_H2728/*29* This file contains common defines and includes for unix.30*/31#include <limits.h>32#include <unistd.h>33#include <sys/param.h>34#include <dlfcn.h>35#include <pthread.h>36#include "manifest_info.h"37#include "jli_util.h"3839#define PATH_SEPARATOR ':'40#define FILESEP "/"41#define FILE_SEPARATOR '/'42#define IS_FILE_SEPARATOR(c) ((c) == '/')43#ifndef MAXNAMELEN44#define MAXNAMELEN PATH_MAX45#endif4647#ifdef _LP6448#define JLONG_FORMAT_SPECIFIER "%ld"49#else50#define JLONG_FORMAT_SPECIFIER "%lld"51#endif5253int UnsetEnv(char *name);54char *FindExecName(char *program);55const char *SetExecname(char **argv);56const char *GetExecName();57static jboolean GetJVMPath(const char *jrepath, const char *jvmtype,58char *jvmpath, jint jvmpathsize);59static jboolean GetJREPath(char *path, jint pathsize, jboolean speculative);6061#if defined(_AIX)62#include "java_md_aix.h"63#endif6465#if defined(MACOSX)66#include <crt_externs.h>67#define environ (*_NSGetEnviron())68#else69extern char **environ;70#endif7172#endif /* JAVA_MD_H */737475