From ca89d7e1fb0b694a372a7c9d85765a936912ceff Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 13 Apr 2011 21:52:44 +0200 Subject: getgroups.c: reorganize, include param.h instead of defining MIN Include only what is necessary. Mark __syscall_getgroups __always_inline. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/getgroups.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'libc/sysdeps/linux/common/getgroups.c') diff --git a/libc/sysdeps/linux/common/getgroups.c b/libc/sysdeps/linux/common/getgroups.c index ddc2caee4..87fecce24 100644 --- a/libc/sysdeps/linux/common/getgroups.c +++ b/libc/sysdeps/linux/common/getgroups.c @@ -8,10 +8,7 @@ */ #include -#include #include -#include - #if defined(__NR_getgroups32) # undef __NR_getgroups @@ -22,12 +19,14 @@ _syscall2(int, getgroups, int, size, gid_t *, list) _syscall2(int, getgroups, int, size, gid_t *, list) #else +# include +# include +# include +# include -#define MIN(a,b) (((a)<(b))?(a):(b)) - -#define __NR___syscall_getgroups __NR_getgroups -static __inline__ _syscall2(int, __syscall_getgroups, - int, size, __kernel_gid_t *, list) +# define __NR___syscall_getgroups __NR_getgroups +static __always_inline +_syscall2(int, __syscall_getgroups, int, size, __kernel_gid_t *, list) int getgroups(int size, gid_t groups[]) { @@ -56,5 +55,4 @@ ret_error: } } #endif - libc_hidden_def(getgroups) -- cgit v1.2.3