[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/19] sigpipe-die: use stdnoreturn.h
From: |
Paul Eggert |
Subject: |
[PATCH 15/19] sigpipe-die: use stdnoreturn.h |
Date: |
Sun, 10 Jul 2011 22:26:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 |
* lib/sigpipe-die.h: Include <stdnoreturn.h>.
(_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
* modules/sigpipe-die (Depends-on): Add stdnoreturn.
---
ChangeLog | 5 +++++
lib/sigpipe-die.h | 9 ++-------
modules/sigpipe-die | 1 +
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index aa37a49..9d45f7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-07-10 Paul Eggert <address@hidden>
+ 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.
diff --git a/lib/sigpipe-die.h b/lib/sigpipe-die.h
index 91565bc..c103099 100644
--- a/lib/sigpipe-die.h
+++ b/lib/sigpipe-die.h
@@ -41,21 +41,16 @@
#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. */
diff --git a/modules/sigpipe-die b/modules/sigpipe-die
index 7229665..90b477a 100644
--- a/modules/sigpipe-die
+++ b/modules/sigpipe-die
@@ -12,6 +12,7 @@ exitfail
sigpipe
sigprocmask
sigaction
+stdnoreturn
configure.ac:
--
1.7.4.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 15/19] sigpipe-die: use stdnoreturn.h,
Paul Eggert <=