Skip to content
Permalink
Browse files

8234821: remove unused functions from libjli

Reviewed-by: clanger, alanb
  • Loading branch information
Matthias Baesken
Matthias Baesken committed Nov 28, 2019
1 parent 4f0cc5a commit 673c732a333c6309ae7fb4ecdee5c0c0786a9665
@@ -709,13 +709,6 @@ static void MacOSXStartup(int argc, char *argv[]) {
}
}

void SplashFreeLibrary() {
if (hSplashLib) {
dlclose(hSplashLib);
hSplashLib = NULL;
}
}

/*
* Signature adapter for pthread_create().
*/
@@ -102,6 +102,9 @@ static int numOptions, maxOptions;
/*
* 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 @@ checkMode(int mode, int newMode, const char *arg) {
/*
* 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 @@ SetJavaCommandLineProp(char *what, int argc, char **argv)
* 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 @@ ShowSplashScreen()

}

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;
}
@@ -162,7 +162,6 @@ int CallJavaMainInNewThread(jlong stack_size, void* args);

/* 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 @@ jboolean IsWhiteSpaceOption(const char* name);

// 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,
@@ -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 @@ char* findLastPathComponent(char *buffer, const char *comp) {
* 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
@@ -727,13 +727,6 @@ void* SplashProcAddress(const char* name) {
}
}

void SplashFreeLibrary() {
if (hSplashLib) {
dlclose(hSplashLib);
hSplashLib = NULL;
}
}

/*
* Signature adapter for pthread_create() or thr_create().
*/
@@ -704,13 +704,6 @@ void* SplashProcAddress(const char* name) {
}
}

void SplashFreeLibrary() {
if (hSplashLib) {
FreeLibrary(hSplashLib);
hSplashLib = NULL;
}
}

/*
* Signature adapter for _beginthreadex().
*/

0 comments on commit 673c732

Please sign in to comment.
You can’t perform that action at this time.