From f5c678d53931b77cf302409288beffc2c95b025d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 18 Jun 2002 10:27:16 +0000 Subject: Eliminate all the pointless globals from getcwd(). Default to using the getcwd syscall instead, when it is present. -Erik --- libc/sysdeps/linux/common/syscalls.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common') 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 -- cgit v1.2.3