diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-05 23:01:03 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-08-05 23:01:03 +0000 |
commit | d86254a25acd878c97af400f8ad1309ac6e307b3 (patch) | |
tree | c15293059bff93c15975ced98e23d97c13307d7e /lib/xalloc.h | |
parent | 71ff7490f9162ef114c2b141b1a1305e6c20c439 (diff) | |
download | coreutils-d86254a25acd878c97af400f8ad1309ac6e307b3.tar.xz |
Sync from gnulib.
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_ */ |