# HG changeset patch # User jwe # Date 854329396 0 # Node ID b35a5cd8107f07b282de5014be89c5cc6276740b # Parent e2f1586bb3936aadc336d9d7ff75135cf9f25e9b [project @ 1997-01-27 01:41:30 by jwe] diff -r e2f1586bb393 -r b35a5cd8107f ChangeLog --- a/ChangeLog Sun Jan 26 04:50:53 1997 +0000 +++ b/ChangeLog Mon Jan 27 01:43:16 1997 +0000 @@ -1,5 +1,15 @@ +Sun Jan 26 19:39:51 1997 John W. Eaton + + * emacs/Makefile.in: New file. + * configure.in: create emacs/Makefile. + * octMakefile.in: Move/add emacs dir to the appropriate lists. + Sat Jan 25 22:27:14 1997 John W. Eaton + * aclocal.m4 (OCTAVE_CHECK_TYPE): New macro, stolen from bash. + * configure.in: Use it. + * acconfig.h: Add #undef for sigset_t. + * configure.in (RLD_FLAG): Delete. * mkoctfile.in (RLD_FLAG): Delete. * octave-bug.in (RLD_FLAG): Delete. diff -r e2f1586bb393 -r b35a5cd8107f acconfig.h --- a/acconfig.h Sun Jan 26 04:50:53 1997 +0000 +++ b/acconfig.h Mon Jan 27 01:43:16 1997 +0000 @@ -122,6 +122,9 @@ /* Define to `short' if doesn't define. */ #undef nlink_t +/* Define to `int' if doesn't define. */ +#undef sigset_t + /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff -r e2f1586bb393 -r b35a5cd8107f aclocal.m4 --- a/aclocal.m4 Sun Jan 26 04:50:53 1997 +0000 +++ b/aclocal.m4 Mon Jan 27 01:43:16 1997 +0000 @@ -565,3 +565,28 @@ AC_DEFINE(MUST_REINSTALL_SIGHANDLERS) fi ]) +dnl +dnl This check originally from bash 2.0. +dnl +dnl Check for typedef'd symbols in header files, but allow the caller to +dnl specify the include files to be checked in addition to the default. +dnl +dnl OCTAVE_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND]) +AC_DEFUN(OCTAVE_CHECK_TYPE, +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(octave_cv_type_$1, +[AC_EGREP_CPP($1, [#include +#if STDC_HEADERS +#include +#endif +$2 +], octave_cv_type_$1=yes, octave_cv_type_$1=no)]) +AC_MSG_RESULT($octave_cv_type_$1) +ifelse($#, 4, [if test $octave_cv_type_$1 = yes; then + AC_DEFINE($4) + fi]) +if test $octave_cv_type_$1 = no; then + AC_DEFINE($1, $3) +fi +]) diff -r e2f1586bb393 -r b35a5cd8107f configure.in --- a/configure.in Sun Jan 26 04:50:53 1997 +0000 +++ b/configure.in Mon Jan 27 01:43:16 1997 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.247 $) +AC_REVISION($Revision: 1.248 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -928,6 +928,7 @@ AC_CHECK_TYPE(dev_t, short) AC_CHECK_TYPE(ino_t, unsigned long) AC_CHECK_TYPE(nlink_t, short) +OCTAVE_CHECK_TYPE(sigset_t, [#include ], int) ### Define VOID_SIGHANDLER for readline. @@ -1117,8 +1118,8 @@ AC_OUTPUT(Makefile octMakefile Makeconf test/Makefile dlfcn/Makefile doc/Makefile doc/faq/Makefile doc/interpreter/Makefile - doc/liboctave/Makefile doc/refcard/Makefile examples/Makefile - liboctave/Makefile src/Makefile libcruft/Makefile + doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile + examples/Makefile liboctave/Makefile src/Makefile libcruft/Makefile libcruft/Makerules libcruft/blas/Makefile libcruft/balgen/Makefile libcruft/dassl/Makefile libcruft/eispack/Makefile libcruft/fftpack/Makefile libcruft/fsqp/Makefile diff -r e2f1586bb393 -r b35a5cd8107f octMakefile.in --- a/octMakefile.in Sun Jan 26 04:50:53 1997 +0000 +++ b/octMakefile.in Mon Jan 27 01:43:16 1997 +0000 @@ -30,7 +30,7 @@ MAKEINFO.PATCH ChangeLog ChangeLog.[0-9] # Complete directory trees to distribute. -DISTDIRS = emacs glob kpathsea make # plplot +DISTDIRS = glob kpathsea make # plplot # Subdirectories in which to run `make all'. SUBDIRS = @INFO_DIR@ @PLPLOT_DIR@ @READLINE_DIR@ @DLFCN_DIR@ glob \ @@ -52,8 +52,8 @@ octave-bug VERSION ARCH # Subdirectories in which to run `make bin-dist'. -BINDISTSUBDIRS = libcruft liboctave src info kpathsea readline \ - scripts doc examples +BINDISTSUBDIRS = libcruft liboctave src kpathsea readline info \ + scripts doc emacs examples # Complete directories trees to distribute with binary distributions. BINDISTDIRS = emacs diff -r e2f1586bb393 -r b35a5cd8107f src/ChangeLog --- a/src/ChangeLog Sun Jan 26 04:50:53 1997 +0000 +++ b/src/ChangeLog Mon Jan 27 01:43:16 1997 +0000 @@ -1,3 +1,8 @@ +Sun Jan 26 19:41:48 1997 John W. Eaton + + * sighandlers.cc (sigchld_handler): Block SIGCHLD while + sigchld_hander is running. + Sat Jan 25 22:36:39 1997 John W. Eaton * Makefile.in (bin-dist): Update for 2.x. diff -r e2f1586bb393 -r b35a5cd8107f src/sighandlers.cc --- a/src/sighandlers.cc Sun Jan 26 04:50:53 1997 +0000 +++ b/src/sighandlers.cc Mon Jan 27 01:43:16 1997 +0000 @@ -80,13 +80,33 @@ #endif #if defined (__EMX__) -#define MAYBE_UNBLOCK_SIGNAL(sig) \ +#define MAYBE_ACK_SIGNAL(sig) \ octave_set_signal_handler (sig, SIG_ACK) #else -#define MAYBE_UNBLOCK_SIGNAL(sig) \ +#define MAYBE_ACK_SIGNAL(sig) \ do { } while (0) #endif +// The following signal blocking stuff is stolen from bash: + +#define BLOCK_SIGNAL(sig, nvar, ovar) \ + do \ + { \ + sigemptyset (&nvar); \ + sigaddset (&nvar, sig); \ + sigemptyset (&ovar); \ + sigprocmask (SIG_BLOCK, &nvar, &ovar); \ + } \ + while (0) + +#if defined (HAVE_POSIX_SIGNALS) +#define BLOCK_CHILD(nvar, ovar) BLOCK_SIGNAL (SIGCHLD, nvar, ovar) +#define UNBLOCK_CHILD(ovar) sigprocmask (SIG_SETMASK, &ovar, 0) +#else +#define BLOCK_CHILD(nvar, ovar) ovar = sigblock (sigmask (SIGCHLD)) +#define UNBLOCK_CHILD(ovar) sigsetmask (ovar) +#endif + void octave_save_signal_mask (void) { @@ -189,14 +209,22 @@ static RETSIGTYPE sigchld_handler (int /* sig */) { -#if defined (__EMX__) volatile octave_interrupt_handler *saved_interrupt_handler = octave_ignore_interrupts (); + // I wonder if this is really right, or if SIGCHLD should just be + // blocked on OS/2 systems the same as for systems with POSIX signal + // functions. + +#if defined (__EMX__) volatile sig_handler *saved_sigchld_handler - = octave_set_signal_hanlder (SIGCHLD, SIG_IGN); + = octave_set_signal_handler (SIGCHLD, SIG_IGN); #endif + sigset_t set, oset; + + BLOCK_CHILD (set, oset); + int n = octave_child_list::length (); if (n == 0) @@ -230,13 +258,15 @@ } } -#if defined (__EMX__) octave_set_interrupt_handler (saved_interrupt_handler); + UNBLOCK_CHILD (oset); + +#ifdef __EMX__ octave_set_signal_handler (SIGCHLD, saved_sigchld_handler); #endif - MAYBE_UNBLOCK_SIGNAL (SIGCHLD); + MAYBE_ACK_SIGNAL (SIGCHLD); MAYBE_REINSTALL_SIGHANDLER (SIGCHLD, sigchld_handler); @@ -247,7 +277,7 @@ static RETSIGTYPE sigfpe_handler (int /* sig */) { - MAYBE_UNBLOCK_SIGNAL (SIGFPE); + MAYBE_ACK_SIGNAL (SIGFPE); MAYBE_REINSTALL_SIGHANDLER (SIGFPE, sigfpe_handler); @@ -272,7 +302,7 @@ static RETSIGTYPE sigint_handler (int sig) { - MAYBE_UNBLOCK_SIGNAL (sig); + MAYBE_ACK_SIGNAL (sig); MAYBE_REINSTALL_SIGHANDLER (sig, sigint_handler); @@ -288,7 +318,7 @@ static RETSIGTYPE sigpipe_handler (int /* sig */) { - MAYBE_UNBLOCK_SIGNAL (SIGPIPE); + MAYBE_ACK_SIGNAL (SIGPIPE); MAYBE_REINSTALL_SIGHANDLER (SIGPIPE, sigpipe_handler);