summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-02-27 17:59:00 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-02-27 17:59:27 -0800
commit6b73b09f931a0642e9615380374178ce0784e240 (patch)
treeeb3591071797afc0c44ad32db725b9299098beec /lib
parenta3b0c7b919c1faf5d8797d1c26fd632823b7e54e (diff)
downloadpaxutils-6b73b09f931a0642e9615380374178ce0784e240.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/system.h9
1 files changed, 1 insertions, 8 deletions
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 <alloca.h>
-#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 <sys/types.h>
#include <ctype.h>
@@ -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));