diff options
Diffstat (limited to 'lib/xalloc.h')
-rw-r--r-- | lib/xalloc.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h index 4b6585811..5985892c9 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -1,7 +1,7 @@ /* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2003 Free Software Foundation, Inc. + 1999, 2000, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,12 @@ # include <stddef.h> + +# ifdef __cplusplus +extern "C" { +# endif + + # ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ # define __attribute__(x) @@ -32,6 +38,7 @@ # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # endif + /* If this pointer is non-zero, run the specified function upon each allocation failure. It is initialized to zero. */ extern void (*xalloc_fail_func) (void); @@ -84,4 +91,10 @@ char *xstrdup (const char *str); # define XREALLOC(p, type, n) xnrealloc (p, n, sizeof (type)) # define XFREE(p) free (p) + +# ifdef __cplusplus +} +# endif + + #endif /* !XALLOC_H_ */ |