getegid.c 549 B

123456789101112131415161718192021222324252627282930
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * getegid() for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include "syscalls.h"
  10. #include <unistd.h>
  11. libc_hidden_proto(getegid)
  12. #ifdef __NR_getegid
  13. #define __NR___syscall_getegid __NR_getegid
  14. static inline _syscall0(int, __syscall_getegid);
  15. gid_t getegid(void)
  16. {
  17. return (__syscall_getegid());
  18. }
  19. #else
  20. libc_hidden_proto(getgid)
  21. gid_t getegid(void)
  22. {
  23. return (getgid());
  24. }
  25. #endif
  26. libc_hidden_def(getegid)