diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-12 01:11:41 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-12 01:11:41 -0700 |
commit | a046525c54d375ff2b3d9d0f8c78f5c779ce4f99 (patch) | |
tree | 5119c9b304e39de5f0634b2261dc1f8b58a772f3 /lib/xalloc.h | |
parent | b067a2ba8fa66bf01717a4e8561c4db858055069 (diff) | |
download | gnulib-a046525c54d375ff2b3d9d0f8c78f5c779ce4f99.tar.gz |
xalloc: use stdnoreturn.h
* lib/xalloc.h: Include <stdnoreturn.h>.
(_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
* modules/xalloc (Depends-on): Add stdnoreturn.
Diffstat (limited to 'lib/xalloc.h')
-rw-r--r-- | lib/xalloc.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h index c1bbe7e5b6..7dbcc79bb3 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -19,6 +19,7 @@ # define XALLOC_H_ # include <stddef.h> +# include <stdnoreturn.h> # include "xalloc-oversized.h" @@ -27,12 +28,6 @@ extern "C" { # endif -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -# else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -# endif - # if __GNUC__ >= 3 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else @@ -50,7 +45,7 @@ extern "C" { or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ -extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN; +extern noreturn void xalloc_die (void); void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); |