From xemacs-m  Sun Jan 26 23:05:55 1997
Received: from dres.elam.org (dres@cola187.scsn.net [206.25.247.187])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id XAA14083 for <xemacs-beta@xemacs.org>; Sun, 26 Jan 1997 23:05:52 -0600 (CST)
Received: (from dres@localhost)
          by dres.elam.org (8.8.4/8.8.4)
	  id AAA16607; Mon, 27 Jan 1997 00:02:21 -0500
To: xemacs-beta@xemacs.org
Subject: fix for temacs crash on linux libc 5.4.20
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII
From: James LewisMoss <dres@scsn.net>
Date: 27 Jan 1997 00:02:20 -0500
Message-ID: <hhraj7yalf.fsf@dres.elam.org>
Lines: 27
X-Mailer: Gnus v5.2.40/XEmacs 20.0

Seems mallopt in libc 5.4.20 sets __malloc_initialized to 1 now so
that the gmalloc in xemacs doesn't get initialized.   Here is a short
patch that fixed that on my system.

Jim
---------

--- ./gmalloc.c.old	Sun Jan 26 23:56:03 1997
+++ ./gmalloc.c	Sun Jan 26 23:56:44 1997
@@ -258,7 +258,7 @@
 extern void (*__after_morecore_hook) __P ((void));
 
 /* Nonzero if `malloc' has been called and done its initialization.  */
-extern int __malloc_initialized;
+    /* extern int __malloc_initialized; */
 
 /* Hooks for debugging versions.  */
 extern void (*__free_hook) __P ((__ptr_t __ptr));
@@ -431,7 +431,7 @@
 __malloc_size_t _bytes_free;
 
 /* Are you experienced?  */
-int __malloc_initialized;
+static int __malloc_initialized;
 
 void (*__after_morecore_hook) __P ((void));
 

