geteuid.c 559 B

12345678910111213141516171819202122232425262728
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * geteuid() for uClibc
  4. *
  5. * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
  6. *
  7. * GNU Library General Public License (LGPL) version 2 or later.
  8. */
  9. #define getuid __getuid
  10. #include "syscalls.h"
  11. #include <unistd.h>
  12. #ifdef __NR_geteuid
  13. #define __NR___syscall_geteuid __NR_geteuid
  14. static inline _syscall0(int, __syscall_geteuid);
  15. uid_t attribute_hidden __geteuid(void)
  16. {
  17. return (__syscall_geteuid());
  18. }
  19. #else
  20. uid_t attribute_hidden __geteuid(void)
  21. {
  22. return (getuid());
  23. }
  24. #endif
  25. strong_alias(__geteuid,geteuid)