#include <pthread.h>
#endif
- #ifdef WINDOWSNT
- #include <w32heap.h> /* for sbrk */
- #endif
-
#ifdef emacs
-extern void emacs_abort (void);
+# include "lisp.h"
+#endif
+
+#ifdef HAVE_MALLOC_H
+# if GNUC_PREREQ (4, 2, 0)
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+# endif
+# include <malloc.h>
+#endif
+#ifndef __MALLOC_HOOK_VOLATILE
+# define __MALLOC_HOOK_VOLATILE volatile
+#endif
+#ifndef HAVE_MALLOC_H
+extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
+extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void);
+extern void *(*__morecore) (ptrdiff_t);
#endif
/* If HYBRID_MALLOC is defined, then temacs will use malloc,