2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
+ 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.
+
xstrtol: use stdnoreturn.h
* lib/xstrtol.h: Include <stdnoreturn.h>.
(_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
# define XALLOC_H_
# include <stddef.h>
+# include <stdnoreturn.h>
# include "xalloc-oversized.h"
# 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
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));