emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109877: Simplify redefinition of 'ab


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109877: Simplify redefinition of 'abort' (Bug#12316).
Date: Tue, 04 Sep 2012 10:34:54 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109877
fixes bug: http://debbugs.gnu.org/12316
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2012-09-04 10:34:54 -0700
message:
  Simplify redefinition of 'abort' (Bug#12316).
  
  Do not try to redefine the 'abort' function.  Instead, redo
  the code so that it calls 'emacs_abort' rather than 'abort'.
  This removes the need for the NO_ABORT configure-time macro
  and makes it easier to change the abort code to do a backtrace.
  * configure.ac (NO_ABRT): Remove.
  * admin/CPP-DEFINES (NO_ABORT): Remove.
  * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
  * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
  * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
  Remove; sysdep.c's emacs_abort now takes its place.
  * src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
  'abort' changed to use 'emacs_abort'.
  * src/msdos.c (dos_abort) [defined abort]: Remove; not used.
  (abort) [!defined abort]: Rename to ...
  (emacs_abort): ... new name.
  * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
  the place of the old 'abort' in emacs.c.
  * src/w32.c, src/w32fns.c (abort): Do not #undef.
  * src/w32.c (emacs_abort): Rename from w32_abort.
modified:
  ChangeLog
  admin/CPP-DEFINES
  admin/ChangeLog
  configure.ac
  nt/ChangeLog
  nt/inc/ms-w32.h
  nt/inc/unistd.h
  src/.gdbinit
  src/ChangeLog
  src/alloc.c
  src/bidi.c
  src/blockinput.h
  src/buffer.c
  src/buffer.h
  src/bytecode.c
  src/character.c
  src/charset.c
  src/cm.c
  src/coding.c
  src/conf_post.h
  src/data.c
  src/dired.c
  src/dispnew.c
  src/editfns.c
  src/emacs.c
  src/eval.c
  src/fileio.c
  src/fns.c
  src/frame.c
  src/frame.h
  src/ftfont.c
  src/gtkutil.c
  src/image.c
  src/indent.c
  src/insdel.c
  src/intervals.c
  src/keyboard.c
  src/keymap.c
  src/lisp.h
  src/lread.c
  src/marker.c
  src/menu.c
  src/minibuf.c
  src/msdos.c
  src/nsfont.m
  src/nsmenu.m
  src/nsterm.m
  src/print.c
  src/process.c
  src/ralloc.c
  src/region-cache.c
  src/scroll.c
  src/search.c
  src/sound.c
  src/sysdep.c
  src/term.c
  src/termchar.h
  src/terminal.c
  src/terminfo.c
  src/tparam.c
  src/w32.c
  src/w32fns.c
  src/w32menu.c
  src/w32proc.c
  src/w32select.c
  src/w32term.c
  src/w32xfns.c
  src/widget.c
  src/window.c
  src/xdisp.c
  src/xfaces.c
  src/xmenu.c
  src/xselect.c
  src/xterm.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-09-04 06:25:44 +0000
+++ b/ChangeLog 2012-09-04 17:34:54 +0000
@@ -1,5 +1,8 @@
 2012-09-04  Paul Eggert  <address@hidden>
 
+       Simplify redefinition of 'abort' (Bug#12316).
+       * configure.ac (NO_ABRT): Remove.
+
        * configure.ac (_setjmp, _longjmp): Check by compiling
        instead of by guessing.  The guesses were wrong for
        recent versions of Solaris, such as Solaris 11.

=== modified file 'admin/CPP-DEFINES'
--- a/admin/CPP-DEFINES 2012-08-18 21:36:13 +0000
+++ b/admin/CPP-DEFINES 2012-09-04 17:34:54 +0000
@@ -428,7 +428,6 @@
 MAIL_USE_SYSTEM_LOCK
 MAXPATHLEN
 NLIST_STRUCT
-NO_ABORT
 NO_EDITRES
 NO_MATHERR
 NO_TERMIO

=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog   2012-08-28 19:26:41 +0000
+++ b/admin/ChangeLog   2012-09-04 17:34:54 +0000
@@ -1,3 +1,8 @@
+2012-09-04  Paul Eggert  <address@hidden>
+
+       Simplify redefinition of 'abort' (Bug#12316).
+       * CPP-DEFINES (NO_ABORT): Remove.
+
 2012-08-28  Glenn Morris  <address@hidden>
 
        * bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree.

=== modified file 'configure.ac'
--- a/configure.ac      2012-09-04 06:25:44 +0000
+++ b/configure.ac      2012-09-04 17:34:54 +0000
@@ -3351,12 +3351,6 @@
     AC_DEFINE(BROKEN_PTY_READ_AFTER_EAGAIN, 1, [Define on FreeBSD to
       work around an issue when reading from a PTY.])
     ;;
-
-  dnl Define the following so emacs symbols will not conflict with those
-  dnl in the System framework.  Otherwise -prebind will not work.
-  darwin)
-    AC_DEFINE(NO_ABORT, 1, [Do not define abort in emacs.c.])
-    ;;
 esac
 
 case $opsys in

=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2012-09-02 02:00:47 +0000
+++ b/nt/ChangeLog      2012-09-04 17:34:54 +0000
@@ -1,3 +1,8 @@
+2012-09-04  Paul Eggert  <address@hidden>
+
+       Simplify redefinition of 'abort' (Bug#12316).
+       * inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
+
 2012-09-02  Juanma Barranquero  <address@hidden>
 
        * config.nt: Sync with autogen/config.in.

=== modified file 'nt/inc/ms-w32.h'
--- a/nt/inc/ms-w32.h   2012-09-01 06:38:52 +0000
+++ b/nt/inc/ms-w32.h   2012-09-04 17:34:54 +0000
@@ -334,16 +334,7 @@
 #include <malloc.h>
 #endif
 
-/* stdlib.h must be included after redefining malloc & friends, but
-   before redefining abort.  Isn't library redefinition funny?  */
 #include <stdlib.h>
-
-/* Redefine abort.  */
-#ifdef HAVE_NTGUI
-#define abort  w32_abort
-extern _Noreturn void w32_abort (void);
-#endif
-
 #include <sys/stat.h>
 
 /* Define for those source files that do not include enough NT system files.  
*/

=== modified file 'nt/inc/unistd.h'
--- a/nt/inc/unistd.h   2011-02-27 19:48:31 +0000
+++ b/nt/inc/unistd.h   2012-09-04 17:34:54 +0000
@@ -3,8 +3,12 @@
 #ifndef _UNISTD_H
 #define _UNISTD_H
 
+/* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX
+   platforms, <unistd.h> does.  Every file in Emacs that includes
+   <unistd.h> also includes <stdlib.h>, so there's no need to declare
+   'environ' here.  */
+
 extern ssize_t readlink (const char *, char *, size_t);
 extern int symlink (char const *, char const *);
 
 #endif /* _UNISTD_H */
-

=== modified file 'src/.gdbinit'
--- a/src/.gdbinit      2012-08-20 17:32:31 +0000
+++ b/src/.gdbinit      2012-09-04 17:34:54 +0000
@@ -1222,14 +1222,9 @@
   set $tem = (struct Lisp_String *) $ptr
   set $tem = (char *) $tem->data
 
-  # Don't let abort actually run, as it will make stdio stop working and
-  # therefore the `pr' command above as well.
-  if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
-    # The windows-nt build replaces abort with its own function.
-    break w32_abort
-  else
-    break abort
-  end
+  # Don't let emacs_abort actually run, as it will make stdio stop
+  # working and therefore the 'pr' command above as well.
+  break emacs_abort
 end
 
 # x_error_quitter is defined only on X.  But window-system is set up

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-09-04 17:15:45 +0000
+++ b/src/ChangeLog     2012-09-04 17:34:54 +0000
@@ -1,3 +1,23 @@
+2012-09-04  Paul Eggert  <address@hidden>
+
+       Simplify redefinition of 'abort' (Bug#12316).
+       Do not try to redefine the 'abort' function.  Instead, redo
+       the code so that it calls 'emacs_abort' rather than 'abort'.
+       This removes the need for the NO_ABORT configure-time macro
+       and makes it easier to change the abort code to do a backtrace.
+       * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
+       * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
+       Remove; sysdep.c's emacs_abort now takes its place.
+       * lisp.h (emacs_abort): New decl.  All calls from Emacs code to
+       'abort' changed to use 'emacs_abort'.
+       * msdos.c (dos_abort) [defined abort]: Remove; not used.
+       (abort) [!defined abort]: Rename to ...
+       (emacs_abort): ... new name.
+       * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
+       the place of the old 'abort' in emacs.c.
+       * w32.c, w32fns.c (abort): Do not #undef.
+       * w32.c (emacs_abort): Rename from w32_abort.
+
 2012-09-04  Eli Zaretskii  <address@hidden>
 
        * w32uniscribe.c (uniscribe_shape): Reverse the sign of

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2012-09-04 06:34:19 +0000
+++ b/src/alloc.c       2012-09-04 17:34:54 +0000
@@ -613,7 +613,7 @@
   register unsigned char *val;
   int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0;
   if (SIZE_MAX - overhead < size)
-    abort ();
+    emacs_abort ();
 
   val = malloc (size + overhead);
   if (val && check_depth == 1)
@@ -638,7 +638,7 @@
   register unsigned char *val = (unsigned char *) block;
   int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0;
   if (SIZE_MAX - overhead < size)
-    abort ();
+    emacs_abort ();
 
   if (val
       && check_depth == 1
@@ -649,7 +649,7 @@
       size_t osize = xmalloc_get_size (val);
       if (memcmp (xmalloc_overrun_check_trailer, val + osize,
                  XMALLOC_OVERRUN_CHECK_SIZE))
-       abort ();
+       emacs_abort ();
       memset (val + osize, 0, XMALLOC_OVERRUN_CHECK_SIZE);
       val -= XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE;
       memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE);
@@ -686,7 +686,7 @@
       size_t osize = xmalloc_get_size (val);
       if (memcmp (xmalloc_overrun_check_trailer, val + osize,
                  XMALLOC_OVERRUN_CHECK_SIZE))
-       abort ();
+       emacs_abort ();
 #ifdef XMALLOC_CLEAR_FREE_MEMORY
       val -= XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE;
       memset (val, 0xff, osize + XMALLOC_OVERRUN_CHECK_OVERHEAD);
@@ -1272,7 +1272,7 @@
        {
          fprintf (stderr,
                   "Freeing `%p' which wasn't allocated with malloc\n", ptr);
-         abort ();
+         emacs_abort ();
        }
       else
        {
@@ -1331,7 +1331,7 @@
        fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n",
                 m->start, m->end, (char *) m->end - (char *) m->start,
                 m->type);
-       abort ();
+       emacs_abort ();
       }
 
     if (!dont_register_blocks)
@@ -1369,7 +1369,7 @@
          fprintf (stderr,
                   "Realloc of %p which wasn't allocated with malloc\n",
                   ptr);
-         abort ();
+         emacs_abort ();
        }
 
       mem_delete (m);
@@ -1391,7 +1391,7 @@
     if (m != MEM_NIL)
       {
        fprintf (stderr, "Realloc returns memory that is already in use\n");
-       abort ();
+       emacs_abort ();
       }
 
     /* Can't handle zero size regions in the red-black tree.  */
@@ -1804,7 +1804,7 @@
   if (!PURE_POINTER_P (s)
       && s->data
       && nbytes != SDATA_NBYTES (SDATA_OF_STRING (s)))
-    abort ();
+    emacs_abort ();
   return nbytes;
 }
 
@@ -1878,7 +1878,7 @@
   while (s != NULL)
     {
       if ((uintptr_t) s < 1024)
-       abort ();
+       emacs_abort ();
       s = NEXT_FREE_LISP_STRING (s);
     }
 }
@@ -2107,7 +2107,7 @@
                     back-pointer so that we know it's free.  */
 #ifdef GC_CHECK_STRING_BYTES
                  if (string_bytes (s) != SDATA_NBYTES (data))
-                   abort ();
+                   emacs_abort ();
 #else
                  data->u.nbytes = STRING_BYTES (s);
 #endif
@@ -2218,7 +2218,7 @@
          /* Check that the string size recorded in the string is the
             same as the one recorded in the sdata structure. */
          if (s && string_bytes (s) != SDATA_NBYTES (from))
-           abort ();
+           emacs_abort ();
 #endif /* GC_CHECK_STRING_BYTES */
 
          nbytes = s ? STRING_BYTES (s) : SDATA_NBYTES (from);
@@ -2231,7 +2231,7 @@
          if (memcmp (string_overrun_cookie,
                      (char *) from_end - GC_STRING_OVERRUN_COOKIE_SIZE,
                      GC_STRING_OVERRUN_COOKIE_SIZE))
-           abort ();
+           emacs_abort ();
 #endif
 
          /* Non-NULL S means it's alive.  Copy its data.  */
@@ -2488,7 +2488,7 @@
   struct Lisp_String *s;
 
   if (nchars < 0)
-    abort ();
+    emacs_abort ();
   if (!nbytes)
     return empty_multibyte_string;
 
@@ -2809,7 +2809,7 @@
       else if (type == CONSTYPE_HEAP)
        val = Fcons (objp[i], val);
       else
-       abort ();
+       emacs_abort ();
     }
   return val;
 }
@@ -3919,7 +3919,7 @@
   while (c != MEM_NIL)
     {
       if (start >= c->start && start < c->end)
-       abort ();
+       emacs_abort ();
       parent = c;
       c = start < c->start ? c->left : c->right;
     }
@@ -3938,7 +3938,7 @@
 #ifdef GC_MALLOC_CHECK
   x = _malloc_internal (sizeof *x);
   if (x == NULL)
-    abort ();
+    emacs_abort ();
 #else
   x = xmalloc (sizeof *x);
 #endif
@@ -4613,7 +4613,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
 
       if (!NILP (obj))
@@ -4810,7 +4810,7 @@
       if (!survives_gc_p (p->var[i]))
        /* FIXME: It's not necessarily a bug.  It might just be that the
           GCPRO is unnecessary or should release the object sooner.  */
-       abort ();
+       emacs_abort ();
 }
 
 #elif GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES
@@ -5351,7 +5351,7 @@
 {
   staticvec[staticidx++] = varaddress;
   if (staticidx >= NSTATICS)
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -5406,7 +5406,7 @@
   Lisp_Object retval = Qnil;
 
   if (abort_on_gc)
-    abort ();
+    emacs_abort ();
 
   /* Can't GC if pure storage overflowed because we can't determine
      if something is a pure object or not.  */
@@ -5887,7 +5887,7 @@
   do {                                         \
     m = mem_find (po);                         \
     if (m == MEM_NIL)                          \
-      abort ();                                        \
+      emacs_abort ();                          \
   } while (0)
 
   /* Check that the object pointed to by PO is live, using predicate
@@ -5895,7 +5895,7 @@
 #define CHECK_LIVE(LIVEP)                      \
   do {                                         \
     if (!LIVEP (m, po))                                \
-      abort ();                                        \
+      emacs_abort ();                          \
   } while (0)
 
   /* Check both of the above conditions.  */
@@ -5943,7 +5943,7 @@
        if (m == MEM_NIL && !SUBRP (obj)
            && po != &buffer_defaults
            && po != &buffer_local_symbols)
-         abort ();
+         emacs_abort ();
 #endif /* GC_CHECK_MARKED_OBJECTS */
 
        if (ptr->header.size & PSEUDOVECTOR_FLAG)
@@ -5966,7 +5966,7 @@
                  if (b == po)
                    break;
                if (b == NULL)
-                 abort ();
+                 emacs_abort ();
              }
 #endif /* GC_CHECK_MARKED_OBJECTS */
            mark_buffer ((struct buffer *) ptr);
@@ -6042,7 +6042,7 @@
            break;
 
          case PVEC_FREE:
-           abort ();
+           emacs_abort ();
 
          default:
            mark_vectorlike (ptr);
@@ -6089,7 +6089,7 @@
               And if it's forwarded to a C variable, either it's not
               a Lisp_Object var, or it's staticpro'd already.  */
            break;
-         default: abort ();
+         default: emacs_abort ();
          }
        if (!PURE_POINTER_P (XSTRING (ptr->name)))
          MARK_STRING (XSTRING (ptr->name));
@@ -6143,7 +6143,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
       break;
 
@@ -6165,7 +6165,7 @@
        obj = ptr->u.cdr;
        cdr_count++;
        if (cdr_count == mark_object_loop_halt)
-         abort ();
+         emacs_abort ();
        goto loop;
       }
 
@@ -6178,7 +6178,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
 #undef CHECK_LIVE
@@ -6247,7 +6247,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
   return survives_p || PURE_POINTER_P ((void *) XPNTR (obj));
@@ -6699,7 +6699,7 @@
           file, line, msg);
   npointers = backtrace (buffer, NPOINTERS_MAX);
   backtrace_symbols_fd (buffer, npointers, STDERR_FILENO);
-  abort ();
+  emacs_abort ();
 }
 #endif
 

=== modified file 'src/bidi.c'
--- a/src/bidi.c        2012-08-23 20:31:52 +0000
+++ b/src/bidi.c        2012-09-04 17:34:54 +0000
@@ -105,7 +105,7 @@
   if (ch == BIDI_EOB)
     return NEUTRAL_B;
   if (ch < 0 || ch > MAX_CHAR)
-    abort ();
+    emacs_abort ();
 
   default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
   /* Every valid character code, even those that are unassigned by the
@@ -113,7 +113,7 @@
      DerivedBidiClass.txt file.  Therefore, if we ever get UNKNOWN_BT
      (= zero) code from CHAR_TABLE_REF, that's a bug.  */
   if (default_type == UNKNOWN_BT)
-    abort ();
+    emacs_abort ();
 
   if (override == NEUTRAL_DIR)
     return default_type;
@@ -141,7 +141,7 @@
              else if (override == R2L)
                return STRONG_R;
              else
-               abort ();       /* can't happen: handled above */
+               emacs_abort (); /* can't happen: handled above */
          }
     }
 }
@@ -183,7 +183,7 @@
       case NEUTRAL_ON:
        return NEUTRAL;
       default:
-       abort ();
+       emacs_abort ();
     }
 }
 
@@ -199,7 +199,7 @@
   if (c == BIDI_EOB)
     return c;
   if (c < 0 || c > MAX_CHAR)
-    abort ();
+    emacs_abort ();
 
   val = CHAR_TABLE_REF (bidi_mirror_table, c);
   if (INTEGERP (val))
@@ -215,7 +215,7 @@
       /* Minimal test we must do in optimized builds, to prevent weird
         crashes further down the road.  */
       if (v < 0 || v > MAX_CHAR)
-       abort ();
+       emacs_abort ();
 
       return v;
     }
@@ -373,7 +373,7 @@
   int current_scan_dir = bidi_it->scan_dir;
 
   if (idx < bidi_cache_start || idx >= bidi_cache_idx)
-    abort ();
+    emacs_abort ();
 
   bidi_copy_it (bidi_it, &bidi_cache[idx]);
   bidi_it->scan_dir = current_scan_dir;
@@ -518,7 +518,7 @@
 
   /* We should never cache on backward scans.  */
   if (bidi_it->scan_dir == -1)
-    abort ();
+    emacs_abort ();
   idx = bidi_cache_search (bidi_it->charpos, -1, 1);
 
   if (idx < 0)
@@ -537,7 +537,7 @@
          idx = bidi_cache_start;
        }
       if (bidi_it->nchars <= 0)
-       abort ();
+       emacs_abort ();
       bidi_copy_it (&bidi_cache[idx], bidi_it);
       if (!resolved)
        bidi_cache[idx].resolved_level = -1;
@@ -592,7 +592,7 @@
 bidi_peek_at_next_level (struct bidi_it *bidi_it)
 {
   if (bidi_cache_idx == bidi_cache_start || bidi_cache_last_idx == -1)
-    abort ();
+    emacs_abort ();
   return bidi_cache[bidi_cache_last_idx + bidi_it->scan_dir].resolved_level;
 }
 
@@ -629,7 +629,7 @@
 bidi_pop_it (struct bidi_it *bidi_it)
 {
   if (bidi_cache_start <= 0)
-    abort ();
+    emacs_abort ();
 
   /* Reset the next free cache slot index to what it was before the
      call to bidi_push_it.  */
@@ -640,7 +640,7 @@
 
   /* Pop the previous cache start from the stack.  */
   if (bidi_cache_sp <= 0)
-    abort ();
+    emacs_abort ();
   bidi_cache_start = bidi_cache_start_stack[--bidi_cache_sp];
 
   /* Invalidate the last-used cache slot data.  */
@@ -762,12 +762,12 @@
 {
   bidi_type_table = uniprop_table (intern ("bidi-class"));
   if (NILP (bidi_type_table))
-    abort ();
+    emacs_abort ();
   staticpro (&bidi_type_table);
 
   bidi_mirror_table = uniprop_table (intern ("mirroring"));
   if (NILP (bidi_mirror_table))
-    abort ();
+    emacs_abort ();
   staticpro (&bidi_mirror_table);
 
   Qparagraph_start = intern ("paragraph-start");
@@ -885,7 +885,7 @@
   else
     {
       if (!CHAR_HEAD_P (*p))
-       abort ();
+       emacs_abort ();
 
       while (pos < end)
        {
@@ -965,7 +965,7 @@
       /* We don't expect to find ourselves in the middle of a display
         property.  Hopefully, it will never be needed.  */
       if (charpos > *disp_pos)
-       abort ();
+       emacs_abort ();
       /* Text covered by `display' properties and overlays with
         display properties or display strings is handled as a single
         character that represents the entire run of characters
@@ -995,7 +995,7 @@
        }
       *nchars = disp_end_pos - *disp_pos;
       if (*nchars <= 0)
-       abort ();
+       emacs_abort ();
       if (string->s)
        *ch_len = bidi_count_bytes (string->s, *disp_pos, bytepos,
                                    disp_end_pos, string->unibyte);
@@ -1160,7 +1160,7 @@
     dir = L2R;
   /* We should never be called at EOB or before BEGV.  */
   else if (bidi_it->charpos >= end || bytepos < begbyte)
-    abort ();
+    emacs_abort ();
 
   if (dir == L2R)
     {
@@ -1298,7 +1298,7 @@
               && no_default_p && bidi_it->paragraph_dir == NEUTRAL_DIR);
     }
   else
-    abort ();
+    emacs_abort ();
 
   /* Contrary to UAX#9 clause P3, we only default the paragraph
      direction to L2R if we have no previous usable paragraph
@@ -1325,7 +1325,7 @@
   bidi_type_t ch_type;
 
   if (!bidi_initialized)
-    abort ();
+    emacs_abort ();
   ch_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
   return (ch_type == LRE || ch_type == LRO
          || ch_type == RLE || ch_type == RLO
@@ -1378,10 +1378,10 @@
       /* Advance to the next character, skipping characters covered by
         display strings (nchars > 1).  */
       if (bidi_it->nchars <= 0)
-       abort ();
+       emacs_abort ();
       bidi_it->charpos += bidi_it->nchars;
       if (bidi_it->ch_len == 0)
-       abort ();
+       emacs_abort ();
       bidi_it->bytepos += bidi_it->ch_len;
     }
 
@@ -1581,7 +1581,7 @@
        }
 
       if (bidi_it->nchars <= 0)
-       abort ();
+       emacs_abort ();
       if (level == prev_level) /* empty embedding */
        saved_it.ignore_bn_limit = bidi_it->charpos + bidi_it->nchars;
       else                     /* this embedding is non-empty */
@@ -1644,7 +1644,7 @@
       || type == RLE
       || type == RLO
       || type == PDF)
-    abort ();
+    emacs_abort ();
 
   if (new_level != prev_level
       || bidi_it->type == NEUTRAL_B)
@@ -1685,7 +1685,7 @@
          else if (bidi_it->sor == L2R)
            type = STRONG_L;
          else /* shouldn't happen! */
-           abort ();
+           emacs_abort ();
        }
       if (type == WEAK_EN      /* W2 */
          && bidi_it->last_strong.type_after_w1 == STRONG_AL)
@@ -1767,7 +1767,7 @@
                                        : bidi_it->string.s);
 
              if (bidi_it->nchars <= 0)
-               abort ();
+               emacs_abort ();
              next_char
                = (bidi_it->charpos + bidi_it->nchars >= eob
                   ? BIDI_EOB
@@ -1875,7 +1875,7 @@
        || type == NEUTRAL_S
        || type == NEUTRAL_WS
        || type == NEUTRAL_ON))
-    abort ();
+    emacs_abort ();
 
   if ((type != NEUTRAL_B /* Don't risk entering the long loop below if
                            we are already at paragraph end.  */
@@ -1930,7 +1930,7 @@
          bidi_type_t next_type;
 
          if (bidi_it->scan_dir == -1)
-           abort ();
+           emacs_abort ();
 
          bidi_copy_it (&saved_it, bidi_it);
          /* Scan the text forward until we find the first non-neutral
@@ -1979,7 +1979,7 @@
                break;
              case WEAK_BN:
                if (!bidi_explicit_dir_char (bidi_it->ch))
-                 abort ();             /* can't happen: BNs are skipped */
+                 emacs_abort (); /* can't happen: BNs are skipped */
                /* FALLTHROUGH */
              case NEUTRAL_B:
                /* Marched all the way to the end of this level run.
@@ -1998,7 +1998,7 @@
                  }
                break;
              default:
-               abort ();
+               emacs_abort ();
            }
          type = bidi_resolve_neutral_1 (saved_it.prev_for_neutral.type,
                                         next_type, current_level);
@@ -2023,7 +2023,7 @@
 
   /* This should always be called during a forward scan.  */
   if (bidi_it->scan_dir != 1)
-    abort ();
+    emacs_abort ();
 
   /* Reset the limit until which to ignore BNs if we step out of the
      area where we found only empty levels.  */
@@ -2107,7 +2107,7 @@
       if (bidi_it->scan_dir > 0)
        {
          if (bidi_it->nchars <= 0)
-           abort ();
+           emacs_abort ();
          next_char_pos = bidi_it->charpos + bidi_it->nchars;
        }
       else if (bidi_it->charpos >= bob)
@@ -2143,7 +2143,7 @@
   if (bidi_it->scan_dir == -1)
     /* If we are going backwards, the iterator state is already cached
        from previous scans, and should be fully resolved.  */
-    abort ();
+    emacs_abort ();
 
   if (type == UNKNOWN_BT)
     type = bidi_type_of_next_char (bidi_it);
@@ -2156,7 +2156,7 @@
       || (type == WEAK_BN && prev_level == level))
     {
       if (bidi_it->next_for_neutral.type == UNKNOWN_BT)
-       abort ();
+       emacs_abort ();
 
       /* If the cached state shows a neutral character, it was not
         resolved by bidi_resolve_neutral, so do it now.  */
@@ -2170,7 +2170,7 @@
        || type == WEAK_BN
        || type == WEAK_EN
        || type == WEAK_AN))
-    abort ();
+    emacs_abort ();
   bidi_it->type = type;
   bidi_check_type (bidi_it->type);
 
@@ -2192,7 +2192,7 @@
       int dpp = bidi_it->disp_prop;
 
       if (bidi_it->nchars <= 0)
-       abort ();
+       emacs_abort ();
       do {
        ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs,
                              fwp, &clen, &nc);
@@ -2301,8 +2301,9 @@
     {
       int new_level;
 
+      /* If we are at end of level, its edges must be cached.  */
       if (end_flag)
-       abort (); /* if we are at end of level, its edges must be cached */
+       emacs_abort ();
 
       bidi_cache_iterator_state (bidi_it, 1);
       do {
@@ -2320,7 +2321,7 @@
   struct gcpro gcpro1;
 
   if (bidi_it->charpos < 0 || bidi_it->bytepos < 0)
-    abort ();
+    emacs_abort ();
 
   if (bidi_it->scan_dir == 0)
     {
@@ -2431,7 +2432,7 @@
            = bidi_at_paragraph_end (bidi_it->charpos + bidi_it->nchars,
                                     bidi_it->bytepos + bidi_it->ch_len);
          if (bidi_it->nchars <= 0)
-           abort ();
+           emacs_abort ();
          if (sep_len >= 0)
            {
              bidi_it->new_paragraph = 1;

=== modified file 'src/blockinput.h'
--- a/src/blockinput.h  2012-01-19 07:21:25 +0000
+++ b/src/blockinput.h  2012-09-04 17:34:54 +0000
@@ -89,7 +89,7 @@
            do_pending_atimers ();              \
        }                                       \
       else if (interrupt_input_blocked < 0)    \
-       abort ();                               \
+       emacs_abort ();                         \
     }                                          \
   while (0)
 
@@ -124,4 +124,3 @@
 extern void reinvoke_input_signal (void);
 
 #endif /* EMACS_BLOCKINPUT_H */
-

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2012-09-03 09:22:43 +0000
+++ b/src/buffer.c      2012-09-04 17:34:54 +0000
@@ -1242,7 +1242,7 @@
          result = Fdefault_value (variable);
        break;
       }
-    default: abort ();
+    default: emacs_abort ();
     }
 
   return result;
@@ -2671,7 +2671,7 @@
       /* Make sure no markers were put on the chain
         while the chain value was incorrect.  */
       if (BUF_MARKERS (current_buffer))
-       abort ();
+       emacs_abort ();
 
       BUF_MARKERS (current_buffer) = markers;
 
@@ -3413,7 +3413,7 @@
            }
        }
       if (p != overlay_str_buf + total)
-       abort ();
+       emacs_abort ();
       if (pstr)
        *pstr = overlay_str_buf;
       return total;
@@ -4596,7 +4596,7 @@
     case_Lisp_Int:    predicate = Qintegerp; break;
     case Lisp_String: predicate = Qstringp;  break;
     case Lisp_Symbol: predicate = Qsymbolp;  break;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   wrong_type_argument (predicate, newval);
@@ -5277,7 +5277,7 @@
 
   /* Need more room? */
   if (idx >= MAX_PER_BUFFER_VARS)
-    abort ();
+    emacs_abort ();
   last_per_buffer_idx = idx;
 
   Vbuffer_alist = Qnil;
@@ -5418,7 +5418,7 @@
   if (PER_BUFFER_IDX (offset) == 0)
     /* Did a DEFVAR_PER_BUFFER without initializing the corresponding
        slot of buffer_local_flags */
-    abort ();
+    emacs_abort ();
 }
 
 

=== modified file 'src/buffer.h'
--- a/src/buffer.h      2012-08-28 06:20:08 +0000
+++ b/src/buffer.h      2012-09-04 17:34:54 +0000
@@ -1149,7 +1149,7 @@
    We assume you know which buffer it's pointing into.  */
 
 #define OVERLAY_POSITION(P) \
- (MARKERP (P) ? marker_position (P) : (abort (), 0))
+ (MARKERP (P) ? marker_position (P) : (emacs_abort (), 0))
 
 
 /***********************************************************************
@@ -1189,7 +1189,7 @@
 
 #define PER_BUFFER_VALUE_P(B, IDX)             \
     (((IDX) < 0 || IDX >= last_per_buffer_idx) \
-     ? (abort (), 0)                           \
+     ? (emacs_abort (), 0)                     \
      : ((B)->local_flags[IDX] != 0))
 
 /* Set whether per-buffer variable with index IDX has a buffer-local
@@ -1198,7 +1198,7 @@
 #define SET_PER_BUFFER_VALUE_P(B, IDX, VAL)    \
      do {                                              \
        if ((IDX) < 0 || (IDX) >= last_per_buffer_idx)  \
-        abort ();                                      \
+        emacs_abort ();                                \
        (B)->local_flags[IDX] = (VAL);                  \
      } while (0)
 

=== modified file 'src/bytecode.c'
--- a/src/bytecode.c    2012-08-28 06:20:08 +0000
+++ b/src/bytecode.c    2012-09-04 17:34:54 +0000
@@ -435,7 +435,7 @@
 #ifdef BYTE_CODE_SAFE
 
 #define CHECK_RANGE(ARG) \
-  if (ARG >= bytestr_length) abort ()
+  if (ARG >= bytestr_length) emacs_abort ()
 
 #else /* not BYTE_CODE_SAFE */
 
@@ -508,7 +508,7 @@
    if (FRAME_X_P (f)
        && FRAME_FONT (f)->direction != 0
        && FRAME_FONT (f)->direction != 1)
-     abort ();
+     emacs_abort ();
  }
 #endif
 
@@ -600,9 +600,9 @@
     {
 #ifdef BYTE_CODE_SAFE
       if (top > stacke)
-       abort ();
+       emacs_abort ();
       else if (top < stack.bottom - 1)
-       abort ();
+       emacs_abort ();
 #endif
 
 #ifdef BYTE_CODE_METER
@@ -1875,7 +1875,7 @@
          /* Actually this is Bstack_ref with offset 0, but we use Bdup
             for that instead.  */
          /* CASE (Bstack_ref): */
-         abort ();
+         emacs_abort ();
 
          /* Handy byte-codes for lexical binding.  */
        CASE (Bstack_ref1):
@@ -1928,11 +1928,11 @@
 #ifdef BYTE_CODE_SAFE
          if (op < Bconstant)
            {
-             abort ();
+             emacs_abort ();
            }
          if ((op -= Bconstant) >= const_length)
            {
-             abort ();
+             emacs_abort ();
            }
          PUSH (vectorp[op]);
 #else
@@ -1951,7 +1951,7 @@
 #ifdef BYTE_CODE_SAFE
     error ("binding stack not balanced (serious byte compiler bug)");
 #else
-    abort ();
+    emacs_abort ();
 #endif
 
   return result;

=== modified file 'src/character.c'
--- a/src/character.c   2012-08-26 08:41:36 +0000
+++ b/src/character.c   2012-09-04 17:34:54 +0000
@@ -541,7 +541,7 @@
       int len = MULTIBYTE_LENGTH (ptr, endp);
 
       if (len == 0)
-       abort ();
+       emacs_abort ();
       ptr += len;
       chars++;
     }

=== modified file 'src/charset.c'
--- a/src/charset.c     2012-08-26 08:41:36 +0000
+++ b/src/charset.c     2012-09-04 17:34:54 +0000
@@ -636,7 +636,7 @@
   else
     {
       if (! CHARSET_UNIFIED_P (charset))
-       abort ();
+       emacs_abort ();
       map = CHARSET_UNIFY_MAP (charset);
     }
   if (STRINGP (map))
@@ -2025,10 +2025,10 @@
   c = XFASTINT (ch);
   charset = CHAR_CHARSET (c);
   if (! charset)
-    abort ();
+    emacs_abort ();
   code = ENCODE_CHAR (charset, c);
   if (code == CHARSET_INVALID_CODE (charset))
-    abort ();
+    emacs_abort ();
   dimension = CHARSET_DIMENSION (charset);
   for (val = Qnil; dimension > 0; dimension--)
     {

=== modified file 'src/cm.c'
--- a/src/cm.c  2012-01-19 07:21:25 +0000
+++ b/src/cm.c  2012-09-04 17:34:54 +0000
@@ -119,7 +119,7 @@
   if (curX (tty) == FrameCols (tty))
     {
       if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
-       abort ();
+       emacs_abort ();
       if (tty->termscript)
        putc ('\r', tty->termscript);
       putc ('\r', tty->output);

=== modified file 'src/coding.c'
--- a/src/coding.c      2012-08-28 05:49:02 +0000
+++ b/src/coding.c      2012-09-04 17:34:54 +0000
@@ -2051,7 +2051,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
       CODING_DECODE_CHAR (coding, src, src_base, src_end,
                          CHARSET_FROM_ID (charset_ID), code, c);
@@ -2345,7 +2345,7 @@
       int i;
 
       if (charbuf_end - charbuf < cmp_status->length)
-       abort ();
+       emacs_abort ();
       for (i = 0; i < cmp_status->length; i++)
        *charbuf++ = cmp_status->carryover[i];
       coding->annotated = 1;
@@ -2619,7 +2619,7 @@
                preferred_charset_id = -1;
              break;
            default:
-             abort ();
+             emacs_abort ();
            }
          charbuf += -c - 1;
          continue;
@@ -3482,7 +3482,7 @@
   if (cmp_status->state != COMPOSING_NO)
     {
       if (charbuf_end - charbuf < cmp_status->length)
-       abort ();
+       emacs_abort ();
       for (i = 0; i < cmp_status->length; i++)
        *charbuf++ = cmp_status->carryover[i];
       coding->annotated = 1;
@@ -3864,7 +3864,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
 
       if (cmp_status->state == COMPOSING_NO
@@ -4419,7 +4419,7 @@
                preferred_charset_id = -1;
              break;
            default:
-             abort ();
+             emacs_abort ();
            }
          charbuf += -c - 1;
          continue;
@@ -4933,7 +4933,7 @@
                }
            }
          if (code == CHARSET_INVALID_CODE (charset))
-           abort ();
+           emacs_abort ();
          if (charset == charset_kanji)
            {
              int c1, c2;
@@ -5023,7 +5023,7 @@
                }
            }
          if (code == CHARSET_INVALID_CODE (charset))
-           abort ();
+           emacs_abort ();
          if (charset == charset_big5)
            {
              int c1, c2;
@@ -7190,7 +7190,7 @@
                    *buf++ = XINT (XCAR (components));
                }
              else
-               abort ();
+               emacs_abort ();
              *head -= len;
            }
        }
@@ -9428,7 +9428,7 @@
             && changed[coding_priorities[j]])
        j++;
       if (j == coding_category_max)
-       abort ();
+       emacs_abort ();
       priorities[i] = coding_priorities[j];
     }
 

=== modified file 'src/conf_post.h'
--- a/src/conf_post.h   2012-08-20 16:48:10 +0000
+++ b/src/conf_post.h   2012-09-04 17:34:54 +0000
@@ -178,9 +178,6 @@
 #endif
 
 #include <string.h>
-/* If you think about removing the line below, note that the
-   MS-Windows build relies on it for declaration of 'environ' needed
-   by a few source files.  */
 #include <stdlib.h>
 
 #if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */

=== modified file 'src/data.c'
--- a/src/data.c        2012-08-27 17:23:48 +0000
+++ b/src/data.c        2012-09-04 17:34:54 +0000
@@ -108,7 +108,7 @@
      to try and do that by checking the tagbits, but nowadays all
      tagbits are potentially valid.  */
   /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit)
-   *   abort (); */
+   *   emacs_abort (); */
 
   xsignal2 (Qwrong_type_argument, predicate, value);
 }
@@ -182,7 +182,7 @@
        case Lisp_Misc_Float:
          return Qfloat;
        }
-      abort ();
+      emacs_abort ();
 
     case Lisp_Vectorlike:
       if (WINDOW_CONFIGURATIONP (object))
@@ -217,7 +217,7 @@
       return Qfloat;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 
@@ -551,7 +551,7 @@
       /* In set_internal, we un-forward vars when their value is
         set to Qunbound. */
       return Qt;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   return (EQ (valcontents, Qunbound) ? Qnil : Qt);
@@ -864,7 +864,7 @@
         don't think anything will break.  --lorentey  */
       return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset
                              + (char *)FRAME_KBOARD (SELECTED_FRAME ()));
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -950,7 +950,7 @@
       break;
 
     default:
-      abort (); /* goto def; */
+      emacs_abort (); /* goto def; */
     }
 }
 
@@ -1055,7 +1055,7 @@
       /* FALLTHROUGH */
     case SYMBOL_FORWARDED:
       return do_symval_forwarding (SYMBOL_FWD (sym));
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -1265,7 +1265,7 @@
          store_symval_forwarding (/* sym, */ innercontents, newval, buf);
        break;
       }
-    default: abort ();
+    default: emacs_abort ();
     }
   return;
 }
@@ -1316,7 +1316,7 @@
        /* For other variables, get the current value.  */
        return do_symval_forwarding (valcontents);
       }
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -1414,7 +1414,7 @@
        else
          return Fset (symbol, value);
       }
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -1538,7 +1538,7 @@
       else if (BUFFER_OBJFWDP (valcontents.fwd))
        return variable;
       break;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   if (sym->constant)
@@ -1611,7 +1611,7 @@
        error ("Symbol %s may not be buffer-local",
               SDATA (SYMBOL_NAME (variable)));
       break;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   if (sym->constant)
@@ -1718,7 +1718,7 @@
       if (blv->frame_local)
        return variable;
       break;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   /* Get rid of this buffer's alist element, if any.  */
@@ -1800,7 +1800,7 @@
        error ("Symbol %s may not be frame-local",
               SDATA (SYMBOL_NAME (variable)));
       break;
-    default: abort ();
+    default: emacs_abort ();
     }
 
   if (sym->constant)
@@ -1877,7 +1877,7 @@
          }
        return Qnil;
       }
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -1912,7 +1912,7 @@
     case SYMBOL_FORWARDED:
       /* All BUFFER_OBJFWD slots become local if they are set.  */
       return (BUFFER_OBJFWDP (SYMBOL_FWD (sym)) ? Qt : Qnil);
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -1956,7 +1956,7 @@
        return SYMBOL_BLV (sym)->where;
       else
        return Qnil;
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 
@@ -2272,7 +2272,7 @@
       return Qnil;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 

=== modified file 'src/dired.c'
--- a/src/dired.c       2012-08-28 00:33:56 +0000
+++ b/src/dired.c       2012-09-04 17:34:54 +0000
@@ -275,7 +275,7 @@
 
                  /* Some bug somewhere.  */
                  if (nchars > nbytes)
-                   abort ();
+                   emacs_abort ();
 
                  STRING_SET_CHARS (fullname, nchars);
                  if (nchars == nbytes)

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2012-09-01 06:38:52 +0000
+++ b/src/dispnew.c     2012-09-04 17:34:54 +0000
@@ -297,7 +297,7 @@
 void
 __executable_start (void)
 {
-  abort ();
+  emacs_abort ();
 }
 #endif
 
@@ -347,7 +347,7 @@
       /* Detect the case that more matrices are freed than were
         allocated.  */
       if (--glyph_matrix_count < 0)
-       abort ();
+       emacs_abort ();
 
       /* Free glyph memory if MATRIX owns it.  */
       if (matrix->pool == NULL)
@@ -2339,9 +2339,9 @@
 
   /* Check that nothing is left allocated.  */
   if (glyph_matrix_count)
-    abort ();
+    emacs_abort ();
   if (glyph_pool_count)
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -3024,7 +3024,7 @@
     {
       if (!glyph_row_slice_p (window_matrix->rows + i,
                              frame_matrix->rows + j))
-        abort ();
+        emacs_abort ();
       ++i, ++j;
     }
 }
@@ -3453,7 +3453,7 @@
       if (!last_seen_p && MATRIX_ROW_BOTTOM_Y (row) >= yb)
        last_seen_p = 1;
       else if (last_seen_p && row->enabled_p)
-       abort ();
+       emacs_abort ();
     }
 }
 
@@ -4809,7 +4809,7 @@
   struct glyph_matrix *desired_matrix = frame->desired_matrix;
 
   if (!current_matrix)
-    abort ();
+    emacs_abort ();
 
   /* Compute hash codes of all the lines.  Also calculate number of
      changed lines, number of unchanged lines at the beginning, and
@@ -5477,7 +5477,7 @@
   else if (part == ON_RIGHT_MARGIN)
     area = RIGHT_MARGIN_AREA;
   else
-    abort ();
+    emacs_abort ();
 
   for (i = 0; row->enabled_p && i < w->current_matrix->nrows; ++i, ++row)
     if (wy >= row->y && wy < MATRIX_ROW_BOTTOM_Y (row))
@@ -6277,7 +6277,7 @@
 
     /* Convert the initial frame to use the new display. */
     if (f->output_method != output_initial)
-      abort ();
+      emacs_abort ();
     f->output_method = t->type;
     f->terminal = t;
 

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2012-09-02 07:10:10 +0000
+++ b/src/editfns.c     2012-09-04 17:34:54 +0000
@@ -4263,7 +4263,7 @@
     }
 
   if (bufsize < p - buf)
-    abort ();
+    emacs_abort ();
 
   if (maybe_combine_byte)
     nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf);
@@ -4603,7 +4603,7 @@
                                     len1_byte, end2, start2_byte + len2_byte)
          || count_combining_after (BYTE_POS_ADDR (start1_byte),
                                    len1_byte, end2, start2_byte + len2_byte))
-       abort ();
+       emacs_abort ();
     }
   else
     {
@@ -4615,7 +4615,7 @@
                                    len2_byte, end1, start1_byte + len1_byte)
          || count_combining_after (BYTE_POS_ADDR (start1_byte),
                                    len1_byte, end2, start2_byte + len2_byte))
-       abort ();
+       emacs_abort ();
     }
 #endif
 

=== modified file 'src/emacs.c'
--- a/src/emacs.c       2012-09-02 17:10:35 +0000
+++ b/src/emacs.c       2012-09-04 17:34:54 +0000
@@ -340,22 +340,6 @@
   force_auto_save_soon ();
 }
 #endif
-
-/* We define abort, rather than using it from the library,
-   so that GDB can return from a breakpoint here.
-   MSDOS has its own definition in msdos.c.  */
-
-#if ! defined (DOS_NT) && ! defined (NO_ABORT)
-
-void
-abort (void)
-{
-  kill (getpid (), SIGABRT);
-  /* This shouldn't be executed, but it prevents a warning.  */
-  exit (1);
-}
-#endif
-
 
 /* Code for dealing with Lisp access to the Unix command line.  */
 
@@ -1892,7 +1876,7 @@
        }
 
       if (best < 0)
-       abort ();
+       emacs_abort ();
 
       /* Copy the highest priority remaining option, with its args, to NEW.
          Unless it is a duplicate of the previous one.  */

=== modified file 'src/eval.c'
--- a/src/eval.c        2012-09-02 17:10:35 +0000
+++ b/src/eval.c        2012-09-04 17:34:54 +0000
@@ -1493,7 +1493,7 @@
   immediate_quit = handling_signal = 0;
   abort_on_gc = 0;
   if (gc_in_progress || waiting_for_input)
-    abort ();
+    emacs_abort ();
 
 #if 0 /* rms: I don't know why this was here,
         but it is surely wrong for an error that is handled.  */
@@ -1590,7 +1590,7 @@
 xsignal (Lisp_Object error_symbol, Lisp_Object data)
 {
   Fsignal (error_symbol, data);
-  abort ();
+  emacs_abort ();
 }
 
 /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list.  */
@@ -2043,7 +2043,7 @@
   struct gcpro gcpro1, gcpro2, gcpro3;
 
   if (handling_signal)
-    abort ();
+    emacs_abort ();
 
   if (SYMBOLP (form))
     {
@@ -2207,7 +2207,7 @@
                 is supported by this code.  We need to either rewrite the
                 subr to use a different argument protocol, or add more
                 cases to this switch.  */
-             abort ();
+             emacs_abort ();
            }
        }
     }
@@ -2850,7 +2850,7 @@
              /* If a subr takes more than 8 arguments without using MANY
                 or UNEVALLED, we need to extend this function to support it.
                 Until this is done, there is no way to call the function.  */
-             abort ();
+             emacs_abort ();
            }
        }
     }
@@ -2981,7 +2981,7 @@
       lexenv = Qnil;
     }
   else
-    abort ();
+    emacs_abort ();
 
   i = optional = rest = 0;
   for (; CONSP (syms_left); syms_left = XCDR (syms_left))
@@ -3195,7 +3195,7 @@
        set_internal (symbol, value, Qnil, 1);
        break;
       }
-    default: abort ();
+    default: emacs_abort ();
     }
 }
 

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-08-28 06:20:08 +0000
+++ b/src/fileio.c      2012-09-04 17:34:54 +0000
@@ -1294,7 +1294,7 @@
     if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])))
 #endif /* WINDOWSNT */
       {
-       if (!drive) abort ();
+       if (!drive) emacs_abort ();
        target -= 2;
        target[0] = DRIVE_LETTER (drive);
        target[1] = ':';

=== modified file 'src/fns.c'
--- a/src/fns.c 2012-09-02 16:56:31 +0000
+++ b/src/fns.c 2012-09-04 17:34:54 +0000
@@ -2953,7 +2953,7 @@
                                    encoded, length, NILP (no_line_break),
                                    !NILP (BVAR (current_buffer, 
enable_multibyte_characters)));
   if (encoded_length > allength)
-    abort ();
+    emacs_abort ();
 
   if (encoded_length < 0)
     {
@@ -3009,7 +3009,7 @@
                                    encoded, length, NILP (no_line_break),
                                    STRING_MULTIBYTE (string));
   if (encoded_length > allength)
-    abort ();
+    emacs_abort ();
 
   if (encoded_length < 0)
     {
@@ -3154,7 +3154,7 @@
                                    decoded, length,
                                    multibyte, &inserted_chars);
   if (decoded_length > allength)
-    abort ();
+    emacs_abort ();
 
   if (decoded_length < 0)
     {
@@ -3204,7 +3204,7 @@
   decoded_length = base64_decode_1 (SSDATA (string), decoded, length,
                                    0, NULL);
   if (decoded_length > length)
-    abort ();
+    emacs_abort ();
   else if (decoded_length >= 0)
     decoded_string = make_unibyte_string (decoded, decoded_length);
   else
@@ -3960,7 +3960,7 @@
          else if (EQ (h->weak, Qkey_and_value))
            remove_p = !(key_known_to_survive_p && value_known_to_survive_p);
          else
-           abort ();
+           emacs_abort ();
 
          next = HASH_NEXT (h, i);
 
@@ -4256,7 +4256,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
   return hash;

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-09-01 06:38:52 +0000
+++ b/src/frame.c       2012-09-04 17:34:54 +0000
@@ -214,7 +214,7 @@
     case output_ns:
       return Qns;
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 
@@ -620,7 +620,7 @@
 #ifdef MSDOS
   if (sf->output_method != output_msdos_raw
       && sf->output_method != output_termcap)
-    abort ();
+    emacs_abort ();
 #else /* not MSDOS */
 
 #ifdef WINDOWSNT                           /* This should work now! */
@@ -767,7 +767,7 @@
          Lisp_Object focus;
 
          if (!FRAMEP (XCAR (tail)))
-           abort ();
+           emacs_abort ();
 
          focus = FRAME_FOCUS_FRAME (XFRAME (XCAR (tail)));
 
@@ -897,7 +897,7 @@
 
   /* There must always be at least one frame in Vframe_list.  */
   if (! CONSP (Vframe_list))
-    abort ();
+    emacs_abort ();
 
   /* If this frame is dead, it won't be in Vframe_list, and we'll loop
      forever.  Forestall that.  */
@@ -975,7 +975,7 @@
 
   /* There must always be at least one frame in Vframe_list.  */
   if (! CONSP (Vframe_list))
-    abort ();
+    emacs_abort ();
 
   prev = Qnil;
   for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
@@ -984,7 +984,7 @@
 
       f = XCAR (tail);
       if (!FRAMEP (f))
-       abort ();
+       emacs_abort ();
 
       if (EQ (frame, f) && !NILP (prev))
        return prev;
@@ -1385,7 +1385,7 @@
 
          this = XCAR (frames);
          if (!FRAMEP (this))
-           abort ();
+           emacs_abort ();
          f1 = XFRAME (this);
 
          if (kb == FRAME_KBOARD (f1))
@@ -1421,7 +1421,7 @@
 
          this = XCAR (frames);
          if (!FRAMEP (this))
-           abort ();
+           emacs_abort ();
          f1 = XFRAME (this);
 
          /* Consider only frames on the same kboard
@@ -1447,7 +1447,7 @@
             that is prohibited at the top; you can't delete surrogate
             minibuffer frames.  */
          if (NILP (frame_with_minibuf))
-           abort ();
+           emacs_abort ();
 
          kset_default_minibuffer_frame (kb, frame_with_minibuf);
        }
@@ -2108,7 +2108,7 @@
              swap_in_global_binding (sym);
            break;
          }
-       default: abort ();
+       default: emacs_abort ();
        }
     }
 
@@ -3835,7 +3835,7 @@
              }
 
            default:
-             abort ();
+             emacs_abort ();
            }
        }
       else

=== modified file 'src/frame.h'
--- a/src/frame.h       2012-09-02 10:53:46 +0000
+++ b/src/frame.h       2012-09-04 17:34:54 +0000
@@ -981,7 +981,7 @@
      ((FRAMEP (selected_frame)                         \
        && FRAME_LIVE_P (XFRAME (selected_frame)))      \
       ? XFRAME (selected_frame)                                \
-      : (abort (), (struct frame *) 0))
+      : (emacs_abort (), (struct frame *) 0))
 
 
 /***********************************************************************

=== modified file 'src/ftfont.c'
--- a/src/ftfont.c      2012-07-20 07:29:04 +0000
+++ b/src/ftfont.c      2012-09-04 17:34:54 +0000
@@ -1630,7 +1630,7 @@
            FT_Glyph_Metrics *m;
 
            if (FT_Load_Glyph (ft_face, g->code, FT_LOAD_DEFAULT) != 0)
-             abort ();
+             emacs_abort ();
            m = &ft_face->glyph->metrics;
            if (flt_font_ft->matrix)
              {

=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c     2012-09-03 08:13:33 +0000
+++ b/src/gtkutil.c     2012-09-04 17:34:54 +0000
@@ -254,7 +254,7 @@
 free_widget_value (widget_value *wv)
 {
   if (wv->free_list)
-    abort ();
+    emacs_abort ();
 
   if (malloc_cpt > 25)
     {
@@ -3519,7 +3519,7 @@
     }
 
   /* Should never end up here  */
-  abort ();
+  emacs_abort ();
 }
 
 /* Remove pointer at IDX from id_to_widget.
@@ -4087,7 +4087,7 @@
           else
             {
               fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n");
-              abort ();
+              emacs_abort ();
             }
         }
       else if (store_type == GTK_IMAGE_ICON_NAME)
@@ -4102,7 +4102,7 @@
       else
         {
           fprintf (stderr, "internal error: store_type is %d\n", store_type);
-          abort ();
+          emacs_abort ();
         }
     }
   if (wmenuimage)

=== modified file 'src/image.c'
--- a/src/image.c       2012-09-04 06:34:19 +0000
+++ b/src/image.c       2012-09-04 17:34:54 +0000
@@ -841,7 +841,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
          break;
        }
 

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-08-18 06:06:39 +0000
+++ b/src/indent.c      2012-09-04 17:34:54 +0000
@@ -122,7 +122,7 @@
   int i;
 
   if (widthtab->header.size != 256)
-    abort ();
+    emacs_abort ();
 
   for (i = 0; i < 256; i++)
     if (character_width (i, disptab)
@@ -144,7 +144,7 @@
     bset_width_table (buf, Fmake_vector (make_number (256), make_number (0)));
   widthtab = XVECTOR (BVAR (buf, width_table));
   if (widthtab->header.size != 256)
-    abort ();
+    emacs_abort ();
 
   for (i = 0; i < 256; i++)
     XSETFASTINT (widthtab->contents[i], character_width (i, disptab));

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2012-09-02 07:10:10 +0000
+++ b/src/insdel.c      2012-09-04 17:34:54 +0000
@@ -69,13 +69,13 @@
   for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
     {
       if (tail->buffer->text != current_buffer->text)
-       abort ();
+       emacs_abort ();
       if (tail->charpos > Z)
-       abort ();
+       emacs_abort ();
       if (tail->bytepos > Z_BYTE)
-       abort ();
+       emacs_abort ();
       if (multibyte && ! CHAR_HEAD_P (FETCH_BYTE (tail->bytepos)))
-       abort ();
+       emacs_abort ();
     }
 }
 
@@ -808,7 +808,7 @@
 #ifdef BYTE_COMBINING_DEBUG
   if (count_combining_before (string, nbytes, PT, PT_BYTE)
       || count_combining_after (string, nbytes, PT, PT_BYTE))
-    abort ();
+    emacs_abort ();
 #endif
 
   /* Record deletion of the surrounding text that combines with
@@ -943,7 +943,7 @@
      the text that has been stored by copy_text.  */
   if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)
       || count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE))
-    abort ();
+    emacs_abort ();
 #endif
 
   record_insert (PT, nchars);
@@ -1126,7 +1126,7 @@
      the text that has been stored by copy_text.  */
   if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)
       || count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE))
-    abort ();
+    emacs_abort ();
 #endif
 
   record_insert (PT, nchars);
@@ -1187,7 +1187,7 @@
 #ifdef BYTE_COMBINING_DEBUG
   if (count_combining_before (GPT_ADDR, len_byte, from, from_byte)
       || count_combining_after (GPT_ADDR, len_byte, from, from_byte))
-    abort ();
+    emacs_abort ();
 #endif
 
   if (STRINGP (prev_text))
@@ -1370,7 +1370,7 @@
      the text that has been stored by copy_text.  */
   if (count_combining_before (GPT_ADDR, outgoing_insbytes, from, from_byte)
       || count_combining_after (GPT_ADDR, outgoing_insbytes, from, from_byte))
-    abort ();
+    emacs_abort ();
 #endif
 
   if (! EQ (BVAR (current_buffer, undo_list), Qt))
@@ -1496,7 +1496,7 @@
      the text that has been stored by copy_text.  */
   if (count_combining_before (GPT_ADDR, insbytes, from, from_byte)
       || count_combining_after (GPT_ADDR, insbytes, from, from_byte))
-    abort ();
+    emacs_abort ();
 #endif
 
   GAP_SIZE -= insbytes;
@@ -1704,7 +1704,7 @@
 #ifdef BYTE_COMBINING_DEBUG
   if (count_combining_before (BUF_BYTE_ADDRESS (current_buffer, to_byte),
                              Z_BYTE - to_byte, from, from_byte))
-    abort ();
+    emacs_abort ();
 #endif
 
   if (ret_string || ! EQ (BVAR (current_buffer, undo_list), Qt))

=== modified file 'src/intervals.c'
--- a/src/intervals.c   2012-09-02 07:10:10 +0000
+++ b/src/intervals.c   2012-09-04 17:34:54 +0000
@@ -199,13 +199,13 @@
       i0_sym = XCAR (i0_cdr);
       i0_cdr = XCDR (i0_cdr);
       if (!CONSP (i0_cdr))
-       return 0;               /* abort (); */
+       return 0;
       i1_val = i1->plist;
       while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym))
        {
          i1_val = XCDR (i1_val);
          if (!CONSP (i1_val))
-           return 0;           /* abort (); */
+           return 0;
          i1_val = XCDR (i1_val);
        }
 
@@ -223,7 +223,7 @@
 
       i1_cdr = XCDR (i1_cdr);
       if (!CONSP (i1_cdr))
-       return 0;               /* abort (); */
+       return 0;
       i1_cdr = XCDR (i1_cdr);
     }
 
@@ -1253,7 +1253,7 @@
       else if (STRINGP (owner))
        set_string_intervals (owner, parent);
       else
-       abort ();
+       emacs_abort ();
 
       return;
     }
@@ -1408,7 +1408,7 @@
                                    start, length);
   else
     {
-      IF_LINT (if (length < - TYPE_MAXIMUM (ptrdiff_t)) abort ();)
+      lint_assume (- TYPE_MAXIMUM (ptrdiff_t) <= length);
       adjust_intervals_for_deletion (buffer, start, -length);
     }
 }
@@ -1468,7 +1468,7 @@
 
   /* This must be the rightmost or last interval and cannot
      be merged right.  The caller should have known.  */
-  abort ();
+  emacs_abort ();
 }
 
 /* Merge interval I with its lexicographic predecessor. The resulting
@@ -1524,7 +1524,7 @@
 
   /* This must be the leftmost or first interval and cannot
      be merged left.  The caller should have known.  */
-  abort ();
+  emacs_abort ();
 }
 
 /* Create a copy of SOURCE but with the default value of UP.  */
@@ -2170,7 +2170,7 @@
   else if (STRINGP (object))
     i = find_interval (string_intervals (object), pos);
   else
-    abort ();
+    emacs_abort ();
 
   if (!i || (i->position + LENGTH (i) <= pos))
     return 0;
@@ -2209,7 +2209,7 @@
 
   /* Perhaps we should just change `position' to the limit.  */
   if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer))
-    abort ();
+    emacs_abort ();
 
   /* Ignore narrowing, so that a local map continues to be valid even if
      the visible region contains no characters and hence no properties.  */

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2012-09-02 16:56:31 +0000
+++ b/src/keyboard.c    2012-09-04 17:34:54 +0000
@@ -1023,7 +1023,7 @@
       pop_kboard ();
       /* The pop should not change the kboard.  */
       if (single_kboard && current_kboard != prev)
-        abort ();
+        emacs_abort ();
     }
   return Qnil;
 }
@@ -2605,13 +2605,13 @@
            Lisp_Object last = KVAR (kb, kbd_queue);
            /* We shouldn't get here if we were in single-kboard mode!  */
            if (single_kboard)
-             abort ();
+             emacs_abort ();
            if (CONSP (last))
              {
                while (CONSP (XCDR (last)))
                  last = XCDR (last);
                if (!NILP (XCDR (last)))
-                 abort ();
+                 emacs_abort ();
              }
            if (!CONSP (last))
              kset_kbd_queue (kb, Fcons (c, Qnil));
@@ -2784,7 +2784,7 @@
       if (current_kboard->kbd_queue_has_data)
        {
          if (!CONSP (KVAR (current_kboard, kbd_queue)))
-           abort ();
+           emacs_abort ();
          c = XCAR (KVAR (current_kboard, kbd_queue));
          kset_kbd_queue (current_kboard,
                          XCDR (KVAR (current_kboard, kbd_queue)));
@@ -2851,7 +2851,7 @@
              while (CONSP (XCDR (last)))
                last = XCDR (last);
              if (!NILP (XCDR (last)))
-               abort ();
+               emacs_abort ();
            }
          if (!CONSP (last))
            kset_kbd_queue (kb, Fcons (c, Qnil));
@@ -3560,7 +3560,7 @@
                             struct input_event *hold_quit)
 {
   if (event->kind == NO_EVENT)
-    abort ();
+    emacs_abort ();
 
   if (hold_quit && hold_quit->kind != NO_EVENT)
     return;
@@ -3955,7 +3955,7 @@
 #else
          /* We're getting selection request events, but we don't have
              a window system.  */
-         abort ();
+         emacs_abort ();
 #endif
        }
 
@@ -4192,7 +4192,7 @@
   else
     /* We were promised by the above while loop that there was
        something for us to read!  */
-    abort ();
+    emacs_abort ();
 
   input_pending = readable_events (0);
 
@@ -4261,7 +4261,7 @@
 #else
          /* We're getting selection request events, but we don't have
              a window system.  */
-         abort ();
+         emacs_abort ();
 #endif
        }
     }
@@ -5614,7 +5614,7 @@
          else if (FRAMEP (event->frame_or_window))
            f = XFRAME (event->frame_or_window);
          else
-           abort ();
+           emacs_abort ();
 
          if (FRAME_WINDOW_P (f))
            fuzz = double_click_fuzz;
@@ -5721,7 +5721,7 @@
        else
          /* Every mouse event should either have the down_modifier or
              the up_modifier set.  */
-         abort ();
+         emacs_abort ();
 
        {
          /* Get the symbol we should use for the mouse click.  */
@@ -5782,7 +5782,7 @@
          else if (FRAMEP (event->frame_or_window))
            fr = XFRAME (event->frame_or_window);
          else
-           abort ();
+           emacs_abort ();
 
          fuzz = FRAME_WINDOW_P (fr)
            ? double_click_fuzz : double_click_fuzz / 8;
@@ -5802,7 +5802,7 @@
          else
            /* Every wheel event should either have the down_modifier or
               the up_modifier set.  */
-           abort ();
+           emacs_abort ();
 
           if (event->kind == HORIZ_WHEEL_EVENT)
             symbol_num += 2;
@@ -5971,7 +5971,7 @@
       {
        char *name = find_user_signal_name (event->code);
        if (!name)
-         abort ();
+         emacs_abort ();
        return intern (name);
       }
 
@@ -6052,7 +6052,7 @@
 
       /* The 'kind' field of the event is something we don't recognize.  */
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 
@@ -6229,7 +6229,7 @@
     /* Only the event queue may use the `up' modifier; it should always
        be turned into a click or drag event before presented to lisp code.  */
     if (modifiers & up_modifier)
-      abort ();
+      emacs_abort ();
 
     if (modifiers & alt_modifier)   { *p++ = 'A'; *p++ = '-'; }
     if (modifiers & ctrl_modifier)  { *p++ = 'C'; *p++ = '-'; }
@@ -6324,7 +6324,7 @@
                            Qnil);
 
       if (modifiers & ~INTMASK)
-       abort ();
+       emacs_abort ();
       XSETFASTINT (mask, modifiers);
       elements = Fcons (unmodified, Fcons (mask, Qnil));
 
@@ -7001,7 +7001,7 @@
 
   if (terminal->type != output_termcap
       && terminal->type != output_msdos_raw)
-    abort ();
+    emacs_abort ();
 
   /* XXX I think the following code should be moved to separate hook
      functions in system-dependent files.  */
@@ -10902,7 +10902,7 @@
 #endif /* not MSDOS */
       fflush (stdout);
       if (((c = getchar ()) & ~040) == 'Y')
-       abort ();
+       emacs_abort ();
       while (c != '\n') c = getchar ();
 #ifdef MSDOS
       printf ("\r\nContinuing...\r\n");
@@ -10983,7 +10983,7 @@
 #ifdef POLL_FOR_INPUT
   /* May be > 1 if in recursive minibuffer.  */
   if (poll_suppress_count == 0)
-    abort ();
+    emacs_abort ();
 #endif
 #endif
   if (FRAMEP (internal_last_event_frame)
@@ -11341,7 +11341,7 @@
 
   for (kbp = &all_kboards; *kbp != kb; kbp = &(*kbp)->next_kboard)
     if (*kbp == NULL)
-      abort ();
+      emacs_abort ();
   *kbp = kb->next_kboard;
 
   /* Prevent a dangling reference to KB.  */
@@ -11352,7 +11352,7 @@
       current_kboard = FRAME_KBOARD (XFRAME (selected_frame));
       single_kboard = 0;
       if (current_kboard == kb)
-       abort ();
+       emacs_abort ();
     }
 
   wipe_kboard (kb);

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-09-02 03:50:29 +0000
+++ b/src/keymap.c      2012-09-04 17:34:54 +0000
@@ -2923,7 +2923,7 @@
          char *title, *p;
 
          if (!SYMBOLP (modes[i]))
-           abort ();
+           emacs_abort ();
 
          p = title = alloca (42 + SCHARS (SYMBOL_NAME (modes[i])));
          *p++ = '\f';

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-09-02 17:10:35 +0000
+++ b/src/lisp.h        2012-09-04 17:34:54 +0000
@@ -2288,7 +2288,7 @@
 
 #define UNGCPRO                                        \
  ((--gcpro_level != gcpro1.level)              \
-  ? (abort (), 0)                              \
+  ? (emacs_abort (), 0)                                \
   : ((gcprolist = gcpro1.next), 0))
 
 #endif /* DEBUG_GCPRO */
@@ -3412,6 +3412,7 @@
 extern EMACS_INT get_random (void);
 extern void seed_random (void *, ptrdiff_t);
 extern void init_random (void);
+extern _Noreturn void emacs_abort (void) NO_INLINE;
 extern int emacs_open (const char *, int, int);
 extern int emacs_close (int);
 extern ptrdiff_t emacs_read (int, char *, ptrdiff_t);

=== modified file 'src/lread.c'
--- a/src/lread.c       2012-09-02 16:56:31 +0000
+++ b/src/lread.c       2012-09-04 17:34:54 +0000
@@ -1694,7 +1694,7 @@
 
   /* We assume START is nil when input is not from a buffer.  */
   if (! NILP (start) && !b)
-    abort ();
+    emacs_abort ();
 
   specbind (Qstandard_input, readcharfun); /* GCPROs readcharfun.  */
   specbind (Qcurrent_load_list, Qnil);
@@ -3671,7 +3671,7 @@
     /* Creating a non-pure string from a string literal not
        implemented yet.  We could just use make_string here and live
        with the extra copy.  */
-    abort ();
+    emacs_abort ();
 
   return Fintern (make_pure_c_string (str, len), obarray);
 }

=== modified file 'src/marker.c'
--- a/src/marker.c      2012-07-29 11:20:43 +0000
+++ b/src/marker.c      2012-09-04 17:34:54 +0000
@@ -59,7 +59,7 @@
                                      bytepos - BUF_BEG_BYTE (b));
 
   if (charpos - 1 != nchars)
-    abort ();
+    emacs_abort ();
 }
 
 #else /* not MARKER_DEBUG */
@@ -67,7 +67,7 @@
 #define byte_char_debug_check(b, charpos, bytepos) do { } while (0)
 
 #endif /* MARKER_DEBUG */
- 
+
 void
 clear_charpos_cache (struct buffer *b)
 {
@@ -142,7 +142,7 @@
   ptrdiff_t best_below, best_below_byte;
 
   if (charpos < BUF_BEG (b) || charpos > BUF_Z (b))
-    abort ();
+    emacs_abort ();
 
   best_above = BUF_Z (b);
   best_above_byte = BUF_Z_BYTE (b);
@@ -296,7 +296,7 @@
   ptrdiff_t best_below, best_below_byte;
 
   if (bytepos < BUF_BEG_BYTE (b) || bytepos > BUF_Z_BYTE (b))
-    abort ();
+    emacs_abort ();
 
   best_above = BUF_Z (b);
   best_above_byte = BUF_Z_BYTE (b);
@@ -506,7 +506,7 @@
   else
     {
       register ptrdiff_t charpos, bytepos;
-    
+
       CHECK_NUMBER_COERCE_MARKER (position);
       charpos = clip_to_bounds (restricted ? BUF_BEGV (b) : BUF_BEG (b),
                                XINT (position),
@@ -570,8 +570,8 @@
 
   if (b)
     {
-      attach_marker 
-       (m, b, 
+      attach_marker
+       (m, b,
         clip_to_bounds (BUF_BEGV (b), charpos, BUF_ZV (b)),
         clip_to_bounds (BUF_BEGV_BYTE (b), bytepos, BUF_ZV_BYTE (b)));
     }
@@ -605,12 +605,12 @@
          {
            if (*prev == BUF_MARKERS (b))
              {
-               /* Deleting first marker from the buffer's chain.  Crash 
+               /* Deleting first marker from the buffer's chain.  Crash
                   if new first marker in chain does not say it belongs
                   to the same buffer, or at least that they have the same
                   base buffer.  */
                if (tail->next && b->text != tail->next->buffer->text)
-                 abort ();
+                 emacs_abort ();
              }
            *prev = tail->next;
            /* We have removed the marker from the chain;

=== modified file 'src/menu.c'
--- a/src/menu.c        2012-09-01 06:38:52 +0000
+++ b/src/menu.c        2012-09-04 17:34:54 +0000
@@ -733,7 +733,7 @@
 
          /* All items should be contained in panes.  */
          if (panes_seen == 0)
-           abort ();
+           emacs_abort ();
 
          item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
          enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
@@ -807,7 +807,7 @@
          else if (EQ (type, QCtoggle))
            wv->button_type = BUTTON_TYPE_TOGGLE;
          else
-           abort ();
+           emacs_abort ();
 
          wv->selected = !NILP (selected);
          if (! STRINGP (help))

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2012-09-02 16:56:31 +0000
+++ b/src/minibuf.c     2012-09-04 17:34:54 +0000
@@ -110,7 +110,7 @@
       /* I don't think that any frames may validly have a null minibuffer
         window anymore.  */
       if (NILP (sf->minibuffer_window))
-       abort ();
+       emacs_abort ();
 
       /* Under X, we come here with minibuf_window being the
         minibuffer window of the unused termcap window created in

=== modified file 'src/msdos.c'
--- a/src/msdos.c       2012-09-02 17:10:35 +0000
+++ b/src/msdos.c       2012-09-04 17:34:54 +0000
@@ -796,7 +796,7 @@
       /* The default face for the frame should always be realized and
         cached.  */
       if (!fp)
-       abort ();
+       emacs_abort ();
     }
   screen_face = face;
   fg = fp->foreground;
@@ -1393,7 +1393,7 @@
 static void
 IT_delete_glyphs (struct frame *f, int n)
 {
-  abort ();
+  emacs_abort ();
 }
 
 /* set-window-configuration on window.c needs this.  */
@@ -3013,7 +3013,7 @@
   const char *p;
 
   if (!enable)
-    abort ();
+    emacs_abort ();
 
   IT_menu_make_room (menu);
   menu->submenu[menu->count] = IT_menu_create ();
@@ -4119,7 +4119,7 @@
     FD_ZERO (efds);
 
   if (nfds != 1)
-    abort ();
+    emacs_abort ();
 
   /* If we are looking only for the terminal, with no timeout,
      just read it and wait -- that's more efficient.  */
@@ -4214,26 +4214,8 @@
 }
 #endif
 
-#ifdef abort
-#undef abort
-void
-dos_abort (char *file, int line)
-{
-  char buffer1[200], buffer2[400];
-  int i, j;
-
-  sprintf (buffer1, "<EMACS FATAL ERROR IN %s LINE %d>", file, line);
-  for (i = j = 0; buffer1[i]; i++) {
-    buffer2[j++] = buffer1[i];
-    buffer2[j++] = 0x70;
-  }
-  dosmemput (buffer2, j, (int)ScreenPrimary);
-  ScreenSetCursor (2, 0);
-  abort ();
-}
-#else
-void
-abort (void)
+void
+emacs_abort (void)
 {
   dos_ttcooked ();
   ScreenSetCursor (10, 0);
@@ -4249,7 +4231,6 @@
 #endif /* __DJGPP_MINOR__ >= 2 */
   exit (2);
 }
-#endif
 
 void
 syms_of_msdos (void)

=== modified file 'src/nsfont.m'
--- a/src/nsfont.m      2012-08-19 00:53:29 +0000
+++ b/src/nsfont.m      2012-09-04 17:34:54 +0000
@@ -1330,7 +1330,7 @@
 
   font_info->glyphs[block] = xmalloc (0x100 * sizeof (unsigned short));
   if (!unichars || !(font_info->glyphs[block]))
-    abort ();
+    emacs_abort ();
 
   /* create a string containing all Unicode characters in this block */
   for (idx = block<<8, i = 0; i < 0x100; idx++, i++)
@@ -1405,7 +1405,7 @@
 
   font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics));
   if (!(font_info->metrics[block]))
-    abort ();
+    emacs_abort ();
 
   metrics = font_info->metrics[block];
   for (g = block<<8, i =0; i<0x100 && g < numGlyphs; g++, i++, metrics++)

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2012-08-28 16:05:17 +0000
+++ b/src/nsmenu.m      2012-09-04 17:34:54 +0000
@@ -948,7 +948,7 @@
          else if (EQ (type, QCradio))
            wv->button_type = BUTTON_TYPE_RADIO;
          else
-           abort ();
+           emacs_abort ();
 
          wv->selected = !NILP (selected);
 

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-08-28 16:01:59 +0000
+++ b/src/nsterm.m      2012-09-04 17:34:54 +0000
@@ -3340,7 +3340,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
   /* Draw box if not done already. */
@@ -3475,7 +3475,7 @@
 
       if (++apploopnr != 1)
         {
-          abort ();
+          emacs_abort ();
         }
       [NSApp run];
       --apploopnr;
@@ -3515,7 +3515,7 @@
   [outerpool release];
   outerpool = [[NSAutoreleasePool alloc] init];
 
-  
+
   send_appdefined = YES;
   if (nr > 0)
     {
@@ -3568,7 +3568,7 @@
   emacs_event = &event;
   if (++apploopnr != 1)
     {
-      abort();
+      emacs_abort ();
     }
   [NSApp run];
   --apploopnr;
@@ -3586,7 +3586,7 @@
     {
       int t;
       if ([ev type] != NSApplicationDefined)
-        abort ();
+        emacs_abort ();
 
       t = [ev data1];
       last_appdefined_event = 0;
@@ -4053,7 +4053,7 @@
             {
               fprintf (stderr, "Failed to create pipe: %s\n",
                        emacs_strerror (errno));
-              abort ();
+              emacs_abort ();
             }
 
           fcntl (selfds[0], F_SETFL, O_NONBLOCK|fcntl (selfds[0], F_GETFL));
@@ -4273,7 +4273,7 @@
     }
   else // force a stack trace to happen
     {
-      abort();
+      emacs_abort ();
     }
 }
 
@@ -4534,10 +4534,10 @@
   /* Don't open files from the command line unconditionally,
      Cocoa parses the command line wrong, --option value tries to open value
      if --option is the last option.  */
-  while ((file = [files nextObject]) != nil) 
+  while ((file = [files nextObject]) != nil)
     if (ns_do_open_file || not_in_argv (file))
       [ns_pending_files addObject: file];
-  
+
   [self replyToOpenOrPrint: NSApplicationDelegateReplySuccess];
 
 }
@@ -4604,7 +4604,7 @@
 
   /* NSTRACE (fd_handler); */
 
-  for (;;) 
+  for (;;)
     {
       [pool release];
       pool = [[NSAutoreleasePool alloc] init];
@@ -4889,7 +4889,7 @@
       is_right_key = (flags & NSRightCommandKeyMask) == NSRightCommandKeyMask;
       is_left_key = (flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask
         || (! is_right_key && (flags & NSCommandKeyMask) == NSCommandKeyMask);
-      
+
       if (is_right_key)
         emacs_event->modifiers |= parse_solitary_modifier
           (EQ (ns_right_command_modifier, Qleft)
@@ -5853,7 +5853,7 @@
   NSTRACE (menuDown);
   if (context_menu_value == -1)
     context_menu_value = [sender tag];
-  else 
+  else
     {
       NSInteger tag = [sender tag];
       find_and_call_menu_selection (emacsframe, 
emacsframe->menu_bar_items_used,
@@ -6180,7 +6180,7 @@
   Lisp_Object str = Qnil;
   struct frame *f = SELECTED_FRAME ();
   struct buffer *curbuf = XBUFFER (XWINDOW (f->selected_window)->buffer);
- 
+
   if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
     return NSAccessibilityTextFieldRole;
 
@@ -6193,13 +6193,13 @@
     {
       if (! NILP (BVAR (curbuf, mark_active)))
           str = ns_get_local_selection (QPRIMARY, QUTF8_STRING);
-      
+
       if (NILP (str))
         {
           ptrdiff_t start_byte = BUF_BEGV_BYTE (curbuf);
           ptrdiff_t byte_range = BUF_ZV_BYTE (curbuf) - start_byte;
           ptrdiff_t range = BUF_ZV (curbuf) - BUF_BEGV (curbuf);
-          
+
           if (! NILP (BVAR (curbuf, enable_multibyte_characters)))
             str = make_uninit_multibyte_string (range, byte_range);
           else
@@ -6209,9 +6209,9 @@
           memcpy (SDATA (str), BYTE_POS_ADDR (start_byte), byte_range);
         }
     }
-  
-  
-  if (! NILP (str)) 
+
+
+  if (! NILP (str))
     {
       if (CONSP (str) && SYMBOLP (XCAR (str)))
         {
@@ -6226,7 +6226,7 @@
           return nsStr;
         }
     }
-  
+
   return [super accessibilityAttributeValue:attribute];
 }
 #endif /* NS_IMPL_COCOA */

=== modified file 'src/print.c'
--- a/src/print.c       2012-08-28 06:20:08 +0000
+++ b/src/print.c       2012-09-04 17:34:54 +0000
@@ -2060,7 +2060,7 @@
       {
        int len;
        /* We're in trouble if this happens!
-          Probably should just abort () */
+          Probably should just emacs_abort ().  */
        strout ("#<EMACS BUG: INVALID DATATYPE ", -1, -1, printcharfun);
        if (MISCP (obj))
          len = sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj));

=== modified file 'src/process.c'
--- a/src/process.c     2012-09-04 06:34:19 +0000
+++ b/src/process.c     2012-09-04 17:34:54 +0000
@@ -1577,7 +1577,7 @@
 start_process_unwind (Lisp_Object proc)
 {
   if (!PROCESSP (proc))
-    abort ();
+    emacs_abort ();
 
   /* Was PROC started successfully?
      -2 is used for a pty with no process, eg for gdb.  */
@@ -2550,7 +2550,7 @@
 make_serial_process_unwind (Lisp_Object proc)
 {
   if (!PROCESSP (proc))
-    abort ();
+    emacs_abort ();
   remove_process (proc);
   return Qnil;
 }
@@ -3387,7 +3387,7 @@
       if (socktype == SOCK_DGRAM)
        {
          if (datagram_address[s].sa)
-           abort ();
+           emacs_abort ();
          datagram_address[s].sa = xmalloc (lres->ai_addrlen);
          datagram_address[s].len = lres->ai_addrlen;
          if (is_server)
@@ -3973,7 +3973,7 @@
          FD_CLR (inchannel, &connect_wait_mask);
          FD_CLR (inchannel, &write_mask);
          if (--num_pending_connects < 0)
-           abort ();
+           emacs_abort ();
        }
 #endif
       if (inchannel == max_process_desc)
@@ -4752,7 +4752,7 @@
                 Cleanup occurs c/o status_notify after SIGCLD. */
              no_avail = 1; /* Cannot depend on values returned */
 #else
-             abort ();
+             emacs_abort ();
 #endif
            }
          else
@@ -4993,7 +4993,7 @@
              FD_CLR (channel, &connect_wait_mask);
               FD_CLR (channel, &write_mask);
              if (--num_pending_connects < 0)
-               abort ();
+               emacs_abort ();
 
              proc = chan_process[channel];
              if (NILP (proc))
@@ -6354,7 +6354,7 @@
 #endif /* not HAVE_SHUTDOWN */
       new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0);
       if (new_outfd < 0)
-       abort ();
+       emacs_abort ();
       old_outfd = XPROCESS (proc)->outfd;
 
       if (!proc_encode_coding_system[new_outfd])

=== modified file 'src/ralloc.c'
--- a/src/ralloc.c      2012-08-28 16:01:59 +0000
+++ b/src/ralloc.c      2012-09-04 17:34:54 +0000
@@ -237,7 +237,7 @@
     }
 
   if (! heap)
-    abort ();
+    emacs_abort ();
 
   /* If we can't fit SIZE bytes in that heap,
      try successive later heaps.  */
@@ -330,7 +330,7 @@
          /* This heap should have no blocs in it.  */
          if (last_heap->first_bloc != NIL_BLOC
              || last_heap->last_bloc != NIL_BLOC)
-           abort ();
+           emacs_abort ();
 
          /* Return the last heap, with its header, to the system.  */
          excess = (char *)last_heap->end - (char *)last_heap->start;
@@ -355,7 +355,7 @@
              which returns the entire last heap to the system, seems
              unlikely to trigger this mode of failure.  */
          if (last_heap->end != (*real_morecore) (0))
-           abort ();
+           emacs_abort ();
        }
     }
 }
@@ -452,7 +452,7 @@
 
   /* No need to ever call this if arena is frozen, bug somewhere!  */
   if (r_alloc_freeze_level)
-    abort ();
+    emacs_abort ();
 
   while (b)
     {
@@ -576,7 +576,7 @@
 
   /* No need to ever call this if arena is frozen, bug somewhere!  */
   if (r_alloc_freeze_level)
-    abort ();
+    emacs_abort ();
 
   if (bloc == NIL_BLOC || size == bloc->size)
     return 1;
@@ -588,7 +588,7 @@
     }
 
   if (heap == NIL_HEAP)
-    abort ();
+    emacs_abort ();
 
   old_size = bloc->size;
   bloc->size = size;
@@ -937,7 +937,7 @@
 
   dead_bloc = find_bloc (ptr);
   if (dead_bloc == NIL_BLOC)
-    abort (); /* Double free? PTR not originally used to allocate?  */
+    emacs_abort (); /* Double free? PTR not originally used to allocate?  */
 
   free_bloc (dead_bloc);
   *ptr = 0;
@@ -979,7 +979,7 @@
 
   bloc = find_bloc (ptr);
   if (bloc == NIL_BLOC)
-    abort (); /* Already freed? PTR not originally used to allocate?  */
+    emacs_abort (); /* Already freed? PTR not originally used to allocate?  */
 
   if (size < bloc->size)
     {
@@ -1152,7 +1152,7 @@
     }
 
   if (bloc == NIL_BLOC || bloc->variable != old)
-    abort (); /* Already freed? OLD not originally used to allocate?  */
+    emacs_abort (); /* Already freed? OLD not originally used to allocate?  */
 
   /* Update variable to point to the new location.  */
   bloc->variable = new;
@@ -1193,7 +1193,7 @@
   first_heap->start = first_heap->bloc_start
     = virtual_break_value = break_value = (*real_morecore) (0);
   if (break_value == NIL)
-    abort ();
+    emacs_abort ();
 
   extra_bytes = ROUNDUP (50000);
 #endif

=== modified file 'src/region-cache.c'
--- a/src/region-cache.c        2012-08-15 16:21:41 +0000
+++ b/src/region-cache.c        2012-09-04 17:34:54 +0000
@@ -194,7 +194,7 @@
   if (BOUNDARY_POS (c, low) > pos
       || (low + 1 < c->cache_len
           && BOUNDARY_POS (c, low + 1) <= pos))
-      abort ();
+      emacs_abort ();
 
   return low;
 }
@@ -217,12 +217,12 @@
 
   if (pos < 0
       || pos > c->cache_len)
-    abort ();
+    emacs_abort ();
 
   /* We mustn't ever try to put the gap before the dummy start
      boundary.  That must always be start-relative.  */
   if (pos == 0)
-    abort ();
+    emacs_abort ();
 
   /* Need we move the gap right?  */
   while (gap_start < pos)
@@ -291,24 +291,24 @@
 {
   /* i must be a valid cache index.  */
   if (i < 0 || i > c->cache_len)
-    abort ();
+    emacs_abort ();
 
   /* We must never want to insert something before the dummy first
      boundary.  */
   if (i == 0)
-    abort ();
+    emacs_abort ();
 
   /* We must only be inserting things in order.  */
   if (! (BOUNDARY_POS (c, i - 1) < pos
          && (i == c->cache_len
              || pos < BOUNDARY_POS (c, i))))
-    abort ();
+    emacs_abort ();
 
   /* The value must be different from the ones around it.  However, we
      temporarily create boundaries that establish the same value as
      the subsequent boundary, so we're not going to flag that case.  */
   if (BOUNDARY_VALUE (c, i - 1) == value)
-    abort ();
+    emacs_abort ();
 
   move_cache_gap (c, i, 1);
 
@@ -331,16 +331,16 @@
   /* Gotta be in range.  */
   if (start < 0
       || end > c->cache_len)
-    abort ();
+    emacs_abort ();
 
   /* Gotta be in order.  */
   if (start > end)
-    abort ();
+    emacs_abort ();
 
   /* Can't delete the dummy entry.  */
   if (start == 0
       && end >= 1)
-    abort ();
+    emacs_abort ();
 
   /* Minimize gap motion.  If we're deleting nothing, do nothing.  */
   if (len == 0)
@@ -380,10 +380,10 @@
                  ptrdiff_t start, ptrdiff_t end, int value)
 {
   if (start > end)
-    abort ();
+    emacs_abort ();
   if (start < c->buffer_beg
       || end   > c->buffer_end)
-    abort ();
+    emacs_abort ();
 
   /* Eliminate this case; then we can assume that start and end-1 are
      both the locations of real characters in the buffer.  */

=== modified file 'src/scroll.c'
--- a/src/scroll.c      2012-07-05 18:35:48 +0000
+++ b/src/scroll.c      2012-09-04 17:34:54 +0000
@@ -195,13 +195,13 @@
          {
            cost = p1->writecost + first_insert_cost[i];
            if ((int) p1->insertcount > i)
-             abort ();
+             emacs_abort ();
            cost1 = p1->insertcost + next_insert_cost[i - p1->insertcount];
          }
        p->insertcost = min (cost, cost1) + draw_cost[i] + extra_cost;
        p->insertcount = (cost < cost1) ? 1 : p1->insertcount + 1;
        if ((int) p->insertcount > i)
-         abort ();
+         emacs_abort ();
 
        /* Calculate the cost if we do a delete line after
           outputting this line.

=== modified file 'src/search.c'
--- a/src/search.c      2012-08-17 17:08:30 +0000
+++ b/src/search.c      2012-09-04 17:34:54 +0000
@@ -1009,7 +1009,7 @@
       if (!EQ (noerror, Qt))
        {
          if (lim < BEGV || lim > ZV)
-           abort ();
+           emacs_abort ();
          SET_PT_BOTH (lim, lim_byte);
          return Qnil;
 #if 0 /* This would be clean, but maybe programs depend on
@@ -1022,7 +1022,7 @@
     }
 
   if (np < BEGV || np > ZV)
-    abort ();
+    emacs_abort ();
 
   SET_PT (np);
 
@@ -2770,7 +2770,7 @@
            }
          else
            /* last_thing_searched must always be Qt, a buffer, or Qnil.  */
-           abort ();
+           emacs_abort ();
 
          len = 2 * i + 2;
        }

=== modified file 'src/sound.c'
--- a/src/sound.c       2012-07-29 08:18:29 +0000
+++ b/src/sound.c       2012-09-04 17:34:54 +0000
@@ -843,7 +843,7 @@
        }
     }
   else
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -1138,7 +1138,7 @@
        }
     }
   else
-    abort ();
+    emacs_abort ();
 }
 
 

=== modified file 'src/sysdep.c'
--- a/src/sysdep.c      2012-09-01 01:13:50 +0000
+++ b/src/sysdep.c      2012-09-04 17:34:54 +0000
@@ -1856,6 +1856,15 @@
 }
 #endif
 
+#ifndef HAVE_NTGUI
+/* Using emacs_abort lets GDB return from a breakpoint here.  */
+void
+emacs_abort (void)
+{
+  abort ();
+}
+#endif
+
 int
 emacs_open (const char *path, int oflag, int mode)
 {

=== modified file 'src/term.c'
--- a/src/term.c        2012-08-31 10:53:19 +0000
+++ b/src/term.c        2012-09-04 17:34:54 +0000
@@ -1498,7 +1498,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       else
@@ -1695,7 +1695,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       else
@@ -1780,7 +1780,7 @@
     {
       glyph->resolved_level = it->bidi_it.resolved_level;
       if ((it->bidi_it.type & 7) != it->bidi_it.type)
-       abort ();
+       emacs_abort ();
       glyph->bidi_type = it->bidi_it.type;
     }
   else
@@ -2250,7 +2250,7 @@
   struct terminal *t;
 
   if (!name)
-    abort ();
+    emacs_abort ();
 
   for (t = terminal_list; t; t = t->next_terminal)
     {
@@ -2798,7 +2798,7 @@
   struct tty_output *t = xzalloc (sizeof *t);
 
   if (! FRAME_TERMCAP_P (f))
-    abort ();
+    emacs_abort ();
 
   t->display_info = FRAME_TERMINAL (f)->display_info.tty;
 
@@ -2811,7 +2811,7 @@
 tty_free_frame_resources (struct frame *f)
 {
   if (! FRAME_TERMCAP_P (f))
-    abort ();
+    emacs_abort ();
 
   if (FRAME_FACE_CACHE (f))
     free_frame_faces (f);
@@ -2827,7 +2827,7 @@
 tty_free_frame_resources (struct frame *f)
 {
   if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f))
-    abort ();
+    emacs_abort ();
 
   if (FRAME_FACE_CACHE (f))
     free_frame_faces (f);
@@ -3108,7 +3108,7 @@
 
 #ifndef TERMINFO
   if (strlen (tty->termcap_term_buffer) >= buffer_size)
-    abort ();
+    emacs_abort ();
   buffer_size = strlen (tty->termcap_term_buffer);
 #endif
   tty->termcap_strings_buffer = area = xmalloc (buffer_size);
@@ -3467,7 +3467,7 @@
     verror (str1, ap);
 
   va_end (ap);
-  abort ();
+  emacs_abort ();
 }
 
 void
@@ -3494,7 +3494,7 @@
     return;
 
   if (terminal->type != output_termcap)
-    abort ();
+    emacs_abort ();
 
   tty = terminal->display_info.tty;
 
@@ -3508,7 +3508,7 @@
 
       if (! p)
         /* This should not happen. */
-        abort ();
+        emacs_abort ();
 
       p->next = tty->next;
       tty->next = 0;

=== modified file 'src/termchar.h'
--- a/src/termchar.h    2012-06-09 16:44:44 +0000
+++ b/src/termchar.h    2012-09-04 17:34:54 +0000
@@ -207,6 +207,6 @@
   (((f)->output_method == output_termcap       \
     || (f)->output_method == output_msdos_raw) \
    ? (f)->terminal->display_info.tty            \
-   : (abort (), (struct tty_display_info *) 0))
+   : (emacs_abort (), (struct tty_display_info *) 0))
 
 #define CURTTY() FRAME_TTY (SELECTED_FRAME())

=== modified file 'src/terminal.c'
--- a/src/terminal.c    2012-08-18 00:07:52 +0000
+++ b/src/terminal.c    2012-09-04 17:34:54 +0000
@@ -294,7 +294,7 @@
 
   for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal)
     if (! *tp)
-      abort ();
+      emacs_abort ();
   *tp = terminal->next_terminal;
 
   xfree (terminal->keyboard_coding);
@@ -411,7 +411,7 @@
     case output_ns:
       return Qns;
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 
@@ -519,7 +519,7 @@
 init_initial_terminal (void)
 {
   if (initialized || terminal_list || tty_list)
-    abort ();
+    emacs_abort ();
 
   initial_terminal = create_terminal ();
   initial_terminal->type = output_initial;
@@ -538,7 +538,7 @@
 delete_initial_terminal (struct terminal *terminal)
 {
   if (terminal != initial_terminal)
-    abort ();
+    emacs_abort ();
 
   delete_terminal (terminal);
   initial_terminal = NULL;

=== modified file 'src/terminfo.c'
--- a/src/terminfo.c    2012-01-19 07:21:25 +0000
+++ b/src/terminfo.c    2012-09-04 17:34:54 +0000
@@ -46,7 +46,7 @@
 
   /* Emacs always should pass a null OUTSTRING and zero LEN.  */
   if (outstring || len)
-    abort ();
+    emacs_abort ();
 
   temp = tparm (string, arg1, arg2, arg3, arg4);
   return xstrdup (temp);

=== modified file 'src/tparam.c'
--- a/src/tparam.c      2012-07-05 06:32:41 +0000
+++ b/src/tparam.c      2012-09-04 17:34:54 +0000
@@ -247,7 +247,7 @@
              break;
 
            default:
-             abort ();
+             emacs_abort ();
            }
        }
       else

=== modified file 'src/w32.c'
--- a/src/w32.c 2012-09-02 17:10:35 +0000
+++ b/src/w32.c 2012-09-04 17:34:54 +0000
@@ -1273,9 +1273,9 @@
 
   /* Ensure HOME and SHELL are defined. */
   if (getenv ("HOME") == NULL)
-    abort ();
+    emacs_abort ();
   if (getenv ("SHELL") == NULL)
-    abort ();
+    emacs_abort ();
 
   /* Set dir and shell from environment variables. */
   strcpy (dflt_passwd.pw_dir, getenv ("HOME"));
@@ -1788,9 +1788,9 @@
       char modname[MAX_PATH];
 
       if (!GetModuleFileName (NULL, modname, MAX_PATH))
-       abort ();
+       emacs_abort ();
       if ((p = strrchr (modname, '\\')) == NULL)
-       abort ();
+       emacs_abort ();
       *p = 0;
 
       if ((p = strrchr (modname, '\\')) && xstrcasecmp (p, "\\bin") == 0)
@@ -1902,13 +1902,13 @@
   /* FIXME: Do we need to resolve possible symlinks in startup_dir?
      Does it matter anywhere in Emacs?  */
   if (!GetCurrentDirectory (MAXPATHLEN, startup_dir))
-    abort ();
+    emacs_abort ();
 
   {
     static char modname[MAX_PATH];
 
     if (!GetModuleFileName (NULL, modname, MAX_PATH))
-      abort ();
+      emacs_abort ();
     argv[0] = modname;
   }
 
@@ -1930,7 +1930,7 @@
 
   p = getenv ("emacs_dir");
   if (p == NULL)
-    abort ();
+    emacs_abort ();
   strcpy (root_dir, p);
   root_dir[parse_root (root_dir, NULL)] = '\0';
   dostounix_filename (root_dir);
@@ -3287,7 +3287,7 @@
      doesn't resolve aliasing due to subst commands, or recognize hard
      links.  */
   if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH))
-    abort ();
+    emacs_abort ();
 
   parse_root (fullname, &p);
   /* Normal W32 filesystems are still case insensitive. */
@@ -5587,7 +5587,7 @@
          if (fd_info[ fd ].cp != NULL)
            {
              DebPrint (("sys_socket: fd_info[%d] apparently in use!\n", fd));
-             abort ();
+             emacs_abort ();
            }
 
          fd_info[ fd ].cp = cp;
@@ -5966,7 +5966,7 @@
            {
              if (fd_info[fd].flags & FILE_SOCKET)
                {
-                 if (winsock_lib == NULL) abort ();
+                 if (winsock_lib == NULL) emacs_abort ();
 
                  pfn_shutdown (SOCK_HANDLE (fd), 2);
                  rc = pfn_closesocket (SOCK_HANDLE (fd));
@@ -6084,7 +6084,7 @@
       || (fd_info[fd].flags & FILE_READ) == 0)
     {
       DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe, serial 
port, or socket!\n", fd));
-      abort ();
+      emacs_abort ();
     }
 
   cp->status = STATUS_READ_IN_PROGRESS;
@@ -6220,7 +6220,7 @@
       /* re-read CR carried over from last read */
       if (fd_info[fd].flags & FILE_LAST_CR)
        {
-         if (fd_info[fd].flags & FILE_BINARY) abort ();
+         if (fd_info[fd].flags & FILE_BINARY) emacs_abort ();
          *buffer++ = 0x0d;
          count--;
          nchars++;
@@ -6323,7 +6323,7 @@
            }
          else /* FILE_SOCKET */
            {
-             if (winsock_lib == NULL) abort ();
+             if (winsock_lib == NULL) emacs_abort ();
 
              /* do the equivalent of a non-blocking read */
              pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting);
@@ -6474,7 +6474,7 @@
   else if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET)
     {
       unsigned long nblock = 0;
-      if (winsock_lib == NULL) abort ();
+      if (winsock_lib == NULL) emacs_abort ();
 
       /* TODO: implement select() properly so non-blocking I/O works. */
       /* For now, make sure the write blocks.  */
@@ -6640,8 +6640,7 @@
                      buffer,
                      "Emacs Abort Dialog",
                      MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);
-      /* Use the low-level Emacs abort. */
-#undef abort
+         /* Use the low-level system abort. */
          abort ();
        }
       else

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-09-01 08:22:10 +0000
+++ b/src/w32fns.c      2012-09-04 17:34:54 +0000
@@ -2280,7 +2280,7 @@
               CoInitialize (NULL);
              w32_createwindow ((struct frame *) msg.wParam);
              if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0))
-               abort ();
+               emacs_abort ();
              break;
            case WM_EMACS_SETLOCALE:
              SetThreadLocale (msg.wParam);
@@ -2290,7 +2290,7 @@
              result = (int) ActivateKeyboardLayout ((HKL) msg.wParam, 0);
              if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE,
                                      result, 0))
-               abort ();
+               emacs_abort ();
              break;
            case WM_EMACS_REGISTER_HOT_KEY:
              focus_window = GetFocus ();
@@ -2311,7 +2311,7 @@
                  GC.  */
              XSETCAR ((Lisp_Object) ((EMACS_INT) msg.lParam), Qnil);
              if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0))
-               abort ();
+               emacs_abort ();
              break;
            case WM_EMACS_TOGGLE_LOCK_KEY:
              {
@@ -2343,7 +2343,7 @@
                  }
                if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE,
                                        cur_state, 0))
-                 abort ();
+                 emacs_abort ();
              }
              break;
 #ifdef MSG_DEBUG
@@ -2398,11 +2398,11 @@
 {
   /* Only input thread can send deferred messages.  */
   if (GetCurrentThreadId () != dwWindowsThreadId)
-    abort ();
+    emacs_abort ();
 
   /* It is an error to send a message that is already deferred.  */
   if (find_deferred_msg (hwnd, msg) != NULL)
-    abort ();
+    emacs_abort ();
 
   /* Enforced synchronization is not needed because this is the only
      function that alters deferred_msg_head, and the following critical
@@ -2475,7 +2475,7 @@
   PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE);
 
   if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0))
-    abort ();
+    emacs_abort ();
 
   memset (&dummy_buf, 0, sizeof (dummy_buf));
   dummy_buf.w32msg.msg.hwnd = NULL;
@@ -3136,7 +3136,7 @@
                msg = WM_MBUTTONUP;
                button_state &= ~MMOUSE;
 
-               if (button_state) abort ();
+               if (button_state) emacs_abort ();
              }
            else
              return 0;
@@ -3367,7 +3367,7 @@
        /* Detect if message has already been deferred; in this case
           we cannot return any sensible value to ignore this.  */
        if (find_deferred_msg (hwnd, msg) != NULL)
-         abort ();
+         emacs_abort ();
 
         menubar_in_use = 1;
 
@@ -3842,7 +3842,7 @@
   MSG msg;
 
   if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW, (WPARAM)f, 
0))
-    abort ();
+    emacs_abort ();
   GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
 }
 
@@ -6287,7 +6287,7 @@
       lisp_modifiers = XINT (Fcar (Fcdr (c)));
       c = Fcar (c);
       if (!SYMBOLP (c))
-       abort ();
+       emacs_abort ();
       vk_code = lookup_vk_code (SDATA (SYMBOL_NAME (c)));
     }
   else if (INTEGERP (c))
@@ -7194,10 +7194,8 @@
   syms_of_w32uniscribe ();
 }
 
-#undef abort
-
 void
-w32_abort (void)
+emacs_abort (void)
 {
   int button;
   button = MessageBox (NULL,

=== modified file 'src/w32menu.c'
--- a/src/w32menu.c     2012-08-28 16:01:59 +0000
+++ b/src/w32menu.c     2012-09-04 17:34:54 +0000
@@ -820,7 +820,7 @@
          else if (EQ (type, QCradio))
            wv->button_type = BUTTON_TYPE_RADIO;
          else
-           abort ();
+           emacs_abort ();
 
          wv->selected = !NILP (selected);
 

=== modified file 'src/w32proc.c'
--- a/src/w32proc.c     2012-08-02 04:14:48 +0000
+++ b/src/w32proc.c     2012-09-04 17:34:54 +0000
@@ -176,7 +176,7 @@
   /* Should not be deleting a child that is still needed. */
   for (i = 0; i < MAXDESC; i++)
     if (fd_info[i].cp == cp)
-      abort ();
+      emacs_abort ();
 
   if (!CHILD_ACTIVE (cp))
     return;
@@ -316,7 +316,7 @@
   DWORD flags;
   char dir[ MAXPATHLEN ];
 
-  if (cp == NULL) abort ();
+  if (cp == NULL) emacs_abort ();
 
   memset (&start, 0, sizeof (start));
   start.cb = sizeof (start);
@@ -405,7 +405,7 @@
   if (fd_info[fd].cp != NULL)
     {
       DebPrint (("register_child: fd_info[%d] apparently in use!\n", fd));
-      abort ();
+      emacs_abort ();
     }
 
   fd_info[fd].cp = cp;
@@ -459,7 +459,7 @@
       /* We want to wait for a specific child */
       wait_hnd[nh] = dead_child->procinfo.hProcess;
       cps[nh] = dead_child;
-      if (!wait_hnd[nh]) abort ();
+      if (!wait_hnd[nh]) emacs_abort ();
       nh++;
       active = 0;
       goto get_result;
@@ -507,7 +507,7 @@
       active -= WAIT_ABANDONED_0;
     }
   else
-    abort ();
+    emacs_abort ();
 
 get_result:
   if (!GetExitCodeProcess (wait_hnd[active], &retval))
@@ -1189,7 +1189,7 @@
 #endif
                wait_hnd[nh] = cp->char_avail;
                fdindex[nh] = i;
-               if (!wait_hnd[nh]) abort ();
+               if (!wait_hnd[nh]) emacs_abort ();
                nh++;
 #ifdef FULL_DEBUG
                DebPrint (("select waiting on child %d fd %d\n",
@@ -1276,7 +1276,7 @@
       active -= WAIT_ABANDONED_0;
     }
   else
-    abort ();
+    emacs_abort ();
 
   /* Loop over all handles after active (now officially documented as
      being the first signaled handle in the array).  We do this to

=== modified file 'src/w32select.c'
--- a/src/w32select.c   2012-07-29 08:18:29 +0000
+++ b/src/w32select.c   2012-09-04 17:34:54 +0000
@@ -394,7 +394,7 @@
 
   BLOCK_INPUT;
 
-  /* Fsignal calls abort() if it sees that waiting_for_input is
+  /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
      set.  */
   owfi = waiting_for_input;
   waiting_for_input = 0;

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2012-08-18 01:42:52 +0000
+++ b/src/w32term.c     2012-09-04 17:34:54 +0000
@@ -2426,7 +2426,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
   if (!s->for_overlaps)
@@ -2626,7 +2626,7 @@
   if (! FRAME_W32_P (f))
     return;
 
-  abort ();
+  emacs_abort ();
 }
 
 
@@ -2709,7 +2709,7 @@
   if (! FRAME_W32_P (f))
     return;
 
-  abort ();
+  emacs_abort ();
 }
 
 
@@ -3431,7 +3431,7 @@
       frame = XCAR (tail);
       /* All elements of Vframe_list should be frames.  */
       if (! FRAMEP (frame))
-       abort ();
+       emacs_abort ();
 
       /* Scan this frame's scroll bar list for a scroll bar with the
         right window ID.  */
@@ -3854,7 +3854,7 @@
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
   if (NILP (window->vertical_scroll_bar))
-    abort ();
+    emacs_abort ();
 
   bar = XSCROLL_BAR (window->vertical_scroll_bar);
 
@@ -3873,7 +3873,7 @@
       else
         /* If its prev pointer is nil, it must be at the front of
            one or the other!  */
-        abort ();
+        emacs_abort ();
     }
   else
     XSCROLL_BAR (bar->prev)->next = bar->next;
@@ -3928,7 +3928,7 @@
                             struct input_event *emacs_event)
 {
   if (! WINDOWP (bar->window))
-    abort ();
+    emacs_abort ();
 
   emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
   emacs_event->code = 0;
@@ -5233,7 +5233,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
     }
 }

=== modified file 'src/w32xfns.c'
--- a/src/w32xfns.c     2012-09-01 06:38:52 +0000
+++ b/src/w32xfns.c     2012-09-04 17:34:54 +0000
@@ -122,7 +122,7 @@
   HDC hdc;
 
   if (f->output_method != output_w32)
-    abort ();
+    emacs_abort ();
 
   enter_crit ();
 

=== modified file 'src/widget.c'
--- a/src/widget.c      2012-09-02 16:56:31 +0000
+++ b/src/widget.c      2012-09-04 17:34:54 +0000
@@ -226,7 +226,7 @@
 static void
 mark_shell_size_user_specified (Widget wmshell)
 {
-  if (! XtIsWMShell (wmshell)) abort ();
+  if (! XtIsWMShell (wmshell)) emacs_abort ();
   /* This is kind of sleazy, but I can't see how else to tell it to make it
      mark the WM_SIZE_HINTS size as user specified when appropriate. */
   ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
@@ -290,7 +290,7 @@
   Widget wmshell = get_wm_shell ((Widget) ew);
   /* Each Emacs shell is now independent and top-level.  */
 
-  if (! XtIsSubclass (wmshell, shellWidgetClass)) abort ();
+  if (! XtIsSubclass (wmshell, shellWidgetClass)) emacs_abort ();
 
   /* We don't need this for the moment. The geometry is computed in
      xfns.c.  */
@@ -677,8 +677,8 @@
   EmacsFrame ew = (EmacsFrame) widget;
   struct frame* s = ew->emacs_frame.frame;
 
-  if (! s) abort ();
-  if (! s->output_data.x) abort ();
+  if (! s) emacs_abort ();
+  if (! s->output_data.x) emacs_abort ();
 
   BLOCK_INPUT;
   x_free_gcs (s);

=== modified file 'src/window.c'
--- a/src/window.c      2012-08-28 16:01:59 +0000
+++ b/src/window.c      2012-09-04 17:34:54 +0000
@@ -386,7 +386,7 @@
       else if (! NILP (XWINDOW (window)->vchild))
        window = XWINDOW (window)->vchild;
       else
-       abort ();
+       emacs_abort ();
     }
 
   return window;
@@ -1289,7 +1289,7 @@
       return Qnil;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 }
 
@@ -1948,7 +1948,7 @@
   buf = w->buffer;
   b = XBUFFER (buf);
   if (b != XMARKER (w->pointm)->buffer)
-    abort ();
+    emacs_abort ();
 
 #if 0
   if (w == XWINDOW (selected_window)
@@ -2669,7 +2669,7 @@
          case CHECK_ALL_WINDOWS:
            if (! NILP (w->buffer)
                && NILP (BVAR (XBUFFER (w->buffer), name)))
-             abort ();
+             emacs_abort ();
            break;
 
          case WINDOW_LOOP_UNUSED:

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-09-03 19:36:09 +0000
+++ b/src/xdisp.c       2012-09-04 17:34:54 +0000
@@ -7306,7 +7306,7 @@
 
     default:
       /* There are no other methods defined, so this should be a bug.  */
-      abort ();
+      emacs_abort ();
     }
 
   eassert (it->method != GET_FROM_STRING
@@ -7761,7 +7761,7 @@
       compute_stop_pos (it);
       /* We must advance forward, right?  */
       if (it->stop_charpos <= charpos)
-       abort ();
+       emacs_abort ();
     }
   while (charpos > BEGV && it->stop_charpos >= it->end_charpos);
 
@@ -7810,7 +7810,7 @@
       compute_stop_pos (it);
       /* We must advance forward, right?  */
       if (it->stop_charpos <= it->prev_stop)
-       abort ();
+       emacs_abort ();
       charpos = it->stop_charpos;
     }
   while (charpos <= where_we_are);
@@ -8898,7 +8898,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
 
       /* Reset/increment for the next run.  */
@@ -10532,7 +10532,7 @@
 check_message_stack (void)
 {
   if (!NILP (Vmessage_stack))
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -14415,7 +14415,7 @@
       for (g = row->glyphs[TEXT_AREA], x = row->x; g < glyph; g++)
        {
          if (g >= row->glyphs[TEXT_AREA] + row->used[TEXT_AREA])
-           abort ();
+           emacs_abort ();
          x += g->pixel_width;
        }
     }
@@ -14536,7 +14536,7 @@
   SET_MARKER_FROM_TEXT_POS (w->start, startp);
 
   if (current_buffer != XBUFFER (w->buffer))
-    abort ();
+    emacs_abort ();
 
   if (!NILP (Vwindow_scroll_functions))
     {
@@ -15505,9 +15505,9 @@
   /* Some sanity checks.  */
   CHECK_WINDOW_END (w);
   if (Z == Z_BYTE && CHARPOS (opoint) != BYTEPOS (opoint))
-    abort ();
+    emacs_abort ();
   if (BYTEPOS (opoint) < CHARPOS (opoint))
-    abort ();
+    emacs_abort ();
 
   /* If %c is in mode line, update it if needed.  */
   if (!NILP (w->column_number_displayed)
@@ -15719,7 +15719,7 @@
          goto try_to_scroll;
 
        default:
-         abort ();
+         emacs_abort ();
        }
     }
   /* If current starting point was originally the beginning of a line
@@ -15882,7 +15882,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
     }
 
@@ -17330,7 +17330,7 @@
          if (row)
            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
          else
-           abort ();
+           emacs_abort ();
          return 1;
        }
     }
@@ -17374,7 +17374,7 @@
          if (row)
            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
          else
-           abort ();
+           emacs_abort ();
          return 2;
        }
     }
@@ -17863,7 +17863,7 @@
       IF_DEBUG (debug_method_add (w, "C"));
     }
   else
-    abort ();
+    emacs_abort ();
 
   IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos);
            debug_end_vpos = XFASTINT (w->window_end_vpos));
@@ -19240,7 +19240,7 @@
        /* A line that is entirely from a string/image/stretch...  */
        row->maxpos = row->minpos;
       else
-       abort ();
+       emacs_abort ();
     }
   else
     row->maxpos = it->current.pos;
@@ -20081,7 +20081,7 @@
          return Qright_to_left;
          break;
        default:
-         abort ();
+         emacs_abort ();
        }
     }
 }
@@ -21994,7 +21994,7 @@
            {
              /* Glyph is off the left margin of the display area.
                 Should not happen.  */
-             abort ();
+             emacs_abort ();
            }
 
          row->ascent = max (row->ascent, it->max_ascent);
@@ -23359,7 +23359,7 @@
              break;                                                    \
                                                                        \
            default:                                                    \
-             abort ();                                                 \
+             emacs_abort ();                                                   
\
            }                                                           \
                                                                        \
          if (s)                                                        \
@@ -23700,7 +23700,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       else
@@ -23774,7 +23774,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       ++it->glyph_row->used[area];
@@ -23953,7 +23953,7 @@
            {
              glyph->resolved_level = it->bidi_it.resolved_level;
              if ((it->bidi_it.type & 7) != it->bidi_it.type)
-               abort ();
+               emacs_abort ();
              glyph->bidi_type = it->bidi_it.type;
            }
          ++it->glyph_row->used[area];
@@ -24014,7 +24014,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       else
@@ -24269,7 +24269,7 @@
        }
     }
   else
-    abort ();
+    emacs_abort ();
 
 #ifdef HAVE_WINDOW_SYSTEM
   /* On a GUI frame, when the right fringe (left fringe for R2L rows)
@@ -24466,7 +24466,7 @@
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
-           abort ();
+           emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
       ++it->glyph_row->used[area];

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2012-09-02 16:56:31 +0000
+++ b/src/xfaces.c      2012-09-04 17:34:54 +0000
@@ -510,7 +510,7 @@
   if (color_count[pixel] > 0)
     --color_count[pixel];
   else
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -727,7 +727,7 @@
   if (!FRAME_NS_P (f) || FRAME_NS_WINDOW (f))
 #endif
     if (!realize_basic_faces (f))
-       abort ();
+       emacs_abort ();
 }
 
 
@@ -771,7 +771,7 @@
     {
       clear_face_cache (0);
       if (!realize_basic_faces (f))
-       abort ();
+       emacs_abort ();
     }
 }
 
@@ -1108,7 +1108,7 @@
     return ns_defined_color (f, color_name, color_def, alloc, 1);
 #endif
   else
-    abort ();
+    emacs_abort ();
 }
 
 
@@ -1304,7 +1304,7 @@
          break;
 
        default:
-         abort ();
+         emacs_abort ();
        }
     }
 #ifdef GLYPH_DEBUG
@@ -4548,7 +4548,7 @@
        return -1;
       default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
       if (default_face == NULL)
-       abort ();  /* realize_basic_faces must have set it up  */
+       emacs_abort (); /* realize_basic_faces must have set it up  */
     }
 
   if (! get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
@@ -4591,7 +4591,7 @@
     case MENU_FACE_ID:                 name = Qmenu;                   break;
 
     default:
-      abort ();            /* the caller is supposed to pass us a basic face 
id */
+      emacs_abort (); /* the caller is supposed to pass us a basic face id */
     }
 
   /* Do a quick scan through Vface_remapping_alist, and return immediately
@@ -4712,7 +4712,7 @@
   struct face *default_face = FACE_FROM_ID (f, face_id);
 
   if (!default_face)
-    abort ();
+    emacs_abort ();
 
   if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
     return -1;
@@ -5102,7 +5102,7 @@
        error ("Cannot realize default face");
       def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
       if (def_face == NULL)
-       abort ();  /* realize_basic_faces must have set it up  */
+       emacs_abort ();  /* realize_basic_faces must have set it up  */
     }
 
   /* Dispatch to the appropriate handler.  */
@@ -5387,7 +5387,7 @@
       else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
        ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg));
       else
-       abort ();
+       emacs_abort ();
     }
 
   if (UNSPECIFIEDP (LFACE_BACKGROUND (lface)))
@@ -5402,7 +5402,7 @@
       else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
        ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg));
       else
-       abort ();
+       emacs_abort ();
     }
 
   if (UNSPECIFIEDP (LFACE_STIPPLE (lface)))
@@ -5502,7 +5502,7 @@
       face = make_realized_face (attrs);
     }
   else
-    abort ();
+    emacs_abort ();
 
   /* Insert the new face.  */
   cache_face (cache, face, lface_hash (attrs));
@@ -5597,7 +5597,7 @@
          if (default_face)
            fontset = default_face->fontset;
          if (fontset == -1)
-           abort ();
+           emacs_abort ();
        }
       if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
        attrs[LFACE_FONT_INDEX]

=== modified file 'src/xmenu.c'
--- a/src/xmenu.c       2012-08-17 21:52:15 +0000
+++ b/src/xmenu.c       2012-09-04 17:34:54 +0000
@@ -169,7 +169,7 @@
   int dummy;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   BLOCK_INPUT;
 
@@ -636,7 +636,7 @@
 x_activate_menubar (FRAME_PTR f)
 {
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   if (!f->output_data.x->saved_menu_event->type)
     return;
@@ -852,7 +852,7 @@
   int columns, rows;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   x = f->output_data.x;
 
@@ -940,7 +940,7 @@
   int *submenu_top_level_items, *submenu_n_panes;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   menubar_widget = f->output_data.x->menubar_widget;
 
@@ -1299,7 +1299,7 @@
   Widget menubar_widget;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   menubar_widget = f->output_data.x->menubar_widget;
 
@@ -1450,7 +1450,7 @@
 #endif
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   xg_crazy_callback_abort = 1;
   menu = xg_create_widget ("popup", first_wv->name, f, first_wv,
@@ -1557,7 +1557,7 @@
   Widget menu;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
 #ifdef USE_LUCID
   apply_systemfont_to_menu (f, f->output_data.x->widget);
@@ -1646,7 +1646,7 @@
   ptrdiff_t specpdl_count = SPECPDL_INDEX ();
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   *error_name = NULL;
 
@@ -1792,7 +1792,7 @@
          else if (EQ (type, QCradio))
            wv->button_type = BUTTON_TYPE_RADIO;
          else
-           abort ();
+           emacs_abort ();
 
          wv->selected = !NILP (selected);
 
@@ -1930,7 +1930,7 @@
   GtkWidget *menu;
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   menu = xg_create_widget ("dialog", first_wv->name, f, first_wv,
                            G_CALLBACK (dialog_selection_callback),
@@ -1977,7 +1977,7 @@
   LWLIB_ID dialog_id;
 
   if (!FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   dialog_id = widget_id_tick++;
 #ifdef USE_LUCID
@@ -2036,7 +2036,7 @@
   ptrdiff_t specpdl_count = SPECPDL_INDEX ();
 
   if (! FRAME_X_P (f))
-    abort ();
+    emacs_abort ();
 
   *error_name = NULL;
 
@@ -2301,7 +2301,7 @@
   ptrdiff_t specpdl_count = SPECPDL_INDEX ();
 
   if (! FRAME_X_P (f) && ! FRAME_MSDOS_P (f))
-    abort ();
+    emacs_abort ();
 
   *error_name = 0;
   if (menu_items_n_panes == 0)

=== modified file 'src/xselect.c'
--- a/src/xselect.c     2012-08-18 00:07:52 +0000
+++ b/src/xselect.c     2012-09-04 17:34:54 +0000
@@ -193,7 +193,7 @@
 x_start_queuing_selection_requests (void)
 {
   if (x_queue_selection_requests)
-    abort ();
+    emacs_abort ();
 
   x_queue_selection_requests++;
   TRACE1 ("x_start_queuing_selection_requests %d", x_queue_selection_requests);
@@ -245,7 +245,7 @@
   if (EQ (sym, QEMACS_TMP)) return dpyinfo->Xatom_EMACS_TMP;
   if (EQ (sym, QTARGETS))   return dpyinfo->Xatom_TARGETS;
   if (EQ (sym, QNULL))     return dpyinfo->Xatom_NULL;
-  if (!SYMBOLP (sym)) abort ();
+  if (!SYMBOLP (sym)) emacs_abort ();
 
   TRACE1 (" XInternAtom %s", SSDATA (SYMBOL_NAME (sym)));
   BLOCK_INPUT;
@@ -1138,7 +1138,7 @@
   ptrdiff_t count = SPECPDL_INDEX ();
 
   if (property_change_reply_object)
-    abort ();
+    emacs_abort ();
 
   /* Make sure to do unexpect_property_change if we quit or err.  */
   record_unwind_protect (wait_for_property_change_unwind,

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2012-09-02 17:10:35 +0000
+++ b/src/xterm.c       2012-09-04 17:34:54 +0000
@@ -1467,7 +1467,7 @@
        && f->output_data.x->widget == widget)
       return f;
 
-  abort ();
+  emacs_abort ();
 }
 
 /* Allocate a color which is lighter or darker than *PIXEL by FACTOR
@@ -2696,7 +2696,7 @@
     y2 += dy;
 
   if (INT_MAX - dx < xmax)
-    abort ();
+    emacs_abort ();
 
   while (x1 <= xmax)
     {
@@ -2805,7 +2805,7 @@
       break;
 
     default:
-      abort ();
+      emacs_abort ();
     }
 
   if (!s->for_overlaps)
@@ -3005,7 +3005,7 @@
 static void
 x_delete_glyphs (struct frame *f, register int n)
 {
-  abort ();
+  emacs_abort ();
 }
 
 
@@ -3278,7 +3278,7 @@
 static void
 x_ins_del_lines (struct frame *f, int vpos, int n)
 {
-  abort ();
+  emacs_abort ();
 }
 
 
@@ -4115,7 +4115,7 @@
       frame = XCAR (tail);
       /* All elements of Vframe_list should be frames.  */
       if (! FRAMEP (frame))
-       abort ();
+       emacs_abort ();
 
       if (! FRAME_X_P (XFRAME (frame)))
         continue;
@@ -5434,7 +5434,7 @@
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
   if (NILP (window->vertical_scroll_bar))
-    abort ();
+    emacs_abort ();
 
   bar = XSCROLL_BAR (window->vertical_scroll_bar);
 
@@ -5453,7 +5453,7 @@
       else
        /* If its prev pointer is nil, it must be at the front of
           one or the other!  */
-       abort ();
+       emacs_abort ();
     }
   else
     XSCROLL_BAR (bar->prev)->next = bar->next;
@@ -5551,7 +5551,7 @@
 x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct 
input_event *emacs_event)
 {
   if (! WINDOWP (bar->window))
-    abort ();
+    emacs_abort ();
 
   emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
   emacs_event->code = event->xbutton.button - Button1;
@@ -6457,7 +6457,7 @@
                 }
               else if (status_return != XLookupKeySym
                        && status_return != XLookupBoth)
-                abort ();
+                emacs_abort ();
             }
           else
             nbytes = XLookupString (&event.xkey, (char *) copy_bufptr,
@@ -7496,7 +7496,7 @@
              break;
 
            default:
-             abort ();
+             emacs_abort ();
            }
        }
 
@@ -7849,7 +7849,7 @@
 This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\
 For details, see etc/PROBLEMS.\n",
               error_msg);
-      abort ();
+      emacs_abort ();
 #endif /* USE_GTK */
 
       /* Indicate that this display is dead.  */
@@ -7859,7 +7859,7 @@
       dpyinfo->terminal->reference_count--;
       if (dpyinfo->reference_count != 0)
         /* We have just closed all frames on this display. */
-        abort ();
+        emacs_abort ();
 
       {
        Lisp_Object tmp;
@@ -10436,7 +10436,7 @@
     to.addr = (XPointer)&font;
     x_catch_errors (dpy);
     if (!XtCallConverter (dpy, XtCvtStringToFont, &d, 1, &fr, &to, NULL))
-      abort ();
+      emacs_abort ();
     if (x_had_errors_p (dpy) || !XQueryFont (dpy, font))
       XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
     x_uncatch_errors ();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]