about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c2
-rw-r--r--malloc/obstack.c4
-rw-r--r--malloc/obstack.h3
3 files changed, 7 insertions, 2 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 3e843541eb..8b99da9f28 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3232,7 +3232,7 @@ heap_trim(heap, pad) heap_info *heap; size_t pad;
     assert(p->size == (0|PREV_INUSE)); /* must be fencepost */
     p = prev_chunk(p);
     new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ);
-    assert(new_size>0 && new_size<(long)2*MINSIZE);
+    assert(new_size>0 && new_size<(long int)(2*MINSIZE));
     if(!prev_inuse(p))
       new_size += p->prev_size;
     assert(new_size>0 && new_size<HEAP_MAX_SIZE);
diff --git a/malloc/obstack.c b/malloc/obstack.c
index cc4147836e..e059b5a7d0 100644
--- a/malloc/obstack.c
+++ b/malloc/obstack.c
@@ -24,7 +24,7 @@
 /* NOTE BEFORE MODIFYING THIS FILE: This version number must be
    incremented whenever callers compiled using an old obstack.h can no
    longer properly call the functions in this obstack.c.  */
-#define OBSTACK_INTERFACE_VERSION 2
+#define OBSTACK_INTERFACE_VERSION 1
 
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself, and the installed library
@@ -171,6 +171,7 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
   chunk->prev = 0;
   /* The initial chunk now contains no empty object.  */
   h->maybe_empty_object = 0;
+  h->alloc_failed = 0;
   return 1;
 }
 
@@ -220,6 +221,7 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
   chunk->prev = 0;
   /* The initial chunk now contains no empty object.  */
   h->maybe_empty_object = 0;
+  h->alloc_failed = 0;
   return 1;
 }
 
diff --git a/malloc/obstack.h b/malloc/obstack.h
index 152fbbc655..2802888763 100644
--- a/malloc/obstack.h
+++ b/malloc/obstack.h
@@ -183,6 +183,9 @@ struct obstack		/* control current object in current chunk */
 				   chunk contains a zero-length object.  This
 				   prevents freeing the chunk if we allocate
 				   a bigger chunk to replace it. */
+  unsigned alloc_failed:1;	/* No longer used, as we now call the failed
+				   handler on error, but retained for binary
+				   compatibility.  */
 };
 
 /* Declare the external functions we use; they are in obstack.c.  */