2011-07-12 Paul Eggert <eggert@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.
# 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);