From 6bddfff3ba873f16c5b9840c3ddf265408b9aef4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Jul 2011 01:09:30 -0700 Subject: [PATCH] openat: use stdnoreturn.h * lib/openat.h: Include . (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. * modules/openat (Depends-on): Add stdnoreturn. --- ChangeLog | 5 +++++ lib/openat.h | 11 +++-------- modules/openat | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ad494fd39..40c5990139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-12 Paul Eggert + openat: use stdnoreturn.h + * lib/openat.h: Include . + (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn. + * modules/openat (Depends-on): Add stdnoreturn. + * lib/openat-die.c (openat_save_fail): Modernize comment. * lib/xalloc-die.c (xalloc_die): Modernize comment. diff --git a/lib/openat.h b/lib/openat.h index 5cb186652f..d1e74331f1 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -26,12 +26,7 @@ #include #include #include - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -#endif +#include #if !HAVE_OPENAT @@ -47,8 +42,8 @@ bool openat_needs_fchdir (void); #endif -void openat_restore_fail (int) _GL_ATTRIBUTE_NORETURN; -void openat_save_fail (int) _GL_ATTRIBUTE_NORETURN; +noreturn void openat_restore_fail (int); +noreturn void openat_save_fail (int); /* Using these function names makes application code slightly more readable than it would be with diff --git a/modules/openat b/modules/openat index b9ce4d46ab..06a4c75aa0 100644 --- a/modules/openat +++ b/modules/openat @@ -32,6 +32,7 @@ openat-die rmdir [test $REPLACE_UNLINKAT = 1] save-cwd stdbool +stdnoreturn sys_stat unistd unlink [test $REPLACE_UNLINKAT = 1] -- 2.30.2