getegid.c 678 B

1234567891011121314151617181920212223242526272829303132333435
  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 <sys/syscall.h>
  10. #include <unistd.h>
  11. libc_hidden_proto(getegid)
  12. #if defined(__NR_getegid32)
  13. # undef __NR_getegid
  14. # define __NR_getegid __NR_getegid32
  15. _syscall0(gid_t, getegid)
  16. #elif defined(__NR_getegid)
  17. # define __NR___syscall_getegid __NR_getegid
  18. static __inline__ _syscall0(int, __syscall_getegid);
  19. gid_t getegid(void)
  20. {
  21. return (__syscall_getegid());
  22. }
  23. #else
  24. libc_hidden_proto(getgid)
  25. gid_t getegid(void)
  26. {
  27. return (getgid());
  28. }
  29. #endif
  30. libc_hidden_def(getegid)