comparison src/emacs.c @ 4735:80d74fed5399

Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the GNU_MALLOC define, which was only used to distinguish between "old" and "new" GNU malloc. See xemacs-patches message with ID <870180fe0911061348g168f85e2m5153e2b554b94803@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Mon, 09 Nov 2009 09:21:59 -0700
parents 3a87551bfeb5
children aa5ed11f473b
comparison
equal deleted inserted replaced
4734:74a5eaa67982 4735:80d74fed5399
940 * complaining? */ 940 * complaining? */
941 if (initialized && malloc_jumpstart (malloc_cookie) != 0) 941 if (initialized && malloc_jumpstart (malloc_cookie) != 0)
942 stderr_out ("malloc jumpstart failed!\n"); 942 stderr_out ("malloc jumpstart failed!\n");
943 #endif /* NeXT */ 943 #endif /* NeXT */
944 944
945 /*
946 #if defined (GNU_MALLOC) && \
947 defined (ERROR_CHECK_MALLOC) && \
948 !defined (HAVE_LIBMCHECK)
949 */
950 #if defined (LOSING_GCC_DESTRUCTOR_FREE_BUG) 945 #if defined (LOSING_GCC_DESTRUCTOR_FREE_BUG)
951 /* Prior to XEmacs 21, this was `#if 0'ed out. */ 946 /* Prior to XEmacs 21, this was `#if 0'ed out. */
952 /* I'm enabling this because it is the only reliable way I've found to */ 947 /* I'm enabling this because it is the only reliable way I've found to */
953 /* prevent a very annoying problem where GCC will attempt to free (3) */ 948 /* prevent a very annoying problem where GCC will attempt to free (3) */
954 /* memory at exit() and cause a coredump. */ 949 /* memory at exit() and cause a coredump. */
1727 1722
1728 #ifdef SYMS_MACHINE 1723 #ifdef SYMS_MACHINE
1729 SYMS_MACHINE; 1724 SYMS_MACHINE;
1730 #endif 1725 #endif
1731 1726
1732 /*
1733 #if defined (GNU_MALLOC) && \
1734 defined (ERROR_CHECK_MALLOC) && \
1735 !defined (HAVE_LIBMCHECK)
1736 */
1737 /* Prior to XEmacs 21, this was `#if 0'ed out. -slb */ 1727 /* Prior to XEmacs 21, this was `#if 0'ed out. -slb */
1738 #if defined (LOSING_GCC_DESTRUCTOR_FREE_BUG) 1728 #if defined (LOSING_GCC_DESTRUCTOR_FREE_BUG)
1739 syms_of_free_hook (); 1729 syms_of_free_hook ();
1740 #endif 1730 #endif
1741 1731
3654 3644
3655 /* Dumping apparently isn't supported by versions of GCC >= 2.8. */ 3645 /* Dumping apparently isn't supported by versions of GCC >= 2.8. */
3656 /* The following needs conditionalization on whether either XEmacs or */ 3646 /* The following needs conditionalization on whether either XEmacs or */
3657 /* various system shared libraries have been built and linked with */ 3647 /* various system shared libraries have been built and linked with */
3658 /* GCC >= 2.8. -slb */ 3648 /* GCC >= 2.8. -slb */
3659 #if defined (GNU_MALLOC) 3649 #ifndef SYSTEM_MALLOC
3660 static void 3650 static void
3661 voodoo_free_hook (void *UNUSED (mem)) 3651 voodoo_free_hook (void *UNUSED (mem))
3662 { 3652 {
3663 /* Disable all calls to free() when XEmacs is exiting and it doesn't */ 3653 /* Disable all calls to free() when XEmacs is exiting and it doesn't */
3664 /* matter. */ 3654 /* matter. */
3667 /* prototype of __free_hook varies with glibc version */ 3657 /* prototype of __free_hook varies with glibc version */
3668 (TYPEOF (__free_hook)) 3658 (TYPEOF (__free_hook))
3669 #endif 3659 #endif
3670 voodoo_free_hook; 3660 voodoo_free_hook;
3671 } 3661 }
3672 #endif /* GNU_MALLOC */ 3662 #endif /* SYSTEM_MALLOC */
3673 3663
3674 DEFUN_NORETURN ("kill-emacs", Fkill_emacs, 0, 1, "P", /* 3664 DEFUN_NORETURN ("kill-emacs", Fkill_emacs, 0, 1, "P", /*
3675 Exit the XEmacs job and kill it. Ask for confirmation, without argument. 3665 Exit the XEmacs job and kill it. Ask for confirmation, without argument.
3676 If ARG is an integer, return ARG as the exit program code. 3666 If ARG is an integer, return ARG as the exit program code.
3677 If ARG is a string, stuff it as keyboard input. 3667 If ARG is a string, stuff it as keyboard input.
3725 pause_so_user_can_read_messages (1); 3715 pause_so_user_can_read_messages (1);
3726 #endif 3716 #endif
3727 3717
3728 shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0); 3718 shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0);
3729 3719
3730 #if defined (GNU_MALLOC) 3720 #ifndef SYSTEM_MALLOC
3731 __free_hook = 3721 __free_hook =
3732 #if defined (TYPEOF) && !defined (UNO) 3722 #if defined (TYPEOF) && !defined (UNO)
3733 /* prototype of __free_hook varies with glibc version */ 3723 /* prototype of __free_hook varies with glibc version */
3734 (TYPEOF (__free_hook)) 3724 (TYPEOF (__free_hook))
3735 #endif 3725 #endif