Skip to content

Commit

Permalink
8295710: remove os::dll_file_extension
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, mdoerr, lucy
  • Loading branch information
MBaesken committed Oct 26, 2022
1 parent e3a5a34 commit b2878c9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions src/hotspot/os/aix/os_aix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,6 @@ int os::current_process_id() {

// DLL functions

const char* os::dll_file_extension() { return ".so"; }

// This must be hard coded because it's the system's temporary
// directory not the java application's temp directory, ala java.io.tmpdir.
const char* os::get_temp_directory() { return "/tmp"; }
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/os/bsd/os_bsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,6 @@ int os::current_process_id() {
}

// DLL functions

const char* os::dll_file_extension() { return JNI_LIB_SUFFIX; }

static int local_dladdr(const void* addr, Dl_info* info) {
#ifdef __APPLE__
if (addr == (void*)-1) {
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/os/linux/os_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,8 +1316,6 @@ int os::current_process_id() {

// DLL functions

const char* os::dll_file_extension() { return ".so"; }

// This must be hard coded because it's the system's temporary
// directory not the java application's temp directory, ala java.io.tmpdir.
const char* os::get_temp_directory() { return "/tmp"; }
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/os/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,6 @@ void os::die() {
win32::exit_process_or_thread(win32::EPT_PROCESS_DIE, -1);
}

const char* os::dll_file_extension() { return ".dll"; }

void os::dll_unload(void *lib) {
char name[MAX_PATH];
if (::GetModuleFileName((HMODULE)lib, name, sizeof(name)) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/disassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ address decode_env::decode_instructions(address start, address end, address orig

void* Disassembler::dll_load(char* buf, int buflen, int offset, char* ebuf, int ebuflen, outputStream* st) {
int sz = buflen - offset;
int written = jio_snprintf(&buf[offset], sz, "%s%s", hsdis_library_name, os::dll_file_extension());
int written = jio_snprintf(&buf[offset], sz, "%s%s", hsdis_library_name, JNI_LIB_SUFFIX);
if (written < sz) { // written successfully, not truncated.
if (Verbose) st->print_cr("Trying to load: %s", buf);
return os::dll_load(buf, ebuf, ebuflen);
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/runtime/os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,6 @@ class os: AllStatic {
static struct dirent* readdir(DIR* dirp);
static int closedir(DIR* dirp);

// Dynamic library extension
static const char* dll_file_extension();

static const char* get_temp_directory();
static const char* get_current_directory(char *buf, size_t buflen);

Expand Down

1 comment on commit b2878c9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.