License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "obstack.h"
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
#include <stddef.h>
+#include <stdint.h>
/* Determine default alignment. */
union fooround
{
- unsigned i;
+ uintmax_t i;
long double d;
void *p;
};
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
} while (0)
-\f
+
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
Objects start on multiples of ALIGNMENT (0 means use default).
CHUNKFUN is the function to use to allocate chunks,
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk)
(*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN((char *) chunk, chunk->contents,
+ h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
alignment - 1);
h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size;
}
return lp != 0;
}
-\f
+
/* Free objects in obstack H, including OBJ and everything allocate
more recently than OBJ. If OBJ is zero, free everything in H. */