xmemdup0: use stdnoreturn.h
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:10:31 +0000 (01:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Jul 2011 08:10:31 +0000 (01:10 -0700)
* lib/xmemdup0.h: Include <stdnoreturn.h>.
(_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
* modules/xmemdup0 (Depends-on): Add stdnoreturn.

ChangeLog
lib/xmemdup0.h
modules/xmemdup0

index 1ccafeb0504c8bf2cf33b2ea408bef6233b54dba..d8bbfd38512a4a3da2be35ed886f79dd5d173a2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
index 8a64e7071880251991a4559377980ec1fbe0e1f9..fe083b7bd6e779c70076870ec3a79ad4f54acb9a 100644 (file)
 # 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);
 
index d7ea438d7fb7c08da3a79cd8e87d741af0b0e44d..aa60a82f399a9af187818e6c1d594e2b96a41817 100644 (file)
@@ -6,6 +6,7 @@ lib/xmemdup0.h
 lib/xmemdup0.c
 
 Depends-on:
+stdnoreturn
 xalloc
 
 configure.ac: