changeset 108436:d276e52e2247

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sat, 20 Mar 2010 10:43:59 +0000
parents d9d618029804 (current diff) 6856772abdfe (diff)
children 4fbbaa6bce36
files lisp/obsolete/s-region.el lisp/s-region.el src/s/lynxos.h src/s/sol2-3.h src/s/sol2-4.h src/s/sol2-5.h src/s/usg5-4-2.h
diffstat 33 files changed, 450 insertions(+), 719 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 19 12:16:57 2010 +0000
+++ b/ChangeLog	Sat Mar 20 10:43:59 2010 +0000
@@ -1,3 +1,12 @@
+2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in: Remove support for old UNIX System V systems and
+	for Unixware on non-x86 machines.
+
+	* configure.in:	Remove support for Solaris on PPC and for old versions.
+
+	* configure.in: Remove non-working lynxos port.
+
 2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* .dir-locals.el (c-mode): Turn on whitespace-mode for diff-mode.
--- a/admin/CPP-DEFINES	Fri Mar 19 12:16:57 2010 +0000
+++ b/admin/CPP-DEFINES	Sat Mar 20 10:43:59 2010 +0000
@@ -299,7 +299,7 @@
 PURESIZE
 RUN_TIME_REMAP
 SA_RESTART
-SECTION_ALIGNMENT
+SECTION_ALIGNMENT  -- was only used by s/lynxos.h, maybe all code depending on it can be removed.
 SEGMENT_MASK
 SETPGRP_RELEASES_CTTY
 SETUP_SLAVE_PTY
--- a/configure.in	Fri Mar 19 12:16:57 2010 +0000
+++ b/configure.in	Sat Mar 20 10:43:59 2010 +0000
@@ -458,15 +458,6 @@
     esac
   ;;
 
-  ## LynxOS ports
-  *-*-lynxos* )
-    opsys=lynxos
-    case "${canonical}" in
-      i[3456]86-*-lynxos*) machine=intel386 ;;
-      powerpc-*-lynxos*) machine=powerpc ;;
-    esac
-  ;;
-
   alpha*-*-linux-gnu* )
     machine=alpha opsys=gnu-linux
   ;;
@@ -550,30 +541,14 @@
 
   *-sun-solaris* \
     | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
-    | x86_64-*-solaris2*    | x86_64-*-sunos5*    \
-    | powerpc*-*-solaris2*  | rs6000-*-solaris2*)
+    | x86_64-*-solaris2*    | x86_64-*-sunos5*)
     case "${canonical}" in
       i[3456]86-*-* )     machine=intel386 ;;
       amd64-*-*|x86_64-*-*)	machine=amdx86-64 ;;
-      powerpc* | rs6000* )  machine=ibmrs6000 ;;
       sparc* )		machine=sparc ;;
       * )		unported=yes ;;
     esac
     case "${canonical}" in
-      *-sunos5.3* | *-solaris2.3* )
-		opsys=sol2-3
-		NON_GNU_CPP=/usr/ccs/lib/cpp
-		;;
-      *-sunos5.4* | *-solaris2.4* )
-		opsys=sol2-4
-		NON_GNU_CPP=/usr/ccs/lib/cpp
-		RANLIB="ar -ts"
-		;;
-      *-sunos5.5* | *-solaris2.5* )
-		opsys=sol2-5
-		NON_GNU_CPP=/usr/ccs/lib/cpp
-		RANLIB="ar -ts"
-		;;
       *-sunos5.6* | *-solaris2.6* )
 		opsys=sol2-6
 		NON_GNU_CPP=/usr/ccs/lib/cpp
@@ -664,22 +639,6 @@
 if test x"${opsys}" = x; then
   case "${canonical}" in
     *-gnu* )				opsys=gnu ;;
-    *-sysv4.2uw* )			opsys=unixware ;;
-    *-sysv5uw* )			opsys=unixware ;;
-    *-sysv5OpenUNIX* )			opsys=unixware ;;
-    *-sysv4.1* | *-sysvr4.1* )
-	NON_GNU_CPP=/usr/lib/cpp
-	opsys=usg5-4 ;;
-    *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
-	if [ x$NON_GNU_CPP = x ]; then
-	  if [ -f /usr/ccs/lib/cpp ]; then
-	    NON_GNU_CPP=/usr/ccs/lib/cpp
-	  else
-	    NON_GNU_CPP=/lib/cpp
-	  fi
-	fi
-	opsys=usg5-4-2 ;;
-    *-sysv4* | *-sysvr4* )		opsys=usg5-4 ;;
     * )
       unported=yes
     ;;
--- a/doc/lispref/ChangeLog	Fri Mar 19 12:16:57 2010 +0000
+++ b/doc/lispref/ChangeLog	Sat Mar 20 10:43:59 2010 +0000
@@ -1,3 +1,7 @@
+2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* os.texi (System Environment): Do not mention lynxos.
+
 2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Branch for 23.2.
--- a/doc/lispref/os.texi	Fri Mar 19 12:16:57 2010 +0000
+++ b/doc/lispref/os.texi	Sat Mar 20 10:43:59 2010 +0000
@@ -786,9 +786,6 @@
 @item irix
 Silicon Graphics Irix system.
 
-@item lynxos 3.0.1
-LynxOS-3.0.1.
-
 @item ms-dos
 Microsoft MS-DOS ``operating system.''  Emacs compiled with DJGPP for
 MS-DOS binds @code{system-type} to @code{ms-dos} even when you run it on
--- a/etc/NEWS	Fri Mar 19 12:16:57 2010 +0000
+++ b/etc/NEWS	Sat Mar 20 10:43:59 2010 +0000
@@ -78,6 +78,9 @@
 .dir-locals.el file, will turn on `whitespace-mode' for *vc-diff*
 buffers.
 
+** s-region.el is now declared obsolete, superceded by shift-select-mode
+enabled by default in 23.1.
+
 
 * New Modes and Packages in Emacs 24.1
 
--- a/lisp/ChangeLog	Fri Mar 19 12:16:57 2010 +0000
+++ b/lisp/ChangeLog	Sat Mar 20 10:43:59 2010 +0000
@@ -1,3 +1,12 @@
+2010-03-20  Juri Linkov  <juri@jurta.org>
+
+	* s-region.el:
+	* obsolete/s-region.el: Move to obsolete.
+
+2010-03-19  Juanma Barranquero  <lekktu@gmail.com>
+
+	* vc-dispatcher.el (vc-do-command): Remove reference to `vc-path'.
+
 2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc-hooks.el (vc-path): Remove variable and obsolete declaration.
--- a/lisp/Makefile.in	Fri Mar 19 12:16:57 2010 +0000
+++ b/lisp/Makefile.in	Sat Mar 20 10:43:59 2010 +0000
@@ -1091,6 +1091,7 @@
 	$(lisp)/obsolete/rnewspost.elc \
 	$(lisp)/obsolete/sc.elc \
 	$(lisp)/obsolete/scribe.elc \
+	$(lisp)/obsolete/s-region.elc \
 	$(lisp)/obsolete/swedish.elc \
 	$(lisp)/obsolete/sym-comp.elc \
 	$(lisp)/obsolete/vc-mcvs.elc \
@@ -1294,7 +1295,6 @@
 	$(lisp)/rfn-eshadow.elc \
 	$(lisp)/rot13.elc \
 	$(lisp)/ruler-mode.elc \
-	$(lisp)/s-region.elc \
 	$(lisp)/savehist.elc \
 	$(lisp)/saveplace.elc \
 	$(lisp)/sb-image.elc \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/obsolete/s-region.el	Sat Mar 20 10:43:59 2010 +0000
@@ -0,0 +1,125 @@
+;;; s-region.el --- set region using shift key
+
+;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+;; Author: Morten Welinder <terra@diku.dk>
+;; Keywords: terminals
+;; Favourite-brand-of-beer: None, I hate beer.
+;; Obsolete-since: 24.1
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Having loaded this code you can set the region by holding down the
+;; shift key and move the cursor to the other end of the region.  The
+;; functionality provided by this code is similar to that provided by
+;; the editors of Borland International's compilers for ms-dos.
+
+;; Currently, s-region-move may be bound only to events that are vectors
+;; of length one and whose last element is a symbol.  Also, the functions
+;; that are given this kind of overlay should be (interactive "p")
+;; functions.
+
+;; If the following keys are not already bound then...
+;; C-insert is bound to copy-region-as-kill
+;; S-delete is bound to kill-region
+;; S-insert is bound to yank
+
+;;; Code:
+
+(defvar s-region-overlay (make-overlay 1 1))
+(overlay-put s-region-overlay 'face 'region)
+(overlay-put s-region-overlay 'priority 1000000) ; for hilit19
+
+(defun s-region-unshift (key)
+  "Remove shift modifier from last keypress KEY and return that as a key."
+  (if (vectorp key)
+      (let ((last (aref key (1- (length key)))))
+	(if (symbolp last)
+	    (let* ((keyname (symbol-name last))
+		   (pos (string-match "S-" keyname)))
+	      (if pos
+		  ;; We skip all initial parts of the event assuming that
+		  ;; those are setting up the prefix argument to the command.
+		  (vector (intern (concat (substring keyname 0 pos)
+					  (substring keyname (+ 2 pos)))))
+		(error "Non-shifted key: %S" key)))
+	  (error "Key does not end in a symbol: %S" key)))
+    (error "Non-vector key: %S" key)))
+
+(defun s-region-move-p1 (&rest arg)
+  "This is an overlay function to point-moving keys that are interactive \"p\"."
+  (interactive "p")
+  (apply (function s-region-move) arg))
+
+(defun s-region-move-p2 (&rest arg)
+  "This is an overlay function to point-moving keys that are interactive \"P\"."
+  (interactive "P")
+  (apply (function s-region-move) arg))
+
+(defun s-region-move (&rest arg)
+  (if (if mark-active (not (equal last-command 's-region-move)) t)
+      (set-mark-command nil)
+    (message "")) ; delete the "Mark set" message
+  (setq this-command 's-region-move)
+  (apply (key-binding (s-region-unshift (this-command-keys))) arg)
+  (move-overlay s-region-overlay (mark) (point) (current-buffer))
+  (sit-for 1)
+  (delete-overlay s-region-overlay))
+
+(defun s-region-bind (keylist &optional map)
+  "Bind shifted keys in KEYLIST to `s-region-move-p1' or `s-region-move-p2'.
+Each key in KEYLIST is shifted and bound to one of the `s-region-move'
+functions provided it is already bound to some command or other.
+Optional second argument MAP specifies keymap to add binding to, defaulting
+to global keymap."
+  (let ((p2 (list 'scroll-up 'scroll-down
+		  'beginning-of-buffer 'end-of-buffer)))
+    (or map (setq map global-map))
+    (while keylist
+      (let* ((key (car keylist))
+	     (binding (key-binding key)))
+	(if (commandp binding)
+	    (define-key
+	      map
+	      (vector (intern (concat "S-" (symbol-name (aref key 0)))))
+	      (cond ((memq binding p2)
+		     's-region-move-p2)
+		    (t 's-region-move-p1)))))
+      (setq keylist (cdr keylist)))))
+
+;; Single keys (plus modifiers) only!
+(s-region-bind
+ (list [right] [left] [up] [down]
+       [C-left] [C-right] [C-up] [C-down]
+       [M-left] [M-right] [M-up] [M-down]
+       [next] [previous] [home] [end]
+       [C-next] [C-previous] [C-home] [C-end]
+       [M-next] [M-previous] [M-home] [M-end]))
+
+(or (global-key-binding [C-insert])
+    (global-set-key [C-insert] 'copy-region-as-kill))
+(or (global-key-binding [S-delete])
+    (global-set-key [S-delete] 'kill-region))
+(or (global-key-binding [S-insert])
+    (global-set-key [S-insert] 'yank))
+
+(provide 's-region)
+
+;; arch-tag: a471e912-18d7-4247-a29b-2100bca180ff
+;;; s-region.el ends here
--- a/lisp/s-region.el	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-;;; s-region.el --- set region using shift key
-
-;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-;; Author: Morten Welinder <terra@diku.dk>
-;; Keywords: terminals
-;; Favourite-brand-of-beer: None, I hate beer.
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Having loaded this code you can set the region by holding down the
-;; shift key and move the cursor to the other end of the region.  The
-;; functionality provided by this code is similar to that provided by
-;; the editors of Borland International's compilers for ms-dos.
-
-;; Currently, s-region-move may be bound only to events that are vectors
-;; of length one and whose last element is a symbol.  Also, the functions
-;; that are given this kind of overlay should be (interactive "p")
-;; functions.
-
-;; If the following keys are not already bound then...
-;; C-insert is bound to copy-region-as-kill
-;; S-delete is bound to kill-region
-;; S-insert is bound to yank
-
-;;; Code:
-
-(defvar s-region-overlay (make-overlay 1 1))
-(overlay-put s-region-overlay 'face 'region)
-(overlay-put s-region-overlay 'priority 1000000) ; for hilit19
-
-(defun s-region-unshift (key)
-  "Remove shift modifier from last keypress KEY and return that as a key."
-  (if (vectorp key)
-      (let ((last (aref key (1- (length key)))))
-	(if (symbolp last)
-	    (let* ((keyname (symbol-name last))
-		   (pos (string-match "S-" keyname)))
-	      (if pos
-		  ;; We skip all initial parts of the event assuming that
-		  ;; those are setting up the prefix argument to the command.
-		  (vector (intern (concat (substring keyname 0 pos)
-					  (substring keyname (+ 2 pos)))))
-		(error "Non-shifted key: %S" key)))
-	  (error "Key does not end in a symbol: %S" key)))
-    (error "Non-vector key: %S" key)))
-
-(defun s-region-move-p1 (&rest arg)
-  "This is an overlay function to point-moving keys that are interactive \"p\"."
-  (interactive "p")
-  (apply (function s-region-move) arg))
-
-(defun s-region-move-p2 (&rest arg)
-  "This is an overlay function to point-moving keys that are interactive \"P\"."
-  (interactive "P")
-  (apply (function s-region-move) arg))
-
-(defun s-region-move (&rest arg)
-  (if (if mark-active (not (equal last-command 's-region-move)) t)
-      (set-mark-command nil)
-    (message "")) ; delete the "Mark set" message
-  (setq this-command 's-region-move)
-  (apply (key-binding (s-region-unshift (this-command-keys))) arg)
-  (move-overlay s-region-overlay (mark) (point) (current-buffer))
-  (sit-for 1)
-  (delete-overlay s-region-overlay))
-
-(defun s-region-bind (keylist &optional map)
-  "Bind shifted keys in KEYLIST to `s-region-move-p1' or `s-region-move-p2'.
-Each key in KEYLIST is shifted and bound to one of the `s-region-move'
-functions provided it is already bound to some command or other.
-Optional second argument MAP specifies keymap to add binding to, defaulting
-to global keymap."
-  (let ((p2 (list 'scroll-up 'scroll-down
-		  'beginning-of-buffer 'end-of-buffer)))
-    (or map (setq map global-map))
-    (while keylist
-      (let* ((key (car keylist))
-	     (binding (key-binding key)))
-	(if (commandp binding)
-	    (define-key
-	      map
-	      (vector (intern (concat "S-" (symbol-name (aref key 0)))))
-	      (cond ((memq binding p2)
-		     's-region-move-p2)
-		    (t 's-region-move-p1)))))
-      (setq keylist (cdr keylist)))))
-
-;; Single keys (plus modifiers) only!
-(s-region-bind
- (list [right] [left] [up] [down]
-       [C-left] [C-right] [C-up] [C-down]
-       [M-left] [M-right] [M-up] [M-down]
-       [next] [previous] [home] [end]
-       [C-next] [C-previous] [C-home] [C-end]
-       [M-next] [M-previous] [M-home] [M-end]))
-
-(or (global-key-binding [C-insert])
-    (global-set-key [C-insert] 'copy-region-as-kill))
-(or (global-key-binding [S-delete])
-    (global-set-key [S-delete] 'kill-region))
-(or (global-key-binding [S-insert])
-    (global-set-key [S-insert] 'yank))
-
-(provide 's-region)
-
-;; arch-tag: a471e912-18d7-4247-a29b-2100bca180ff
-;;; s-region.el ends here
--- a/lisp/vc-dispatcher.el	Fri Mar 19 12:16:57 2010 +0000
+++ b/lisp/vc-dispatcher.el	Sat Mar 20 10:43:59 2010 +0000
@@ -318,16 +318,9 @@
 	    (status 0))
 	(when files
 	  (setq squeezed (nconc squeezed files)))
-	(let ((exec-path (append vc-path exec-path))
-	      ;; Add vc-path to PATH for the execution of this command.
-	      ;; Also, since some functions need to parse the output
+	(let (;; Since some functions need to parse the output
 	      ;; from external commands, set LC_MESSAGES to C.
-	      (process-environment
-	       (cons (concat "PATH=" (getenv "PATH")
-			     path-separator
-			     (mapconcat 'identity vc-path path-separator))
-		     (cons "LC_MESSAGES=C"
-			   process-environment)))
+	      (process-environment (cons "LC_MESSAGES=C" process-environment))
 	      (w32-quote-process-args t))
 	  (if (eq okstatus 'async)
 	      ;; Run asynchronously.
--- a/src/ChangeLog	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/ChangeLog	Sat Mar 20 10:43:59 2010 +0000
@@ -1,3 +1,76 @@
+2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove support for old GNU/Linux using libc version 5.
+	* m/alpha.h (LINUX_SBRK_BUG): Remove definition.
+	* emacs.c (main): Remove code depending on LINUX_SBRK_BUG.
+
+	Consolidate redundant definitions in s/bsd-common.h.
+	* s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of
+	doing it in all files that include this one.
+	* s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+	* s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+	* s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
+	(LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
+	(LDAV_SYMBOL, KERNEL_FILE): Remove.
+
+	Consolidate redundant definitions.
+	* s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
+	it's undefined in all files that include this one.
+	(POSIX_SIGNALS): Define here instead of doing it in all files that
+	include this one.
+	* s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
+	(POSIX_SIGNALS): Do not define.
+	* s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
+	(POSIX_SIGNALS): Do not define.
+	* s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
+	(POSIX_SIGNALS): Do not define.
+
+	Remove support for old UNIX System V systems.
+	* s/unixware.h: Add the contents of s/usg-5-4-2.h.
+	* s/usg-5-4-2.h: Remove.
+
+	Remove support for Solaris on PPC and for old versions.
+	* s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h.
+	(LD_SWITCH_SYSTEM, USE_MMAP_FOR_BUFFERS): Remove #defines/#undef
+	that cancel each other.
+	* s/sol2-3.h:
+	* s/sol2-4.h:
+	* s/sol2-5.h: Remove.
+	* m/ibmrs6000.h: Remove code for USG5_4, this file is only used on AIX.
+	(NO_REMAP): Remove, unused.
+	(UNEXEC): Move definition ...
+	* s/aix4-2.h (UNEXEC): ... here.
+
+	* s/openbsd.h: Remove support for non-ELF and for systems that do
+	not support shared libraries.
+	* s/netbsd.h:
+	* s/freebsd.h: Likewise.
+
+2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove non-working support for lynxos 3.0.
+	* s/lynxos.h: Remove file.
+
+	* unexec.c (unexec, adjust_lnnoptrs): Do not depend on
+	COFF_BSD_SYMBOLS, nothing defines it anymore.
+
+2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove obsolete uses of HAVE_SHM.
+	* emacs.c (standard_args):
+	(Fdump_emacs):
+	(syms_of_emacs): Remove code depending on HAVE_SHM.
+
+	* alloc.c: Remove HAVE_SHM dependent definition.
+
+	* Makefile.in (RUN_TEMACS): Do not depend on HAVE_SHM.
+
 2010-03-18  Glenn Morris  <rgm@gnu.org>
 
 	* emacs.c (USAGE4): Hard-code bug address.
--- a/src/Makefile.in	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/Makefile.in	Sat Mar 20 10:43:59 2010 +0000
@@ -853,11 +853,7 @@
    @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
 
-#ifdef HAVE_SHM
-RUN_TEMACS = `/bin/pwd`/temacs -nl
-#else
 RUN_TEMACS = `/bin/pwd`/temacs
-#endif
 
 all: emacs${EXEEXT} $(OTHER_FILES)
 
--- a/src/alloc.c	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/alloc.c	Sat Mar 20 10:43:59 2010 +0000
@@ -257,8 +257,6 @@
 
 Lisp_Object Vmemory_full;
 
-#ifndef HAVE_SHM
-
 /* Initialize it to a nonzero value to force it into data space
    (rather than bss space).  That way unexec will remap it into text
    space (pure), on some systems.  We have not implemented the
@@ -268,13 +266,6 @@
 EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,};
 #define PUREBEG (char *) pure
 
-#else /* HAVE_SHM */
-
-#define pure PURE_SEG_BITS   /* Use shared memory segment */
-#define PUREBEG (char *)PURE_SEG_BITS
-
-#endif /* HAVE_SHM */
-
 /* Pointer to the pure area, and its size.  */
 
 static char *purebeg;
--- a/src/emacs.c	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/emacs.c	Sat Mar 20 10:43:59 2010 +0000
@@ -790,11 +790,6 @@
       heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static);
     }
 
-#ifdef LINUX_SBRK_BUG
-  /* This is only used GNU/LINUX running on alpha when using libc5 */
-  __sbrk (1);
-#endif
-
 #ifdef RUN_TIME_REMAP
   if (initialized)
     run_time_remap (argv[0]);
@@ -1816,9 +1811,6 @@
 const struct standard_args standard_args[] =
 {
   { "-version", "--version", 150, 0 },
-#ifdef HAVE_SHM
-  { "-nl", "--no-shared-memory", 140, 0 },
-#endif
   { "-t", "--terminal", 120, 1 },
   { "-nw", "--no-window-system", 110, 0 },
   { "-nw", "--no-windows", 110, 0 },
@@ -2210,39 +2202,6 @@
 
 #ifndef CANNOT_DUMP
 
-#ifdef HAVE_SHM
-
-DEFUN ("dump-emacs-data", Fdump_emacs_data, Sdump_emacs_data, 1, 1, 0,
-       doc: /* Dump current state of Emacs into data file FILENAME.
-This function exists on systems that use HAVE_SHM.  */)
-     (filename)
-     Lisp_Object filename;
-{
-  extern char my_edata[];
-  Lisp_Object tem;
-
-  check_pure_size ();
-  CHECK_STRING (filename);
-  filename = Fexpand_file_name (filename, Qnil);
-
-  tem = Vpurify_flag;
-  Vpurify_flag = Qnil;
-
-  fflush (stdout);
-  /* Tell malloc where start of impure now is.  */
-  /* Also arrange for warnings when nearly out of space.  */
-#ifndef SYSTEM_MALLOC
-  memory_warnings (my_edata, malloc_warning);
-#endif
-  map_out_data (SDATA (filename));
-
-  Vpurify_flag = tem;
-
-  return Qnil;
-}
-
-#else /* not HAVE_SHM */
-
 DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
        doc: /* Dump current state of Emacs into executable file FILENAME.
 Take symbols from SYMFILE (presumably the file you executed to run Emacs).
@@ -2339,8 +2298,6 @@
   return unbind_to (count, Qnil);
 }
 
-#endif /* not HAVE_SHM */
-
 #endif /* not CANNOT_DUMP */
 
 #if HAVE_SETLOCALE
@@ -2517,12 +2474,8 @@
   staticpro (&Qfile_name_handler_alist);
 
 #ifndef CANNOT_DUMP
-#ifdef HAVE_SHM
-  defsubr (&Sdump_emacs_data);
-#else
   defsubr (&Sdump_emacs);
 #endif
-#endif
 
   defsubr (&Skill_emacs);
 
--- a/src/m/alpha.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/m/alpha.h	Sat Mar 20 10:43:59 2010 +0000
@@ -116,11 +116,6 @@
 
 #endif /* __ELF__ */
 
-#if defined (GNU_LINUX) && __GNU_LIBRARY__ - 0 < 6
-/* This controls a conditional in main.  */
-#define LINUX_SBRK_BUG
-#endif
-
 /* On the Alpha it's best to avoid including TERMIO since struct
    termio and struct termios are mutually incompatible.  */
 #define NO_TERMIO
--- a/src/m/ibmrs6000.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/m/ibmrs6000.h	Sat Mar 20 10:43:59 2010 +0000
@@ -32,19 +32,10 @@
 
 #define IBMR2AIX
 
-#ifndef UNEXEC
-#define UNEXEC unexaix.o
-#endif
-
-/* Define addresses, macros, change some setup for dump */
-
-#define NO_REMAP
-
 /* The data segment in this machine always starts at address 0x20000000.
    An address of data cannot be stored correctly in a Lisp object;
    we always lose the high bits.  We must tell XPNTR to add them back.  */
 
-#ifndef USG5_4
 #define TEXT_START 0x10000000
 #define DATA_START 0x20000000
 #define WORDS_BIG_ENDIAN
@@ -75,12 +66,6 @@
 #define LIBS_MACHINE -lrts -lIM -liconv
 #endif
 
-#else /* USG5_4 */
-#undef WORDS_BIG_ENDIAN
-#define DATA_SEG_BITS 0
-#define LIBS_MACHINE
-#endif /* USG5_4 */
-
 #undef ADDR_CORRECT
 #define ADDR_CORRECT(x) ((int)(x))
 
--- a/src/s/aix4-2.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/aix4-2.h	Sat Mar 20 10:43:59 2010 +0000
@@ -168,5 +168,7 @@
 */
 #define BROKEN_GET_CURRENT_DIR_NAME 1
 
+#define UNEXEC unexaix.o
+
 /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
    (do not change this comment) */
--- a/src/s/bsd-common.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/bsd-common.h	Sat Mar 20 10:43:59 2010 +0000
@@ -33,6 +33,36 @@
 #define BSD_SYSTEM 43
 #endif /* BSD_SYSTEM */
 
+/* For mem-limits.h.  */
+#define BSD4_2
+
+#define TABDLY OXTABS
+#define TAB3 OXTABS
+
+/* These aren't needed, since we have getloadavg.  */
+#undef KERNEL_FILE
+#undef LDAV_SYMBOL
+
+#define HAVE_TERMIOS
+#define NO_TERMIO
+
+#define LIBS_DEBUG
+
+#define SYSV_SYSTEM_DIR
+
+/* POSIX-style pgrp behavior.  */
+#undef BSD_PGRPS
+
+#define UNEXEC unexelf.o
+
+/* If the system's imake configuration file defines `NeedWidePrototypes'
+   as `NO', we must define NARROWPROTO manually.  Such a define is
+   generated in the Makefile generated by `xmkmf'.  If we don't
+   define NARROWPROTO, we will see the wrong function prototypes
+   for X functions taking float or double parameters.  */
+
+#define NARROWPROTO 1
+
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
 
--- a/src/s/freebsd.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/freebsd.h	Sat Mar 20 10:43:59 2010 +0000
@@ -23,39 +23,14 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* Get the correct __FreeBSD_version, even if this is before that was
-   defined. */
-#ifndef __FreeBSD_version
-#ifndef __FreeBSD__
-#define __FreeBSD_version 199401
-#elif __FreeBSD__ == 1
-#define __FreeBSD_version 199405
-#else
-#include <osreldate.h>
-#endif
-#endif /* !defined __FreeBSD_version */
-
-/* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up.
-   Earlier versions do not have shared libraries, so inhibit them.
-   You can inhibit them on newer systems if you wish
-   by defining NO_SHARED_LIBS.  */
-#ifndef __FreeBSD__
-#define NO_SHARED_LIBS
-#endif
-
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
 /* For mem-limits.h. */
 #define BSD4_2
 
-/* These aren't needed, since we have getloadavg.  */
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
-
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-#define LIBS_DEBUG
 #define LIBS_SYSTEM -lutil
 #if __FreeBSD_version < 400000
 #define LIBS_TERMCAP -ltermcap
@@ -64,44 +39,19 @@
 #define LIBS_TERMCAP -lncurses
 #endif
 
-#define SYSV_SYSTEM_DIR
-
-/* freebsd has POSIX-style pgrp behavior. */
-#undef BSD_PGRPS
-
-#ifdef __ELF__
-
 /* Let `ld' find image libs and similar things in /usr/local/lib.  The
    system compiler, GCC, has apparently been modified to not look
    there, contrary to what a stock GCC would do.  */
 
 #define LD_SWITCH_SYSTEM  -L/usr/local/lib
 #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
-#define UNEXEC unexelf.o
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
 #undef LIB_GCC
 #define LIB_GCC
 
-#else /* not __ELF__ */
-
-#ifdef NO_SHARED_LIBS
-#ifdef __FreeBSD__  /* shared libs are available, but the user prefers
-                     not to use them.  */
-#define LD_SWITCH_SYSTEM -Bstatic -L/usr/local/lib
-#endif /* __FreeBSD__ */
-#endif /* NO_SHARED_LIBS */
-
-#endif /* not __ELF__ */
-
 #define HAVE_GETLOADAVG 1
-#define HAVE_TERMIOS
-#define NO_TERMIO
 #define DECLARE_GETPWUID_WITH_UID_T
 
-/* freebsd uses OXTABS instead of the expected TAB3. */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
 /* this silences a few compilation warnings */
 #undef BSD_SYSTEM
 #if __FreeBSD__ == 1
@@ -117,14 +67,6 @@
    ioctl TIOCSCTTY.  */
 #define DONT_REOPEN_PTY
 
-/* If the system's imake configuration file defines `NeedWidePrototypes'
-   as `NO', we must define NARROWPROTO manually.  Such a define is
-   generated in the Makefile generated by `xmkmf'.  If we don't
-   define NARROWPROTO, we will see the wrong function prototypes
-   for X functions taking float or double parameters.  */
-
-#define NARROWPROTO 1
-
 /* The following is needed to make `configure' find Xpm, Xaw3d and
    image include and library files if using /usr/bin/gcc.  That
    compiler seems to be modified to not find headers in
--- a/src/s/gnu.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/gnu.h	Sat Mar 20 10:43:59 2010 +0000
@@ -21,27 +21,13 @@
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
-/* For mem-limits.h.  */
-#define BSD4_2
-
 #undef SYSTEM_TYPE
 #define SYSTEM_TYPE "gnu"
 
 #undef NLIST_STRUCT
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
 
 #define SIGNALS_VIA_CHARACTERS
 
-#define HAVE_TERMIOS
-#define NO_TERMIO
-
-#define LIBS_DEBUG
-
-/* XXX emacs should not expect TAB3 to be defined.  */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
 /* Tell Emacs that we are a terminfo based system; disable the use
    of local termcap.  (GNU uses ncurses.) */
 #ifdef HAVE_LIBNCURSES
@@ -49,11 +35,6 @@
 #define LIBS_TERMCAP -lncurses
 #endif
 
-#define SYSV_SYSTEM_DIR
-
-/* GNU has POSIX-style pgrp behavior.  */
-#undef BSD_PGRPS
-
 /* Use mmap directly for allocating larger buffers.  */
 #ifdef DOUG_LEA_MALLOC
 #undef REL_ALLOC
@@ -63,17 +44,12 @@
 #define ORDINARY_LINK
 #define DATA_START ({ extern int data_start; (char *) &data_start; })
 
-/* GNU now always uses the ELF format.  */
-#define UNEXEC unexelf.o
-
 /* Some losing code fails to include this and then assumes
    that because it is braindead that O_RDONLY==0.  */
 #ifndef NOT_C_CODE
 #include <fcntl.h>
 #endif
 
-#define NARROWPROTO 1
-
 #ifdef emacs
 #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
--- a/src/s/irix6-5.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/irix6-5.h	Sat Mar 20 10:43:59 2010 +0000
@@ -22,7 +22,6 @@
 #define IRIX6_5			/* used in m/iris4d */
 #include "usg5-4.h"
 
-#undef sigsetmask  /* use sys_sigsetmask */
 #undef _longjmp /* use system versions, not conservative aliases */
 #undef _setjmp
 
@@ -46,9 +45,6 @@
 #define SIGNALS_VIA_CHARACTERS
 
 /* No need to use sprintf to get the tty name--we get that from _getpty.  */
-#ifdef PTY_TTY_NAME_SPRINTF
-#undef PTY_TTY_NAME_SPRINTF
-#endif
 #define PTY_TTY_NAME_SPRINTF
 /* No need to get the pty name at all.  */
 #ifdef PTY_NAME_SPRINTF
@@ -80,10 +76,6 @@
   strcpy (pty_name, name);				    \
 }
 
-/* Since we use POSIX constructs in PTY_OPEN, we must force POSIX
-   throughout. */
-#define POSIX_SIGNALS
-
 /* Ulimit(UL_GMEMLIM) is busted...  */
 #define ULIMIT_BREAK_VALUE 0x14000000
 
--- a/src/s/lynxos.h	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/* Definitions file for GNU Emacs running on LynxOS-3.0.1
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* LynxOS is almost a bsd 4.2 system */
-#include "s/bsd4-2.h"
-
-/* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
-
-/* override the bsd definition */
-#undef SYSTEM_TYPE
-#define SYSTEM_TYPE "lynxos 3.0.1"
-
-/* System stuff redefined from bsd4-2.h */
-#undef KERNEL_FILE
-#define KERNEL_FILE "/lynx.os"
-#undef LDAV_SYMBOL
-#define LDAV_SYMBOL "load_average"
-
-/* misc defines */
-#define LNOFLSH 0
-
-/* COFF related */
-#define COFF
-#define NO_REMAP
-#define SECTION_ALIGNMENT 0x1
-#define COFF_BSD_SYMBOLS
-#define etext __etext
-#define edata __edata
-#define _start __text
-
-/* Compilation options */
-#define LIBS_DEBUG
-#define ORDINARY_LINK
-/* we define following to prevent all the lynxos's stupid compilation */
-/* warning messages */
-#define C_SWITCH_SYSTEM -D__NO_INCLUDE_WARN__
-#define LIBS_SYSTEM -lbsd
-
-/* arch-tag: fbc81ec9-1c45-416b-a368-799ae7c094a1
-   (do not change this comment) */
--- a/src/s/netbsd.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/netbsd.h	Sat Mar 20 10:43:59 2010 +0000
@@ -22,44 +22,20 @@
 /* Get most of the stuff from bsd-common */
 #include "bsd-common.h"
 
-#if defined (__alpha__) && !defined (__ELF__)
-#define NO_SHARED_LIBS
-#endif
-
-/* For mem-limits.h.  */
-#define BSD4_2
-
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
 #define HAVE_GETLOADAVG 1
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-/* netbsd uses OXTABS instead of the expected TAB3.  */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
-
-#define HAVE_TERMIOS
-#define NO_TERMIO
-
-#define LIBS_DEBUG
 /* -lutil is not needed for NetBSD >0.9.  */
 /* #define LIBS_SYSTEM -lutil */
 #define LIBS_TERMCAP -ltermcap
 
 #define NEED_ERRNO
-#define SYSV_SYSTEM_DIR
 
-/* Netbsd has POSIX-style pgrp behavior.  */
-#undef BSD_PGRPS
-
-#if !defined (NO_SHARED_LIBS) && defined (__ELF__)
 #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
-#define UNEXEC unexelf.o
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
 #undef LIB_GCC
 #define LIB_GCC
-#endif
 
 #ifdef HAVE_CRTIN
 #define START_FILES_1 /usr/lib/crti.o 
@@ -71,7 +47,6 @@
 
 #define AMPERSAND_FULL_NAME
 
-#ifdef __ELF__
 /* Here is how to find X Windows.  LD_SWITCH_X_SITE_AUX gives an -R option
    says where to find X windows at run time.  We convert it to a -rpath option
    which is what OSF1 uses.  */
@@ -92,8 +67,6 @@
 
 #define LD_SWITCH_SYSTEM_TEMACS -Wl,-z,nocombreloc
 
-#endif /* __ELF__ */
-
 /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
    the library search parth, i.e. it won't search /usr/lib
    for libc and friends. Using -nostartfiles instead avoids
@@ -101,8 +74,6 @@
 
 #define LINKER $(CC) -nostartfiles
 
-#define NARROWPROTO 1
-
 #define DEFAULT_SOUND_DEVICE "/dev/audio"
 
 /* Greg A. Woods <woods@weird.com> says we must include signal.h
--- a/src/s/openbsd.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/openbsd.h	Sat Mar 20 10:43:59 2010 +0000
@@ -19,7 +19,6 @@
 
 #undef LD_SWITCH_SYSTEM_TEMACS
 #undef LD_SWITCH_SYSTEM
-#ifdef __ELF__
 
   /*  Han Boetes <han@mijncomputer.nl> says this
       is necessary,  otherwise Emacs dumps core on elf systems.  */
@@ -29,12 +28,5 @@
    default.  */
 #define LD_SWITCH_X_DEFAULT -L/usr/local/lib
 
-#else
-  
-#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp
-#define LD_SWITCH_X_DEFAULT -L/usr/local/lib
-
-#endif
-
 /* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
    (do not change this comment) */
--- a/src/s/sol2-3.h	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/* Definitions file for GNU Emacs running on Solaris 2.3.
-
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "usg5-4.h"
-
-#define SOLARIS2
-
-/* This triggers a conditional in xfaces.c.  */
-#define XOS_NEEDS_TIME_H
-
-#define POSIX
-
-#define LIBS_SYSTEM -lsocket -lnsl -lkstat
-
-/* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root.
-   ghazi@caip.rutgers.edu, 7/21/97.  Don't redefine if already defined
-   (e.g., by config.h). */
-#ifndef HAVE_LIBKSTAT
-#define HAVE_LIBKSTAT
-#endif
-
-/* inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
-   XIM support.  */
-
-#define INHIBIT_X11R6_XIM
-
-/* Must use the system's termcap, if we use any termcap.
-   It does special things.  */
-
-#ifndef TERMINFO
-#define LIBS_TERMCAP -ltermcap
-#endif
-
-#define USE_MMAP_FOR_BUFFERS 1
-
-#ifndef __GNUC__
-#define LD_SWITCH_SYSTEM -L /usr/ccs/lib LD_SWITCH_X_SITE_AUX
-/* eggert thinks all versions of SunPro C allowed this.  */
-#define C_DEBUG_SWITCH -g -O
-#else /* GCC */
-/* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
-   has anything in it.  It can be empty.
-   This works ok in src.  Luckily lib-src does not use LD_SWITCH_SYSTEM.  */
-#define LD_SWITCH_SYSTEM -L /usr/ccs/lib \
- `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX`
-#endif /* GCC */
-
-/* Info from fnf@cygnus.com suggests this is appropriate.  */
-#define POSIX_SIGNALS
-
-/* We don't need the definition from usg5-4.h with POSIX_SIGNALS.  */
-#undef sigsetmask
-
-/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
-   rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
-   work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
-   (x<2) but I'm not sure.   fnf@cygnus.com */
-/* This sets the name of the slave side of the PTY.  On SysVr4,
-   grantpt(3) forks a subprocess, so keep sigchld_handler() from
-   intercepting that death.  If any child but grantpt's should die
-   within, it should be caught after sigrelse(2). */
-
-#undef PTY_TTY_NAME_SPRINTF
-#define PTY_TTY_NAME_SPRINTF			\
-  {						\
-    char *ptsname (), *ptyname;			\
-						\
-    sigblock (sigmask (SIGCLD));		\
-    if (grantpt (fd) == -1)			\
-      { emacs_close (fd); return -1; }		\
-    sigunblock (sigmask (SIGCLD));		\
-    if (unlockpt (fd) == -1)			\
-      { emacs_close (fd); return -1; }		\
-    if (!(ptyname = ptsname (fd)))		\
-      { emacs_close (fd); return -1; }		\
-    strncpy (pty_name, ptyname, sizeof (pty_name)); \
-    pty_name[sizeof (pty_name) - 1] = 0;	\
-  }
-
-/* arch-tag: a8fe2e15-e517-49cb-a863-f346b80885fe
-   (do not change this comment) */
--- a/src/s/sol2-4.h	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* Handle Solaris 2.4.  */
-
-#include "sol2-3.h"
-
-#undef LD_SWITCH_SYSTEM
-
-/* `#ifdef USE_MOTIF' won't work here, since USE_MOTIF isn't defined yet.
-   Instead, dynamically check whether USE_MOTIF expands to something.  */
-#define NOT_USING_MOTIF { set x USE_MOTIF; test "$$2" = "USE_MOTIF"; }
-
-#ifndef __GNUC__
-#define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib LD_SWITCH_X_SITE_AUX \
-  `NOT_USING_MOTIF || echo ' -R/usr/dt/lib'`
-#else /* GCC */
-/* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
-   has anything in it.  It can be empty.
-   This works ok in temacs.  */
-#define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib \
- `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX` \
-  `NOT_USING_MOTIF || echo ' -R/usr/dt/lib -L/usr/dt/lib'`
-
-/* Get rid of -traditional and let const really do its thing.  */
-#undef C_SWITCH_SYSTEM
-#undef const
-#endif /* GCC */
-
-/* Gregory Neil Shapiro <gshapiro@hhmi.org> reports the Motif header files
-   are in this directory on Solaris 2.4.  */
-#define C_SWITCH_X_SYSTEM -I/usr/dt/include
-
-/* arch-tag: 6f0de37b-cfda-427a-a5ae-b83ed54aaae7
-   (do not change this comment) */
--- a/src/s/sol2-5.h	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* Handle Solaris 2.5.  */
-
-#include "sol2-4.h"
-
-/* -lgen is needed for the regex and regcmp functions
-   which are used by Motif.  In the future we can try changing
-   regex.c to provide them in Emacs, but this is safer for now.  */
-#define LIB_MOTIF -lXm -lgen
-
-/* This is the only known way to avoid some crashes
-   that seem to relate to screwed up malloc data
-   after deleting a frame.  */
-/* rms: I think the problems using ralloc had to do with system
-   libraries that called the system malloc even if we linked in the
-   GNU malloc.  I could not see any way to fix the problem except to
-   have just one malloc and that had to be the system one.  */
-/* This is not always necessary.  Turned off at present for testers to
-   identify any problems with gmalloc more accurately.  */
-/* #define SYSTEM_MALLOC */
-
-/* There have problems reported with mmap at least on Solaris 2.6
-   and 2.7.  For simplicity, let's not use mmap for anything >= 2.5.
-   We can optimize this later.  */
-
-#undef USE_MMAP_FOR_BUFFERS
-
-/* Probably OK also on earlier versions.  */
-#define GC_SETJMP_WORKS 1
-#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: 96d65526-21c9-4547-a797-2bd575c05be7
-   (do not change this comment) */
--- a/src/s/sol2-6.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/sol2-6.h	Sat Mar 20 10:43:59 2010 +0000
@@ -1,11 +1,126 @@
-/* Handle Solaris 2.6.  */
+/* Definitions file for GNU Emacs running on Solaris 2.6.
+
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "usg5-4.h"
+
+#define SOLARIS2
+
+/* This triggers a conditional in xfaces.c.  */
+#define XOS_NEEDS_TIME_H
 
-#include "sol2-5.h"
+#define POSIX
+
+#define LIBS_SYSTEM -lsocket -lnsl -lkstat
+
+/* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root.
+   ghazi@caip.rutgers.edu, 7/21/97.  Don't redefine if already defined
+   (e.g., by config.h). */
+#ifndef HAVE_LIBKSTAT
+#define HAVE_LIBKSTAT
+#endif
+
+/* inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
+   XIM support.  */
+
+#define INHIBIT_X11R6_XIM
+
+/* Must use the system's termcap, if we use any termcap.
+   It does special things.  */
+
+#ifndef TERMINFO
+#define LIBS_TERMCAP -ltermcap
+#endif
+
+#ifndef __GNUC__
+/* eggert thinks all versions of SunPro C allowed this.  */
+#define C_DEBUG_SWITCH -g -O
+#endif /* GCC */
 
-#if 0 /* dldump does not handle all the extensions used by GNU ld.  */
-#undef UNEXEC
-#define UNEXEC unexsol.o
-#endif
+/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
+   rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
+   work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
+   (x<2) but I'm not sure.   fnf@cygnus.com */
+/* This sets the name of the slave side of the PTY.  On SysVr4,
+   grantpt(3) forks a subprocess, so keep sigchld_handler() from
+   intercepting that death.  If any child but grantpt's should die
+   within, it should be caught after sigrelse(2). */
+
+#define PTY_TTY_NAME_SPRINTF			\
+  {						\
+    char *ptsname (), *ptyname;			\
+						\
+    sigblock (sigmask (SIGCLD));		\
+    if (grantpt (fd) == -1)			\
+      { emacs_close (fd); return -1; }		\
+    sigunblock (sigmask (SIGCLD));		\
+    if (unlockpt (fd) == -1)			\
+      { emacs_close (fd); return -1; }		\
+    if (!(ptyname = ptsname (fd)))		\
+      { emacs_close (fd); return -1; }		\
+    strncpy (pty_name, ptyname, sizeof (pty_name)); \
+    pty_name[sizeof (pty_name) - 1] = 0;	\
+  }
+
+/* `#ifdef USE_MOTIF' won't work here, since USE_MOTIF isn't defined yet.
+   Instead, dynamically check whether USE_MOTIF expands to something.  */
+#define NOT_USING_MOTIF { set x USE_MOTIF; test "$$2" = "USE_MOTIF"; }
+
+#ifndef __GNUC__
+#define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib LD_SWITCH_X_SITE_AUX \
+  `NOT_USING_MOTIF || echo ' -R/usr/dt/lib'`
+#else /* GCC */
+/* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
+   has anything in it.  It can be empty.
+   This works ok in temacs.  */
+#define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib \
+ `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX` \
+  `NOT_USING_MOTIF || echo ' -R/usr/dt/lib -L/usr/dt/lib'`
+
+/* Get rid of -traditional and let const really do its thing.  */
+#undef C_SWITCH_SYSTEM
+#undef const
+#endif /* GCC */
+
+/* Gregory Neil Shapiro <gshapiro@hhmi.org> reports the Motif header files
+   are in this directory on Solaris 2.4.  */
+#define C_SWITCH_X_SYSTEM -I/usr/dt/include
+
+/* -lgen is needed for the regex and regcmp functions
+   which are used by Motif.  In the future we can try changing
+   regex.c to provide them in Emacs, but this is safer for now.  */
+#define LIB_MOTIF -lXm -lgen
+
+/* This is the only known way to avoid some crashes
+   that seem to relate to screwed up malloc data
+   after deleting a frame.  */
+/* rms: I think the problems using ralloc had to do with system
+   libraries that called the system malloc even if we linked in the
+   GNU malloc.  I could not see any way to fix the problem except to
+   have just one malloc and that had to be the system one.  */
+/* This is not always necessary.  Turned off at present for testers to
+   identify any problems with gmalloc more accurately.  */
+/* #define SYSTEM_MALLOC */
+
+/* Probably OK also on earlier versions.  */
+#define GC_SETJMP_WORKS 1
+#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
 
 /* arch-tag: 71ea3857-89dc-4395-9623-77964e6ed3ca
    (do not change this comment) */
--- a/src/s/unixware.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/unixware.h	Sat Mar 20 10:43:59 2010 +0000
@@ -1,4 +1,71 @@
-#include "usg5-4-2.h"
+/* s/ file for Unixware.
+
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+                 2008, 2009, 2010  Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+
+
+#include "usg5-4.h"
+
+/* fnf@cygnus.com says these exist.  */
+#define HAVE_TCATTR
+/* #define HAVE_GETWD  (appears to be buggy on SVR4.2) */
+#undef HAVE_GETWD
+
+#undef HAVE_SYSV_SIGPAUSE
+
+/* Motif needs -lgen.  */
+#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
+
+/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
+   rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
+   work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
+   (x<2) but I'm not sure.   fnf@cygnus.com */
+/* This sets the name of the slave side of the PTY.  On SysVr4,
+   grantpt(3) forks a subprocess, so keep sigchld_handler() from
+   intercepting that death.  If any child but grantpt's should die
+   within, it should be caught after sigrelse(2). */
+
+#define PTY_TTY_NAME_SPRINTF			\
+  {						\
+    char *ptsname(), *ptyname;			\
+						\
+    sigblock(sigmask(SIGCLD));			\
+    if (grantpt(fd) == -1)			\
+      fatal("could not grant slave pty");	\
+    sigunblock(sigmask(SIGCLD));		\
+    if (unlockpt(fd) == -1)			\
+      fatal("could not unlock slave pty");	\
+    if (!(ptyname = ptsname(fd)))		\
+      fatal ("could not enable slave pty");	\
+    strncpy(pty_name, ptyname, sizeof(pty_name)); \
+    pty_name[sizeof(pty_name) - 1] = 0;		\
+  }
+
+/* Use libw.a along with X11R6 Xt.  */
+#define NEED_LIBW
+
+/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp
+   is needed in UNIX_SV ... 4.2 1.1.2.  */
+#define LIB_MOTIF -lXm -lXimp
+
+/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6
+   (do not change this comment) */
+
 
 #define	PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)
 
--- a/src/s/usg5-4-2.h	Fri Mar 19 12:16:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/* s/ file for System V release 4.2.
-
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-#include "usg5-4.h"
-
-/* fnf@cygnus.com says these exist.  */
-#define HAVE_TCATTR
-/* #define HAVE_GETWD  (appears to be buggy on SVR4.2) */
-#undef HAVE_GETWD
-
-/* Info from fnf@cygnus.com suggests this is appropriate.  */
-#define POSIX_SIGNALS
-
-/* We don't need the definition from usg5-3.h with POSIX_SIGNALS.  */
-#undef sigsetmask
-#undef HAVE_SYSV_SIGPAUSE
-
-/* Motif needs -lgen.  */
-#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
-
-/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
-   rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
-   work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
-   (x<2) but I'm not sure.   fnf@cygnus.com */
-/* This sets the name of the slave side of the PTY.  On SysVr4,
-   grantpt(3) forks a subprocess, so keep sigchld_handler() from
-   intercepting that death.  If any child but grantpt's should die
-   within, it should be caught after sigrelse(2). */
-
-#undef PTY_TTY_NAME_SPRINTF
-#define PTY_TTY_NAME_SPRINTF			\
-  {						\
-    char *ptsname(), *ptyname;			\
-						\
-    sigblock(sigmask(SIGCLD));			\
-    if (grantpt(fd) == -1)			\
-      fatal("could not grant slave pty");	\
-    sigunblock(sigmask(SIGCLD));		\
-    if (unlockpt(fd) == -1)			\
-      fatal("could not unlock slave pty");	\
-    if (!(ptyname = ptsname(fd)))		\
-      fatal ("could not enable slave pty");	\
-    strncpy(pty_name, ptyname, sizeof(pty_name)); \
-    pty_name[sizeof(pty_name) - 1] = 0;		\
-  }
-
-/* Use libw.a along with X11R6 Xt.  */
-#define NEED_LIBW
-
-/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp
-   is needed in UNIX_SV ... 4.2 1.1.2.  */
-#define LIB_MOTIF -lXm -lXimp
-
-/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6
-   (do not change this comment) */
--- a/src/s/usg5-4.h	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/s/usg5-4.h	Sat Mar 20 10:43:59 2010 +0000
@@ -63,13 +63,7 @@
 
 /* Special hacks needed to make Emacs run on this system.  */
 
-/*
- *	Make the sigsetmask function go away.  Don't know what the
- *	ramifications of this are, but doesn't seem possible to
- *	emulate it properly anyway at this point.
- */
-
-#define sigsetmask(mask)	/* Null expansion */
+#define POSIX_SIGNALS
 
 /* setjmp and longjmp can safely replace _setjmp and _longjmp,
    but they will run slower.  */
@@ -176,27 +170,6 @@
 
 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
 
-/* This sets the name of the slave side of the PTY.  On SysVr4,
-   grantpt(3) forks a subprocess, so keep sigchld_handler() from
-   intercepting that death.  If any child but grantpt's should die
-   within, it should be caught after sigrelse(2). */
-
-#define PTY_TTY_NAME_SPRINTF				\
-  {							\
-    char *ptsname (), *ptyname;				\
-							\
-    sighold (SIGCLD);					\
-    if (grantpt (fd) == -1)				\
-      { emacs_close (fd); return -1; }			\
-    sigrelse (SIGCLD);					\
-    if (unlockpt (fd) == -1)				\
-      { emacs_close (fd); return -1; }			\
-    if (!(ptyname = ptsname (fd)))			\
-      { emacs_close (fd); return -1; }			\
-    strncpy (pty_name, ptyname, sizeof (pty_name));	\
-    pty_name[sizeof (pty_name) - 1] = 0;		\
-  }
-
 /* Push various streams modules onto a PTY channel. */
 
 #define SETUP_SLAVE_PTY \
--- a/src/unexec.c	Fri Mar 19 12:16:57 2010 +0000
+++ b/src/unexec.c	Sat Mar 20 10:43:59 2010 +0000
@@ -630,7 +630,6 @@
     PERROR (name);
 }
 
-#ifndef COFF_BSD_SYMBOLS
 
 /*
  *	If the COFF file contains a symbol table and a line number section,
@@ -699,8 +698,6 @@
   return 0;
 }
 
-#endif /* COFF_BSD_SYMBOLS */
-
 /* ****************************************************************
  * unexec
  *
@@ -724,9 +721,7 @@
   if (make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) < 0
       || copy_text_and_data (new, a_out) < 0
       || copy_sym (new, a_out, a_name, new_name) < 0
-#ifndef COFF_BSD_SYMBOLS
       || adjust_lnnoptrs (new, a_out, new_name) < 0
-#endif
       )
     {
       close (new);