From 3800a9e7d7906a46433c33eb8694b93b1c78bc6f Mon Sep 17 00:00:00 2001
From: Christopher Faylor <me@cgf.cx>
Date: Sun, 9 Sep 2001 20:00:29 +0000
Subject: [PATCH] * heap.h (inheap): Rewrite macro to accomodate removal of brk
 macros below.

---
 winsup/cygwin/ChangeLog | 5 +++++
 winsup/cygwin/heap.h    | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 73085b0a9..22ae6003b 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Sun Sep  9 15:59:53 2001  Christopher Faylor <cgf@cygnus.com>
+
+	* heap.h (inheap): Rewrite macro to accomodate removal of brk macros
+	below.
+
 Sun Sep  9 15:02:44 2001  Christopher Faylor <cgf@cygnus.com>
 
 	* cygheap.cc (cygheap_fixup_in_child): Clear cygheap->base so that heap
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/heap.h
index 96046cbb9..ce16e1333 100644
--- a/winsup/cygwin/heap.h
+++ b/winsup/cygwin/heap.h
@@ -14,4 +14,6 @@ details. */
 void heap_init ();
 void malloc_init ();
 
-#define inheap(s) (brk && ((char *) (s) >= (char *) brkbase) && ((char *) (s) <= (char *) brktop))
+#define inheap(s) \
+  (cygheap->heapptr && ((char *) (s) >= (char *) cygheap->heapbase) \
+   && ((char *) (s) <= (char *) cygheap->heaptop))