X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fobstack.c;h=25cb9abba31c3845c44682ef176c1678dce32462;hb=6dc8b58f2a657faf8c1dd2e9438faab2a016c034;hp=8ce49ad8cca18c41a4e6ea235316e93223bf2a82;hpb=d2cffec544f98047457b91ba5ec62c26975885d5;p=gnulib.git diff --git a/lib/obstack.c b/lib/obstack.c index 8ce49ad8c..25cb9abba 100644 --- a/lib/obstack.c +++ b/lib/obstack.c @@ -24,6 +24,7 @@ #ifdef _LIBC # include +# include #else # include "obstack.h" #endif @@ -59,10 +60,17 @@ #ifndef ELIDE_CODE +# if HAVE_INTTYPES_H +# include +# endif +# if HAVE_STDINT_H || defined _LIBC +# include +# endif + /* Determine default alignment. */ union fooround { - long int i; + uintmax_t i; long double d; void *p; }; @@ -103,10 +111,13 @@ int obstack_exit_failure = EXIT_FAILURE; # endif # ifdef _LIBC +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) /* 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; +struct obstack *_obstack_compat; +compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); +# endif # endif /* Define a macro that either calls functions with the traditional malloc/free