geteuid.c 549 B

123456789101112131415161718192021222324252627282930
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * geteuid() 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(geteuid)
  12. #ifdef __NR_geteuid
  13. #define __NR___syscall_geteuid __NR_geteuid
  14. static inline _syscall0(int, __syscall_geteuid);
  15. uid_t geteuid(void)
  16. {
  17. return (__syscall_geteuid());
  18. }
  19. #else
  20. libc_hidden_proto(getuid)
  21. uid_t geteuid(void)
  22. {
  23. return (getuid());
  24. }
  25. #endif
  26. libc_hidden_def(geteuid)