mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8199323: hsdis could not be loaded which are located on long path
Reviewed-by: dholmes, stuefe
This commit is contained in:
parent
e16d660cc2
commit
8680d7da99
1 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -63,6 +63,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
#define JVM_MAXPATHLEN _MAX_PATH
|
||||||
|
#else
|
||||||
|
#include <sys/param.h>
|
||||||
|
#define JVM_MAXPATHLEN MAXPATHLEN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
static int getLastErrorString(char *buf, size_t len)
|
static int getLastErrorString(char *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +120,7 @@ JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIE
|
||||||
const char *error_message = NULL;
|
const char *error_message = NULL;
|
||||||
const char *jrepath = NULL;
|
const char *jrepath = NULL;
|
||||||
const char *libname = NULL;
|
const char *libname = NULL;
|
||||||
char buffer[128];
|
char buffer[JVM_MAXPATHLEN];
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
HINSTANCE hsdis_handle = (HINSTANCE) NULL;
|
HINSTANCE hsdis_handle = (HINSTANCE) NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue