* malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this var.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 May 2004 04:51:32 +0000 (04:51 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 May 2004 04:51:32 +0000 (04:51 +0000)
lib/ChangeLog
lib/obstack.c

index 65dcb92..a894cc1 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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  <eggert@cs.ucla.edu>
 
        * obstack.c (_obstack): Remove unused variable.  It hasn't been
index 65e23e9..52946d2 100644 (file)
@@ -102,6 +102,13 @@ int obstack_exit_failure = EXIT_FAILURE;
 #  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.