From 6b73b09f931a0642e9615380374178ce0784e240 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 27 Feb 2021 17:59:00 -0800 Subject: Port better to non-GCC compilers Gnulib now defines _Noreturn for us on pre-C11 compilers, so use that instead of the less-portable __attribute__ ((noreturn)). * lib/system.h (__attribute__): Remove; no longer used. * paxlib/paxlib.h: Use _Noreturn instead of __attribute__ ((noreturn)). * paxtest/paxtest.c (dump): First arg is char *, not unsigned char *, to avoid type mismatch. --- lib/system.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/system.h b/lib/system.h index 6f36684..1bd5ba9 100644 --- a/lib/system.h +++ b/lib/system.h @@ -23,13 +23,6 @@ #include -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -# define __attribute__(spec) /* empty */ -# endif -#endif - #include #include @@ -483,7 +476,7 @@ sys_reset_uid_gid (void) struct passwd *pw; uid_t uid = getuid (); gid_t gid = getgid (); - + if ((pw = getpwuid (uid)) == NULL) { FATAL_ERROR ((0, errno, "%s(%lu)", "getpwuid", (unsigned long)uid)); -- cgit v1.2.1