changeset 337:fbbf69b4e8a7 r21-0-66

Import from CVS: tag r21-0-66
author cvs
date Mon, 13 Aug 2007 10:51:02 +0200
parents fe0a93612022
children d486d167960c
files CHANGES-beta ChangeLog etc/NEWS lib-src/ChangeLog lib-src/fakemail.c lisp/ChangeLog lisp/alist.el lisp/auto-autoloads.el lisp/cus-dep.el lisp/cus-edit.el lisp/menubar-items.el lisp/package-get.el lisp/x-faces.el lwlib/ChangeLog man/ChangeLog nt/ChangeLog src/ChangeLog src/alloc.c src/dbxrc src/file-coding.c src/file-coding.h src/free-hook.c src/gdbinit src/menubar-msw.c src/mule-charset.c src/mule-charset.h src/opaque.c src/systime.h version.sh
diffstat 29 files changed, 776 insertions(+), 288 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 10:50:41 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 10:51:02 2007 +0200
@@ -1,6 +1,11 @@
 							-*- indented-text -*-
+to 21.0.66 "20 minutes to Nikko"
+-- build fixes from Martin Buchholz
+-- various patches from Andy Piper and Jan Vroonhof
+-- alist.el synched with APEL-9.13 from MORIOKA Tomohiko
+
 to 21.0.65 "20 minutes to Nikko"
--- Fix for new Berkeley DB library from Paul Keusemann/Gregory Neal Shapiro
+-- Fix for new Berkeley DB library from Paul Keusemann/Gregory Neil Shapiro
 -- Various package-ui fixes from Jan Vroonhof
 -- Fix for doubled font-locking during buffer reversion
 -- KFM browsing support from Neal Becker
--- a/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/etc/NEWS	Mon Aug 13 10:50:41 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 10:51:02 2007 +0200
@@ -157,6 +157,13 @@
 It has been greatly enhanced with respect to the one once included
 with the ilisp package and should work well under XEmacs 21.0.
 
+** Gnuserv changes
+
+*** Like the old 'gnudoit' program. Gnuclient -batch now can read from stdin.
+
+*** Again like the old 'gnudoit' program, gnuclient now can return multiple
+lines.
+
 ** C mode changes
 
 *** Multiline macros are now handled, both as they affect indentation,
--- a/lib-src/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,19 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-03-10  Martin Buchholz  <martin@xemacs.org>
+
+	* fakemail.c (add_a_stream): Always use full ANSI prototypes.
+
+1999-03-06  Martin Buchholz  <martin@xemacs.org>
+
+	* fakemail.c (main): Ansify.
+	(xmalloc): Ansify.
+	(xrealloc): Ansify.
+	(get_keyword): use paranoid casts ((int) (unsigned char) c) for
+	islower, toupper, isspace.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/lib-src/fakemail.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/lib-src/fakemail.c	Mon Aug 13 10:51:02 2007 +0200
@@ -24,9 +24,9 @@
 #include <../src/config.h>
 
 #if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
-/* This program isnot used in BSD, so just avoid loader complaints.  */
+/* This program is not used in BSD, so just avoid loader complaints.  */
 int
-main ()
+main (int argc, char *argv[])
 {
   return 0;
 }
@@ -34,7 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 int
-main ()
+main (int argc, char *argv[])
 {
   /* Linux /bin/mail, if it exists, is NOT the Unix v7 mail that
      fakemail depends on!  This causes garbled mail.  Better to
@@ -48,7 +48,7 @@
 #else /* not BSD 4.2 (or newer) */
 #ifdef MSDOS
 int
-main ()
+main (int argc, char *argv[])
 {
   return 0;
 }
@@ -100,11 +100,11 @@
   struct header_record *previous;
 };
 typedef struct header_record *header;
-			
+
 struct stream_record
 {
   FILE *handle;
-  int (*action)();
+  int (*action)(FILE *);
   struct stream_record *rest_streams;
 };
 typedef struct stream_record *stream_list;
@@ -191,8 +191,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static char *
-xmalloc (size)
-     size_t size;
+xmalloc (size_t size)
 {
   char *result = malloc (((unsigned) size));
   if (result == ((char *) NULL))
@@ -201,9 +200,7 @@
 }
 
 static char *
-xrealloc (ptr, size)
-     char *ptr;
-     size_t size;
+xrealloc (char *ptr, size_t size)
 {
   char *result = realloc (ptr, ((unsigned) size));
   if (result == ((char *) NULL))
@@ -221,7 +218,7 @@
 }
 
 /* Read a line of text from `stream' into `linebuffer'.
- * Return the length of the line.  
+ * Return the length of the line.
  */
 
 static long
@@ -263,14 +260,17 @@
 
   ptr = &keyword[0];
   c = *field++;
-  if ((isspace (c)) || (c == ':'))
-    return ((char *) NULL);
-  *ptr++ = ((islower (c)) ? (toupper (c)) : c);
-  while (((c = *field++) != ':') && (!(isspace (c))))
-    *ptr++ = ((islower (c)) ? (toupper (c)) : c);
+  if ((isspace ((int) (unsigned char) c)) || (c == ':'))
+    return (char *) NULL;
+  *ptr++ = ((islower ((int) (unsigned char) c)) ?
+	    (toupper ((int) (unsigned char) c)) : c);
+  while (((c = *field++) != ':') &&
+	 (!(isspace ((int) (unsigned char) c))))
+    *ptr++ = ((islower ((int) (unsigned char) c)) ?
+	      (toupper ((int) (unsigned char) c)) : c);
   *ptr++ = '\0';
-  while (isspace (c)) c = *field++;
-  if (c != ':') return ((char *) NULL);
+  while (isspace ((int) (unsigned char) c)) c = *field++;
+  if (c != ':') return (char *) NULL;
   *rest = field;
   return &keyword[0];
 }
@@ -371,7 +371,7 @@
 }
 
 static void
-add_a_stream (FILE *the_stream, int (*closing_action)())
+add_a_stream (FILE *the_stream, int (*closing_action)(FILE *))
 {
   stream_list old = the_streams;
   the_streams = new_stream ();
@@ -553,7 +553,7 @@
   *where = '\0';
   return;
 }
-    
+
 static header
 read_header (void)
 {
@@ -624,9 +624,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char *argv[])
 {
   char *command_line;
   header the_header;
@@ -655,7 +653,7 @@
 					 args_size (the_header)));
   strcpy (command_line, mail_program_name);
   parse_header (the_header, &command_line[name_length]);
-  
+
   the_pipe = popen (command_line, "w");
   if (the_pipe == ((FILE *) NULL))
     fatal ("cannot open pipe to real mailer", (char *) 0);
--- a/lisp/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,31 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-02-19  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+	* x-faces.el (x-init-global-faces): Add default tag to specifiers, 
+	so they can be overridden by x-init-face-from-resources.
+	Additionally specify the font name also with an x tag.
+
+1999-03-08  Andy Piper  <andy@xemacs.org>
+
+	* package-get.el (package-get-base): autoload.
+
+	* menubar-items.el (default-menubar): add update menu item. Fix
+	custom menu to only be activated when package-base is available.
+
+	* package-get.el (package-get-custom): don't load
+	package-get-custom as it is auto-generated. Fix group definition.
+
+1999-03-05  Didier Verna  <verna@inf.enst.fr>
+
+	* cus-dep.el (Custom-make-dependencies): use `prin1-to-string'
+	instead of `symbol-name' (Thanks Kyle).
+
+	* cus-edit.el (custom-save-variables): use `prin1' instead of
+	princ to write symbols.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/lisp/alist.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/alist.el	Mon Aug 13 10:51:02 2007 +0200
@@ -1,13 +1,11 @@
-;;; alist.el --- utility functions about assoc-list
+;;; alist.el --- utility functions about association-list
 
-;; Copyright (C) 1993,1994,1995,1996 Free Software Foundation, Inc.
+;; Copyright (C) 1993,1994,1995,1996,1998 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version:
-;;	$Id: alist.el,v 1.1 1997/11/29 20:37:43 steve Exp $
 ;; Keywords: alist
 
-;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
+;; This file is part of APEL (A Portable Emacs Library).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -26,6 +24,7 @@
 
 ;;; Code:
 
+;;;###autoload
 (defun put-alist (item value alist)
   "Modify ALIST to set VALUE to ITEM.
 If there is a pair whose car is ITEM, replace its cdr by VALUE.
@@ -40,6 +39,7 @@
       (cons (cons item value) alist)
       )))
 
+;;;###autoload
 (defun del-alist (item alist)
   "If there is a pair whose key is ITEM, delete it from ALIST.
 \[tomo's ELIS emulating function]"
@@ -59,6 +59,7 @@
 	  )
 	alist))))
 
+;;;###autoload
 (defun set-alist (symbol item value)
   "Modify a alist indicated by SYMBOL to set VALUE to ITEM."
   (or (boundp symbol)
@@ -67,12 +68,14 @@
   (set symbol (put-alist item value (symbol-value symbol)))
   )
 
+;;;###autoload
 (defun remove-alist (symbol item)
   "Remove ITEM from the alist indicated by SYMBOL."
   (and (boundp symbol)
        (set symbol (del-alist item (symbol-value symbol)))
        ))
 
+;;;###autoload
 (defun modify-alist (modifier default)
   "Modify alist DEFAULT into alist MODIFIER."
   (mapcar (function
@@ -82,6 +85,7 @@
 	  modifier)
   default)
 
+;;;###autoload
 (defun set-modified-alist (sym modifier)
   "Modify a value of a symbol SYM into alist MODIFIER.
 The symbol SYM should be alist. If it is not bound,
--- a/lisp/auto-autoloads.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/auto-autoloads.el	Mon Aug 13 10:51:02 2007 +0200
@@ -12,6 +12,35 @@
 
 ;;;***
 
+;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist) "alist" "lisp/alist.el")
+
+(autoload 'put-alist "alist" "\
+Modify ALIST to set VALUE to ITEM.
+If there is a pair whose car is ITEM, replace its cdr by VALUE.
+If there is not such pair, create new pair (ITEM . VALUE) and
+return new alist whose car is the new pair and cdr is ALIST.
+[tomo's ELIS like function]" nil nil)
+
+(autoload 'del-alist "alist" "\
+If there is a pair whose key is ITEM, delete it from ALIST.
+[tomo's ELIS emulating function]" nil nil)
+
+(autoload 'set-alist "alist" "\
+Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil)
+
+(autoload 'remove-alist "alist" "\
+Remove ITEM from the alist indicated by SYMBOL." nil nil)
+
+(autoload 'modify-alist "alist" "\
+Modify alist DEFAULT into alist MODIFIER." nil nil)
+
+(autoload 'set-modified-alist "alist" "\
+Modify a value of a symbol SYM into alist MODIFIER.
+The symbol SYM should be alist. If it is not bound,
+its value regard as nil." nil nil)
+
+;;;***
+
 ;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el")
 
 (fset 'command-apropos 'apropos-command)
@@ -1218,6 +1247,52 @@
 
 ;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el")
 
+(defvar package-get-base nil "\
+List of packages that are installed at this site.
+For each element in the alist,  car is the package name and the cdr is
+a plist containing information about the package.   Typical fields
+kept in the plist are:
+
+version		- version of this package
+provides	- list of symbols provided
+requires	- list of symbols that are required.
+		  These in turn are provided by other packages.
+filename	- name of the file.
+size		- size of the file (aka the bundled package)
+md5sum		- computed md5 checksum
+description	- What this package is for.
+type		- Whether this is a 'binary (default) or 'single file package
+
+More fields may be added as needed.  An example:
+
+'(
+ (name
+  (version \"<version 2>\"
+   file \"filename\"
+   description \"what this package is about.\"
+   provides (<list>)
+   requires (<list>)
+   size <integer-bytes>
+   md5sum \"<checksum\"
+   type single
+   )
+  (version \"<version 1>\"
+   file \"filename\"
+   description \"what this package is about.\"
+   provides (<list>)
+   requires (<list>)
+   size <integer-bytes>
+   md5sum \"<checksum\"
+   type single
+   )
+   ...
+   ))
+
+For version information, it is assumed things are listed in most
+recent to least recent -- in other words, the version names don't have to
+be lexically ordered.  It is debatable if it makes sense to have more than
+one version of a package available.")
+
 (autoload 'package-get-download-menu "package-get" "\
 Build the `Add Download Site' menu." nil nil)
 
--- a/lisp/cus-dep.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/cus-dep.el	Mon Aug 13 10:51:02 2007 +0200
@@ -173,7 +173,7 @@
 			   (if found
 			       (insert " ")
 			     (insert "(custom-add-loads '"
-				     (symbol-name sym) " '("))
+				     (prin1-to-string sym) " '("))
 			   (prin1 where (current-buffer))
 			   (push where found)))
 		       (when found
--- a/lisp/cus-edit.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/cus-edit.el	Mon Aug 13 10:51:02 2007 +0200
@@ -3017,7 +3017,7 @@
 					   (not (get symbol 'force-value)))))))
 		    (when value
 		      (princ "\n '(")
-		      (princ symbol)
+		      (prin1 symbol)
 		      (princ " ")
 		      (prin1 (car value))
 		      (cond (requests
@@ -3058,7 +3058,7 @@
 			       ;; Don't print default face here.
 			       value)
 		      (princ "\n '(")
-		      (princ symbol)
+		      (prin1 symbol)
 		      (princ " ")
 		      (prin1 value)
 		      (if (or (get symbol 'face-defface-spec)
--- a/lisp/menubar-items.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/menubar-items.el	Mon Aug 13 10:51:02 2007 +0200
@@ -237,10 +237,16 @@
                   (package-get-download-menu)))
        ["Update Package Index" package-get-update-base]
        ["List & Install" pui-list-packages]
-       ("Using Custom"
-	("Select" :filter (lambda (&rest junk)
-			  (cdr (custom-menu-create 'packages))))
-	["Update" package-get-custom])
+       ["Update Installed Packages" package-get-update-all]
+       ;; hack-o-matic, we can't force a laod of package-base here
+       ;; since it triggers dialog box interactions which we can't
+       ;; deal while using a menu
+       ("Using Custom" 
+	:filter (lambda (&rest junk)
+		  (if package-get-base
+		      (cdr (custom-menu-create 'packages))
+		    '(["Please load Package Index" (lamda (&rest junk) ()) nil]))))
+       
        ["Help" (Info-goto-node "(xemacs)Packages")])
 
       "---"
--- a/lisp/package-get.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/package-get.el	Mon Aug 13 10:51:02 2007 +0200
@@ -112,7 +112,8 @@
   "Automatic Package Fetcher and Installer."
   :prefix "package-get"
   :group 'package-tools)
-  
+
+;;;###autoload  
 (defvar package-get-base nil
   "List of packages that are installed at this site.
 For each element in the alist,  car is the package name and the cdr is
@@ -1015,8 +1016,6 @@
   "Fetch and install the latest versions of all customized packages."
   (interactive)
   (package-get-require-base t)
-  ;; Load a fresh copy
-  (load "package-get-custom.el")
   (mapcar (lambda (pkg)
 	    (if (eval (intern (concat (symbol-name (car pkg)) "-package")))
 		(package-get (car pkg) nil))
@@ -1041,7 +1040,7 @@
          (custom-var (intern (concat (symbol-name package) "-package")))
          (description (plist-get props 'description)))
     (when (not (memq group package-get-custom-groups))
-      (setq package-get-custom-groups (cons package
+      (setq package-get-custom-groups (cons group
                                             package-get-custom-groups))
       (eval `(defgroup ,group nil
                ,(concat category " package group")
--- a/lisp/x-faces.el	Mon Aug 13 10:50:41 2007 +0200
+++ b/lisp/x-faces.el	Mon Aug 13 10:51:02 2007 +0200
@@ -602,12 +602,12 @@
 (defun x-init-global-faces ()
   (or (face-font 'default 'global)
       (set-face-font 'default
-		     "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*")
-      'global)
+		     "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
+		     'global '(x default)))
   (or (face-foreground 'default 'global)
-      (set-face-foreground 'default "black" 'global 'x))
+      (set-face-foreground 'default "black" 'global '(x default)))
   (or (face-background 'default 'global)
-      (set-face-background 'default "gray80" 'global 'x)))
+      (set-face-background 'default "gray80" 'global '(x default))))
 
 ;;; x-init-device-faces is responsible for initializing default
 ;;; values for faces on a newly created device.
--- a/lwlib/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/lwlib/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/man/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/man/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/nt/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/nt/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,7 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
--- a/src/ChangeLog	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 10:51:02 2007 +0200
@@ -1,3 +1,77 @@
+1999-03-12  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.0.66 is released
+
+1999-03-08  Andy Piper  <andy@xemacs.org>
+
+	* menubar-msw.c (displayable_menu_item): correct off-by-one &
+ 	handling.
+
+1999-03-08  Martin Buchholz  <martin@xemacs.org>
+
+	* mule-charset.c:
+	(non_ascii_valid_char_p):
+	(lookup_composite_char):
+	(composite_char_string):
+	(make-composite-char):
+	(composite-char-string):
+	(syms_of_mule_charset): 
+	(complex_vars_of_mule_charset): 
+	* mule-charset.h (LEADING_BYTE_COMPOSITE):
+	(CHAR_LEADING_BYTE):
+	(MAKE_CHAR):
+	* file-coding.h (CODING_STATE_COMPOSITE):
+	(CODING_STATE_ISO2022_LOCK):
+	(iso_esc_flag):
+	(LEADING_BYTE_COMPOSITE):
+	* file-coding.c (struct iso2022_decoder):
+	(decoding_closer):
+	(reset_iso2022):
+	(parse_iso2022_esc):
+	(encode_coding_iso2022):
+	#ifdef out all composite character support using 
+	#ifdef ENABLE_COMPOSITE_CHARS 
+
+	* alloc.c: Define lrecord_coding_system only if ! FILE_CODING
+
+1999-03-07  Martin Buchholz  <martin@xemacs.org>
+
+	* systime.h: Unix98 says sys/time.h should define select(), but
+	some systems define that in unistd.h.  So include that file always.
+
+	* free-hook.c (blocktype): Add gcpro5_type to blocktype.
+	(log_gcpro): Remove unused variable FRAME.
+	(show_gcprohist): Ansify.
+	Comment the #endif's
+
+1999-02-18  Martin Buchholz  <martin@xemacs.org>
+
+	* opaque.c (print_opaque):
+	(sizeof_opaque):
+	(equal_opaque):
+	(hash_opaque):
+	Egcs 1.1.1 seems to have a bug where
+	INTP (p->size_or_chain)
+	will crash XEmacs.  Fix by introducing intermediate variable.
+
+1999-03-05  Martin Buchholz  <martin@xemacs.org>
+
+	* alloc.c: (disksave_object_finalization):
+	Set all the *-load-path variables to
+	nil, not just load-path itself.  This gets the locate-file hash
+	tables garbage collected BEFORE dump, and has the side effect of
+	preventing crashes on OSF4.0+egcs.
+
+	* alloc.c:
+	* gdbinit:
+	* dbxrc:
+	- Clean up gdb/dbx debugging support.
+	- Storing an EMACS_INT in an enum is not 64-bit clean!
+	- So change the enum to a set of separate variables.
+	- Add test cases to help debug the debugging support!
+	- Add `lisp-shadows' and `run-temacs' targets for dbx.
+	- Both dbx and gdb have been tested now.
+
 1999-03-05  XEmacs Build Bot <builds@cvs.xemacs.org>
 
 	* XEmacs 21.0.65 is released
@@ -29,9 +103,15 @@
 
 	* glyphs-x.c (convert_EImage_to_XImage): Remove unused variable.
 
+1999-02-18  Martin Buchholz  <martin@xemacs.org>
+
+	* file-coding.c (convert_to_external_format):
+	(convert_from_external_format):
+	Rewrite code to work around a DEC cc compiler bug.
+
 1999-02-17  Kazuo Oishi <oishi@ae.agr.yamaguchi-u.ac.jp>
 
-	* glyphs-x.c (cononvert_EImage_to_XImage): correct 
+	* glyphs-x.c (cononvert_EImage_to_XImage): correct
 	bytes per pixel counting.
 
 1999-02-15  Andy Piper  <andy@xemacs.org>
@@ -46,7 +126,7 @@
 
 1999-02-02  Gleb Arshinov  <gleb@cs.stanford.edu>
 
-	* process-nt.c (nt_send_process): 
+	* process-nt.c (nt_send_process):
  	Fix for process-send-region/process-send-string breaking when size
 	of the input > 128 chars: change maximum chunk size for process
 	stream from 512 to 128, thus guaranteeing that ntpipe_shove_writer
@@ -76,7 +156,7 @@
 
 1998-12-28  Martin Buchholz  <martin@xemacs.org>
 
-	* buffer.c (init_initial_directory): 
+	* buffer.c (init_initial_directory):
 	- use correct conversions between internal and external format.
 	(directory_is_current_directory): new function
 	(init_buffer): convert initial_directory to internal format.
@@ -182,7 +262,7 @@
 
 	* process-unix.c (unix_create_process): handle properly
 	Vfile_name_coding_system for converting the program and directory
-	names. 
+	names.
 
 1998-11-27  SL Baur  <steve@altair.xemacs.org>
 
@@ -278,7 +358,7 @@
 
 1998-10-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
-	* scrollbar-msw.c: Use the same vertical scrollbar drag hack as 
+	* scrollbar-msw.c: Use the same vertical scrollbar drag hack as
 	  is used for Motif or Lucid scrollbars under X.
 
 1998-10-08  Pierre Wendling  <pw@ebc.vbe.dec.com>
@@ -321,9 +401,9 @@
 	  mswindows_enumerate_fonts() function in objects-msw.c instead
 	  of font_enum_callback_1() to enumerate fonts.
 
-	  font_enum_callback_1() and _2() moved to objects-msw.c. 
-
-	* faces.c (complex_vars_of_faces): Make the mswindows default 
+	  font_enum_callback_1() and _2() moved to objects-msw.c.
+
+	* faces.c (complex_vars_of_faces): Make the mswindows default
 	  face font fully specified and provide some fallbacks.
 
 	* objects-msw.c: font_enum_callback_1() and _2() moved here
@@ -351,7 +431,7 @@
 	  sig_enable_code_end() since they are now redundant.
 
 	  send_signal() and enable_child_signals(): Don't try to work
-	  out the end of the code fragments passed to 
+	  out the end of the code fragments passed to
 	  run_in_other_process()
 
 1998-09-10  Kazuyuki IENAGA  <ienaga@jsys.co.jp>
@@ -374,7 +454,7 @@
 
 	* process-unix.c (unix_create_process): Reset SIGHUP handler to
 	SIG_DFL. We now try to conserve any inherted SIG_IGN settings
-	in init_signals_very_early. However these should not be passed 
+	in init_signals_very_early. However these should not be passed
 	on to children attached to the new pty.
 
 1998-08-28  Andy Piper  <andyp@parallax.co.uk>
@@ -384,7 +464,7 @@
 1998-09-07  Jonathan Harris  <jhar@tardis.ed.ac.uk>
 
 	* fileio.c (file-name-directory, file_name_as_directory):
-	  Don't call CORRECT_DIR_SEPS, even when #defined WINDOWSNT. 
+	  Don't call CORRECT_DIR_SEPS, even when #defined WINDOWSNT.
 
 1998-09-05  SL Baur  <steve@altair.xemacs.org>
 
@@ -405,7 +485,7 @@
 
 	* frame-x.c (x_delete_frame): Flush the X output buffer after
 	calling XtDestroyWidget to ensure that the windows are really
-	killed right now. 
+	killed right now.
 
 1998-08-26  Hrvoje Niksic  <hniksic@srce.hr>
 
@@ -459,9 +539,9 @@
 1998-08-07 Matt Stupple <matts@tibco.com>
 
 	* ntproc.c: don't wait on char_consumed at thread entry.
-	Additionally, to get the 'process' marked as finished, ensure 
-	that the CHILD_ACTIVE macro returns false, so before exiting 
-	close char_avail and set it to NULL, and close other handles 
+	Additionally, to get the 'process' marked as finished, ensure
+	that the CHILD_ACTIVE macro returns false, so before exiting
+	close char_avail and set it to NULL, and close other handles
 	to reduce handle leak problems.
 
 1998-08-09  Jonathan Harris  <jhar@tardis.ed.ac.uk>
@@ -510,7 +590,7 @@
 1998-07-16  Jan Vroonhof  <vroonhof@math.ethz.ch>
 
 	* event-Xt.c (x_to_emacs_keysym): Return nil for modifier keysyms.
-	(x_event_to_emacs_event): Let x_to_emacs_keysym check for modifier 
+	(x_event_to_emacs_event): Let x_to_emacs_keysym check for modifier
 	keys thus no longer considering all keysyms on a key.
 
 1998-07-27  SL Baur  <steve@altair.xemacs.org>
@@ -609,7 +689,7 @@
 	* glyphs-msw.c (mswindows_resource_normalize): Qresource ->
 	Qmswindows_resource.
 	From Jonathan Harris <jhar@tardis.ed.ac.uk>
-	
+
 1998-07-12  SL Baur  <steve@altair.xemacs.org>
 
 	* general.c (syms_of_general): Add defsymbol for Qresource.
@@ -710,7 +790,7 @@
 
 	* eval.c (run_hook_with_args_in_buffer): Check
 	  default (non-buffer-local) value of hook for
-	  nil before treating it as a function.  Don't initialize 
+	  nil before treating it as a function.  Don't initialize
 	  the `globals' variable twice.
 
 1998-06-24  Jonathan Harris  <jhar@tardis.ed.ac.uk>
@@ -741,7 +821,7 @@
 
 	* eval.c (run_hook_with_args_in_buffer): Don't treat
 	  the default value of a buffer local hook as a list of
-	  hooks unless it is both a cons and the car of that cons 
+	  hooks unless it is both a cons and the car of that cons
 	  is not Qlambda.
 
 1998-06-29  SL Baur  <steve@altair.xemacs.org>
@@ -771,7 +851,7 @@
 	* winslots.h: Rename.
 
 	* window.c (specifier_vars_of_window): Renamed
-	vertical-divider-draggable-p to vertical-divider-always-visible-p, 
+	vertical-divider-draggable-p to vertical-divider-always-visible-p,
 	as suggested by Ben Wing.
 	(specifier_vars_of_window): Fix docstrings.
 
@@ -807,7 +887,7 @@
 	Set last_known_column_point to the buffer position for
 	which the column was requested, not buffer's point.
 
-	* redisplay.c (decode_mode_spec): for current-column, show 
+	* redisplay.c (decode_mode_spec): for current-column, show
 	window's point's column, not buffer's point's column.
 
 1998-06-23  Andy Piper  <andyp@parallax.co.uk>
@@ -906,7 +986,7 @@
 	mswindows_size_frame_internal function and size frame if frame
 	parameters not just if init is finished - WM_SIZE happens too
 	early for some specs. (mswindows_size_frame_internal): new
-	function abstracted from mswindows_set_frame_properties. 
+	function abstracted from mswindows_set_frame_properties.
 	(Vmswindows_use_system_frame_size_defaults):
 	new variable controls whether to allow the system to pick frame
 	size defaults, defaults to nil.
@@ -930,7 +1010,7 @@
 
 1998-06-05  Hrvoje Niksic  <hniksic@srce.hr>
 
-	* eldap.c (Fldap_search_internal): Use build_ext_string instead of 
+	* eldap.c (Fldap_search_internal): Use build_ext_string instead of
 	build_string to avoid crashes under Mule.
 
 1998-06-13  Andy Piper  <andyp@parallax.co.uk>
@@ -1123,7 +1203,7 @@
 
 	* glyphs-msw.c (read_bitmap_data) (NextInt)
 	(read_bitmap_data_from_file): new functions copied from Xmu
-	sources. 
+	sources.
 	(xbm_create_bitmap_from_data) from Ben <ben@666.com> convert
 	inline data to an mswindows bitmap.
 	(init_image_instance_from_xbm_inline) (xbm_instantiate_1)
@@ -1169,7 +1249,7 @@
 	Added prototype for mswindows_enqueue_misc_user_event().
 
 	* menubar-msw.c (mswindows_handle_wm_command): Use
-	mswindows_enqueue_misc_user_event(). 
+	mswindows_enqueue_misc_user_event().
 
 	* toolbar-msw.c (mswindows_handle_toolbar_wm_command): Ditto.
 
@@ -1182,11 +1262,11 @@
 1998-05-29  Greg Klanderman  <greg@alphatech.com>
 
 	* window.c (Fwindow_displayed_text_pixel_height): was relying on
-	incorrect semantics of vmotion_pixels which has been fixed.  don't 
+	incorrect semantics of vmotion_pixels which has been fixed.  don't
 	use it anymore as it can't easily be used.
 
 	* indent.c (vmotion_pixels): fix off by one bug moving up.  also
-	the motion was reported incorrectly if you tried to go past end of 
+	the motion was reported incorrectly if you tried to go past end of
 	buffer.
 
 1998-05-30  Kirill M. Katsnelson  <kkm@kis.ru>
@@ -1212,11 +1292,11 @@
 
 1998-05-28  Martin Buchholz  <martin@xemacs.org>
 
-	* alloc.c (dbg_constants): 
+	* alloc.c (dbg_constants):
 	* dbxrc:
 	* gdbinit:
 	Remove toolbar_data debugging code, since that lrecord has
-	also been removed. 
+	also been removed.
 
 Wed May 27, 1998  Darryl Okahata  <darrylo@sr.hp.com>
 
@@ -1247,7 +1327,7 @@
 	* fileio.c: replaced egetenv("HOME") with calls to the new
 	  get_home_directory().
 
-	* lisp.h: Added function prototypes for uncache_home_directory() 
+	* lisp.h: Added function prototypes for uncache_home_directory()
 	  and get_home_directory(), along with lisp prototypes for
 	  Fuser_home_directory() and friends.
 
@@ -1264,7 +1344,7 @@
 
 	* event-msw.c (mswindows_wnd_proc, WM_KEYDOWN): Unconditionally
 	remove MOD_SHIFT from ASCII characters.
-	(mswindows_wnd_proc, WM_KEYDOWN): Do not activate the menubar when 
+	(mswindows_wnd_proc, WM_KEYDOWN): Do not activate the menubar when
 	F10 is pressed.
 
 1998-05-24  Oliver Graf <ograf@fga.de>
@@ -1301,10 +1381,10 @@
 	(syms_of_indent): DEFSUBR.
 	* lisp.h: declaration for vmotion_pixels().
 
-	* indent.c (Fvertical_motion): Add optional third argument PIXELS, 
+	* indent.c (Fvertical_motion): Add optional third argument PIXELS,
 	to request returning motion in pixels.
 	(Fvertical_motion_pixels): Remove, functionality merged into
-	Fvertical_motion. 
+	Fvertical_motion.
  	* window.c (window_scroll): call Fvertical_motion with 3 arguments.
 	(Fmove_to_window_line): ditto.
 	* lisp.h: Change declaration for Fvertical_motion.
@@ -1318,7 +1398,7 @@
 	Tooltalk_Message_plist_str and Tooltalk_Pattern_plist_str
 
 1998-05-27  Andy Piper  <andyp@parallax.co.uk>
-		
+
 	* faces.c: create a new 3d_object_face, make modeline and
 	vertical_divider faces fallback to this rather than the default.
 
@@ -1366,9 +1446,9 @@
 	* This patch is to fix compilation warnings under Windows.
 
 	* s/windowsnt.h: Encapsulate getpid with sys_getpid.
-	Added prototypes for FSF inherited functions, with which XEmacs is 
+	Added prototypes for FSF inherited functions, with which XEmacs is
 	sprinkled thoroughly.
-	Removed some #if 0 code. Bracketed some more definitions, probably 
+	Removed some #if 0 code. Bracketed some more definitions, probably
 	related to Visual C versions prior to 4 (we do not support them).
 
 	* sysfloat.h (logb): Finally, get logb() prototyped.
@@ -1384,10 +1464,10 @@
 	vars_of_dired_mswindows and init_ntproc (Grrr).
 
 	* realpath.c: Added Windows specific include files.
-	(xrealpath): Conditionalized declaration of some auto variables on 
+	(xrealpath): Conditionalized declaration of some auto variables on
 	S_IFLNK, to avoid warnings.
 
-	* ntproc.c: Disabled some compiler warnings. This file is going to 
+	* ntproc.c: Disabled some compiler warnings. This file is going to
 	die, so I have not cleaned it up much.
 	(set_process_dir): Const parameter.
 	(Fwin32_short_file_name): Down CHECK_* macros to one argument.
@@ -1463,7 +1543,7 @@
 
 	* symsinit.h: Prototyped the above functions.
 
-	* dialog-x.c (x_popup_dialog_box): Moved dialog descriptor consistency 
+	* dialog-x.c (x_popup_dialog_box): Moved dialog descriptor consistency
 	checks to dialog.c...
 
 	* dialog.c (Fpopup_dialog_box): ...right here. Added more checks: a
@@ -1516,7 +1596,7 @@
 
 	* EmacsFrame.c (Xt_StringToScrollBarPlacement):  Added support for
 	{top,bottom}-{left,right} values in addition to
-	{top,bottom}_{left,right}. 
+	{top,bottom}_{left,right}.
 
 1998-05-18  Hrvoje Niksic  <hniksic@srce.hr>
 
@@ -1527,10 +1607,10 @@
 
 1998-05-19  Martin Buchholz  <martin@xemacs.org>
 
-	* unexhp9k800.c: 
-	* sound.c (vars_of_sound): 
-	* sysdep.c (reset_sigio_on_device): 
-	* window.c (window_bottom_gutter_height): 
+	* unexhp9k800.c:
+	* sound.c (vars_of_sound):
+	* sysdep.c (reset_sigio_on_device):
+	* window.c (window_bottom_gutter_height):
 	unexhp9k800.c:258: warning: implicit declaration of function
 	`calculate_checksum'
 	sound.c:604: warning: implicit declaration of function `vars_of_hpplay'
@@ -1560,7 +1640,7 @@
 	* frame-x.c (x_update_frame_external_traits): Start preprocessor
 	directives in column 1.
 
-	* search.c (skip_chars): Avoid using xzero with arrays, since some 
+	* search.c (skip_chars): Avoid using xzero with arrays, since some
 	compilers get confused by the construct &array.
 
 1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
@@ -1584,7 +1664,7 @@
 1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
 
 	* objects-msw.c (mswindows_initialize_font_instance): Use ANSI
-	charset when creating font. 
+	charset when creating font.
 	(mswindows_initialize_color_instance): Do not create brush along
 	with a color.
 	(mswindows_finalize_color_instance): Do not delete it then.
@@ -1608,7 +1688,7 @@
 	(compute_frame_toolbars_data): Removed unused second parameter;
 	Adjusted callers of this static function throughout the file.
 	(init_frame_toolbars): Initialize current_toolbar_size.
-	(update_frame_toolbars): Use DEVICE_SUPPORTS_TOOLBARS_P instead of 
+	(update_frame_toolbars): Use DEVICE_SUPPORTS_TOOLBARS_P instead of
 	what is its current expansion, for clarity.
 	(init_frame_toolbars): Ditto.
 	(init_device_toolbars): Ditto.
@@ -1653,7 +1733,7 @@
 
 	* emacs.c (main_1): Call syms_of_process_nt()
 
-	* process-nt.c: Quote process arguments by a call to Lisp function 
+	* process-nt.c: Quote process arguments by a call to Lisp function
 	`nt-quote-process-args'.
 	(syms_of_process_nt): New function.
 	(nt_send_process): Flush data stream after each write, to avoid
@@ -1678,7 +1758,7 @@
 
 1998-05-17  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
-	* s/aix4-2.h (ALIGN_DATA_RELOC): Undefined to support new unexaix.c. 
+	* s/aix4-2.h (ALIGN_DATA_RELOC): Undefined to support new unexaix.c.
 
 	* s/aix3-1.h (ALIGN_DATA_RELOC): Defined to support new unexaix.c.
 
@@ -1750,7 +1830,7 @@
 
 	* bufslots.h: Removed buffer_file_type slot.
 
-	* buffer.c (complex_vars_of_buffer): Removed buffer_file_type from 
+	* buffer.c (complex_vars_of_buffer): Removed buffer_file_type from
 	buffer local flags.
 	(complex_vars_of_buffer): Removed buffer-file-type variable and
 	its default reference.
@@ -1779,9 +1859,9 @@
 	(x_divider_width): ditto.
 
 	* window.c (specifier_vars_of_window): new specifiers:
-	vertical-divier -line-width and -spacing. 
+	vertical-divier -line-width and -spacing.
 	(vertical_divider_global_width_changed): formerly known as
-	vertical_divider_shadow_thickness_changed. 
+	vertical_divider_shadow_thickness_changed.
 
 	* winslots.h: new slots: vertical_specifier _line_width and
 	_spacing. Plus corrected a comment typo.
@@ -1794,7 +1874,7 @@
 	(console_type_create_stream): And declaration for it.
 
 	* redisplay.c (pixel_to_glyph_translation): Use
-	window_divider_width() instead of divider_width redisplay method. 
+	window_divider_width() instead of divider_width redisplay method.
 	(pixel_to_glyph_translation): Fix top divider edge calculation
 	when scrollbar is on top.
 
@@ -1804,7 +1884,7 @@
 	(specifier_vars_of_window): For	vertical-divider-{spacing,line-width}
 	specifiers, set fallback values differently on TTYs, and document
 	the behavior of these on TTYs in the docstrings.
-	
+
 	* scrollbar.c (update_scrollbar_instance): Use
 	window_divider_width() instead of divider_width redisplay method.
 
@@ -1859,7 +1939,7 @@
 
 	* emacs.c (main_1): Call console_type_create_dialog_x().
 
-	* dialog-x.c (x_popup_dialog_box): Old Fpopup_dialog_box converted 
+	* dialog-x.c (x_popup_dialog_box): Old Fpopup_dialog_box converted
 	into this device method.
 	(console_type_create_dialog_x): New function.
 
@@ -1867,7 +1947,7 @@
 	(syms_of_dialog): Defsubr it.
 
 	* console.h (struct console_methods): Declared
-	popup_dialog_box_method(). 
+	popup_dialog_box_method().
 
 	* symsinit.h: Defined console_type_create_dialog_{x,mswindows}
 
@@ -1905,10 +1985,10 @@
 	** Renamed window-divider-map => vertical-divider-map
 	and event-over-divider-p => event-over-vertical-divider-p,
 	in the following files/functions:
-	* events.h: 
-	* events.c (Fevent_over_divider_p): 
-	* keymap.c (get_relevant_keymaps): 
-	(vars_of_keymap): 
+	* events.h:
+	* events.c (Fevent_over_divider_p):
+	* keymap.c (get_relevant_keymaps):
+	(vars_of_keymap):
 
 	* redisplay.h (OVER_V_DIVIDER): Renamed so from OVER_DIVIDER.
 
@@ -1931,7 +2011,7 @@
 
 	* window.h: Prototype invalidate_vertical_divider_cache_in_window.
 	(struct window): Added need_vertical_divider_p and
-	need_vertical_divider_valid_p. 
+	need_vertical_divider_valid_p.
 
 	* winslots.h: Added vertical_divider_draggable_p slot.
 
@@ -1987,7 +2067,7 @@
 	thickness is negative.
 
 	* console-stream.c (stream_divider_width): pass a struct window *
-	argument. 
+	argument.
 
 	* redisplay-tty.c (tty_divider_width): ditto.
 
@@ -1996,12 +2076,12 @@
 	* redisplay.c (generate_modeline): ittod.
 
 	* scrollbar.c (update_scrollbar_instance): ttido.
-	
-	* redisplay-msw.c (mswindows_divider_width): ottid. 
+
+	* redisplay-msw.c (mswindows_divider_width): ottid.
 	WARNING: this enables to compile, but the feature is not functional.
 
 	* window.h (struct window): new field
-	vertical_divider_shadow_thickness. 
+	vertical_divider_shadow_thickness.
 
 	* window.c (specifier_vars_of_window): new specifier
 	vertical-divider-shadow-thickness.
@@ -2052,7 +2132,7 @@
 1998-05-10  Andy Piper  <andyp@parallax.co.uk>
 
 	* redisplay-msw.c (mswindows_output_dibitmap_region): make sure
-	multiple bitmaps are output vertically as well as horizontally.  
+	multiple bitmaps are output vertically as well as horizontally.
 	* (mswindows_output_dibitmap): don't cope with bitmap boundaries
 	crossing lines this is handled by
 	mswindows_output_dibitmap_region.
@@ -2061,7 +2141,7 @@
 
 	* inline.c: Include eldap.h
 
-	* menubar-x.c (x_update_frame_menubar_internal): 
+	* menubar-x.c (x_update_frame_menubar_internal):
 	Remove: unused variable `container'
 
 1998-05-11  Martin Buchholz  <martin@xemacs.org>
@@ -2069,8 +2149,8 @@
 	* s/aix4.h: Allow AIX 4.3 XEmacs to compile cleanly.
 	Unfortunately, the resulting temacs still cannot dump.
 
-	* symbols.c (symbol_is_constant): 
-	(verify_ok_for_buffer_local): 
+	* symbols.c (symbol_is_constant):
+	(verify_ok_for_buffer_local):
 	-Wswitch Warning suppression - add default case to switches.
 
 	* redisplay.c (decode_mode_spec): Remove unused variables,
@@ -2117,7 +2197,7 @@
 1998-05-12  Didier Verna  <verna@inf.enst.fr>
 
 	* redisplay.c: removed the scrolling modeline code that didn't
-	make it for 21.0. To be continued ... 
+	make it for 21.0. To be continued ...
 
 1998-05-13  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
@@ -2174,7 +2254,7 @@
 	(mswindows_output_vertical_divider): Always output the divider on
 	the right side of a window, down to bottom.
 
-	* keymap.c (get_relevant_keymaps): Route mouse button events which 
+	* keymap.c (get_relevant_keymaps): Route mouse button events which
 	happened over a window divider through window-divider-map.
 	(Fkey_binding): Documented that in the docstring.
 	Defined the variable Vwindow_divider_map.
@@ -2223,7 +2303,7 @@
 	(metrics); Changed parameters order and added DEFAULT parameter;
 	Unabbreviated some metric constants; Fixed and untabified doc string.
 	(Fdevice_system_metrics): Added. Returns a plist of all provided
-	metrics. 
+	metrics.
 
 	* device-msw.c (mswindows_device_system_metrics): Renamed
 	device_metrics enum constants.
--- a/src/alloc.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/alloc.c	Mon Aug 13 10:51:02 2007 +0200
@@ -636,78 +636,93 @@
 }
 
 
-/**********************************************************************/
-/*			  Debugger support			      */
-/**********************************************************************/
-/* Give gdb/dbx enough information to decode Lisp Objects.
-   We make sure certain symbols are defined, so gdb doesn't complain
-   about expressions in src/gdbinit.  Values are randomly chosen.
-   See src/gdbinit or src/dbxrc to see how this is used.  */
-
-enum dbg_constants
-{
+/************************************************************************/
+/*			  Debugger support				*/
+/************************************************************************/
+/* Give gdb/dbx enough information to decode Lisp Objects.  We make
+   sure certain symbols are always defined, so gdb doesn't complain
+   about expressions in src/gdbinit.  See src/gdbinit or src/dbxrc to
+   see how this is used.  */
+
 #ifdef USE_MINIMAL_TAGBITS
-  dbg_valmask = (EMACS_INT) (((1UL << VALBITS) - 1) << GCBITS),
-  dbg_typemask = (EMACS_INT) ((1UL << GCTYPEBITS) - 1),
-  dbg_USE_MINIMAL_TAGBITS = 1,
-  dbg_Lisp_Type_Int = 100,
-#else /* ! USE_MIMIMAL_TAGBITS */
-  dbg_valmask = (EMACS_INT) ((1UL << VALBITS) - 1),
-  dbg_typemask = (EMACS_INT) (((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS)),
-  dbg_USE_MINIMAL_TAGBITS = 0,
-  dbg_Lisp_Type_Int = Lisp_Type_Int,
-#endif /* ! USE_MIMIMAL_TAGBITS */
+EMACS_UINT dbg_valmask = ((1UL << VALBITS) - 1) << GCBITS;
+EMACS_UINT dbg_typemask = (1UL << GCTYPEBITS) - 1;
+unsigned char dbg_USE_MINIMAL_TAGBITS = 1;
+unsigned char Lisp_Type_Int = 100;
+#else
+EMACS_UINT dbg_valmask = (1UL << VALBITS) - 1;
+EMACS_UINT dbg_typemask = ((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS);
+unsigned char dbg_USE_MINIMAL_TAGBITS = 0;
+#endif
+
+#ifdef USE_UNION_TYPE
+unsigned char dbg_USE_UNION_TYPE = 1;
+#else
+unsigned char dbg_USE_UNION_TYPE = 0;
+#endif
+
 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
-  dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1,
+unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1;
 #else
-  dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0,
+unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0;
 #endif
-  dbg_Lisp_Type_Char = Lisp_Type_Char,
-  dbg_Lisp_Type_Record = Lisp_Type_Record,
+
 #ifdef LRECORD_CONS
-  dbg_Lisp_Type_Cons = 101,
+unsigned char Lisp_Type_Cons = 101;
 #else
-  dbg_Lisp_Type_Cons = Lisp_Type_Cons,
-  lrecord_cons = 201,
+unsigned char lrecord_cons;
 #endif
+
 #ifdef LRECORD_STRING
-  dbg_Lisp_Type_String = 102,
+unsigned char Lisp_Type_String = 102;
 #else
-  dbg_Lisp_Type_String = Lisp_Type_String,
-  lrecord_string = 202,
+unsigned char lrecord_string;
 #endif
+
 #ifdef LRECORD_VECTOR
-  dbg_Lisp_Type_Vector = 103,
+unsigned char Lisp_Type_Vector = 103;
 #else
-  dbg_Lisp_Type_Vector = Lisp_Type_Vector,
-  lrecord_vector = 203,
+unsigned char lrecord_vector;
 #endif
+
 #ifdef LRECORD_SYMBOL
-  dbg_Lisp_Type_Symbol = 104,
+unsigned char Lisp_Type_Symbol = 104;
 #else
-  dbg_Lisp_Type_Symbol = Lisp_Type_Symbol,
-  lrecord_symbol = 204,
+unsigned char lrecord_symbol;
 #endif
+
 #ifndef MULE
-  lrecord_char_table_entry = 205,
-  lrecord_charset          = 206,
-  lrecord_coding_system    = 207,
+unsigned char lrecord_char_table_entry;
+unsigned char lrecord_charset;
+#ifndef FILE_CODING
+unsigned char lrecord_coding_system;
+#endif
 #endif
+
 #ifndef HAVE_TOOLBARS
-  lrecord_toolbar_button   = 208,
+unsigned char lrecord_toolbar_button;
+#endif
+
+#ifndef TOOLTALK
+unsigned char lrecord_tooltalk_message;
+unsigned char lrecord_tooltalk_pattern;
 #endif
-#ifndef HAVE_TOOLTALK
-  lrecord_tooltalk_message = 210,
-  lrecord_tooltalk_pattern = 211,
-#endif
+
 #ifndef HAVE_DATABASE
-  lrecord_database = 212,
+unsigned char lrecord_database;
 #endif
-  dbg_valbits = VALBITS,
-  dbg_gctypebits = GCTYPEBITS
-  /* If we don't have an actual object of this enum, pgcc (and perhaps
-     other compilers) might optimize away the entire type declaration :-( */
-} dbg_dummy;
+
+unsigned char dbg_valbits = VALBITS;
+unsigned char dbg_gctypebits = GCTYPEBITS;
+
+/* Macros turned into functions for ease of debugging.
+   Debuggers don't know about macros! */
+int dbg_eq (Lisp_Object obj1, Lisp_Object obj2);
+int
+dbg_eq (Lisp_Object obj1, Lisp_Object obj2)
+{
+  return EQ (obj1, obj2);
+}
 
 
 /**********************************************************************/
@@ -4314,6 +4329,10 @@
   Vexec_path = Qnil;
   Vload_path = Qnil;
   /* Vdump_load_path = Qnil; */
+  /* Release hash tables for locate_file */
+  Fset (intern ("early-package-load-path"), Qnil);
+  Fset (intern ("late-package-load-path"),  Qnil);
+  Fset (intern ("last-package-load-path"),  Qnil);
   uncache_home_directory();
 
 #if defined(LOADHIST) && !(defined(LOADHIST_DUMPED) || \
--- a/src/dbxrc	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/dbxrc	Mon Aug 13 10:51:02 2007 +0200
@@ -23,7 +23,7 @@
 # You can use this file to debug XEmacs using Sun WorkShop's dbx.
 # Add the contents of this file to $HOME/.dbxrc or
 # Source the contents of this file with something like:
-# test -r ./dbxrc && . ./dbxrc
+# if test -r ./dbxrc; then . ./dbxrc; fi
 
 # Some functions defined here require a running process, but most
 # don't.  Considerable effort has been expended to this end.
@@ -58,10 +58,23 @@
 
 # A bug in dbx prevents string variables from having values beginning with `-'!!
 function XEmacsInit {
-  eval $(echo $(whatis -t `alloc.c`dbg_constants) | \
-    perl -e 'print "@{[map {s/=(-\d+)/sprintf(q[=0x%x],$1)/oge; /\w+=[0-9a-fx]+/og} <>]}\n"')
+  function ToInt { eval "$1=\$[(int) $1]"; }
+  ToInt dbg_USE_MINIMAL_TAGBITS
+  ToInt dbg_USE_UNION_TYPE
+  ToInt dbg_USE_INDEXED_LRECORD_IMPLEMENTATION
+  ToInt Lisp_Type_Int
+  ToInt Lisp_Type_Char
+  ToInt Lisp_Type_Cons
+  ToInt Lisp_Type_String
+  ToInt Lisp_Type_Vector
+  ToInt Lisp_Type_Symbol
+  ToInt Lisp_Type_Record
+  ToInt dbg_valbits
+  ToInt dbg_gctypebits
+  function ToLong { eval "$1=\$[(unsigned long) $1]"; }
+  ToLong dbg_valmask
+  ToLong dbg_typemask
   xemacs_initted=yes
-  #printvar dbg_valbits dbg_valmask
 }
 
 function printvar {
@@ -76,31 +89,48 @@
 
 # Various dbx bugs cause ugliness in following code
 function decode_object {
-  test -z "$xemacs_initted" && XEmacsInit
-  obj=$[*(void**)(&$1)]
-  test "$obj" = "(nil)" && obj="0x0"
+  if test -z "$xemacs_initted"; then XEmacsInit; fi;
+  if test $dbg_USE_UNION_TYPE = 1; then
+    # Repeat after me... dbx sux, dbx sux, dbx sux...
+    # Allow both `pobj Qnil' and `pobj 0x82746834' to work
+    case $(whatis $1) in
+      *Lisp_Object*) obj="$[(unsigned long)(($1).i)]";;
+      *) obj="$[(unsigned long)($1)]";;
+    esac
+  else
+    obj="$[(unsigned long)($1)]";
+  fi
   if test $dbg_USE_MINIMAL_TAGBITS = 1; then
     if test $[(int)($obj & 1)] = 1; then
       # It's an int
       val=$[(long)(((unsigned long long)$obj) >> 1)]
-      type=$dbg_Lisp_Type_Int
+      type=$Lisp_Type_Int
     else
       type=$[(int)(((void*)$obj) & $dbg_typemask)]
-      if test $type = $dbg_Lisp_Type_Char; then
+      if test $type = $Lisp_Type_Char; then
         val=$[(void*)(long)(((unsigned long long)($obj & $dbg_valmask)) >> $dbg_gctypebits)]
       else
         # It's a record pointer
         val=$[(void*)$obj]
+        if test "$val" = "(nil)"; then type=null_pointer; fi
       fi
     fi
   else
     # not dbg_USE_MINIMAL_TAGBITS
-    val=$[(void*)($obj & $dbg_valmask)]
-    test "$val" = "(nil)" && val="0x0"
     type=$[(int)(((unsigned long long)($obj & $dbg_typemask)) >> ($dbg_valbits + 1))]
+    if test "$type" = $Lisp_Type_Int; then
+      val=$[(int)($obj & $dbg_valmask)]
+    elif test "$type" = $Lisp_Type_Char; then
+      val=$[(int)($obj & $dbg_valmask)]
+    else
+      val=$[(void*)($obj & $dbg_valmask)]
+      if test "$val" = "(nil)"; then type=null_pointer; fi
+    fi
+    #val=$[(void*)($obj & $dbg_valmask)]
+    #printvar val type obj
   fi
 
-  if test $type = $dbg_Lisp_Type_Record; then
+  if test $type = $Lisp_Type_Record; then
     typeset lheader="((struct lrecord_header *) $val)"
     if test $dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1; then
       imp=$[(void*)(lrecord_implementations_table[$lheader->type])]
@@ -110,7 +140,7 @@
   else
     imp="0xdeadbeef"
   fi
-  #printvar obj val type imp
+  # printvar obj val type imp
 }
 
 function xint {
@@ -120,17 +150,28 @@
 
 function xtype {
   decode_object "$*"
-  if   test $type = $dbg_Lisp_Type_Int;    then echo "int"
-  elif test $type = $dbg_Lisp_Type_Char;   then echo "char"
-  elif test $type = $dbg_Lisp_Type_Symbol; then echo "symbol"
-  elif test $type = $dbg_Lisp_Type_String; then echo "string"
-  elif test $type = $dbg_Lisp_Type_Vector; then echo "vector"
-  elif test $type = $dbg_Lisp_Type_Cons;   then echo "cons"
+  if   test $type = $Lisp_Type_Int;    then echo "int"
+  elif test $type = $Lisp_Type_Char;   then echo "char"
+  elif test $type = $Lisp_Type_Symbol; then echo "symbol"
+  elif test $type = $Lisp_Type_String; then echo "string"
+  elif test $type = $Lisp_Type_Vector; then echo "vector"
+  elif test $type = $Lisp_Type_Cons;   then echo "cons"
+  elif test $type = null_pointer;      then echo "null_pointer"
   else
     echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
   fi
 }
 
+function lisp-shadows {
+  run -batch -vanilla -f list-load-path-shadows
+}
+
+function environment-to-run-temacs {
+  unset EMACSLOADPATH
+  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  export EMACSBOOTSTRAPMODULEPATH=../modules/:..
+}
+
 document run-temacs << 'end'
 Usage: run-temacs
 Run temacs interactively, like xemacs.
@@ -139,8 +180,7 @@
 end
 
 function run-temacs {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el run-temacs -q
 }
 
@@ -152,15 +192,13 @@
 end
 
 function update-elc {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/update-elc.el
 }
 
 
 function dump-temacs {
-  unset EMACSLOADPATH
-  export EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el dump
 }
 
@@ -188,22 +226,22 @@
 
 function pobj {
   decode_object $1
-  if test $type = $dbg_Lisp_Type_Int; then
+  if test $type = $Lisp_Type_Int; then
     print -f"Integer: %d" $val
-  elif test $type = $dbg_Lisp_Type_Char; then
-    if $val < 128; then
+  elif test $type = $Lisp_Type_Char; then
+    if test $[$val > 32 && $val < 128] = 1; then
       print -f"Char: %c" $val
     else
       print -f"Char: %d" $val
     fi
-  elif test $type = $dbg_Lisp_Type_String || lrecord_type_p string; then
+  elif test $type = $Lisp_Type_String || lrecord_type_p string; then
     pstruct Lisp_String
-  elif test $type = $dbg_Lisp_Type_Cons   || lrecord_type_p cons; then
+  elif test $type = $Lisp_Type_Cons   || lrecord_type_p cons; then
     pstruct Lisp_Cons
-  elif test $type = $dbg_Lisp_Type_Symbol || lrecord_type_p symbol; then
+  elif test $type = $Lisp_Type_Symbol || lrecord_type_p symbol; then
     pstruct Lisp_Symbol
     echo "Symbol name: $[(char *)($xstruct->name->_data)]"
-  elif test $type = $dbg_Lisp_Type_Vector || lrecord_type_p vector; then
+  elif test $type = $Lisp_Type_Vector || lrecord_type_p vector; then
     pstruct Lisp_Vector
     echo "Vector of length $[$xstruct->size]"
   elif lrecord_type_p bit_vector; then
@@ -227,7 +265,7 @@
   elif lrecord_type_p console; then
     pstruct console
   elif lrecord_type_p database; then
-    pstruct database
+    pstruct Lisp_Database
   elif lrecord_type_p device; then
     pstruct device
   elif lrecord_type_p event; then
@@ -249,11 +287,11 @@
   elif lrecord_type_p glyph; then
     pstruct Lisp_Glyph
   elif lrecord_type_p hashtable; then
-    pstruct hashtable
+    pstruct Lisp_Hash_Table
   elif lrecord_type_p image_instance; then
     pstruct Lisp_Image_Instance
   elif lrecord_type_p keymap; then
-    pstruct keymap
+    pstruct Lisp_Keymap
   elif lrecord_type_p lcrecord_list; then
     pstruct lcrecord_list
   elif lrecord_type_p lstream; then
@@ -294,6 +332,8 @@
     pstruct window
   elif lrecord_type_p window_configuration; then
     pstruct window_config
+  elif test "$type" = "null_pointer"; then
+    echo "Lisp Object is a null pointer!!"
   else
     echo "Unknown Lisp Object type"
     print $1
@@ -307,6 +347,7 @@
 }
 
 dbxenv suppress_startup_message 4.0
+dbxenv mt_watchpoints on
 
 function dp_core {
   print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
@@ -316,3 +357,27 @@
 function print_shell {
   print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget)
 }
+
+# -------------------------------------------------------------
+# functions to test the debugging support itself.
+# If you change this file, make sure the following still work...
+# -------------------------------------------------------------
+function test_xtype {
+  function doit { echo -n "$1: "; xtype "$1"; }
+  test_various_objects
+}
+
+function test_pobj {
+  function doit { echo '==============================='; echo -n "$1: "; pobj "$1"; }
+  test_various_objects
+}
+
+function test_various_objects {
+  doit Vemacs_major_version
+  doit Vhelp_char
+  doit Qnil
+  doit Qunbound
+  doit Vobarray
+  doit Vall_weak_lists
+  doit Vxemacs_codename
+}
--- a/src/file-coding.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/file-coding.c	Mon Aug 13 10:51:02 2007 +0200
@@ -103,8 +103,10 @@
   /* Index for next byte to store in ISO escape sequence. */
   int esc_bytes_index;
 
+#ifdef ENABLE_COMPOSITE_CHARS
   /* Stuff seen so far when composing a string. */
   unsigned_char_dynarr *composite_chars;
+#endif
 
   /* If we saw an invalid designation sequence for a particular
      register, we flag it here and switch to ASCII.  The next time we
@@ -1890,9 +1892,11 @@
     }
   Dynarr_free (str->runoff);
 #ifdef MULE
+#ifdef ENABLE_COMPOSITE_CHARS
   if (str->iso2022.composite_chars)
     Dynarr_free (str->iso2022.composite_chars);
 #endif
+#endif
   return Lstream_close (str->other_end);
 }
 
@@ -3195,8 +3199,10 @@
   iso->invalid_switch_dir = 0;
   iso->output_direction_sequence = 0;
   iso->output_literally = 0;
+#ifdef ENABLE_COMPOSITE_CHARS
   if (iso->composite_chars)
     Dynarr_reset (iso->composite_chars);
+#endif
 }
 
 static int
@@ -3326,6 +3332,7 @@
 
 	  /**** composite ****/
 
+#ifdef ENABLE_COMPOSITE_CHARS
 	case '0':
 	  iso->esc = ISO_ESC_START_COMPOSITE;
 	  *flags = (*flags & CODING_STATE_ISO2022_LOCK) |
@@ -3337,6 +3344,7 @@
 	  *flags = (*flags & CODING_STATE_ISO2022_LOCK) &
 	    ~CODING_STATE_COMPOSITE;
 	  return 1;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 	  /**** directionality ****/
 
@@ -3785,14 +3793,18 @@
   enum eol_type eol_type;
   struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
   Lisp_Object coding_system;
+#ifdef ENABLE_COMPOSITE_CHARS
   unsigned_char_dynarr *real_dst = dst;
+#endif
 
   CODING_STREAM_DECOMPOSE (str, flags, ch);
   eol_type = str->eol_type;
   XSETCODING_SYSTEM (coding_system, str->codesys);
 
+#ifdef ENABLE_COMPOSITE_CHARS
   if (flags & CODING_STATE_COMPOSITE)
     dst = str->iso2022.composite_chars;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   while (n--)
     {
@@ -3806,6 +3818,7 @@
 	    {
 	      switch (str->iso2022.esc)
 		{
+#ifdef ENABLE_COMPOSITE_CHARS
 		case ISO_ESC_START_COMPOSITE:
 		  if (str->iso2022.composite_chars)
 		    Dynarr_reset (str->iso2022.composite_chars);
@@ -3824,6 +3837,7 @@
 		    Dynarr_add_many (dst, comstr, len);
 		    break;
 		  }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 		case ISO_ESC_LITERAL:
 		  DECODE_ADD_BINARY_CHAR (c, dst);
@@ -4109,11 +4123,13 @@
   Lisp_Object charset;
   int half;
 
+#ifdef ENABLE_COMPOSITE_CHARS
   /* flags for handling composite chars.  We do a little switcharoo
      on the source while we're outputting the composite char. */
   unsigned int saved_n = 0;
   CONST unsigned char *saved_src = NULL;
   int in_composite = 0;
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   CODING_STREAM_DECOMPOSE (str, flags, ch);
   eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys);
@@ -4121,7 +4137,9 @@
   charset = str->iso2022.current_charset;
   half = str->iso2022.current_half;
 
+#ifdef ENABLE_COMPOSITE_CHARS
  back_to_square_n:
+#endif
   while (n--)
     {
       c = *src++;
@@ -4180,7 +4198,10 @@
 	  if (LEADING_BYTE_PREFIX_P(c))
 	    ch = c;
 	  else if (!EQ (charset, Vcharset_control_1)
-		   && !EQ (charset, Vcharset_composite))
+#ifdef ENABLE_COMPOSITE_CHARS
+		   && !EQ (charset, Vcharset_composite)
+#endif
+		   )
 	    {
 	      int reg;
 
@@ -4300,6 +4321,7 @@
 		    }
 		  else if (ch)
 		    {
+#ifdef ENABLE_COMPOSITE_CHARS
 		      if (EQ (charset, Vcharset_composite))
 			{
 			  if (in_composite)
@@ -4323,6 +4345,7 @@
 			    }
 			}
 		      else
+#endif /* ENABLE_COMPOSITE_CHARS */
 			{
 			  Dynarr_add (dst, ch & charmask);
 			  Dynarr_add (dst, c & charmask);
@@ -4355,6 +4378,7 @@
 	}
     }
 
+#ifdef ENABLE_COMPOSITE_CHARS
   if (in_composite)
     {
       n = saved_n;
@@ -4364,6 +4388,7 @@
       Dynarr_add (dst, '1'); /* end composing */
       goto back_to_square_n; /* Wheeeeeeeee ..... */
     }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
   if (char_boundary && flags & CODING_STATE_END)
     {
@@ -4489,27 +4514,25 @@
    (EQ ((Vfile_name_coding_system), Qbinary))) ?	\
   Qnil : Fget_coding_system (Vfile_name_coding_system))
 
-/* #### not correct for all values of `fmt'! */
-#ifdef MULE
-#define FMT_CODING_SYSTEM(fmt)					\
- (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM     :	\
-  ((fmt) == FORMAT_CTEXT   ) ? Fget_coding_system (Qctext) :	\
-  ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM     :	\
-  Qnil)
-#else
-#define FMT_CODING_SYSTEM(fmt)					\
- (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM     :	\
-  ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM     :	\
-  Qnil)
-#endif
-
 Extbyte *
 convert_to_external_format (CONST Bufbyte *ptr,
 			    Bytecount len,
 			    Extcount *len_out,
 			    enum external_data_format fmt)
 {
-  Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt);
+  Lisp_Object coding_system;
+
+  /* #### not correct for all values of `fmt'! */
+  if (fmt == FORMAT_FILENAME || fmt == FORMAT_TERMINAL)
+    coding_system = FILE_NAME_CODING_SYSTEM;
+#ifdef MULE
+  else if (fmt == FORMAT_CTEXT)
+    coding_system = Fget_coding_system (Qctext);
+#endif
+  else
+    coding_system = Qnil;
+
+  /* Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); */
 
   if (!conversion_out_dynarr)
     conversion_out_dynarr = Dynarr_new (Extbyte);
@@ -4577,7 +4600,19 @@
 			      Bytecount *len_out,
 			      enum external_data_format fmt)
 {
-  Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt);
+  Lisp_Object coding_system;
+
+  /* #### not correct for all values of `fmt'! */
+  if (fmt == FORMAT_FILENAME || fmt == FORMAT_TERMINAL)
+    coding_system = FILE_NAME_CODING_SYSTEM;
+#ifdef MULE
+  else if (fmt == FORMAT_CTEXT)
+    coding_system = Fget_coding_system (Qctext);
+#endif
+  else
+    coding_system = Qnil;
+
+  /* Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); */
 
   if (!conversion_in_dynarr)
     conversion_in_dynarr = Dynarr_new (Bufbyte);
--- a/src/file-coding.h	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/file-coding.h	Mon Aug 13 10:51:02 2007 +0200
@@ -305,20 +305,26 @@
 					     CODING_STATE_SS2 overrides; but
 					     this probably indicates an error
 					     in the text encoding. */
+#ifdef ENABLE_COMPOSITE_CHARS
 #define CODING_STATE_COMPOSITE  (1 << 8)  /* If set, we're currently processing
 					     a composite character (i.e. a
 					     character constructed by
 					     overstriking two or more
 					     characters). */
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 
 /* CODING_STATE_ISO2022_LOCK is the mask of flags that remain on until
    explicitly turned off when in the ISO2022 encoder/decoder.  Other flags are
    turned off at the end of processing each character or escape sequence. */
+#ifdef ENABLE_COMPOSITE_CHARS
 # define CODING_STATE_ISO2022_LOCK \
   (CODING_STATE_END | CODING_STATE_COMPOSITE | CODING_STATE_R2L)
-#define CODING_STATE_BIG5_LOCK \
-  CODING_STATE_END
+#else
+# define CODING_STATE_ISO2022_LOCK (CODING_STATE_END | CODING_STATE_R2L)
+#endif
+
+#define CODING_STATE_BIG5_LOCK CODING_STATE_END
 
 /* Flags indicating what we've seen so far when parsing an
    ISO2022 escape sequence. */
@@ -369,8 +375,10 @@
 			   character must be ]. */
 
   /* Full sequences. */
+#ifdef ENABLE_COMPOSITE_CHARS
   ISO_ESC_START_COMPOSITE, /* Private usage for START COMPOSING */
-  ISO_ESC_END_COMPOSITE, /* Private usage for END COMPOSING */
+  ISO_ESC_END_COMPOSITE,   /* Private usage for END COMPOSING */
+#endif /* ENABLE_COMPOSITE_CHARS */
   ISO_ESC_SINGLE_SHIFT, /* We've seen a complete single-shift sequence. */
   ISO_ESC_LOCKING_SHIFT,/* We've seen a complete locking-shift sequence. */
   ISO_ESC_DESIGNATE,	/* We've seen a complete designation sequence. */
@@ -505,7 +513,9 @@
 #ifndef MULE
 #define MIN_LEADING_BYTE		0x80
 /* These need special treatment in a string and/or character */
+#ifdef ENABLE_COMPOSITE_CHARS
 #define LEADING_BYTE_COMPOSITE		0x80 /* for a composite character */
+#endif
 #define LEADING_BYTE_CONTROL_1		0x8F /* represent normal 80-9F */
 #define LEADING_BYTE_LATIN_ISO8859_1	0x81 /* Right half of ISO 8859-1 */
 #define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20)
--- a/src/free-hook.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/free-hook.c	Mon Aug 13 10:51:02 2007 +0200
@@ -510,7 +510,8 @@
 /* Note: There is no more input blocking in XEmacs */
 typedef enum {
   block_type, unblock_type, totally_type,
-  gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, ungcpro_type
+  gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, gcpro5_type,
+  ungcpro_type
 } blocktype;
 
 struct block_input_history_struct
@@ -526,7 +527,7 @@
 
 typedef struct block_input_history_struct block_input_history;
 
-#endif
+#endif /* DEBUG_INPUT_BLOCKING || DEBUG_GCPRO */
 
 #ifdef DEBUG_INPUT_BLOCKING
 
@@ -575,7 +576,7 @@
     blhistptr = 0;
 }
 
-#endif
+#endif /* DEBUG_INPUT_BLOCKING */
 
 
 #ifdef DEBUG_GCPRO
@@ -587,8 +588,6 @@
 static void
 log_gcpro (char *file, int line, struct gcpro *value, blocktype type)
 {
-  FRAME start_frame;
-
   if (type == ungcpro_type)
     {
       if (value == gcprolist) goto OK;
@@ -681,6 +680,9 @@
   gcprolist = gcpro1->next;
 }
 
+
+/* To be called from the debugger */
+void show_gcprohist (void);
 void
 show_gcprohist (void)
 {
@@ -703,4 +705,4 @@
   fflush (stdout);
 }
 
-#endif
+#endif /* DEBUG_GCPRO */
--- a/src/gdbinit	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/gdbinit	Mon Aug 13 10:51:02 2007 +0200
@@ -53,10 +53,10 @@
     if $obj & 1
     # It's an int
       set $val = $obj >> 1
-      set $type = dbg_Lisp_Type_Int
+      set $type = Lisp_Type_Int
     else
       set $type = $obj & dbg_typemask
-      if $type == dbg_Lisp_Type_Char
+      if $type == Lisp_Type_Char
         set $val = ($obj & dbg_valmask) >> dbg_gctypebits
       else
         # It's a record pointer
@@ -69,7 +69,7 @@
     set $type = ($obj & dbg_typemask) >> (dbg_valbits + 1)
   end
 
-  if $type == dbg_Lisp_Type_Record
+  if $type == Lisp_Type_Record
     set $lheader = (struct lrecord_header *) $val
     if dbg_USE_INDEXED_LRECORD_IMPLEMENTATION
       set $imp = lrecord_implementations_table[$lheader->type]
@@ -94,22 +94,22 @@
 
 define xtype
   decode_object $arg0
-  if $type == dbg_Lisp_Type_Int
+  if $type == Lisp_Type_Int
     echo int\n
   else
-  if $type == dbg_Lisp_Type_Char
+  if $type == Lisp_Type_Char
     echo char\n
   else
-  if $type == dbg_Lisp_Type_Symbol
+  if $type == Lisp_Type_Symbol
     echo symbol\n
   else
-  if $type == dbg_Lisp_Type_String
+  if $type == Lisp_Type_String
     echo string\n
   else
-  if $type == dbg_Lisp_Type_Vector
+  if $type == Lisp_Type_Vector
     echo vector\n
   else
-  if $type == dbg_Lisp_Type_Cons
+  if $type == Lisp_Type_Cons
     echo cons\n
   else
     printf "record type: %s\n", $imp->name
@@ -122,9 +122,23 @@
   end
 end
 
-define run-temacs
+define lisp-shadows
+  run -batch -vanilla -f list-load-path-shadows
+end
+
+document lisp-shadows
+Usage: lisp-shadows
+Run xemacs to check for lisp shadows
+end
+
+define environment-to-run-temacs
   unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  set env EMACSBOOTSTRAPLOADPATH=../lisp/:..
+  set env EMACSBOOTSTRAPMODULEPATH=../modules/:..
+end
+
+define run-temacs
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el run-temacs -q
 end
 
@@ -136,8 +150,7 @@
 end
 
 define update-elc
-  unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/update-elc.el
 end
 
@@ -149,8 +162,7 @@
 end
 
 define dump-temacs
-  unset env EMACSLOADPATH
-  set env EMACSBOOTSTRAPLOADPATH ../lisp/:..
+  environment-to-run-temacs
   run -batch -l ../lisp/loadup.el dump
 end
 
@@ -185,6 +197,22 @@
 Requires a running xemacs process.
 end
 
+
+define leval
+ldp Feval(Fcar(Fread_from_string(build_string($arg0),Qnil,Qnil)))
+end
+
+document leval
+Usage: leval "SEXP"
+Eval a lisp expression.
+Requires a running xemacs process.
+
+Example:
+(gdb) leval "(+ 1 2)"
+Lisp ==> 3
+end
+
+
 define wtype
 print $arg0->core.widget_class->core_class.class_name
 end
@@ -203,27 +231,27 @@
 
 define pobj
   decode_object $arg0
-  if $type == dbg_Lisp_Type_Int
+  if $type == Lisp_Type_Int
     printf "Integer: %d\n", $val
   else
-  if $type == dbg_Lisp_Type_Char
-    if $val < 128
+  if $type == Lisp_Type_Char
+    if $val > 32 && $val < 128
       printf "Char: %c\n", $val
     else
       printf "Char: %d\n", $val
     end
   else
-  if $type == dbg_Lisp_Type_String || $imp == lrecord_string
+  if $type == Lisp_Type_String || $imp == lrecord_string
     pstruct Lisp_String
   else
-  if $type == dbg_Lisp_Type_Cons   || $imp == lrecord_cons
+  if $type == Lisp_Type_Cons   || $imp == lrecord_cons
     pstruct Lisp_Cons
   else
-  if $type == dbg_Lisp_Type_Symbol || $imp == lrecord_symbol
+  if $type == Lisp_Type_Symbol || $imp == lrecord_symbol
     pstruct Lisp_Symbol
     printf "Symbol name: %s\n", $xstruct->name->_data
   else
-  if $type == dbg_Lisp_Type_Vector || $imp == lrecord_vector
+  if $type == Lisp_Type_Vector || $imp == lrecord_vector
     pstruct Lisp_Vector
     printf "Vector of length %d\n", $xstruct->size
     #print *($xstruct->_data) @ $xstruct->size
@@ -259,7 +287,7 @@
     pstruct console
   else
   if $imp == lrecord_database
-    pstruct database
+    pstruct Lisp_Database
   else
   if $imp == lrecord_device
     pstruct device
@@ -292,13 +320,13 @@
     pstruct Lisp_Glyph
   else
   if $imp == lrecord_hashtable
-    pstruct hashtable
+    pstruct Lisp_Hash_Table
   else
   if $imp == lrecord_image_instance
     pstruct Lisp_Image_Instance
   else
   if $imp == lrecord_keymap
-    pstruct keymap
+    pstruct Lisp_Keymap
   else
   if $imp == lrecord_lcrecord_list
     pstruct lcrecord_list
@@ -378,6 +406,7 @@
   end
   end
   end
+  # Repeat after me... gdb sux, gdb sux, gdb sux...
   end
   end
   end
@@ -396,6 +425,7 @@
   end
   end
   end
+  # Are we having fun yet??
   end
   end
   end
@@ -419,3 +449,42 @@
 Usage: pobj lisp_object
 Print the internal C structure of a underlying Lisp Object.
 end
+
+# -------------------------------------------------------------
+# functions to test the debugging support itself.
+# If you change this file, make sure the following still work...
+# -------------------------------------------------------------
+define test_xtype
+  printf "Vemacs_major_version: "
+  xtype Vemacs_major_version
+  printf "Vhelp_char: "
+  xtype Vhelp_char
+  printf "Qnil: "
+  xtype Qnil
+  printf "Qunbound: "
+  xtype Qunbound
+  printf "Vobarray: "
+  xtype Vobarray
+  printf "Vall_weak_lists: "
+  xtype Vall_weak_lists
+  printf "Vxemacs_codename: "
+  xtype Vxemacs_codename
+end
+
+define test_pobj
+  printf "Vemacs_major_version: "
+  pobj Vemacs_major_version
+  printf "Vhelp_char: "
+  pobj Vhelp_char
+  printf "Qnil: "
+  pobj Qnil
+  printf "Qunbound: "
+  pobj Qunbound
+  printf "Vobarray: "
+  pobj Vobarray
+  printf "Vall_weak_lists: "
+  pobj Vall_weak_lists
+  printf "Vxemacs_codename: "
+  pobj Vxemacs_codename
+end
+
--- a/src/menubar-msw.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/menubar-msw.c	Mon Aug 13 10:51:02 2007 +0200
@@ -143,7 +143,7 @@
       if (ll+2 >= MAX_MENUITEM_LENGTH)
 	signal_simple_error ("Menu item produces too long displayable string",
 			     pgui_item->name);
-      memmove (ptr+1, ptr, ll-(ptr-buf));
+      memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
       ll++;
       ptr+=2;
     }
--- a/src/mule-charset.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/mule-charset.c	Mon Aug 13 10:51:02 2007 +0200
@@ -58,6 +58,8 @@
 Lisp_Object Vcharset_chinese_cns11643_1;
 Lisp_Object Vcharset_chinese_cns11643_2;
 Lisp_Object Vcharset_korean_ksc5601;
+
+#ifdef ENABLE_COMPOSITE_CHARS
 Lisp_Object Vcharset_composite;
 
 /* Hashtables for composite chars.  One maps string representing
@@ -66,15 +68,17 @@
 Lisp_Object Vcomposite_char_char2string_hashtable;
 Lisp_Object Vcomposite_char_string2char_hashtable;
 
+static int composite_char_row_next;
+static int composite_char_col_next;
+
+#endif /* ENABLE_COMPOSITE_CHARS */
+
 /* Table of charsets indexed by leading byte. */
 Lisp_Object charset_by_leading_byte[128];
 
 /* Table of charsets indexed by type/final-byte/direction. */
 Lisp_Object charset_by_attributes[4][128][2];
 
-static int composite_char_row_next;
-static int composite_char_col_next;
-
 /* Table of number of bytes in the string representation of a character
    indexed by the first byte of that representation.
 
@@ -277,6 +281,8 @@
       if (f2 < 0x20 || f3 < 0x20)
 	return 0;
 
+
+#ifdef ENABLE_COMPOSITE_CHARS
       if (f1 + FIELD1_TO_OFFICIAL_LEADING_BYTE == LEADING_BYTE_COMPOSITE)
 	{
 	  if (UNBOUNDP (Fgethash (make_int (ch),
@@ -285,6 +291,7 @@
 	    return 0;
 	  return 1;
 	}
+#endif /* ENABLE_COMPOSITE_CHARS */
 
       if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F)
 	return 1;
@@ -461,7 +468,7 @@
 				CHARSET_TYPE (cs) == CHARSET_TYPE_96) ? 1 : 2;
   CHARSET_CHARS         (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 ||
 				CHARSET_TYPE (cs) == CHARSET_TYPE_94X94) ? 94 : 96;
-    
+
   if (final)
     {
       /* some charsets do not have final characters.  This includes
@@ -1068,6 +1075,7 @@
 }
 
 
+#ifdef ENABLE_COMPOSITE_CHARS
 /************************************************************************/
 /*                     composite character functions                    */
 /************************************************************************/
@@ -1113,7 +1121,7 @@
   return str;
 }
 
-DEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /*
+xxDEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /*
 Convert a string into a single composite character.
 The character is the result of overstriking all the characters in
 the string.
@@ -1125,7 +1133,7 @@
 					   XSTRING_LENGTH (string)));
 }
 
-DEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /*
+xxDEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /*
 Return a string of the characters comprising a composite character.
 */
        (ch))
@@ -1138,6 +1146,7 @@
     signal_simple_error ("Must be composite char", ch);
   return composite_char_string (emch);
 }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 
 /************************************************************************/
@@ -1167,8 +1176,10 @@
   DEFSUBR (Fchar_charset);
   DEFSUBR (Fchar_octet);
 
+#ifdef ENABLE_COMPOSITE_CHARS
   DEFSUBR (Fmake_composite_char);
   DEFSUBR (Fcomposite_char_string);
+#endif
 
   defsymbol (&Qcharsetp, "charsetp");
   defsymbol (&Qregistry, "registry");
@@ -1397,6 +1408,8 @@
 		  CHARSET_LEFT_TO_RIGHT,
 		  build_string ("KS C5601 (Hangul and Korean Hanja)"),
 		  build_string ("ksc5601"));
+
+#ifdef ENABLE_COMPOSITE_CHARS
   /* #### For simplicity, we put composite chars into a 96x96 charset.
      This is going to lead to problems because you can run out of
      room, esp. as we don't yet recycle numbers. */
@@ -1416,5 +1429,6 @@
     make_lisp_hashtable (500, HASHTABLE_NONWEAK, HASHTABLE_EQ);
   staticpro (&Vcomposite_char_string2char_hashtable);
   staticpro (&Vcomposite_char_char2string_hashtable);
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 }
--- a/src/mule-charset.h	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/mule-charset.h	Mon Aug 13 10:51:02 2007 +0200
@@ -327,7 +327,9 @@
 #define MIN_LEADING_BYTE		0x80
 /* These need special treatment in a string and/or character */
 #define LEADING_BYTE_ASCII		0x8E /* Omitted in a buffer */
+#ifdef ENABLE_COMPOSITE_CHARS
 #define LEADING_BYTE_COMPOSITE		0x80 /* for a composite character */
+#endif
 #define LEADING_BYTE_CONTROL_1		0x8F /* represent normal 80-9F */
 
 /** The following are for 1-byte characters in an official charset. **/
@@ -676,7 +678,14 @@
   else if (c < MIN_CHAR_COMPOSITION)
     return CHAR_FIELD1 (c) + FIELD1_TO_PRIVATE_LEADING_BYTE;
   else
-    return LEADING_BYTE_COMPOSITE;
+    {
+#ifdef ENABLE_COMPOSITE_CHARS
+      return LEADING_BYTE_COMPOSITE;
+#else
+      abort();
+      return 0;
+#endif /* ENABLE_COMPOSITE_CHARS */
+    }
 }
 
 #define CHAR_CHARSET(c) CHARSET_BY_LEADING_BYTE (CHAR_LEADING_BYTE (c))
@@ -697,8 +706,10 @@
     return c1;
   else if (EQ (charset, Vcharset_control_1))
     return c1 | 0x80;
+#ifdef ENABLE_COMPOSITE_CHARS
   else if (EQ (charset, Vcharset_composite))
     return (0x1F << 14) | ((c1) << 7) | (c2);
+#endif
   else if (XCHARSET_DIMENSION (charset) == 1)
     return ((XCHARSET_LEADING_BYTE (charset) -
 	     FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) | (c1);
@@ -738,12 +749,14 @@
 
 
 
+#ifdef ENABLE_COMPOSITE_CHARS
 /************************************************************************/
 /*                           Composite characters                       */
 /************************************************************************/
 
 Emchar lookup_composite_char (Bufbyte *str, int len);
 Lisp_Object composite_char_string (Emchar ch);
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 
 /************************************************************************/
--- a/src/opaque.c	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/opaque.c	Mon Aug 13 10:51:02 2007 +0200
@@ -55,32 +55,38 @@
 static Lisp_Object
 mark_opaque (Lisp_Object obj, void (*markobj) (Lisp_Object))
 {
+  struct Lisp_Opaque *p = XOPAQUE (obj);
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
 #ifdef ERROR_CHECK_GC
   if (!in_opaque_list_marking)
     /* size is non-int for objects on an opaque free list.  We sure
        as hell better not be marking any of these objects unless
        we're marking an opaque list. */
-    assert (INTP (XOPAQUE (obj)->size_or_chain));
+    assert (GC_INTP (size_or_chain));
   else
     /* marking an opaque on the free list doesn't do any recursive
        markings, so we better not have non-freed opaques on a free
        list. */
-    assert (!INTP (XOPAQUE (obj)->size_or_chain));
+    assert (!GC_INTP (size_or_chain));
 #endif
-  if (INTP (XOPAQUE (obj)->size_or_chain) && XOPAQUE_MARKFUN (obj))
-    return XOPAQUE_MARKFUN (obj) (obj, markobj);
+  if (GC_INTP (size_or_chain) && OPAQUE_MARKFUN (p))
+    return OPAQUE_MARKFUN (p) (obj, markobj);
   else
-    return XOPAQUE (obj)->size_or_chain;
+    return size_or_chain;
 }
 
 /* Should never, ever be called. (except by an external debugger) */
 static void
 print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
+  CONST struct Lisp_Opaque *p = XOPAQUE (obj);
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
   char buf[200];
-  if (INTP (XOPAQUE (obj)->size_or_chain))
+  if (GC_INTP (size_or_chain))
     sprintf (buf, "#<INTERNAL EMACS BUG (opaque, size=%ld) 0x%lx>",
-	     (long) XOPAQUE_SIZE (obj), (unsigned long) XPNTR (obj));
+	     (long) OPAQUE_SIZE (p), (unsigned long) XPNTR (obj));
   else
     sprintf (buf, "#<INTERNAL EMACS BUG (opaque, freed) 0x%lx>",
 	     (unsigned long) XPNTR (obj));
@@ -91,9 +97,11 @@
 sizeof_opaque (CONST void *header)
 {
   CONST struct Lisp_Opaque *p = (CONST struct Lisp_Opaque *) header;
-  if (!INTP (p->size_or_chain))
+  /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+  Lisp_Object size_or_chain = p->size_or_chain;
+  if (!GC_INTP (size_or_chain))
     return sizeof (*p);
-  return sizeof (*p) + XINT (p->size_or_chain) - sizeof (int);
+  return sizeof (*p) + XINT (size_or_chain) - sizeof (int);
 }
 
 Lisp_Object
@@ -119,16 +127,20 @@
 equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
 #ifdef DEBUG_XEMACS
-  assert (!XOPAQUE_MARKFUN (obj1) && !XOPAQUE_MARKFUN (obj2));
-  assert (INTP (XOPAQUE(obj1)->size_or_chain));
-  assert (INTP (XOPAQUE(obj2)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain_1 = XOPAQUE (obj1)->size_or_chain;
+    Lisp_Object size_or_chain_2 = XOPAQUE (obj2)->size_or_chain;
+    assert (INTP (size_or_chain_1));
+    assert (INTP (size_or_chain_2));
+    assert (!XOPAQUE_MARKFUN (obj1) && !XOPAQUE_MARKFUN (obj2));
+  }
 #endif
-  if (XOPAQUE_SIZE(obj1) != XOPAQUE_SIZE(obj2))
-    return 0;
-  return (XOPAQUE_SIZE(obj1) == sizeof(*XOPAQUE_DATA(obj1))
-	  ? *XOPAQUE_DATA(obj1) == *XOPAQUE_DATA(obj2)
-	  : memcmp (XOPAQUE_DATA(obj1), XOPAQUE_DATA(obj2),
-		    XOPAQUE_SIZE(obj1)) == 0);
+  {
+    size_t size;
+    return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) &&
+	    !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size));
+  }
 }
 
 /* This will not work correctly for opaques with subobjects! */
@@ -137,13 +149,17 @@
 hash_opaque (Lisp_Object obj, int depth)
 {
 #ifdef DEBUG_XEMACS
-  assert (!XOPAQUE_MARKFUN (obj));
-  assert (INTP (XOPAQUE(obj)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain = XOPAQUE (obj)->size_or_chain;
+    assert (INTP (size_or_chain));
+    assert (!XOPAQUE_MARKFUN (obj));
+  }
 #endif
-  if (XOPAQUE_SIZE(obj) == sizeof (unsigned long))
-    return (unsigned int) *XOPAQUE_DATA(obj);
+  if (XOPAQUE_SIZE (obj) == sizeof (unsigned long))
+    return *((unsigned long *) XOPAQUE_DATA (obj));
   else
-    return memory_hash (XOPAQUE_DATA(obj), XOPAQUE_SIZE(obj));
+    return memory_hash (XOPAQUE_DATA (obj), XOPAQUE_SIZE (obj));
 }
 
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("opaque", opaque,
@@ -211,7 +227,11 @@
   struct Lisp_Opaque_List *li = XOPAQUE_LIST (opaque_list);
 
 #ifdef ERROR_CHECK_GC
-  assert (INTP (XOPAQUE (opaque)->size_or_chain));
+  {
+    /* Egcs 1.1.1 sometimes crashes on INTP (p->size_or_chain) */
+    Lisp_Object size_or_chain = XOPAQUE (opaque)->size_or_chain;
+    assert (INTP (size_or_chain));
+  }
 #endif
   XOPAQUE (opaque)->size_or_chain = li->free;
   li->free = opaque;
--- a/src/systime.h	Mon Aug 13 10:50:41 2007 +0200
+++ b/src/systime.h	Mon Aug 13 10:51:02 2007 +0200
@@ -34,6 +34,13 @@
 #endif
 #endif
 
+/* select() is supposed to be (Unix98) defined in sys/time.h,
+   but FreeBSD and Irix 5 put it in unistd.h instead.
+   If we have it, including it can't hurt. */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #if defined(WINDOWSNT) && defined(HAVE_X_WINDOWS)
 /* Provides gettimeofday etc */
 #include <X11/Xw32defs.h>
--- a/version.sh	Mon Aug 13 10:50:41 2007 +0200
+++ b/version.sh	Mon Aug 13 10:51:02 2007 +0200
@@ -1,8 +1,8 @@
 #!/bin/sh
 emacs_major_version=21
 emacs_minor_version=0
-emacs_beta_version=65
-xemacs_codename="20"
+emacs_beta_version=66
+xemacs_codename="20 minutes to Nikko"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=6