* lib/xmemdup0.h: Include <stdnoreturn.h>. (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. * modules/xmemdup0 (Depends-on): Add stdnoreturn. --- ChangeLog | 5 +++++ lib/xmemdup0.h | 9 ++------- modules/xmemdup0 | 1 + 3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 9d45f7c..832ca2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-10 Paul Eggert <egg...@cs.ucla.edu> + xmemdup0: use stdnoreturn.h + * lib/xmemdup0.h: Include <stdnoreturn.h>. + (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. + * modules/xmemdup0 (Depends-on): Add stdnoreturn. + sigpipe-die: use stdnoreturn.h * lib/sigpipe-die.h: Include <stdnoreturn.h>. (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. diff --git a/lib/xmemdup0.h b/lib/xmemdup0.h index 8a64e70..fe083b7 100644 --- a/lib/xmemdup0.h +++ b/lib/xmemdup0.h @@ -19,24 +19,19 @@ # define XMEMDUP_H_ # include <stddef.h> +# include <stdnoreturn.h> # ifdef __cplusplus extern "C" { # endif -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -# else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -# endif - /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly 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); char *xmemdup0 (void const *p, size_t s); diff --git a/modules/xmemdup0 b/modules/xmemdup0 index d7ea438..aa60a82 100644 --- a/modules/xmemdup0 +++ b/modules/xmemdup0 @@ -6,6 +6,7 @@ lib/xmemdup0.h lib/xmemdup0.c Depends-on: +stdnoreturn xalloc configure.ac: -- 1.7.4.4