Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
dnl -----------------------------------------------------------
dnl Native java.math.BigInteger (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([gmp],

Check warning on line 252 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_PROG_LIBTOOL' is obsolete.
[AS_HELP_STRING(--enable-gmp,
compile native java.math.BigInteger library (disabled by --disable-gmp) [default=yes])],
[case "${enableval}" in
Expand Down Expand Up @@ -308,7 +308,7 @@
[
ANTLR_JAR=$withval
],
[

Check warning on line 311 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_HEADER_STDC' is obsolete.
ANTLR_JAR="$ANTLR_JAR"
])

Expand Down Expand Up @@ -345,13 +345,13 @@
[if test -e ${srcdir}/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java; then
REGENERATE_GJDOC_PARSER=no ;
else
REGENERATE_GJDOC_PARSER=yes ;

Check warning on line 348 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_HEADER_TIME' is obsolete.
fi])
AC_MSG_RESULT(${REGENERATE_GJDOC_PARSER})
AM_CONDITIONAL(CREATE_GJDOC_PARSER, test "x${REGENERATE_GJDOC_PARSER}" = xyes)

dnl -----------------------------------------------------------
dnl Enable tool wrapper binaries (disabled by default)

Check warning on line 354 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_LINK' is obsolete.
dnl -----------------------------------------------------------
AC_ARG_ENABLE([tool-wrappers],
[AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
Expand Down Expand Up @@ -405,14 +405,14 @@
if test "x${COMPILE_JNI}" = xyes; then
GCC_ATTRIBUTE_UNUSED

AC_HEADER_STDC

Check warning on line 408 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_HEADER_STDC' is obsolete.

dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
dnl at least.
AC_COMPILE_CHECK_SIZEOF(void *)

Check warning on line 412 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_COMPILE' is obsolete.

dnl Checking for endianess.
AC_C_BIGENDIAN_CROSS

Check warning on line 415 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_FD_MSG' is obsolete.

Check warning on line 415 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_FD_MSG' is obsolete.

Check warning on line 415 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_RUN' is obsolete.

Check warning on line 415 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_COMPILE' is obsolete.

Check warning on line 415 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_COMPILE' is obsolete.

dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
dnl On that system, sys/ioctl.h will not include sys/filio.h unless
Expand Down Expand Up @@ -443,8 +443,9 @@
AC_SEARCH_LIBS([inet_pton],[nsl])
AC_CHECK_LIB([socket], [gethostname])

AC_CHECK_FUNCS([ftruncate fsync select \

Check warning on line 446 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

AC_CHECK_FUNCS(\): you should use literals
gethostname socket strerror fork pipe execve open close close_range \
posix_spawn \
lseek fstat read readv write writev htonl memset htons connect \
getsockname getpeername bind listen accept \
recvfrom send sendto setsockopt getsockopt time mktime clock_gettime \
Expand All @@ -469,7 +470,7 @@
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])

AC_HEADER_TIME

Check warning on line 473 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_HEADER_TIME' is obsolete.
AC_STRUCT_TM
AC_STRUCT_TIMEZONE

Expand Down Expand Up @@ -978,7 +979,7 @@
esac],
[])

AX_CREATE_STDINT_H([include/config-int.h])

Check warning on line 982 in configure.ac

View workflow job for this annotation

GitHub Actions / macos

The macro 'AC_TRY_COMPILE' is obsolete.

dnl -----------------------------------------------------------------------
dnl Support for using a prebuilt class library
Expand Down
7 changes: 4 additions & 3 deletions native/jni/java-lang/java_lang_VMProcess.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ copy_elem (JNIEnv * env, jobject stringArray, jint i)
}

/*
* private final native void nativeSpawn(String[], String[], File)
* private final native void nativeSpawn(String[], String[], File, boolean, boolean)
* throws java/io/IOException
*/
JNIEXPORT void JNICALL
Java_java_lang_VMProcess_nativeSpawn (JNIEnv * env, jobject this,
jobjectArray cmdArray,
jobjectArray envArray, jobject dirFile,
jboolean redirect)
jboolean redirect,
jboolean usePosixSpawn)
{
int fds[CPIO_EXEC_NUM_PIPES] = { -1, -1, -1 };
jobject streams[CPIO_EXEC_NUM_PIPES] = { NULL, NULL, NULL };
Expand Down Expand Up @@ -206,7 +207,7 @@ Java_java_lang_VMProcess_nativeSpawn (JNIEnv * env, jobject this,
}

/* Create inter-process pipes */
err = cpproc_forkAndExec(strings, newEnviron, fds, pipe_count, &pid, dir);
err = cpproc_forkAndExec(strings, newEnviron, fds, pipe_count, &pid, dir, usePosixSpawn);
if (err != 0)
{
strncpy(errbuf, cpnative_getErrorString (err), sizeof(errbuf));
Expand Down
1 change: 1 addition & 0 deletions native/jni/native-lib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.deps
Makefile
Makefile.in
cpspawnhelper
18 changes: 16 additions & 2 deletions native/jni/native-lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ libclasspathnative_la_SOURCES = cpnet.c \
cpio.h \
cpnative.h \
cpproc.h \
cpproc.c
cpproc.c \
cpproc-child.h \
cpproc-child.c

spawnhelperdir = $(pkglibdir)
spawnhelper_PROGRAMS = cpspawnhelper
cpspawnhelper_SOURCES = cpspawnhelper.c \
cpproc-child.h \
cpproc-child.c

# Keep the helper's objects separate from the libtool objects built from
# the same sources. Per-target CFLAGS trigger Automake's target-specific
# object names; assigning AM_CFLAGS leaves the effective flags unchanged.
cpspawnhelper_CFLAGS = $(AM_CFLAGS)

AM_LDFLAGS = @CLASSPATH_CONVENIENCE@
AM_CPPFLAGS = @CLASSPATH_INCLUDES@
AM_CPPFLAGS = @CLASSPATH_INCLUDES@ \
-DCPPROC_SPAWN_HELPER='"$(pkglibdir)/cpspawnhelper"'
AM_CFLAGS = @WARNING_CFLAGS@ @STRICT_WARNING_CFLAGS@ @ERROR_CFLAGS@ \
@EXTRA_CFLAGS@
Loading
Loading