From 7ccad0028b6c1ee6c694332f70cb067a8169ab1e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 11 Jul 2012 21:49:28 -0400 Subject: [PATCH] Move more stuff from src/s to configure * configure.ac (PREFER_VSUSP, RUN_TIME_REMAP, SETPGRP_RELEASES_CTTY) (TAB3, TABDLY, RUN_TIME_REMAP, XOS_NEEDS_TIME_H): Move here from src/s. * src/s/bsd-common.h, src/s/darwin.h: Move TAB3 to configure. * src/s/hpux10-20.h, src/s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure. * src/s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP): * src/s/hpux10-20.h (RUN_TIME_REMAP): * src/s/bsd-common.h (TABDLY): Move to configure. --- ChangeLog | 6 ++-- configure.ac | 76 +++++++++++++++++++++++++++++++++------------- src/ChangeLog | 8 +++++ src/s/bsd-common.h | 3 -- src/s/darwin.h | 3 -- src/s/hpux10-20.h | 5 --- src/s/irix6-5.h | 5 --- src/s/sol2-6.h | 3 -- 8 files changed, 67 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16b33ac5add..56ea8070a63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,8 +3,10 @@ * configure.ac (NO_MATHERR): Unconditionally define for Darwin; as src/s/darwin.h used to. - * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_FIONREAD, BROKEN_SIGAIO): - (BROKEN_SIGPOLL, BROKEN_SIGPTY): Move here from src/s. + * configure.ac (NARROWPROTO, NO_ABORT, BROKEN_FIONREAD, BROKEN_SIGAIO) + (BROKEN_SIGPOLL, BROKEN_SIGPTY, PREFER_VSUSP, RUN_TIME_REMAP) + (SETPGRP_RELEASES_CTTY, TAB3, TABDLY, RUN_TIME_REMAP + (XOS_NEEDS_TIME_H): Move here from src/s. 2012-07-11 Glenn Morris diff --git a/configure.ac b/configure.ac index eb29a2621f4..1edfe5adce7 100644 --- a/configure.ac +++ b/configure.ac @@ -3365,33 +3365,67 @@ case $opsys in ;; esac + +AH_TEMPLATE(TAB3, [Undocumented.]) + case $opsys in - gnu) opsysfile="s/bsd-common.h" ;; + darwin) AC_DEFINE(TAB3, OXTABS) ;; - gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; + gnu | freebsd | netbsd | openbsd ) + AC_DEFINE(TABDLY, OXTABS, [Undocumented.] ) + AC_DEFINE(TAB3, OXTABS) + ;; - hpux11) - dnl See comments in sysdep.c:sys_signal. - dnl SA_RESTART resets the timeout of `select' on hpux11. - dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART. - AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only - be used in batch mode.]) - dnl It works to open the pty's tty in the parent (Emacs), then - dnl close and reopen it in the child. - AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it - works to open a pty's tty in the parent process, then close and - reopen it in the child.]) + hpux*) + AC_DEFINE(RUN_TIME_REMAP, 1, [Define if emacs.c needs to call + run_time_remap; for HPUX.]) + ;; +esac - opsysfile="s/hpux10-20.h" - ;; - openbsd) opsysfile="s/netbsd.h" ;; +dnl Used in xfaces.c. +case $opsys in + hpux* | sol2* ) + AC_DEFINE(XOS_NEEDS_TIME_H, 1, [Compensate for a bug in Xos.h on + some systems, where it requires time.h.]) + ;; +esac - sol2-10) - AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes - on Solaris.]) - opsysfile="s/sol2-6.h" - ;; + +case $opsys in + gnu) opsysfile="s/bsd-common.h" ;; + + gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; + + hpux11) + dnl See comments in sysdep.c:sys_signal. + dnl SA_RESTART resets the timeout of `select' on hpux11. + dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART. + AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only + be used in batch mode.]) + dnl It works to open the pty's tty in the parent (Emacs), then + dnl close and reopen it in the child. + AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it + works to open a pty's tty in the parent process, then close and + reopen it in the child.]) + + opsysfile="s/hpux10-20.h" + ;; + + irix6-5) + AC_DEFINE(PREFER_VSUSP, 1, [Define if process_send_signal should + use VSUSP instead of VSWTCH.]) + AC_DEFINE(SETPGRP_RELEASES_CTTY, 1, [Define if process.c:child_setup + should not call setpgrp.]) + ;; + + openbsd) opsysfile="s/netbsd.h" ;; + + sol2-10) + AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes + on Solaris.]) + opsysfile="s/sol2-6.h" + ;; esac # Set up the CFLAGS for real compilation, so we can substitute it. diff --git a/src/ChangeLog b/src/ChangeLog index 9085e91f9ce..6aa14c96198 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2012-07-12 Glenn Morris + * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP): + * s/hpux10-20.h (RUN_TIME_REMAP): + * s/bsd-common.h (TABDLY): Move to configure. + + * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure. + + * s/bsd-common.h, s/darwin.h: Move TAB3 to configure. + * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY) (BROKEN_SIGPOLL): Let configure set them. diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index 0fa6d146479..901ed0c490e 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -37,8 +37,5 @@ along with GNU Emacs. If not, see . */ /* For mem-limits.h. */ #define BSD4_2 -#define TABDLY OXTABS -#define TAB3 OXTABS - /* First pty name is /dev/ptyp0. */ #define FIRST_PTY_LETTER 'p' diff --git a/src/s/darwin.h b/src/s/darwin.h index 548e3b4779e..7b4b5e196e3 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -60,9 +60,6 @@ along with GNU Emacs. If not, see . */ also the name of a Mach system call. */ #define init_process emacs_init_process -/* System uses OXTABS instead of the expected TAB3. (Copied from bsd386.h.) */ -#define TAB3 OXTABS - /* Definitions for how to compile & link. */ #ifdef HAVE_NS #define SYSTEM_PURESIZE_EXTRA 200000 diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index a7283a8026e..47908c9a4c0 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define RUN_TIME_REMAP - /* Define symbols to identify the version of Unix this is. Define all the symbols that apply correctly. */ #define USG /* System III, System V, etc */ @@ -40,9 +38,6 @@ along with GNU Emacs. If not, see . */ #define PTY_NAME_SPRINTF \ sprintf (pty_name, "/dev/ptym/pty%c%x", c, i); -/* This triggers a conditional in xfaces.c. */ -#define XOS_NEEDS_TIME_H - /* Assar Westerlund says this is necessary for HP-UX 10.20, and that it works for HP-UX 0 as well. */ #define NO_EDITRES diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index cd06af7c2bb..dd7a00d0ba7 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -24,8 +24,6 @@ along with GNU Emacs. If not, see . */ #undef _longjmp /* use system versions, not conservative aliases */ #undef _setjmp -#define SETPGRP_RELEASES_CTTY - #undef SETUP_SLAVE_PTY /* Letter to use in finding device name of first pty, @@ -67,9 +65,6 @@ char *_getpty(); /* Ulimit(UL_GMEMLIM) is busted... */ #define ULIMIT_BREAK_VALUE 0x14000000 -/* Tell process_send_signal to use VSUSP instead of VSWTCH. */ -#define PREFER_VSUSP - #undef SA_RESTART /* not the same as defining BROKEN_SA_RESTART */ #undef TIOCSIGSEND /* defined in usg5-4-common.h */ diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index 6a7c261054f..e77d9e5a901 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h @@ -21,9 +21,6 @@ along with GNU Emacs. If not, see . */ #define SOLARIS2 -/* This triggers a conditional in xfaces.c. */ -#define XOS_NEEDS_TIME_H - /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x