diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-10 05:43:11 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-10 05:43:11 +0000 |
commit | 1b26801391ff8981c211d55f462cf6a6294a8ed8 (patch) | |
tree | 1bc2cc7879ba9d87bfd40514aec4d3d93e231086 /lib/obstack.h | |
parent | 557ed575e8f209487e245851b6841ecc74970291 (diff) | |
download | coreutils-1b26801391ff8981c211d55f462cf6a6294a8ed8.tar.xz |
Sync with gnulib.
Diffstat (limited to 'lib/obstack.h')
-rw-r--r-- | lib/obstack.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/obstack.h b/lib/obstack.h index d46b0544a..46a1cb781 100644 --- a/lib/obstack.h +++ b/lib/obstack.h @@ -287,7 +287,10 @@ __extension__ \ # define obstack_empty_p(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ - (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + (__o->chunk->prev == 0 \ + && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \ + __o->chunk->contents, \ + __o->alignment_mask)); }) # define obstack_grow(OBSTACK,where,length) \ __extension__ \ @@ -411,7 +414,10 @@ __extension__ \ (unsigned) ((h)->chunk_limit - (h)->next_free) # define obstack_empty_p(h) \ - ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + ((h)->chunk->prev == 0 \ + && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \ + (h)->chunk->contents, \ + (h)->alignment_mask)) /* Note that the call to _obstack_newchunk is enclosed in (..., 0) so that we can avoid having void expressions |