m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/m4/system_.h,v


From: Eric Blake
Subject: Changes to m4/m4/system_.h,v
Date: Wed, 25 Oct 2006 12:45:46 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/10/25 12:45:45

Index: m4/system_.h
===================================================================
RCS file: /sources/m4/m4/m4/system_.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- m4/system_.h        19 Oct 2006 13:38:46 -0000      1.17
+++ m4/system_.h        25 Oct 2006 12:45:45 -0000      1.18
@@ -42,6 +42,14 @@
 #include <gnu/xalloc.h>
 #include <gnu/xstrndup.h>
 
+/* glibc's obstack left out the ability to suspend and resume growth
+   of an object on the stack.  Reopen OBJECT (previously returned by
+   obstack_alloc or obstack_finish) with SIZE for additional growth,
+   freeing all objects that occur later in the stack.  */
+#define obstack_regrow(OBS, OBJECT, SIZE)               \
+  (obstack_free (OBS, (char *)(OBJECT) + SIZE),         \
+   (OBS)->object_base = (char *)(OBJECT))
+
 /* In addition to EXIT_SUCCESS and EXIT_FAILURE, m4 can fail with version
    mismatch when trying to load a frozen file produced by a newer m4 than
    the version doing the reload.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]