From d86254a25acd878c97af400f8ad1309ac6e307b3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 5 Aug 2004 23:01:03 +0000 Subject: Sync from gnulib. --- lib/xalloc.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/xalloc.h') 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 + +# 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_ */ -- cgit v1.2.3-54-g00ecf