* lib/openat.h: Include <stdnoreturn.h>. (_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 fff4c98..aa37a49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-10 Paul Eggert <egg...@cs.ucla.edu> + openat: use stdnoreturn.h + * lib/openat.h: Include <stdnoreturn.h>. + (_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 5cb1866..d1e7433 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -26,12 +26,7 @@ #include <dirent.h> #include <unistd.h> #include <stdbool.h> - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -#endif +#include <stdnoreturn.h> #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 b9ce4d4..06a4c75 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] -- 1.7.4.4