From 96924181b7f9eb0c8b0585467fc3cb2da2766a4f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Jul 2011 01:10:04 -0700 Subject: [PATCH] sigpipe-die: use stdnoreturn.h * lib/sigpipe-die.h: Include . (_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 40c5990139..1ccafeb050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-12 Paul Eggert + sigpipe-die: use stdnoreturn.h + * lib/sigpipe-die.h: Include . + (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. + * modules/sigpipe-die (Depends-on): Add stdnoreturn. + openat: use stdnoreturn.h * lib/openat.h: Include . (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. diff --git a/lib/sigpipe-die.h b/lib/sigpipe-die.h index 91565bcf5e..c103099cd5 100644 --- a/lib/sigpipe-die.h +++ b/lib/sigpipe-die.h @@ -41,21 +41,16 @@ #ifndef _SIGPIPE_DIE_H #define _SIGPIPE_DIE_H +#include #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 722966568f..90b477a9e5 100644 --- a/modules/sigpipe-die +++ b/modules/sigpipe-die @@ -12,6 +12,7 @@ exitfail sigpipe sigprocmask sigaction +stdnoreturn configure.ac: -- 2.30.2