8313277: Resolve multiple definition of 'normalize' when statically linking JDK native libraries with user code

Co-authored-by: Chris Moon <cjmoon@google.com>
Reviewed-by: dholmes, stuefe, sspitsyn
This commit is contained in:
Jiangli Zhou 2023-09-12 09:06:08 +00:00
parent 3b422d0dc1
commit 455c471ee3
4 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ char* basePath(const char* path);
* Convert the given pathname string to normal form. If the string is
* already in normal form then it is simply returned.
*/
char* normalize(const char* path);
char* normalize_path(const char* path);
/**
* Tell whether or not the given abstract pathname is absolute.

View File

@ -924,7 +924,7 @@ appendBootClassPath( JPLISAgent* agent,
* Normalize the path - no duplicate slashes (except UNCs on Windows), trailing
* slash removed.
*/
TRANSFORM(path, normalize(path));
TRANSFORM(path, normalize_path(path));
/*
* If the path is an absolute path then add to the bootclassloader

View File

@ -100,7 +100,7 @@ static char* normalizePath(const char* pathname, int len, int off) {
/* Check that the given pathname is normal. If not, invoke the real
normalizer on the part of the pathname that requires normalization.
This way we iterate through the whole pathname string only once. */
char* normalize(const char* pathname) {
char* normalize_path(const char* pathname) {
int i;
int n = strlen(pathname);
char prevChar = 0;

View File

@ -196,7 +196,7 @@ static char* normalizePath(const char* path, int len, int off) {
* normalizer on the part of the pathname that requires normalization.
* This way we iterate through the whole pathname string only once.
*/
char* normalize(char* path) {
char* normalize_path(char* path) {
int n = (int)strlen(path);
int i;
int prev = 0;