Check for sigaction.

From-SVN: r42790
This commit is contained in:
Anthony Green 2001-06-02 08:34:33 +00:00
parent 46d7fc9602
commit 6a6a4abb1a
4 changed files with 291 additions and 297 deletions

577
libjava/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -409,7 +409,7 @@ else
AC_CHECK_FUNCS(iconv nl_langinfo setlocale) AC_CHECK_FUNCS(iconv nl_langinfo setlocale)
AC_CHECK_FUNCS(inet_aton inet_addr, break) AC_CHECK_FUNCS(inet_aton inet_addr, break)
AC_CHECK_FUNCS(inet_pton uname inet_ntoa) AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
AC_CHECK_FUNCS(backtrace fork execvp pipe) AC_CHECK_FUNCS(backtrace fork execvp pipe sigaction)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h) AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
AC_CHECK_LIB(dl, dladdr, [ AC_CHECK_LIB(dl, dladdr, [
AC_DEFINE(HAVE_DLADDR)]) AC_DEFINE(HAVE_DLADDR)])

View File

@ -269,6 +269,9 @@
/* Define if you have the setlocale function. */ /* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE #undef HAVE_SETLOCALE
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
/* Define if you have the sleep function. */ /* Define if you have the sleep function. */
#undef HAVE_SLEEP #undef HAVE_SLEEP

View File

@ -877,14 +877,16 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
#ifdef USE_WIN32_SIGNALLING #ifdef USE_WIN32_SIGNALLING
// Install exception handler // Install exception handler
SetUnhandledExceptionFilter (win32_exception_handler); SetUnhandledExceptionFilter (win32_exception_handler);
#else #elif defined(HAVE_SIGACTION)
// We only want this on POSIX systems. // We only want this on POSIX systems.
struct sigaction act; struct sigaction act;
act.sa_handler = SIG_IGN; act.sa_handler = SIG_IGN;
sigemptyset (&act.sa_mask); sigemptyset (&act.sa_mask);
act.sa_flags = 0; act.sa_flags = 0;
sigaction (SIGPIPE, &act, NULL); sigaction (SIGPIPE, &act, NULL);
#endif /* USE_WIN32_SIGNALLING */ #else
signal (SIGPIPE, SIG_IGN);
#endif
_Jv_JNI_Init (); _Jv_JNI_Init ();