# HG changeset patch # User mbaesken # Date 1574942559 -3600 # Node ID ae2eb76c486d27d37065c62902d530833602c8b8 # Parent 5775e4825e5893a7affab3948b56315008e10c76 8234821: remove unused functions from libjli Reviewed-by: clanger, alanb diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/macosx/native/libjli/java_md_macosx.m --- a/src/java.base/macosx/native/libjli/java_md_macosx.m Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/macosx/native/libjli/java_md_macosx.m Thu Nov 28 13:02:39 2019 +0100 @@ -709,13 +709,6 @@ } } -void SplashFreeLibrary() { - if (hSplashLib) { - dlclose(hSplashLib); - hSplashLib = NULL; - } -} - /* * Signature adapter for pthread_create(). */ diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/share/native/libjli/java.c --- a/src/java.base/share/native/libjli/java.c Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/share/native/libjli/java.c Thu Nov 28 13:02:39 2019 +0100 @@ -102,6 +102,9 @@ /* * Prototypes for functions internal to launcher. */ +static const char* GetFullVersion(); +static jboolean IsJavaArgs(); +static void SetJavaLauncherProp(); static void SetClassPath(const char *s); static void SetMainModule(const char *s); static void SelectVersion(int argc, char **argv, char **main_class); @@ -643,8 +646,7 @@ /* * Test if an arg identifies a source file. */ -jboolean -IsSourceFile(const char *arg) { +static jboolean IsSourceFile(const char *arg) { struct stat st; return (JLI_HasSuffix(arg, ".java") && stat(arg, &st) == 0); } @@ -1871,8 +1873,7 @@ * JVM would like to know if it's created by a standard Sun launcher, or by * user native application, the following property indicates the former. */ -void -SetJavaLauncherProp() { +static void SetJavaLauncherProp() { AddOption("-Dsun.java.launcher=SUN_STANDARD", NULL); } @@ -2300,26 +2301,22 @@ } -const char* -GetFullVersion() +static const char* GetFullVersion() { return _fVersion; } -const char* -GetProgramName() +static const char* GetProgramName() { return _program_name; } -const char* -GetLauncherName() +static const char* GetLauncherName() { return _launcher_name; } -jboolean -IsJavaArgs() +static jboolean IsJavaArgs() { return _is_java_args; } diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/share/native/libjli/java.h --- a/src/java.base/share/native/libjli/java.h Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/share/native/libjli/java.h Thu Nov 28 13:02:39 2019 +0100 @@ -162,7 +162,6 @@ /* sun.java.launcher.* platform properties. */ void SetJavaCommandLineProp(char* what, int argc, char** argv); -void SetJavaLauncherProp(void); /* * Functions defined in java.c and used in java_md.c. @@ -174,10 +173,6 @@ // Utility function defined in args.c int isTerminalOpt(char *arg); - -const char* GetProgramName(); -const char* GetFullVersion(); -jboolean IsJavaArgs(); jboolean IsJavaw(); int ContinueInNewThread(InvocationFunctions* ifn, jlong threadStackSize, diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/unix/native/libjli/java_md_common.c --- a/src/java.base/unix/native/libjli/java_md_common.c Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/unix/native/libjli/java_md_common.c Thu Nov 28 13:02:39 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ /* * Find the last occurrence of a string */ -char* findLastPathComponent(char *buffer, const char *comp) { +static char* findLastPathComponent(char *buffer, const char *comp) { char* t = buffer; char* p = NULL; size_t l = JLI_StrLen(comp); @@ -47,7 +47,7 @@ * Ex: if a buffer contains "/foo/bin/javac" or "/foo/bin/x64/javac", the * truncated resulting buffer will contain "/foo". */ -jboolean +static jboolean TruncatePath(char *buf) { // try bin directory, maybe an executable diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/unix/native/libjli/java_md_solinux.c --- a/src/java.base/unix/native/libjli/java_md_solinux.c Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/unix/native/libjli/java_md_solinux.c Thu Nov 28 13:02:39 2019 +0100 @@ -727,13 +727,6 @@ } } -void SplashFreeLibrary() { - if (hSplashLib) { - dlclose(hSplashLib); - hSplashLib = NULL; - } -} - /* * Signature adapter for pthread_create() or thr_create(). */ diff -r 5775e4825e58 -r ae2eb76c486d src/java.base/windows/native/libjli/java_md.c --- a/src/java.base/windows/native/libjli/java_md.c Fri Nov 29 10:20:17 2019 +0100 +++ b/src/java.base/windows/native/libjli/java_md.c Thu Nov 28 13:02:39 2019 +0100 @@ -704,13 +704,6 @@ } } -void SplashFreeLibrary() { - if (hSplashLib) { - FreeLibrary(hSplashLib); - hSplashLib = NULL; - } -} - /* * Signature adapter for _beginthreadex(). */