Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/windows/javavm/export/jvm_md.h
48576 views
/*1* Copyright (c) 1997, 2008, 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 <windef.h>34#include <winbase.h>3536#include "jni.h"3738#define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"}39#define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}4041#define JNI_LIB_PREFIX ""42#define JNI_LIB_SUFFIX ".dll"4344struct dirent {45char d_name[MAX_PATH];46};4748typedef struct {49struct dirent dirent;50char *path;51HANDLE handle;52WIN32_FIND_DATA find_data;53} DIR;5455#include <stddef.h> /* For uintptr_t */56#include <stdlib.h>5758#define JVM_MAXPATHLEN _MAX_PATH5960#define JVM_R_OK 461#define JVM_W_OK 262#define JVM_X_OK 163#define JVM_F_OK 06465JNIEXPORT void * JNICALL66JVM_GetThreadInterruptEvent();6768/*69* These routines are only reentrant on Windows70*/7172JNIEXPORT struct protoent * JNICALL73JVM_GetProtoByName(char* name);7475JNIEXPORT struct hostent* JNICALL76JVM_GetHostByAddr(const char* name, int len, int type);7778JNIEXPORT struct hostent* JNICALL79JVM_GetHostByName(char* name);8081/*82* File I/O83*/8485#include <sys/types.h>86#include <sys/stat.h>87#include <fcntl.h>88#include <errno.h>89#include <signal.h>9091/* O Flags */9293#define JVM_O_RDONLY O_RDONLY94#define JVM_O_WRONLY O_WRONLY95#define JVM_O_RDWR O_RDWR96#define JVM_O_O_APPEND O_APPEND97#define JVM_O_EXCL O_EXCL98#define JVM_O_CREAT O_CREAT99#define JVM_O_DELETE O_TEMPORARY100101/* Signals */102103#define JVM_SIGINT SIGINT104#define JVM_SIGTERM SIGTERM105106107#endif /* !_JAVASOFT_JVM_MD_H_ */108109110