From: Glenn Morris Date: Wed, 11 Jul 2012 07:28:27 +0000 (-0700) Subject: Move SIGNALS_VIA_CHARACTERS from src/s to configure X-Git-Tag: emacs-24.2.90~1199^2~63 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09f4e3b0149e10d6d6a3d4915cf5c0a9768ded46;p=emacs.git Move SIGNALS_VIA_CHARACTERS from src/s to configure * configure.ac (SIGNALS_VIA_CHARACTERS): Move here from src/s. * src/s/aix4-2.h, src/s/bsd-common.h, src/s/cygwin.h, src/s/gnu-linux.h: * src/s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure. --- diff --git a/ChangeLog b/ChangeLog index 1cb5ed3585f..e84ed262adb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,7 @@ * configure.ac (opsysfile): Use bsd-common on gnu systems. * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): - Move here from src/s. + (SIGNALS_VIA_CHARACTERS): Move here from src/s. 2012-07-11 Paul Eggert diff --git a/configure.ac b/configure.ac index e55c40fe77c..106b0a22481 100644 --- a/configure.ac +++ b/configure.ac @@ -3171,6 +3171,35 @@ dnl Used in sound.c AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DEVICE, "$sound_device", [Name of the default sound device.]) + +AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by +"typing" a signal character on the pty.]) + +case $opsys in + dnl Perry Smith says this is correct for AIX. + dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX. + aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) + AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) + ;; + + dnl 21 Jun 06: Eric Hanchrow says this works. + dnl FIXME Does gnu-kfreebsd have linux/version.h? It seems unlikely... + gnu-linux | gnu-kfreebsd ) + + AC_MSG_CHECKING([for signals via characters]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ +#include +#if LINUX_VERSION_CODE < 0x20400 +# error "Linux version too old" +#endif + ]], [[]])], emacs_signals_via_chars=yes, emacs_signals_via_chars=no) + + AC_MSG_RESULT([$emacs_signals_via_chars]) + test $emacs_signals_via_chars = yes && AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) + ;; +esac + + dnl Used in dispnew.c AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the buffer of a stdio stream.]) diff --git a/src/ChangeLog b/src/ChangeLog index b323a876334..5542d1db0f1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -14,6 +14,9 @@ 2012-07-11 Glenn Morris + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h: + * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure. + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h: * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h: Move CLASH_DETECTION to configure. diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 5741ef7c492..9fd7938f37c 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -40,9 +40,6 @@ along with GNU Emacs. If not, see . */ /* Special items needed to make Emacs run on this system. */ -/* Perry Smith says these are correct. */ -#define SIGNALS_VIA_CHARACTERS - /* Perry Smith says these are correct. */ #undef sigmask diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index c9c531b70b6..184ba7d036b 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -59,6 +59,3 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS - -/* Send signals to subprocesses by "typing" special chars at them. */ -#define SIGNALS_VIA_CHARACTERS diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 9faaea785d7..cf418135b8d 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -76,6 +76,3 @@ along with GNU Emacs. If not, see . */ As malloc is not the Cygwin malloc, the Cygwin memalign always returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ #define G_SLICE_ALWAYS_MALLOC - -/* Send signals to subprocesses by "typing" special chars at them. */ -#define SIGNALS_VIA_CHARACTERS diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index d61d3ae5621..463ad226ec1 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -25,17 +25,6 @@ along with GNU Emacs. If not, see . */ #define USG #define GNU_LINUX -#ifdef emacs -#ifdef HAVE_LINUX_VERSION_H -#include - -#if LINUX_VERSION_CODE >= 0x20400 -/* 21 Jun 06: Eric Hanchrow says this works. */ -#define SIGNALS_VIA_CHARACTERS -#endif /* LINUX_VERSION_CODE >= 0x20400 */ -#endif /* HAVE_LINUX_VERSION_H */ -#endif /* emacs */ - #if defined HAVE_GRANTPT #define UNIX98_PTYS diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 1f50df600d9..506f2c6cd8f 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -28,10 +28,6 @@ along with GNU Emacs. If not, see . */ #undef SETUP_SLAVE_PTY -/* thomas@mathematik.uni-bremen.de says this is needed. */ -/* Make process_send_signal work by "typing" a signal character on the pty. */ -#define SIGNALS_VIA_CHARACTERS - /* Letter to use in finding device name of first pty, if system supports pty's. 'a' means it is /dev/ptya0 */ #undef FIRST_PTY_LETTER