# HG changeset patch # User Paul Eggert # Date 1085115092 0 # Node ID d525afe1916c9abdf9bde2ec232585d34f058901 # Parent 57d23334289f9c558d2eebef29e3cb7a97cf1465 * malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this var. diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2004-05-20 Paul Eggert + + * malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this + var. Add comment explaining why libc still defines it. This + merges the following patch from glibc: + http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html + 2004-05-19 Paul Eggert * obstack.c (_obstack): Remove unused variable. It hasn't been diff --git a/lib/obstack.c b/lib/obstack.c --- a/lib/obstack.c +++ b/lib/obstack.c @@ -102,6 +102,13 @@ # define obstack_exit_failure exit_failure # endif +# ifdef _LIBC +/* A looong time ago (before 1994, anyway; we're not sure) this global variable + was used by non-GNU-C macros to avoid multiple evaluation. The GNU C + library still exports it because somebody might use it. */ +struct obstack *_obstack; +# endif + /* Define a macro that either calls functions with the traditional malloc/free calling interface, or calls functions with the mmalloc/mfree interface (that adds an extra first argument), based on the state of use_extra_arg.