diff options
author | DJtheRedstoner <52044242+DJtheRedstoner@users.noreply.github.com> | 2022-09-30 20:41:51 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-01 19:17:50 +0100 |
commit | bd08587ac90f634c335f4b2dde65f93db17cb38d (patch) | |
tree | 042971feba75131a3dd595c28fa6f75afaa292cb | |
parent | 8b2683a070ab632778d6545fc80db747440616c6 (diff) | |
download | serenity-bd08587ac90f634c335f4b2dde65f93db17cb38d.zip |
Ports/OpenJDK: Update for the removal of StringView(char const*)
8 files changed, 74 insertions, 78 deletions
diff --git a/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch b/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch index d1756e6a9f..31f395c98e 100644 --- a/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch +++ b/Ports/OpenJDK/patches/0001-make-Add-Serenity-support-masquerading-as-BSD-when-n.patch @@ -16,7 +16,7 @@ Co-Authored-By: Andrew Kaster <akaster@serenityos.org> 7 files changed, 39 insertions(+) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 -index 5eed1138f..62e53a1c4 100644 +index 5eed1138f1f205874e21b92050634fbfcfefd0c7..62e53a1c421c600ed92eaeb6805fd61e825e3072 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -382,6 +382,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], @@ -30,7 +30,7 @@ index 5eed1138f..62e53a1c4 100644 CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_" fi diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 -index 23bb33e87..e3deb0c3f 100644 +index 23bb33e878d17d2b8072189c1c6d4b17097598e7..e3deb0c3fb0cecfb39b4052f0e5abda34465abc9 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -110,6 +110,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], @@ -52,7 +52,7 @@ index 23bb33e87..e3deb0c3f 100644 if test "x$TOOLCHAIN_TYPE" = xgcc; then if test "x$OPENJDK_TARGET_OS" = xlinux; then diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 -index 205d64f56..6e668edc4 100644 +index 205d64f566d93a9a9c9d0b9191372e3aabb05143..6e668edc45672128a3e70bb4e37d0100a1ef9243 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -220,6 +220,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS], @@ -85,7 +85,7 @@ index 205d64f56..6e668edc4 100644 AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR) ]) diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 -index 69540e160..badd84a50 100644 +index 69540e1608e1df16ca2a3e631c061ba6ae366ca7..badd84a506a201d664f0a6902c68109017c86180 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -42,6 +42,7 @@ VALID_TOOLCHAINS_linux="gcc clang" @@ -97,7 +97,7 @@ index 69540e160..badd84a50 100644 # Toolchain descriptions TOOLCHAIN_DESCRIPTION_clang="clang/LLVM" diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk -index 7ad0375e2..8100f655e 100644 +index 7ad0375e2e38ff31419eb47d028a652c2dead647..8100f655e9273de3775e828d7c9dc8aa0185bf46 100644 --- a/make/common/modules/LauncherCommon.gmk +++ b/make/common/modules/LauncherCommon.gmk @@ -157,11 +157,14 @@ define SetupBuildLauncherBody @@ -116,7 +116,7 @@ index 7ad0375e2..8100f655e 100644 -framework ApplicationServices, \ LIBS_aix := -ljli_static, \ diff --git a/make/hotspot/lib/JvmMapfile.gmk b/make/hotspot/lib/JvmMapfile.gmk -index 5cba93178..752727d0d 100644 +index 5cba93178c744feb0d1c0286634a40def232eca2..752727d0d8b445ab584a09ee5e0cd3f65f9813d4 100644 --- a/make/hotspot/lib/JvmMapfile.gmk +++ b/make/hotspot/lib/JvmMapfile.gmk @@ -64,6 +64,18 @@ ifeq ($(call isTargetOs, linux), true) @@ -139,7 +139,7 @@ index 5cba93178..752727d0d 100644 # nm on macosx prints out "warning: nm: no name list" to stderr for # files without symbols. Hide this, even at the expense of hiding real errors. diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk -index 1d5fede2a..0a61d009f 100644 +index 1d5fede2aa8af9e475ab2980e303b3ff22412795..0a61d009f34a4e73ace746d0cc6068fe2852e832 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -209,6 +209,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ diff --git a/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch b/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch index 63deaa8e89..10fa2f0cd7 100644 --- a/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch +++ b/Ports/OpenJDK/patches/0002-make-Build-with-c-20-when-targeting-serenity.patch @@ -12,7 +12,7 @@ Subject: [PATCH] make: Build with c++20 when targeting serenity 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 -index 62e53a1c4..9239dfb43 100644 +index 62e53a1c421c600ed92eaeb6805fd61e825e3072..9239dfb435521ab276ea1ca566e6bf539f649ddb 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -154,7 +154,8 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], @@ -45,7 +45,7 @@ index 62e53a1c4..9239dfb43 100644 TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS" ADLC_LANGSTD_CXXFLAGS="$LANGSTD_CXXFLAGS" diff --git a/src/hotspot/share/utilities/chunkedList.hpp b/src/hotspot/share/utilities/chunkedList.hpp -index 1a899ee2b..13f05cd3a 100644 +index 1a899ee2bfb2e8ef20bb98914fe909248f1aec45..13f05cd3a85acde45124b5cda6303f5198eecb9c 100644 --- a/src/hotspot/share/utilities/chunkedList.hpp +++ b/src/hotspot/share/utilities/chunkedList.hpp @@ -44,7 +44,7 @@ template <class T, MEMFLAGS F> class ChunkedList : public CHeapObj<F> { @@ -58,7 +58,7 @@ index 1a899ee2b..13f05cd3a 100644 bool is_full() const { return _top == end(); diff --git a/src/hotspot/share/utilities/events.hpp b/src/hotspot/share/utilities/events.hpp -index b5d67bd6a..3cf3b399f 100644 +index b5d67bd6a8ad8eae3d844e904d2d105408f22719..3cf3b399f96cf0be0e5ff15c29fcd7ce12fc2ffd 100644 --- a/src/hotspot/share/utilities/events.hpp +++ b/src/hotspot/share/utilities/events.hpp @@ -99,7 +99,7 @@ template <class T> class EventLogBase : public EventLog { @@ -71,7 +71,7 @@ index b5d67bd6a..3cf3b399f 100644 _name(name), _handle(handle), diff --git a/src/hotspot/share/utilities/growableArray.hpp b/src/hotspot/share/utilities/growableArray.hpp -index b75283843..67074b86f 100644 +index b75283843eb798e476ffd15d2b8d7a06c8c41586..67074b86fe231fcf3efc93e0bef04c792e2f62c1 100644 --- a/src/hotspot/share/utilities/growableArray.hpp +++ b/src/hotspot/share/utilities/growableArray.hpp @@ -118,7 +118,7 @@ class GrowableArrayView : public GrowableArrayBase { @@ -84,7 +84,7 @@ index b75283843..67074b86f 100644 ~GrowableArrayView() {} diff --git a/src/hotspot/share/utilities/linkedlist.hpp b/src/hotspot/share/utilities/linkedlist.hpp -index 16ee6a844..2c5ffe6cb 100644 +index 16ee6a844fa1afb1cdbc8f3f0656c59710ac4e5e..2c5ffe6cb48085791598252c40b9c526a8b9ac97 100644 --- a/src/hotspot/share/utilities/linkedlist.hpp +++ b/src/hotspot/share/utilities/linkedlist.hpp @@ -82,7 +82,7 @@ template <class E> class LinkedListNode : public ResourceObj { diff --git a/Ports/OpenJDK/patches/0003-make-Remove-CUPS-dependency.patch b/Ports/OpenJDK/patches/0003-make-Remove-CUPS-dependency.patch index 4f2c46f7e3..a9bde27b25 100644 --- a/Ports/OpenJDK/patches/0003-make-Remove-CUPS-dependency.patch +++ b/Ports/OpenJDK/patches/0003-make-Remove-CUPS-dependency.patch @@ -8,7 +8,7 @@ Subject: [PATCH] make: Remove CUPS dependency 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4 -index a65d91ee9..7c779d012 100644 +index a65d91ee974bff4248cd39cce662159f23f84720..7c779d01201661e3f5cd124c2e86a8d554b9d502 100644 --- a/make/autoconf/libraries.m4 +++ b/make/autoconf/libraries.m4 @@ -26,7 +26,7 @@ diff --git a/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch b/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch index f0687e68d9..fd375e3c2f 100644 --- a/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch +++ b/Ports/OpenJDK/patches/0004-hotspot-Add-workarounds-for-BSD-differences-from-ser.patch @@ -21,7 +21,7 @@ Co-Authored-By: Timur Sultanov <sultanovts@yandex.ru> 7 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/hotspot/os/bsd/attachListener_bsd.cpp b/src/hotspot/os/bsd/attachListener_bsd.cpp -index 9daad43dc..092b4d94a 100644 +index 9daad43dc7ad567dd87c9ce44b1363d18c4f5931..092b4d94ab99eb016fe8583ae9defca4922f807f 100644 --- a/src/hotspot/os/bsd/attachListener_bsd.cpp +++ b/src/hotspot/os/bsd/attachListener_bsd.cpp @@ -358,11 +358,23 @@ BsdAttachOperation* BsdAttachListener::dequeue() { @@ -49,7 +49,7 @@ index 9daad43dc..092b4d94a 100644 if (!os::Posix::matches_effective_uid_and_gid_or_root(puid, pgid)) { log_debug(attach)("euid/egid check failed (%d/%d vs %d/%d)", puid, pgid, diff --git a/src/hotspot/os/bsd/osThread_bsd.cpp b/src/hotspot/os/bsd/osThread_bsd.cpp -index 9eba7288f..d7164e5d5 100644 +index 9eba7288fbe36fbe2149fb54c5709b5fd3f098ba..d7164e5d5f2151e71b535ccf998a5c9b260ad160 100644 --- a/src/hotspot/os/bsd/osThread_bsd.cpp +++ b/src/hotspot/os/bsd/osThread_bsd.cpp @@ -31,13 +31,17 @@ @@ -72,7 +72,7 @@ index 9eba7288f..d7164e5d5 100644 _ucontext = NULL; _expanding_stack = 0; diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp -index 1896c036c..4452b5e9b 100644 +index 1896c036cffa2f6eccff0b1e9bd20f7c36ae8bb8..4452b5e9b0b5cd6376849709230584c70b778467 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -87,8 +87,10 @@ @@ -304,7 +304,7 @@ index 1896c036c..4452b5e9b 100644 void os::pause() { diff --git a/src/hotspot/os/bsd/os_perf_bsd.cpp b/src/hotspot/os/bsd/os_perf_bsd.cpp -index e69bfc795..4e67e2e4b 100644 +index e69bfc79558c3fb5cebf3a8451b98f1fd0ecad80..4e67e2e4b7add0a56cf356156c6f40987db773e3 100644 --- a/src/hotspot/os/bsd/os_perf_bsd.cpp +++ b/src/hotspot/os/bsd/os_perf_bsd.cpp @@ -425,6 +425,9 @@ NetworkPerformanceInterface::NetworkPerformance::~NetworkPerformance() { @@ -326,7 +326,7 @@ index e69bfc795..4e67e2e4b 100644 NetworkPerformanceInterface::NetworkPerformanceInterface() { diff --git a/src/hotspot/os_cpu/bsd_zero/bytes_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/bytes_bsd_zero.hpp -index 0da7ecc78..bd1ee9a67 100644 +index 0da7ecc7892dc74b21caf5c9ac831d6ab45aae2e..bd1ee9a6756e040733b30cef6823053f793d7c75 100644 --- a/src/hotspot/os_cpu/bsd_zero/bytes_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/bytes_bsd_zero.hpp @@ -30,6 +30,8 @@ @@ -339,7 +339,7 @@ index 0da7ecc78..bd1ee9a67 100644 # include <sys/endian.h> #endif diff --git a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp -index a9fda1d4b..494f073ac 100644 +index a9fda1d4b75aa08462cbb9ca9853fe4199faee80..494f073ac1a040535b3791f94ccc8cab283bbdcd 100644 --- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp +++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp @@ -23,11 +23,15 @@ @@ -386,7 +386,7 @@ index a9fda1d4b..494f073ac 100644 pthread_attr_t attr; diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp -index 0287b73e5..101299b2f 100644 +index 0287b73e50373c5634fbfa5b0ab09059b507a576..101299b2f28ae496d9de2cc32c3b52974ac1b32b 100644 --- a/src/hotspot/share/classfile/classLoader.cpp +++ b/src/hotspot/share/classfile/classLoader.cpp @@ -249,7 +249,7 @@ ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* diff --git a/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch b/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch index 420eff1282..b7bfd3e57a 100644 --- a/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch +++ b/Ports/OpenJDK/patches/0005-hotspot-Update-non-BSD-native-modules-for-Serenity.patch @@ -16,7 +16,7 @@ Co-Authored-By: Andrew Kaster <akaster@serenityos.org> 8 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp -index 9eb1fcbcc..0676cb83d 100644 +index 9eb1fcbcc0b22d2e633082877fd5a1ea849738cb..0676cb83d276f284de800c561828c405d29c15d3 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp @@ -65,7 +65,9 @@ @@ -96,7 +96,7 @@ index 9eb1fcbcc..0676cb83d 100644 const char* os::get_current_directory(char *buf, size_t buflen) { diff --git a/src/hotspot/os/posix/signals_posix.cpp b/src/hotspot/os/posix/signals_posix.cpp -index 2c020a794..9f3316f5b 100644 +index 2c020a79408049797d5c2f1fcc1e5de8d968323e..9f3316f5b9ad66a47bedf7f56a318610a4d88873 100644 --- a/src/hotspot/os/posix/signals_posix.cpp +++ b/src/hotspot/os/posix/signals_posix.cpp @@ -552,6 +552,8 @@ public: @@ -152,7 +152,7 @@ index 2c020a794..9f3316f5b 100644 #ifdef SI_TKILL { SI_TKILL, "SI_TKILL", "Signal sent by tkill (pthread_kill)" }, diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp -index 9b8e667f9..4e9a5f0e6 100644 +index 9b8e667f9ec38e33ec33e9f8bbf90bfb1efa36bc..4e9a5f0e6c5748a6942af6dd637ccd45b6580796 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -155,7 +155,7 @@ char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t b @@ -183,7 +183,7 @@ index 9b8e667f9..4e9a5f0e6 100644 #define DEFINE_ENTRY(e, text) { e, #e, text }, diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp -index 7eaaa9db9..50591f707 100644 +index 7eaaa9db984f423c184599050b94238bc0cd1b6f..50591f7070e150e0586bbb05eef00a52b29df47b 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -468,7 +468,7 @@ class os: AllStatic { @@ -196,7 +196,7 @@ index 7eaaa9db9..50591f707 100644 { return false; } #else diff --git a/src/hotspot/share/runtime/semaphore.hpp b/src/hotspot/share/runtime/semaphore.hpp -index 0e19c101d..afc007e7a 100644 +index 0e19c101da035baf13a4dd60d81bc024e4d6ac2d..afc007e7a328e05a297a278668386a4944ee1c48 100644 --- a/src/hotspot/share/runtime/semaphore.hpp +++ b/src/hotspot/share/runtime/semaphore.hpp @@ -28,7 +28,7 @@ @@ -209,7 +209,7 @@ index 0e19c101d..afc007e7a 100644 #elif defined(BSD) # include "semaphore_bsd.hpp" diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp -index 082a3272c..65157b52e 100644 +index 082a3272c6faf5899002fc30d14988bde3869af4..65157b52ed0fc68f289fb529ad7e10fd4699a6b0 100644 --- a/src/hotspot/share/utilities/globalDefinitions.hpp +++ b/src/hotspot/share/utilities/globalDefinitions.hpp @@ -1209,5 +1209,9 @@ template<typename K> bool primitive_equals(const K& k0, const K& k1) { @@ -223,7 +223,7 @@ index 082a3272c..65157b52e 100644 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_HPP diff --git a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp -index 30cca9ee7..7cac45142 100644 +index 30cca9ee7aef6abd56a4156d4dfb7e1f191bc542..7cac45142b53c8e407e62108a4c84444fa6c1cd7 100644 --- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp +++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp @@ -48,7 +48,7 @@ @@ -254,7 +254,7 @@ index 30cca9ee7..7cac45142 100644 inline int g_isnan(double f) { return isnan(f); } #else diff --git a/src/hotspot/share/utilities/ostream.cpp b/src/hotspot/share/utilities/ostream.cpp -index 04995064f..e25c3a429 100644 +index 04995064fe3a98489bebb3605ceadc9d02b38f95..e25c3a4296577ab796f6d750d20186a4de412381 100644 --- a/src/hotspot/share/utilities/ostream.cpp +++ b/src/hotspot/share/utilities/ostream.cpp @@ -1065,7 +1065,7 @@ bufferedStream::~bufferedStream() { diff --git a/Ports/OpenJDK/patches/0006-Add-serenity-specific-modules-to-java.base-and-jdk.a.patch b/Ports/OpenJDK/patches/0006-Add-serenity-specific-modules-to-java.base-and-jdk.a.patch index eff5bcc881..cfe8f9a219 100644 --- a/Ports/OpenJDK/patches/0006-Add-serenity-specific-modules-to-java.base-and-jdk.a.patch +++ b/Ports/OpenJDK/patches/0006-Add-serenity-specific-modules-to-java.base-and-jdk.a.patch @@ -38,7 +38,7 @@ Co-Authored-By: Andrew Kaster <akaster@serenityos.org> diff --git a/src/java.base/serenity/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java b/src/java.base/serenity/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java new file mode 100644 -index 000000000..7a7bfe089 +index 0000000000000000000000000000000000000000..7a7bfe0897390a5828dfea7a7f9d0e83f25af9af --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java @@ -0,0 +1,47 @@ @@ -91,7 +91,7 @@ index 000000000..7a7bfe089 +} diff --git a/src/java.base/serenity/classes/sun/nio/ch/DefaultSelectorProvider.java b/src/java.base/serenity/classes/sun/nio/ch/DefaultSelectorProvider.java new file mode 100644 -index 000000000..86d3ade19 +index 0000000000000000000000000000000000000000..86d3ade19de292048b3b028a7f78a1cc61f4784f --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/ch/DefaultSelectorProvider.java @@ -0,0 +1,54 @@ @@ -152,7 +152,7 @@ index 000000000..86d3ade19 \ No newline at end of file diff --git a/src/java.base/serenity/classes/sun/nio/ch/SerenityAsynchronousChannelProvider.java b/src/java.base/serenity/classes/sun/nio/ch/SerenityAsynchronousChannelProvider.java new file mode 100644 -index 000000000..2daa2cca4 +index 0000000000000000000000000000000000000000..2daa2cca4717a6db0dff166bc4befd19d9fdb528 --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/ch/SerenityAsynchronousChannelProvider.java @@ -0,0 +1,91 @@ @@ -249,7 +249,7 @@ index 000000000..2daa2cca4 +} diff --git a/src/java.base/serenity/classes/sun/nio/ch/SerenityPollPort.java b/src/java.base/serenity/classes/sun/nio/ch/SerenityPollPort.java new file mode 100644 -index 000000000..0894d1814 +index 0000000000000000000000000000000000000000..0894d1814244f39887d119da00290798c960e53c --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/ch/SerenityPollPort.java @@ -0,0 +1,538 @@ @@ -793,7 +793,7 @@ index 000000000..0894d1814 +} diff --git a/src/java.base/serenity/classes/sun/nio/fs/DefaultFileSystemProvider.java b/src/java.base/serenity/classes/sun/nio/fs/DefaultFileSystemProvider.java new file mode 100644 -index 000000000..b24f3de01 +index 0000000000000000000000000000000000000000..b24f3de0139e5447455417914c47b3bfcff1301c --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/fs/DefaultFileSystemProvider.java @@ -0,0 +1,53 @@ @@ -852,7 +852,7 @@ index 000000000..b24f3de01 +} diff --git a/src/java.base/serenity/classes/sun/nio/fs/SerenityFileStore.java b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileStore.java new file mode 100644 -index 000000000..3f408ec9b +index 0000000000000000000000000000000000000000..3f408ec9bd370405e4b2287742b3ba09c9233bbc --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileStore.java @@ -0,0 +1,105 @@ @@ -963,7 +963,7 @@ index 000000000..3f408ec9b +} diff --git a/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystem.java b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystem.java new file mode 100644 -index 000000000..bee588a7e +index 0000000000000000000000000000000000000000..bee588a7ebc0e5d3994a05ac733ba6a8e0d34117 --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystem.java @@ -0,0 +1,94 @@ @@ -1063,7 +1063,7 @@ index 000000000..bee588a7e +} diff --git a/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystemProvider.java b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystemProvider.java new file mode 100644 -index 000000000..8582190af +index 0000000000000000000000000000000000000000..8582190afb01b4f1415789aa36b2dd11431443c4 --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/fs/SerenityFileSystemProvider.java @@ -0,0 +1,52 @@ @@ -1121,7 +1121,7 @@ index 000000000..8582190af +} diff --git a/src/java.base/serenity/classes/sun/nio/fs/SerenityNativeDispatcher.java b/src/java.base/serenity/classes/sun/nio/fs/SerenityNativeDispatcher.java new file mode 100644 -index 000000000..7c50b719c +index 0000000000000000000000000000000000000000..7c50b719c792a157f53348d00ecfdc6f89a1f726 --- /dev/null +++ b/src/java.base/serenity/classes/sun/nio/fs/SerenityNativeDispatcher.java @@ -0,0 +1,49 @@ @@ -1176,7 +1176,7 @@ index 000000000..7c50b719c +} diff --git a/src/java.base/serenity/native/libnet/serenity_close.c b/src/java.base/serenity/native/libnet/serenity_close.c new file mode 100644 -index 000000000..6a177bbb9 +index 0000000000000000000000000000000000000000..6a177bbb90a59efdcc6734ee68a06fdd12e4fa61 --- /dev/null +++ b/src/java.base/serenity/native/libnet/serenity_close.c @@ -0,0 +1,458 @@ @@ -1640,7 +1640,7 @@ index 000000000..6a177bbb9 +} diff --git a/src/jdk.attach/serenity/classes/sun/tools/attach/AttachProviderImpl.java b/src/jdk.attach/serenity/classes/sun/tools/attach/AttachProviderImpl.java new file mode 100644 -index 000000000..2f6fc4d4d +index 0000000000000000000000000000000000000000..2f6fc4d4df22ccfda0c36d5ce1cbb6704ec05bbf --- /dev/null +++ b/src/jdk.attach/serenity/classes/sun/tools/attach/AttachProviderImpl.java @@ -0,0 +1,82 @@ @@ -1728,7 +1728,7 @@ index 000000000..2f6fc4d4d +} diff --git a/src/jdk.attach/serenity/classes/sun/tools/attach/VirtualMachineImpl.java b/src/jdk.attach/serenity/classes/sun/tools/attach/VirtualMachineImpl.java new file mode 100644 -index 000000000..0c432edee +index 0000000000000000000000000000000000000000..0c432edeee3c7d5241006d1aaaf68c1b6d81dd3c --- /dev/null +++ b/src/jdk.attach/serenity/classes/sun/tools/attach/VirtualMachineImpl.java @@ -0,0 +1,326 @@ @@ -2060,7 +2060,7 @@ index 000000000..0c432edee +} diff --git a/src/jdk.attach/serenity/native/libattach/VirtualMachineImpl.c b/src/jdk.attach/serenity/native/libattach/VirtualMachineImpl.c new file mode 100644 -index 000000000..d20a6f012 +index 0000000000000000000000000000000000000000..d20a6f012f20be4d3ef49b4b05417b92c1f42975 --- /dev/null +++ b/src/jdk.attach/serenity/native/libattach/VirtualMachineImpl.c @@ -0,0 +1,328 @@ diff --git a/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch b/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch index 271a7e0120..1d4fcc48f9 100644 --- a/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch +++ b/Ports/OpenJDK/patches/0007-java.base-Update-native-modules-to-support-Serenity.patch @@ -8,7 +8,7 @@ Subject: [PATCH] java.base: Update native modules to support Serenity src/java.base/share/native/libjava/io_util.h | 5 +- src/java.base/share/native/libjli/jli_util.h | 3 + src/java.base/share/native/libzip/zip_util.c | 2 +- - .../sun/nio/fs/UnixConstants.java.template | 92 ++++++++++++++++++- + .../sun/nio/fs/UnixConstants.java.template | 91 ++++++++++++++++++- .../native/libjava/ProcessHandleImpl_unix.c | 2 +- .../unix/native/libjava/TimeZone_md.c | 4 +- .../unix/native/libjava/io_util_md.c | 2 +- @@ -19,17 +19,16 @@ Subject: [PATCH] java.base: Update native modules to support Serenity .../unix/native/libnet/NetworkInterface.c | 11 ++- .../unix/native/libnet/net_util_md.h | 4 + .../unix/native/libnio/MappedMemoryUtils.c | 4 + - .../native/libnio/ch/DatagramDispatcher.c | 1 + .../unix/native/libnio/ch/FileChannelImpl.c | 3 + .../native/libnio/ch/FileDispatcherImpl.c | 7 +- src/java.base/unix/native/libnio/ch/FileKey.c | 2 +- .../unix/native/libnio/ch/NativeThread.c | 2 +- src/java.base/unix/native/libnio/ch/Net.c | 2 +- .../native/libnio/fs/UnixNativeDispatcher.c | 39 +++++++- - 22 files changed, 207 insertions(+), 16 deletions(-) + 21 files changed, 205 insertions(+), 16 deletions(-) diff --git a/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template b/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template -index 0672ced15..55bde3569 100644 +index 0672ced15e268cd5f07cabd91793eafe441e6fa8..55bde3569d9a429e5e24ad39e393bdb8149f956c 100644 --- a/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template +++ b/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template @@ -50,6 +50,24 @@ @@ -68,7 +67,7 @@ index 0672ced15..55bde3569 100644 StandardProtocolFamily.INET6), new OptionKey(41, IPV6_TCLASS)); map.put(new RegistryKey(StandardSocketOptions.PREFIX_IP_MULTICAST_IF, diff --git a/src/java.base/share/native/libjava/io_util.h b/src/java.base/share/native/libjava/io_util.h -index 6e960c034..cbd1d087e 100644 +index 6e960c0347fe7cf8d2d40211a9b8f744673f1a05..cbd1d087ed50ba0a74e35e7e1c1cec0ef0aa4ccf 100644 --- a/src/java.base/share/native/libjava/io_util.h +++ b/src/java.base/share/native/libjava/io_util.h @@ -30,11 +30,14 @@ extern jfieldID IO_fd_fdID; @@ -88,7 +87,7 @@ index 6e960c034..cbd1d087e 100644 #define O_DSYNC O_FSYNC #endif diff --git a/src/java.base/share/native/libjli/jli_util.h b/src/java.base/share/native/libjli/jli_util.h -index 3512b1e96..e60f7581f 100644 +index 3512b1e96f5820afd0d130d840e2bc591183d84f..e60f7581ff8793a26e8453cdc44e90c351c0cd50 100644 --- a/src/java.base/share/native/libjli/jli_util.h +++ b/src/java.base/share/native/libjli/jli_util.h @@ -108,6 +108,9 @@ JLI_CmdToArgs(char *cmdline); @@ -102,7 +101,7 @@ index 3512b1e96..e60f7581f 100644 #define JLI_Lseek lseek #endif diff --git a/src/java.base/share/native/libzip/zip_util.c b/src/java.base/share/native/libzip/zip_util.c -index fbbd9d850..eef30b9e4 100644 +index fbbd9d850fcc7d4ccc7a55a22c8a5fe84affe6f9..eef30b9e4dedbe96dfd615444f10adf8b5732f16 100644 --- a/src/java.base/share/native/libzip/zip_util.c +++ b/src/java.base/share/native/libzip/zip_util.c @@ -46,7 +46,7 @@ @@ -115,7 +114,7 @@ index fbbd9d850..eef30b9e4 100644 #define mmap64 mmap #endif diff --git a/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template b/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template -index d60283d24..5d428521b 100644 +index d60283d24aafd83854c2506de5b5a88d2e13ac5f..cc953ba3a89456c70d5bf98225fdaaea6acba2ed 100644 --- a/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template +++ b/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template @@ -31,6 +31,95 @@ @@ -214,7 +213,7 @@ index d60283d24..5d428521b 100644 /* To be able to name the Java constants the same as the C constants without having the preprocessor rewrite those identifiers, add PREFIX_ to all identifiers matching a C constant. The PREFIX_ is filtered out in the -@@ -120,7 +210,7 @@ class UnixConstants { +@@ -120,7 +209,7 @@ class UnixConstants { // fgetxattr error codes for absent attributes depend on the OS: #ifdef _ALLBSD_SOURCE static final int PREFIX_XATTR_NOT_FOUND = ENOATTR; @@ -224,7 +223,7 @@ index d60283d24..5d428521b 100644 #else // not supported (dummy values will not be used at runtime). diff --git a/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c b/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c -index d53e88764..eddb5f169 100644 +index d53e88764c5892996bd7bb5a611b6cb7ebc48c2e..eddb5f169d149bb62cc9a317c691675c9cb34ecc 100644 --- a/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c +++ b/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c @@ -488,7 +488,7 @@ void unix_getUserInfo(JNIEnv* env, jobject jinfo, uid_t uid) { @@ -237,7 +236,7 @@ index d53e88764..eddb5f169 100644 /* * Returns the children of the requested pid and optionally each parent and diff --git a/src/java.base/unix/native/libjava/TimeZone_md.c b/src/java.base/unix/native/libjava/TimeZone_md.c -index 94dfc207f..2a6c3851a 100644 +index 94dfc207f965204d6485f3e6154b669ac951e96e..2a6c3851aef90e0a66517efc134f168d4345439d 100644 --- a/src/java.base/unix/native/libjava/TimeZone_md.c +++ b/src/java.base/unix/native/libjava/TimeZone_md.c @@ -53,7 +53,7 @@ static char *isFileIdentical(char* buf, size_t size, char *pathname); @@ -259,7 +258,7 @@ index 94dfc207f..2a6c3851a 100644 /* * Returns a pointer to the zone ID portion of the given zoneinfo file diff --git a/src/java.base/unix/native/libjava/io_util_md.c b/src/java.base/unix/native/libjava/io_util_md.c -index e207c57d4..8afabc544 100644 +index e207c57d49b751b03a845f6ab2f053f8bbb38b30..8afabc544caada520dc990b649895acee3b95c46 100644 --- a/src/java.base/unix/native/libjava/io_util_md.c +++ b/src/java.base/unix/native/libjava/io_util_md.c @@ -30,7 +30,7 @@ @@ -272,7 +271,7 @@ index e207c57d4..8afabc544 100644 #endif diff --git a/src/java.base/unix/native/libjava/io_util_md.h b/src/java.base/unix/native/libjava/io_util_md.h -index 3dccf64f4..3e9e7d3b0 100644 +index 3dccf64f41f7bc2cecada62d428514afcb94ef10..3e9e7d3b09e07866eb02f3c40e60ce090c546dda 100644 --- a/src/java.base/unix/native/libjava/io_util_md.h +++ b/src/java.base/unix/native/libjava/io_util_md.h @@ -66,7 +66,7 @@ FD getFD(JNIEnv *env, jobject cur, jfieldID fid); @@ -296,7 +295,7 @@ index 3dccf64f4..3e9e7d3b0 100644 * On Solaris, the handle field is unused */ diff --git a/src/java.base/unix/native/libjsig/jsig.c b/src/java.base/unix/native/libjsig/jsig.c -index 1108b2f9c..d891aab93 100644 +index 1108b2f9ce5a37efd0e404d2ebb4f9415730e2b0..d891aab931ba6e12c8e861db7ac04584de69104d 100644 --- a/src/java.base/unix/native/libjsig/jsig.c +++ b/src/java.base/unix/native/libjsig/jsig.c @@ -100,6 +100,10 @@ static sa_handler_t call_os_signal(int sig, sa_handler_t disp, @@ -311,7 +310,7 @@ index 1108b2f9c..d891aab93 100644 // Deprecation warning first time through printf(HOTSPOT_VM_DISTRO " VM warning: the use of signal() and sigset() " diff --git a/src/java.base/unix/native/libnet/Inet4AddressImpl.c b/src/java.base/unix/native/libnet/Inet4AddressImpl.c -index b165be7ce..a4cd70003 100644 +index b165be7cea1f60836c354772b5adfd6c5119ade4..a4cd7000329ab444bf1937c833bab8df6a33fbd7 100644 --- a/src/java.base/unix/native/libnet/Inet4AddressImpl.c +++ b/src/java.base/unix/native/libnet/Inet4AddressImpl.c @@ -335,6 +335,7 @@ static jboolean @@ -332,7 +331,7 @@ index b165be7ce..a4cd70003 100644 } diff --git a/src/java.base/unix/native/libnet/Inet6AddressImpl.c b/src/java.base/unix/native/libnet/Inet6AddressImpl.c -index 058f3d3a7..61460fda8 100644 +index 058f3d3a7e47d09e20d1851a38c0a696e8cab1fd..61460fda89f1b54d36744dac69ea5726e9fedbe3 100644 --- a/src/java.base/unix/native/libnet/Inet6AddressImpl.c +++ b/src/java.base/unix/native/libnet/Inet6AddressImpl.c @@ -29,7 +29,9 @@ @@ -362,7 +361,7 @@ index 058f3d3a7..61460fda8 100644 } diff --git a/src/java.base/unix/native/libnet/NetworkInterface.c b/src/java.base/unix/native/libnet/NetworkInterface.c -index 990bc1bcc..fdeff2bf6 100644 +index 990bc1bcc5101185803c16164ee414ddd946c6f1..fdeff2bf67a34d9765f4c7c24df60d884dcc7352 100644 --- a/src/java.base/unix/native/libnet/NetworkInterface.c +++ b/src/java.base/unix/native/libnet/NetworkInterface.c @@ -43,6 +43,10 @@ @@ -412,7 +411,7 @@ index 990bc1bcc..fdeff2bf6 100644 } diff --git a/src/java.base/unix/native/libnet/net_util_md.h b/src/java.base/unix/native/libnet/net_util_md.h -index 68835987b..f99b11207 100644 +index 68835987b64008df1c7e02b17d8b302fac289d22..f99b112077eb95081c2c61ae7e3cd4664520f5aa 100644 --- a/src/java.base/unix/native/libnet/net_util_md.h +++ b/src/java.base/unix/native/libnet/net_util_md.h @@ -30,6 +30,10 @@ @@ -427,7 +426,7 @@ index 68835987b..f99b11207 100644 * Macros and constants */ diff --git a/src/java.base/unix/native/libnio/MappedMemoryUtils.c b/src/java.base/unix/native/libnio/MappedMemoryUtils.c -index e90acd286..34787fff4 100644 +index e90acd2863fa1e96564456a616ea0cb65971bf4b..34787fff4b7fd1af6f38bd3330dd7d92984c9cf1 100644 --- a/src/java.base/unix/native/libnio/MappedMemoryUtils.c +++ b/src/java.base/unix/native/libnio/MappedMemoryUtils.c @@ -58,6 +58,7 @@ JNIEXPORT jboolean JNICALL @@ -449,7 +448,7 @@ index e90acd286..34787fff4 100644 diff --git a/src/java.base/unix/native/libnio/ch/FileChannelImpl.c b/src/java.base/unix/native/libnio/ch/FileChannelImpl.c -index 8cc753e6a..28fa55269 100644 +index 8cc753e6aa090c14623afecb47f59281eeddea88..28fa5526972b032681905fa5a9e6e716467a2423 100644 --- a/src/java.base/unix/native/libnio/ch/FileChannelImpl.c +++ b/src/java.base/unix/native/libnio/ch/FileChannelImpl.c @@ -39,6 +39,9 @@ @@ -463,7 +462,7 @@ index 8cc753e6a..28fa55269 100644 #include "jni.h" diff --git a/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c b/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c -index c0c31d6ab..3a4d8a632 100644 +index c0c31d6ab2cec8445aac9c85645052cbc9200034..3a4d8a632becb07c46879badfa652b93a9523c34 100644 --- a/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c +++ b/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c @@ -40,7 +40,7 @@ @@ -488,7 +487,7 @@ index c0c31d6ab..3a4d8a632 100644 #include "jni_util.h" #include "jvm.h" diff --git a/src/java.base/unix/native/libnio/ch/FileKey.c b/src/java.base/unix/native/libnio/ch/FileKey.c -index bdb42a632..a433cdf01 100644 +index bdb42a6324b685400fd2a6893b80f7504cea56b6..a433cdf013471f584b06dcd6592ffc4ddb525d7c 100644 --- a/src/java.base/unix/native/libnio/ch/FileKey.c +++ b/src/java.base/unix/native/libnio/ch/FileKey.c @@ -30,7 +30,7 @@ @@ -501,7 +500,7 @@ index bdb42a632..a433cdf01 100644 #define fstat64 fstat diff --git a/src/java.base/unix/native/libnio/ch/NativeThread.c b/src/java.base/unix/native/libnio/ch/NativeThread.c -index 92dcb9e56..4bf09d03b 100644 +index 92dcb9e569c81bb69e149279b29f074872faf185..4bf09d03b90afefb297cbe073ccb344eea953516 100644 --- a/src/java.base/unix/native/libnio/ch/NativeThread.c +++ b/src/java.base/unix/native/libnio/ch/NativeThread.c @@ -40,7 +40,7 @@ @@ -514,7 +513,7 @@ index 92dcb9e56..4bf09d03b 100644 #define INTERRUPT_SIGNAL SIGIO #else diff --git a/src/java.base/unix/native/libnio/ch/Net.c b/src/java.base/unix/native/libnio/ch/Net.c -index 42a07359d..ca1401861 100644 +index 42a07359dde3e2daa8b5dfb3b34e1184bae37d94..ca14018610dd531c5efdf46da76d79e415ca9734 100644 --- a/src/java.base/unix/native/libnio/ch/Net.c +++ b/src/java.base/unix/native/libnio/ch/Net.c @@ -701,7 +701,7 @@ JNIEXPORT jint JNICALL @@ -527,7 +526,7 @@ index 42a07359d..ca1401861 100644 return IOS_UNAVAILABLE; #else diff --git a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c -index 9df8be1e6..993e240db 100644 +index 9df8be1e62c21b5d059f1354e699679c26596fa0..993e240db043f10cb41c218b3b2e909e1f78b807 100644 --- a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c +++ b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c @@ -57,7 +57,7 @@ diff --git a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch index e99b3d2dd8..56358816ac 100644 --- a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch +++ b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch @@ -6,13 +6,13 @@ Subject: [PATCH] java.base: Enable java.lang.Process on serenity --- make/modules/java.base/Launcher.gmk | 2 +- make/modules/java.base/lib/CoreLibraries.gmk | 3 + - .../libjava/ProcessHandleImpl_serenity.cpp | 167 ++++++++++++++++++ + .../libjava/ProcessHandleImpl_serenity.cpp | 164 ++++++++++++++++++ .../unix/classes/java/lang/ProcessImpl.java | 7 +- - 4 files changed, 177 insertions(+), 2 deletions(-) + 4 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp diff --git a/make/modules/java.base/Launcher.gmk b/make/modules/java.base/Launcher.gmk -index 700ddefda..78c884dae 100644 +index 700ddefda49e891ac1a2cfd8602fb8a9409ad1d4..78c884dae8271aea4431976823a0f18506cab4b4 100644 --- a/make/modules/java.base/Launcher.gmk +++ b/make/modules/java.base/Launcher.gmk @@ -73,7 +73,7 @@ endif @@ -25,7 +25,7 @@ index 700ddefda..78c884dae 100644 NAME := jspawnhelper, \ SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \ diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk -index 0a61d009f..7867a3095 100644 +index 0a61d009f34a4e73ace746d0cc6068fe2852e832..7867a3095dbe3d76c8db6d7d1948ae0f05d41c63 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -90,6 +90,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ @@ -47,10 +47,10 @@ index 0a61d009f..7867a3095 100644 -framework SystemConfiguration, \ diff --git a/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp b/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp new file mode 100644 -index 000000000..e9bb2ec4a +index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f83b5e719 --- /dev/null +++ b/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp -@@ -0,0 +1,167 @@ +@@ -0,0 +1,164 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -188,15 +188,12 @@ index 000000000..e9bb2ec4a + unix_getUserInfo(env, jinfo, proc.pid); + JNU_CHECK_EXCEPTION(env); + -+ char cmdline_name[256]; -+ snprintf(cmdline_name , sizeof(cmdline_name) - 1, "/proc/%d/cmdline", pid); -+ -+ auto cmdline_file = JAVA_TRY(Core::Stream::File::open(cmdline_name, Core::Stream::OpenMode::Read), "Unable to open /proc/pid/cmdline"sv); ++ auto cmdline_file = JAVA_TRY(Core::Stream::File::open(String::formatted("/proc/{}/cmdline", pid), Core::Stream::OpenMode::Read), "Unable to open /proc/pid/cmdline"sv); + auto contents = JAVA_TRY(cmdline_file->read_all(), "Unable to read /proc/pid/cmdline"sv); + auto cmdline = JAVA_TRY(JsonValue::from_string(contents), "Invalid JSON in /proc/pid/cmdline"sv); + + if (!cmdline.is_array()) -+ return throwSerenityError(env, Error::from_string_literal("Not an array"), "Unexpected JSON in /proc/pid/cmdline"); ++ return throwSerenityError(env, Error::from_string_literal("Not an array"), "Unexpected JSON in /proc/pid/cmdline"sv); + + jstring cmdexe = JNU_NewStringPlatform(env, cmdline.as_array()[0].as_string().characters()); + env->ExceptionClear(); // unconditionally clear any exception @@ -219,7 +216,7 @@ index 000000000..e9bb2ec4a +} +} diff --git a/src/java.base/unix/classes/java/lang/ProcessImpl.java b/src/java.base/unix/classes/java/lang/ProcessImpl.java -index 2bf36f8f1..317bbf158 100644 +index 2bf36f8f136794af4030e12c64026ab217696959..317bbf158a2032cc23ef3b73528a9e9c801612cf 100644 --- a/src/java.base/unix/classes/java/lang/ProcessImpl.java +++ b/src/java.base/unix/classes/java/lang/ProcessImpl.java @@ -89,7 +89,9 @@ final class ProcessImpl extends Process { |