--- old/src/hotspot/os/aix/os_aix.cpp 2018-06-17 16:00:48.490903233 +0200 +++ new/src/hotspot/os/aix/os_aix.cpp 2018-06-17 16:00:48.386903492 +0200 @@ -3737,16 +3737,6 @@ return buf[0] == 'y' || buf[0] == 'Y'; } -int os::stat(const char *path, struct stat *sbuf) { - char pathbuf[MAX_PATH]; - if (strlen(path) > MAX_PATH - 1) { - errno = ENAMETOOLONG; - return -1; - } - os::native_path(strcpy(pathbuf, path)); - return ::stat(pathbuf, sbuf); -} - // Is a (classpath) directory empty? bool os::dir_is_empty(const char* path) { DIR *dir = NULL; --- old/src/hotspot/os/aix/os_aix.inline.hpp 2018-06-17 16:00:48.770902533 +0200 +++ new/src/hotspot/os/aix/os_aix.inline.hpp 2018-06-17 16:00:48.670902782 +0200 @@ -93,10 +93,6 @@ return ::fsync(fd); } -inline char* os::native_path(char *path) { - return path; -} - inline int os::ftruncate(int fd, jlong length) { return ::ftruncate64(fd, length); } --- old/src/hotspot/os/bsd/os_bsd.cpp 2018-06-17 16:00:49.030901884 +0200 +++ new/src/hotspot/os/bsd/os_bsd.cpp 2018-06-17 16:00:48.930902133 +0200 @@ -3489,16 +3489,6 @@ return buf[0] == 'y' || buf[0] == 'Y'; } -int os::stat(const char *path, struct stat *sbuf) { - char pathbuf[MAX_PATH]; - if (strlen(path) > MAX_PATH - 1) { - errno = ENAMETOOLONG; - return -1; - } - os::native_path(strcpy(pathbuf, path)); - return ::stat(pathbuf, sbuf); -} - static inline struct timespec get_mtime(const char* filename) { struct stat st; int ret = os::stat(filename, &st); --- old/src/hotspot/os/bsd/os_bsd.inline.hpp 2018-06-17 16:00:49.310901199 +0200 +++ new/src/hotspot/os/bsd/os_bsd.inline.hpp 2018-06-17 16:00:49.210901443 +0200 @@ -96,10 +96,6 @@ return ::fsync(fd); } -inline char* os::native_path(char *path) { - return path; -} - inline int os::ftruncate(int fd, jlong length) { return ::ftruncate(fd, length); } --- old/src/hotspot/os/linux/os_linux.cpp 2018-06-17 16:00:49.574900551 +0200 +++ new/src/hotspot/os/linux/os_linux.cpp 2018-06-17 16:00:49.470900805 +0200 @@ -5378,16 +5378,6 @@ return buf[0] == 'y' || buf[0] == 'Y'; } -int os::stat(const char *path, struct stat *sbuf) { - char pathbuf[MAX_PATH]; - if (strlen(path) > MAX_PATH - 1) { - errno = ENAMETOOLONG; - return -1; - } - os::native_path(strcpy(pathbuf, path)); - return ::stat(pathbuf, sbuf); -} - // Is a (classpath) directory empty? bool os::dir_is_empty(const char* path) { DIR *dir = NULL; --- old/src/hotspot/os/linux/os_linux.inline.hpp 2018-06-17 16:00:49.866899835 +0200 +++ new/src/hotspot/os/linux/os_linux.inline.hpp 2018-06-17 16:00:49.762900090 +0200 @@ -88,10 +88,6 @@ return ::fsync(fd); } -inline char* os::native_path(char *path) { - return path; -} - inline int os::ftruncate(int fd, jlong length) { return ::ftruncate64(fd, length); } --- old/src/hotspot/os/posix/os_posix.cpp 2018-06-17 16:00:50.126899204 +0200 +++ new/src/hotspot/os/posix/os_posix.cpp 2018-06-17 16:00:50.026899443 +0200 @@ -1334,6 +1334,13 @@ } +int os::stat(const char *path, struct stat *sbuf) { + return ::stat(path, sbuf); +} + +char * os::native_path(char *path) { + return path; +} // Check minimum allowable stack sizes for thread creation and to initialize // the java system classes, including StackOverflowError - depends on page --- old/src/hotspot/os/solaris/os_solaris.cpp 2018-06-17 16:00:50.398898550 +0200 +++ new/src/hotspot/os/solaris/os_solaris.cpp 2018-06-17 16:00:50.294898800 +0200 @@ -1667,16 +1667,6 @@ return (void*)::dlopen(NULL, RTLD_LAZY); } -int os::stat(const char *path, struct stat *sbuf) { - char pathbuf[MAX_PATH]; - if (strlen(path) > MAX_PATH - 1) { - errno = ENAMETOOLONG; - return -1; - } - os::native_path(strcpy(pathbuf, path)); - return ::stat(pathbuf, sbuf); -} - static inline time_t get_mtime(const char* filename) { struct stat st; int ret = os::stat(filename, &st); @@ -4474,10 +4464,6 @@ return (jlong) ::lseek64(fd, offset, whence); } -char * os::native_path(char *path) { - return path; -} - int os::ftruncate(int fd, jlong length) { return ::ftruncate64(fd, length); } --- old/src/hotspot/os/windows/os_windows.cpp 2018-06-17 16:00:50.698897829 +0200 +++ new/src/hotspot/os/windows/os_windows.cpp 2018-06-17 16:00:50.590898088 +0200 @@ -4544,6 +4544,9 @@ // system. Because this might be a double-byte encoding, care is taken to // treat double-byte lead characters correctly. // +// On Posix platforms, this function is a noop; it just returns the +// input argument unchanged. +// // This procedure modifies the given path in place, as the result is never // longer than the original. There is no error return; this operation always // succeeds.