diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-04-13 21:52:44 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:36 +0200 |
commit | ca89d7e1fb0b694a372a7c9d85765a936912ceff (patch) | |
tree | 96cb0e963fa2ad2a34b3e8292611ad7e4542dcc6 /libc/sysdeps/linux/common | |
parent | 11430a8e3c521e2bd8a2d0821a60c3b0d554e6ff (diff) |
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 <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/getgroups.c | 16 |
1 files changed, 7 insertions, 9 deletions
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 <sys/syscall.h> -#include <stdlib.h> #include <unistd.h> -#include <grp.h> - #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 <errno.h> +# include <stdlib.h> +# include <sys/types.h> +# include <sys/param.h> -#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) |