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

ChangeLog
lib/sigpipe-die.h
modules/sigpipe-die

index 40c5990..1ccafeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
+       sigpipe-die: use stdnoreturn.h
+       * lib/sigpipe-die.h: Include <stdnoreturn.h>.
+       (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
+       * modules/sigpipe-die (Depends-on): Add stdnoreturn.
+
        openat: use stdnoreturn.h
        * lib/openat.h: Include <stdnoreturn.h>.
        (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
index 91565bc..c103099 100644 (file)
 #ifndef _SIGPIPE_DIE_H
 #define _SIGPIPE_DIE_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
-
 /* Emit an error message indicating a SIGPIPE signal, and terminate the
    process with an error code.  */
-extern void sigpipe_die (void) _GL_ATTRIBUTE_NORETURN;
+extern noreturn void sigpipe_die (void);
 
 /* Install a SIGPIPE handler that invokes PREPARE_DIE and then emits an
    error message and exits.  PREPARE_DIE may be NULL, meaning a no-op.  */
index 7229665..90b477a 100644 (file)
@@ -12,6 +12,7 @@ exitfail
 sigpipe
 sigprocmask
 sigaction
+stdnoreturn
 
 configure.ac: