diff options
Diffstat (limited to 'xmalloc.h')
-rw-r--r-- | xmalloc.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -17,8 +17,12 @@ extern "C" { #define XMALLOCTYPE char #endif +#if !defined __GNUC__ || __GNUC__ < 2 +# define __attribute__(xyz) /* Ignore. */ +#endif + /** Allocate \a n characters of memory, abort program on failure. */ -XMALLOCTYPE *xmalloc(size_t n); +XMALLOCTYPE *xmalloc(size_t n) __attribute__((malloc)); /** Reallocate \a n characters of memory, abort program on failure. */ XMALLOCTYPE *xrealloc(/*@null@*/ void *, size_t n); |