diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-06-18 10:27:16 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-06-18 10:27:16 +0000 |
commit | f5c678d53931b77cf302409288beffc2c95b025d (patch) | |
tree | 50a86cc736751dbb079794965bf0875928748d3b /libc/sysdeps/linux/common | |
parent | 5b14ccee8539f346cec001b1dcdb7f061965d3af (diff) |
Eliminate all the pointless globals from getcwd(). Default
to using the getcwd syscall instead, when it is present.
-Erik
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/syscalls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c index 5d826927e..542ec1b96 100644 --- a/libc/sysdeps/linux/common/syscalls.c +++ b/libc/sysdeps/linux/common/syscalls.c @@ -1613,7 +1613,13 @@ _syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group); #endif //#define __NR_getcwd 183 -// See unistd/getcwd.c -- we don't use this syscall, even when it is available... +#ifdef L_getcwd +# ifdef __NR_getcwd + _syscall2(int, getcwd, char *, buf, unsigned long, size); +# else +// See unistd/getcwd.c if this syscall is not available... +# endif +#endif //#define __NR_capget 184 #ifdef L_capget |