(TARGET_FORMAT): Remove LynxOS COFF definition.
[deliverable/binutils-gdb.git] / gdb / gdb_obstack.h
index 0dcfc4ff7803ec50bb7da0a9ded031ac589a6e2a..253fd199b0d4e62a2d8f92e861801ee3d957f784 100644 (file)
 
 #include "obstack.h"
 
+/* Utility macros - wrap obstack alloc into something more robust.  */
+
+#define OBSTACK_ZALLOC(OBSTACK,TYPE) (memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE)))
+
+#define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) (memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), 0, (NUMBER) * sizeof (TYPE)))
+
 /* Unless explicitly specified, GDB obstacks always use xmalloc() and
    xfree().  */
 /* Note: ezannoni 2004-02-09: One could also specify the allocation
This page took 0.025631 seconds and 4 git commands to generate.